Skip to main content

Corresponding states utilities from Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler

Project description

Sandlercorrespondingstates

Corresponding states utilities from Sandler's 5th ed.

Sandlercorrespondingstates implements a python interface to a corresponding states calculations using charts from Chemical, Biochemical, and Engineering Thermodynamics (5th edition) by Stan Sandler (Wiley, USA). It should be used for educational purposes only.

Installation

Sandlercorrespondingstates is available via pip:

pip install sandlercorrespondingstates

Usage

Command-line

$ sandlercorrespondingstates state -n methane -P 7.5 -T 400 
T                      =   400 kelvin
P                      =   7.5 megapascal
v                      =  0.000434569 meter ** 3 / mole
u                      =  216.113 joule / mole
h                      =  3475.38 joule / mole
s                      = -25.7768 joule / kelvin / mole
Pv                     =  3259.27 joule / mole
Tc                     =  190.4 kelvin
Pc                     =    4.6 megapascal
Tr                     =  2.10084 dimensionless
Pr                     =  1.63043 dimensionless
Z                      =   0.98 dimensionless
h_departure            = -438.148 joule / mole
s_departure            = -1.12968 joule / kelvin / mole
neg_h_dep_over_Tc_read =   0.55 calorie / kelvin / mole
neg_s_dep_read         =   0.27 calorie / kelvin / mole
$ sandlercorrespondingstates delta -n methane -T1 400 -P1 1 -T2 500 -P2 2 --show-states
State-change calculations for methane using Corresponding states equation of state:

State 1:                                                     State 2:
T                      =   400 kelvin                        T                      =   500 kelvin
P                      =     1 megapascal                    P                      =     2 megapascal
v                      =  0.00332579 meter ** 3 / mole       v                      =  0.00207862 meter ** 3 / mole
u                      =  587.746 joule / mole               u                      =  4150.18 joule / mole
h                      =  3913.53 joule / mole               h                      =  8307.41 joule / mole
s                      = -7.97796 joule / kelvin / mole      s                      = -4.04963 joule / kelvin / mole
Pv                     =  3325.79 joule / mole               Pv                     =  4157.23 joule / mole
Tc                     =  190.4 kelvin                       Tc                     =  190.4 kelvin
Pc                     =    4.6 megapascal                   Pc                     =    4.6 megapascal
Tr                     =  2.10084 dimensionless              Tr                     =  2.62605 dimensionless
Pr                     =  0.217391 dimensionless             Pr                     =  0.434783 dimensionless
Z                      =      1 dimensionless                Z                      =      1 dimensionless
h_departure            =     -0 joule / mole                 h_departure            = -15.9327 joule / mole
s_departure            = -0.08368 joule / kelvin / mole      s_departure            = -0.2092 joule / kelvin / mole
neg_h_dep_over_Tc_read =      0 calorie / kelvin / mole      neg_h_dep_over_Tc_read =   0.02 calorie / kelvin / mole
neg_s_dep_read         =   0.02 calorie / kelvin / mole      neg_s_dep_read         =   0.05 calorie / kelvin / mole

Property changes:
ΔT  =    100 kelvin
ΔP  =      1 megapascal
Δh  =  4393.88 joule / mole
Δs  =  3.92832 joule / kelvin / mole
Δu  =  3562.43 joule / mole
Δv  = -0.00124717 meter ** 3 / mole
ΔPv =  831.446 joule / mole
ΔZ  =      0 dimensionless

API

>>> from sandlercorrespondingstates import CSSstate
>>> state = CSState(T=400, P=0.5).set_compound('methane')
>>> print(result.report(additional_vars=['Tc', 'Pc', 'Tr', 'Pr', 'Z', 'h_departure', 's_departure', 'neg_h_dep_over_Tc_read', 'neg_s_dep_read']))
T                      =   400 kelvin
P                      =   0.5 megapascal
v                      =  0.00665157 meter ** 3 / mole
u                      =  595.712 joule / mole
h                      =  3921.5 joule / mole
s                      = -2.08929 joule / kelvin / mole
Pv                     =  3325.79 joule / mole
Tc                     =  190.4 kelvin
Pc                     =    4.6 megapascal
Tr                     =  2.10084 dimensionless
Pr                     =  0.108696 dimensionless
Z                      =      1 dimensionless
h_departure            =  7.96634 joule / mole
s_departure            =  0.04184 joule / kelvin / mole
neg_h_dep_over_Tc_read =  -0.01 calorie / kelvin / mole
neg_s_dep_read         =  -0.01 calorie / kelvin / mole

Release History

  • 0.5.0
    • pint integration
  • 0.4.1
    • help updated
  • 0.3.0
    • delta subcommand added
  • 0.2.0
    • StateReporter used
  • 0.1.2
    • fixed messaging errors
  • 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

  1. Fork it (https://github.com/cameronabrams/sandlercorrespondingstates/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. 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

sandlercorrespondingstates-0.5.0.tar.gz (153.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sandlercorrespondingstates-0.5.0-py3-none-any.whl (157.0 kB view details)

Uploaded Python 3

File details

Details for the file sandlercorrespondingstates-0.5.0.tar.gz.

File metadata

File hashes

Hashes for sandlercorrespondingstates-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0362be270c1e73ca8dabe28a3cb8e0e73365a660d630c68575f33156de32b6af
MD5 efaaa12c98a8a5a8b4cc9ef855939755
BLAKE2b-256 effef59a7214168eae4786e48a98b7fbc5f573fa8a8331edd0f26c50335597dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for sandlercorrespondingstates-0.5.0.tar.gz:

Publisher: release.yaml on cameronabrams/sandlercorrespondingstates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sandlercorrespondingstates-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sandlercorrespondingstates-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34c86332a997c3d05ddac3db8edc34120a83793d71d2f94423170fbac5975cbe
MD5 c2356b1a4ba2e3c5d7596362920c6ef8
BLAKE2b-256 6850b77a55c235466c0ec2b112ae41868ff3d6c01a2e7577b4df42d988f2d25b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sandlercorrespondingstates-0.5.0-py3-none-any.whl:

Publisher: release.yaml on cameronabrams/sandlercorrespondingstates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page