Miscellaneous utilities from Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler
Project description
Sandlermisc
Miscellaneous utilities from Sandler's 5th ed.
Sandlermisc implements a python interface to a few miscellaneous utilities from Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler (Wiley, USA). It should be used for educational purposes only.
Current utilities:
GasConstant-- a unit-specific implementation of the universal gas constantThermals-- ideal-gas calculations of ΔH and ΔS
Installation
Sandlermisc is available via pip:
pip install sandlermisc
Usage
API
GasConstant() expects two optional argurments: the pressure units (default Pascal, or "pa") and the volume units (default cubic meter, or "m3"). It returns an object that can be used like a float.
>>> from sandlermisc.gas_constant import GasConstant
R = GasConstant() # J/mol-K
>>> print(R)
8.31446 (pa-m3)/(mol-K)
>>> print(float(R))
8.31446261815324
R_pv = GasConstant("bar", "m3") # bar-m3/mol-K
>>> print(R_pv)
8.31446e-05 (bar-m3)/(mol-K)
>>> print(float(R_pv))
8.31446261815324e-05
>>> R_pv = GasConstant("atm", "l")
>>> print(R_pv)
0.0820574 (atm-l)/(mol-K)
>>> print(float(R_pv))
0.08205736608095968
DeltaH_IG requires the temperature of state 1, the temperature of state 2, and an ideal-gas heat-capacity argument, which can be a scalar, four-element list of floats, or four-element dict with keys a, b, c, and d.
>>> from sandlermisc.thermals import DeltaH_IG
>>> DeltaH_IG(100, 200, 10)
1000.0
>>> DeltaH_IG(500, 600, [10., 0.01, 0.00002, 0.000000032])
2693.466666666667
>>> DeltaH_IG(500, 600, dict(a=10., b=0.01, c=0.00002, d=0.000000032))
2693.466666666667
DeltaS_IG requires the temperature and pressure of state 1, the temperature and pressure of state 2, the ideal-gas heat-capacity argument, and a GasConstant instance.
>>> from sandlermisc.thermals import DeltaS_IG
>>> DeltaS_IG(500, 10, 600, 12, 10)
0.30730979949270765
One can optionally provide a value for the gas constant R to match units of one's Cp, if necessary. By default, sandlermisc assumes Cp has energy units of J.
Release History
- 0.3.1
- bugfix:
unpackCpignoredints -- now fixed
- bugfix:
- 0.3.0
StateReporterimplemented
- 0.1.1
- bug in converting Cp
- 0.1.0
- Initial release
Meta
Cameron F. Abrams – cfa22@drexel.edu
Distributed under the MIT license. See LICENSE for more information.
https://github.com/cameronabrams
Contributing
- Fork it (https://github.com/cameronabrams/sandlermisc/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sandlermisc-0.3.1.tar.gz.
File metadata
- Download URL: sandlermisc-0.3.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c643f22522fd713ade6b33fb35d9474f3e8ea5d79005cc8351e0b660b2f87454
|
|
| MD5 |
d7a6647b524fdbbc6ee4141b29b2fb27
|
|
| BLAKE2b-256 |
f1568fe4601be7119ae3391f2776f889101c7022c7de5fb26639e36ce99e3cc3
|
Provenance
The following attestation bundles were made for sandlermisc-0.3.1.tar.gz:
Publisher:
release.yaml on cameronabrams/sandlermisc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandlermisc-0.3.1.tar.gz -
Subject digest:
c643f22522fd713ade6b33fb35d9474f3e8ea5d79005cc8351e0b660b2f87454 - Sigstore transparency entry: 798571913
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlermisc@48e08839a4c08d71284062789b55e4a85a51a825 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@48e08839a4c08d71284062789b55e4a85a51a825 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sandlermisc-0.3.1-py3-none-any.whl.
File metadata
- Download URL: sandlermisc-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c73ce9981bcba9e2404ce2823e418a5acc8654309efb07226d60dc4c9b1d211
|
|
| MD5 |
ae6b9fee25720a6ce4a674a1088e27b1
|
|
| BLAKE2b-256 |
9d881545b98deb9bb2523249276fed05bb119007596a0e214914dd4e79a4c754
|
Provenance
The following attestation bundles were made for sandlermisc-0.3.1-py3-none-any.whl:
Publisher:
release.yaml on cameronabrams/sandlermisc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandlermisc-0.3.1-py3-none-any.whl -
Subject digest:
9c73ce9981bcba9e2404ce2823e418a5acc8654309efb07226d60dc4c9b1d211 - Sigstore transparency entry: 798571914
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlermisc@48e08839a4c08d71284062789b55e4a85a51a825 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@48e08839a4c08d71284062789b55e4a85a51a825 -
Trigger Event:
push
-
Statement type: