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:
ThermodynamicState: An abstract class for handling thermodynamic states for pure componentsureg: a pint unit registryR: the universal gas constant as a pint QuantityDeltaH_IGandDeltaS_IG: Ideal-gas delta-h and delta-s calculations
Installation
Sandlermisc is available via pip:
pip install sandlermisc
Usage
API
ThermodynamicState is an abstract class that manages state-variable attributes:
T-- temperatureP-- pressurev-- molar volume or specific volumeh-- molar ethalpy or specific enthapyu-- molar internal energy or specific internal energys-- molar entropy or specific entropyx-- vapor fraction for a saturated state
A subclass of ThermodynamicState must define the method resolve() to compute state variables from input state variables. Any instance of such a subclass will automatically compute all state variables once enough inputs are specified.
DeltaH_IG requires the temperature of state 1 (assumed in K if units not specified), 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 import DeltaH_IG
>>> DeltaH_IG(100, 200, 10)
<Quantity(1000.0, 'joule / mole')>
>>> DeltaH_IG(500, 600, [10., 0.01, 0.00002, 0.000000032])
<Quantity(2693.46667, 'joule / mole')>
>>> DeltaH_IG(500, 600, dict(a=10., b=0.01, c=0.00002, d=0.000000032))
<Quantity(2693.46667, 'joule / mole')>
DeltaS_IG requires the temperature and pressure of state 1, the temperature and pressure of state 2, the ideal-gas heat-capacity argument.
>>> from sandlermisc import DeltaS_IG
>>> DeltaS_IG(500, 10, 600, 12, 10)
<Quantity(0.307309799, 'joule / mole / kelvin')>
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.4.1
- pint incorporation
- Full smart-resolution of ThermodynamicState
- 0.3.2
- bugfix:
unpackCpignoredints -- now fixed - bugfix:
unpackCpignorednp.ndarray-- 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.4.2.tar.gz.
File metadata
- Download URL: sandlermisc-0.4.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eaea4fcf27dd32b6935724583443d1170af4b5acd1ac809698930c9b6858bc0
|
|
| MD5 |
1de294d1bce12423772cd7282e3a37fe
|
|
| BLAKE2b-256 |
ef69b1765c36714a4ecf64918700e11fee32dd436146f287b4818b487f67261b
|
Provenance
The following attestation bundles were made for sandlermisc-0.4.2.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.4.2.tar.gz -
Subject digest:
7eaea4fcf27dd32b6935724583443d1170af4b5acd1ac809698930c9b6858bc0 - Sigstore transparency entry: 913500558
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlermisc@befb1e1a7b9b30bafcca24e7b638f97e0e554467 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@befb1e1a7b9b30bafcca24e7b638f97e0e554467 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sandlermisc-0.4.2-py3-none-any.whl.
File metadata
- Download URL: sandlermisc-0.4.2-py3-none-any.whl
- Upload date:
- Size: 10.8 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 |
e4051e8f2f9d92d2c491aaa9332ee681e8b5f0ed386502ec7159f03664508b87
|
|
| MD5 |
d291053e6287fa704e7c9457960f8a91
|
|
| BLAKE2b-256 |
b43d8154ef4c7900c3e19e23e0559825577dd460eda36f7a54a9cb25b8663f80
|
Provenance
The following attestation bundles were made for sandlermisc-0.4.2-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.4.2-py3-none-any.whl -
Subject digest:
e4051e8f2f9d92d2c491aaa9332ee681e8b5f0ed386502ec7159f03664508b87 - Sigstore transparency entry: 913500608
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlermisc@befb1e1a7b9b30bafcca24e7b638f97e0e554467 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@befb1e1a7b9b30bafcca24e7b638f97e0e554467 -
Trigger Event:
push
-
Statement type: