Cubic equations of state from Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler
Project description
Sandlercubics
Digitized cubic equations of state from Sandler's 5th ed.
Sandlercubics implements a python interface to the cubic equations of state found in Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler (Wiley, USA). It should be used for educational purposes only.
Currently only the generalized vdW and generalized Peng-Robison equations for pure substances are implemented.
Installation
sandlercubics is available via pip:
pip install sandlercubics
Usage
Command-line interface
A volumetric calculation example on methane using Peng-Robinson:
$ sandlercubics state -T 400 -P 0.5 -eos pr -n methane
EOS = pr
T = 400.00 K
P = 0.50 MPa
Z = 1.00
v = 0.006628 m3/mol
Hdep = -54.75 J/mol
Sdep = -0.11 J/mol-K
Tc = 190.40 K
Pc = 4.60 MPa
omega = 0.011
State calculation example:
$ sandlercubics delta -T1 350 -P1 7.5 -T2 400 -P2 15.5 -n methane -eos pr --show-states
State 1:
EOS = pr
T = 350.00 K
P = 7.50 MPa
Z = 0.93
v = 0.000359 m3/mol
Hdep = -989.93 J/mol
Sdep = -2.13 J/mol-K
State 2:
EOS = pr
T = 400.00 K
P = 15.50 MPa
Z = 0.95
v = 0.000204 m3/mol
Hdep = -1412.32 J/mol
Sdep = -2.86 J/mol-K
Property differences:
Delta H = 2416.63 J/mol
Delta S = 0.02 J/mol-K
Delta U = 2883.75 J/mol
Constants used for calculations:
Tc = 190.40 K
Pc = 4.60 MPa
omega = 0.011
CpA = 19.25 J/mol-K
CpB = 5.213e-02 J/mol-K^2
CpC = 1.197e-05 J/mol-K^3
CpD = -1.132e-08 J/mol-K^4
API
Below we create a PengRobinsonEOS object to reproduce the first calculation:
>>> from sandlercubics.eos import PengRobsinsonEOS
>>> from sandlerprops.properties import PropertiesDatabase
>>> db = ProperitesDatabase()
>>> m = db.get_compound('methane')
>>> s1 = PengRobinsonEOS(Tc=m.Tc, Pc=m.Pc/10, omega=m.Omega)
>>> s1.T = 400
>>> s1.P = 0.5
>>> s1.v.item() # it is a np float
0.0066279171348771915
Release History
- 0.5.0
- Output of two-phase saturated states allowed
- 0.4.0
- Heat and entropy of vaporization properties added
- 0.3.0
- Soave-Redlich-Kwong equation implemented
- 0.2.1
- redefined
CubicEOSabstract class
- redefined
- 0.2.0
- uses
StateReporter deltasubcommand implemented
- uses
- 0.1.1
- fixed erroneous thank-you message
- 0.1.0
- Initial version, implements vdw and PengRobinson
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/sandlercubics/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
Release history Release notifications | RSS feed
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 sandlercubics-0.5.1.tar.gz.
File metadata
- Download URL: sandlercubics-0.5.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
911f0524ad05ab9a96dbe128f2dffca38d26c7375be409526de6950b39f571c1
|
|
| MD5 |
9be83ad2961705221fa0cf9a015c00db
|
|
| BLAKE2b-256 |
1121865207a3b99b73fe2ac6e27e0c9f1cda14fa9056462104e5a8d9978d353a
|
Provenance
The following attestation bundles were made for sandlercubics-0.5.1.tar.gz:
Publisher:
release.yaml on cameronabrams/sandlercubics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandlercubics-0.5.1.tar.gz -
Subject digest:
911f0524ad05ab9a96dbe128f2dffca38d26c7375be409526de6950b39f571c1 - Sigstore transparency entry: 805498341
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlercubics@51b11e95720453c85c887b9b6719a09df2e593fe -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@51b11e95720453c85c887b9b6719a09df2e593fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file sandlercubics-0.5.1-py3-none-any.whl.
File metadata
- Download URL: sandlercubics-0.5.1-py3-none-any.whl
- Upload date:
- Size: 9.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 |
d91bbada4dbcc4e3b190d99d277fe1225c8133e830a0649c77877070ace68357
|
|
| MD5 |
920931cbd12a549ffb65b98af1c7deba
|
|
| BLAKE2b-256 |
668c3384ed3327eee7ae51dd72d3b7c24a0b00822000939f8bf6101617edff69
|
Provenance
The following attestation bundles were made for sandlercubics-0.5.1-py3-none-any.whl:
Publisher:
release.yaml on cameronabrams/sandlercubics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandlercubics-0.5.1-py3-none-any.whl -
Subject digest:
d91bbada4dbcc4e3b190d99d277fe1225c8133e830a0649c77877070ace68357 - Sigstore transparency entry: 805498362
- Sigstore integration time:
-
Permalink:
cameronabrams/sandlercubics@51b11e95720453c85c887b9b6719a09df2e593fe -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@51b11e95720453c85c887b9b6719a09df2e593fe -
Trigger Event:
push
-
Statement type: