Thermo Readthedocs Io en Release
Thermo Readthedocs Io en Release
Release 0.2.24
Caleb Bell
i
3.2.7 Property Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.8 Property Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2.9 Using Tabular Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.3 Mixture Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7 API Reference 51
7.1 Activity Coefficients (thermo.activity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.1.1 Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.1.2 Ideal Liquid Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.1.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.2 Bulk Phases (thermo.bulk) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.2.1 Bulk Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.2.2 Bulk Settings Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
7.3 Legacy Chemicals (thermo.chemical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
7.4 Chemical Constants and Correlations (thermo.chemical_package) . . . . . . . . . . . . . . . . . . . 115
7.4.1 Chemical Constants Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
7.4.2 Chemical Correlations Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
7.4.3 Sample Constants and Correlations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
7.5 Creating Property Datasheets (thermo.datasheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
7.6 Electrochemistry (thermo.electrochem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
7.6.1 Aqueous Electrolyte Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
7.6.2 Aqueous Electrolyte Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
7.6.3 Aqueous Electrolyte Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
7.6.4 Aqueous Electrolyte Thermal Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . 138
7.6.5 Aqueous Electrolyte Electrical Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.6.6 Pure Liquid Electrical Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
7.6.7 Water Dissociation Equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
7.6.8 Balancing Ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
7.6.9 Fit Coefficients and Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
7.7 Cubic Equations of State (thermo.eos) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
7.7.1 Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
7.7.2 Standard Peng-Robinson Family EOSs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
7.7.3 Volume Translated Peng-Robinson Family EOSs . . . . . . . . . . . . . . . . . . . . . . . 223
ii
7.7.4 Soave-Redlich-Kwong Family EOSs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
7.7.5 Van der Waals Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
7.7.6 Redlich-Kwong Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
7.7.7 Ideal Gas Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
7.7.8 Lists of Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.7.9 Demonstrations of Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.8 Cubic Equations of State for Mixtures (thermo.eos_mix) . . . . . . . . . . . . . . . . . . . . . . . . 256
7.8.1 Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
7.8.2 Peng-Robinson Family EOSs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
7.8.3 SRK Family EOSs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
7.8.4 Cubic Equation of State with Activity Coefficients . . . . . . . . . . . . . . . . . . . . . . . 342
7.8.5 Van der Waals Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
7.8.6 Redlich-Kwong Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
7.8.7 Ideal Gas Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
7.8.8 Different Mixing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
7.8.9 Lists of Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
7.9 Cubic Equations of State Utilities (thermo.eos_mix_methods) . . . . . . . . . . . . . . . . . . . . . 357
7.9.1 Alpha Function Mixing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
7.10 Cubic Equations of State Volume Solvers (thermo.eos_volume) . . . . . . . . . . . . . . . . . . . . 362
7.10.1 Analytical Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
7.10.2 Numerical Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
7.10.3 Higher-Precision Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
7.11 Cubic Equation of State Alpha Functions (thermo.eos_alpha_functions) . . . . . . . . . . . . . . . . 375
7.11.1 Vectorized Alpha Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
7.11.2 Vectorized Alpha Functions With Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . 378
7.11.3 Class With Alpha Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
7.11.4 Pure Alpha Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
7.12 Equilibrium State (thermo.equilibrium) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
7.12.1 EquilibriumState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
7.13 Flash Calculations (thermo.flash) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
7.13.1 Main Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
7.13.2 Specific Flash Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
7.14 Functional Group Identification (thermo.functional_groups) . . . . . . . . . . . . . . . . . . . . . . 572
7.14.1 Specific molecule matching functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
7.14.2 Hydrocarbon Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
7.14.3 Oxygen Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
7.14.4 Nitrogen Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
7.14.5 Sulfur Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
7.14.6 Silicon Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
7.14.7 Boron Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
7.14.8 Phosphorus Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
7.14.9 Halogen Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
7.14.10 Organometalic Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
7.14.11 Other Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
7.14.12 Utility functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
7.14.13 Functions using group identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
7.15 Heat Capacity (thermo.heat_capacity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
7.15.1 Pure Liquid Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
7.15.2 Pure Gas Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
7.15.3 Pure Solid Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
7.15.4 Mixture Liquid Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
7.15.5 Mixture Gas Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
7.15.6 Mixture Solid Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
7.16 Interfacial/Surface Tension (thermo.interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
iii
7.16.1 Pure Liquid Surface Tension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
7.16.2 Mixture Liquid Heat Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
7.17 Interaction Parameters (thermo.interaction_parameters) . . . . . . . . . . . . . . . . . . . . . . . . 623
7.18 Legal and Economic Chemical Data (thermo.law) . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
7.19 NRTL Gibbs Excess Model (thermo.nrtl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
7.19.1 NRTL Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
7.19.2 NRTL Functional Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
7.19.3 NRTL Regression Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
7.20 Legacy Mixtures (thermo.mixture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
7.21 Permittivity/Dielectric Constant (thermo.permittivity) . . . . . . . . . . . . . . . . . . . . . . . . . 680
7.21.1 Pure Liquid Permittivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
7.22 Phase Models (thermo.phases) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
7.22.1 Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
7.22.2 Ideal Gas Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
7.22.3 Cubic Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
7.22.4 Virial Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
7.22.5 Activity Based Liquids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
7.22.6 Fundamental Equations of State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
7.22.7 CoolProp Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
7.23 Phase Change Properties (thermo.phase_change) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
7.23.1 Enthalpy of Vaporization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
7.23.2 Enthalpy of Sublimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
7.24 Legacy Property Packages (thermo.property_package) . . . . . . . . . . . . . . . . . . . . . . . . . 895
7.25 Phase Identification (thermo.phase_identification) . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
7.25.1 Phase Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
7.25.2 Sorting Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
7.26 Regular Solution Gibbs Excess Model (thermo.regular_solution) . . . . . . . . . . . . . . . . . . . . 907
7.26.1 Regular Solution Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907
7.26.2 Regular Solution Regression Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
7.27 Streams (thermo.stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
7.28 Thermal Conductivity (thermo.thermal_conductivity) . . . . . . . . . . . . . . . . . . . . . . . . . 981
7.28.1 Pure Liquid Thermal Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
7.28.2 Pure Gas Thermal Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
7.28.3 Mixture Liquid Thermal Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 990
7.28.4 Mixture Gas Thermal Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 992
7.29 UNIFAC Gibbs Excess Model (thermo.unifac) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
7.29.1 Main Model (Object-Oriented) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
7.29.2 Main Model (Functional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
7.29.3 Misc Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1021
7.29.4 Data for Original UNIFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024
7.29.5 Data for Dortmund UNIFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
7.29.6 Data for NIST UNIFAC (2015) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026
7.29.7 Data for NIST KT UNIFAC (2011) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1028
7.29.8 Data for UNIFAC LLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1029
7.29.9 Data for Lyngby UNIFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1029
7.29.10 Data for PSRK UNIFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030
7.29.11 Data for VTPR UNIFAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031
7.30 Support for pint Quantities (thermo.units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031
7.31 Utilities and Base Classes (thermo.utils) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
7.31.1 Temperature Dependent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
7.31.2 Temperature and Pressure Dependent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
7.31.3 Temperature, Pressure, and Composition Dependent . . . . . . . . . . . . . . . . . . . . . . 1055
7.32 Vapor Pressure and Sublimation Pressure (thermo.vapor_pressure) . . . . . . . . . . . . . . . . . . . 1062
7.32.1 Vapor Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1062
iv
7.32.2 Sublimation Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065
7.33 Viscosity (thermo.viscosity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1067
7.33.1 Pure Liquid Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1067
7.33.2 Pure Gas Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071
7.33.3 Mixture Liquid Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075
7.33.4 Mixture Gas Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077
7.34 Density/Volume (thermo.volume) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079
7.34.1 Pure Liquid Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079
7.34.2 Pure Gas Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083
7.34.3 Pure Solid Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087
7.34.4 Mixture Liquid Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1088
7.34.5 Mixture Gas Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1090
7.34.6 Mixture Solid Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1092
7.35 Wilson Gibbs Excess Model (thermo.wilson) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
7.35.1 Wilson Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
7.35.2 Wilson Functional Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1103
7.35.3 Wilson Regression Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1104
7.36 UNIQUAC Gibbs Excess Model (thermo.uniquac) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105
7.36.1 UNIQUAC Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105
7.36.2 UNIQUAC Functional Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114
7.37 Joback Group Contribution Method (thermo.group_contribution.joback) . . . . . . . . . . . . . . . 1115
7.38 Fedors Group Contribution Method (thermo.group_contribution.fedors) . . . . . . . . . . . . . . . . 1126
7.39 Wilson-Jasperson Group Contribution Method (thermo.group_contribution.wilson_jasperson) . . . . 1127
v
8.17.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1177
8.18 Problem 14.10 Leakage Rate Change in Vacuum Distillation When Lowering the Column Pressure . 1177
8.18.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1178
8.19 Problem 14.11 Pressure Rise In a Storage Tank Upon Heating . . . . . . . . . . . . . . . . . . . . . 1179
8.19.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1179
8.20 Problem 14.12 Work and Temperature Change Upon Adiabatic Compression of Oxygen . . . . . . . 1180
8.20.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1180
8.21 Problem 14.13 Thermodynamic Cycle Calculation Using a High-Precision EOS . . . . . . . . . . . 1181
8.21.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1182
8.22 Problem 14.14 Refrigeration Cycle Calculation Using the Peng-Robinson EOS . . . . . . . . . . . . 1183
8.22.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1183
8.23 Problem 14.15 Joule-Thomson Coefficient for Methane Using the Peng-Robinson EOS . . . . . . . . 1184
8.23.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1184
8.24 Problem 14.16 Compressor Duty and State Properties after Ammonia Compression . . . . . . . . . . 1185
8.24.1 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185
9 Installation 1187
13 Citation 1195
Bibliography 1199
Index 1215
vi
thermo Documentation, Release 0.2.24
Contents:
CONTENTS 1
thermo Documentation, Release 0.2.24
2 CONTENTS
CHAPTER
ONE
Cubic equations of state provide thermodynamically-consistent and relatively fast models for pure chemicals and mix-
tures. They are normally used to represent gases and liquids.
The generic three-parameter form is as follows:
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 2 + 𝛿𝑉 + 𝜖
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
The other slow parts which applies to both types are calculating some basic properties (the list is at
set_properties_from_solution) that other properties may depend on, and calculating the molar volume given
a pair of (T, P) inputs (an entire submodule thermo.eos_volume discusses and implements this topic). Both of those
calculations are constant-time, so their overhead is the same for pure components and multicomponent mixtures.
3
thermo Documentation, Release 0.2.24
We can use the GCEOS (short for “General Cubic Equation Of State”) interface with any component or implemented
equation of state, but for simplicity n-hexane is used with the Peng-Robinson EOS. Its critical temperature is 507.6 K,
critical pressure 3.025 MPa, and acentric factor is 0.2975.
The state must be specified along with the critical constants when initializing a GCEOS object; we use 400 K and 1e6
Pa here:
The __repr__ string is designed to show all the inputs to the object.
We can check the volume solutions with the raw_volumes attribute:
>>> eos.raw_volumes
(0.0001560731847856, 0.002141876816741, 0.000919295474982)
At this point there are three real volume, so there is a liquid-like and a vapor-like solution available. The phase attribute
will have the value of ‘l/g’ in this state; otherwise it will be ‘l’ or ‘g’.
>>> eos.phase
'l/g'
The basic properties calculated at initialization are directly attributes, and can be accessed as such. Liquid-like prop-
erties have “_l” at the end of their name, and “_g” is at the end of gas-like properties.
>>> eos.H_dep_l
-26111.877
>>> eos.S_dep_g
-6.4394518
>>> eos.dP_dT_l
288501.633
All calculations in thermo.eos and thermo.eos_mix are on a molar basis; molecular weight is never provided or
needed. All outputs are in base SI units (K, Pa, m^3, mole, etc). This simplified development substantially. For working
with mass-based units, use the Phase interface. The thermo.eos and thermo.eos_mix interfaces were developed
prior to the Phase interface and does have some features not exposed in the Phase interface however.
Other properties are either implemented as methods that require arguments, or Python properties which act just like
attributes but calculate the results on the fly. For example, the liquid-phase fugacity fugacity_l or the gas isobaric
(constant-pressure) expansion coefficient are properties.
>>> eos.fugacity_l
421597.00785
>>> eos.beta_g
0.0101232239
There are an awful lot of these properties, because many of them are derivatives subject to similar conditions. A full
list is in the documentation for GCEOS. There are fewer calls that take temperature, such as Hvap which calculates the
heat of vaporization of the object at a specified temperature:
>>> eos.Hvap(300)
31086.2
Once an object has been created, it can be used to instantiate new GCEOS objects at different conditions, without re-
specifying the critical constants and other parameters that may be needed.
As was seen in the examples above, any two of T, P, V can be used to specify the state of the object. The input variables
of the object are stored and can be checked with state_specs :
>>> eos.state_specs
{'T': 400.0, 'P': 1000000.0}
The individual parts of the generic cubic equation are stored as well. We can use them to check that the pressure
equation is satisfied:
Note that as floating points are not perfectly precise, some small error may be shown but great care has been taken to
minimize this.
The value of the gas constant used is 8.31446261815324 J/(mol*K). This is near the full precision of floating point
numbers, but not quite. It is now an exact value used as a “definition” in the SI system. Note that other implementa-
tions of equations of state may not use the full value of the gas constant, but the author strongly recommends anyone
considering writing their own EOS implementation use the full gas constant. This will allow more interchangeable
results.
Continuing with the same state and example as before, there were two solutions available from the equation of state.
However, unless the exact temperature 400 K and pressure 1 MPa happens to be on the saturation line, there is always
one more thermodynamically stable state. We need to use the departure Gibbs free energy to determine which state is
more stable. For a pure component, the state which minimizes departure Gibbs free energy is the most stable state.
It is easy to see the liquid phase is more stable. This shortcut of using departure Gibbs free energy is valid only for
pure components with all phases using the ideal-gas reference state. The full criterial is whichever state minimizes the
actual Gibbs free energy.
The method more_stable_phase does this check and returns either ‘l’ or ‘g’:
>>> eos.more_stable_phase
'l'
For a pure component, there is a vapor-liquid equilibrium line right up to the critical point which defines the vapor
pressure of the fluid. This can be calculated using the Psat method:
>>> eos.Psat(400.0)
466205.073739
The result is accurate to more than 10 digits, and is implemented using some fancy mathematical techniques that allow
a direct calculation of the vapor pressure. A few more digits can be obtained by setting polish to True, which polishes
the result with a newton solver to as much accuracy as a floating point number can provide:
A few more methods of interest are V_l_sat and V_g_sat which calculate the saturation liquid and molar volumes;
Tsat which calculates the saturation temperature given a specified pressure, and phi_sat which computes the satu-
ration fugacity coefficient given a temperature.
>>> eos.V_l_sat(298.15), eos.V_g_sat(500)
(0.0001303559, 0.0006827569)
>>> eos.Tsat(101325.0)
341.76265
>>> eos.phi_sat(425.0)
0.8349716
Using mixture from thermo.eos_mix is first illustrated using an equimolar mixture of nitrogen-methane at 115 K and
1 MPa and the Peng-Robinson equation of state:
All of the properties available in GCEOS are also available for GCEOSMIX objects.
New GCEOSMIX objects can be created with the to method, which accepts new mole fractions zs as well as new state
variables. If a new composition zs is not provided, the current composition is also used for the new object.
>>> eos.to(T=300.0, P=1e5)
PRMIX(Tcs=[126.1, 190.6], Pcs=[3394000.0, 4604000.0], omegas=[0.04, 0.011], kijs=[[0.0,␣
˓→0.0289], [0.0289, 0.0]], zs=[0.5, 0.5], T=300.0, P=100000.0)
>>> eos.to(T=300.0, P=1e5, zs=[.1, .9])
PRMIX(Tcs=[126.1, 190.6], Pcs=[3394000.0, 4604000.0], omegas=[0.04, 0.011], kijs=[[0.0,␣
˓→0.0289], [0.0289, 0.0]], zs=[0.1, 0.9], T=300.0, P=100000.0)
>>> eos.to(V=1, P=1e5, zs=[.4, .6])
PRMIX(Tcs=[126.1, 190.6], Pcs=[3394000.0, 4604000.0], omegas=[0.04, 0.011], kijs=[[0.0,␣
˓→0.0289], [0.0289, 0.0]], zs=[0.4, 0.6], P=100000.0, V=1) (continues on next page)
It is possible to create new GCEOSMIX objects with the subset method which uses only some of the initially specified
components:
>>> kijs = [[0.0, 0.00076, 0.00171], [0.00076, 0.0, 0.00061], [0.00171, 0.00061, 0.0]]
>>> PR3 = PRMIX(Tcs=[469.7, 507.4, 540.3], zs=[0.8168, 0.1501, 0.0331], omegas=[0.249, 0.
˓→305, 0.349], Pcs=[3.369E6, 3.012E6, 2.736E6], T=322.29, P=101325.0, kijs=kijs)
>>> PR3.subset([1,2])
PRMIX(Tcs=[507.4, 540.3], Pcs=[3012000.0, 2736000.0], omegas=[0.305, 0.349], kijs=[[0.0,␣
˓→0.00061], [0.00061, 0.0]], zs=[0.8193231441048, 0.1806768558951], T=322.29, P=101325.0)
>>> PR3.pures()
[PR(Tc=469.7, Pc=3369000.0, omega=0.249, T=322.29, P=101325.0), PR(Tc=507.4, Pc=3012000.
˓→0, omega=0.305, T=322.29, P=101325.0), PR(Tc=540.3, Pc=2736000.0, omega=0.349, T=322.
˓→29, P=101325.0)]
Temperature, pressure, mole number, and mole fraction derivatives of the log fugacity coefficients are available as well
with the methods dlnphis_dT, dlnphis_dP, dlnphis_dns, and dlnphis_dzs:
>>> PR3.dlnphis_dT('l')
[0.029486952019, 0.03514175794, 0.040281845273]
>>> PR3.dlnphis_dP('l')
[-9.8253779e-06, -9.8189093031e-06, -9.8122598e-06]
>>> PR3.dlnphis_dns(PR3.Z_l)
[[-0.0010590517, 0.004153228837, 0.007300114797], [0.0041532288, -0.016918292791, -0.
˓→0257680231], [0.0073001147, -0.02576802316, -0.0632916462]]
>>> PR3.dlnphis_dzs(PR3.Z_l)
[[0.0099380692, 0.0151503498, 0.0182972357], [-0.038517738, -0.059589260, -0.068438990],␣
˓→[-0.070571069, -0.103639207, -0.141162830]]
1.4.1 Hashing
It is possible to compare the two objects with each other to see if they have the same kijs, model parameters, and
components by using the model_hash method:
It is possible to see if both the exact state and the model match between two different objects by using the state_hash
method:
And finally it is possible to see if two objects are exactly identical, including cached calculation results, by using the
__hash__ method:
1.4.2 Serialization
All cubic EOS models offer a as_json method and a from_json to serialize the object state for transport over a
network, storing to disk, and passing data between processes.
Other json libraries can be used besides the standard json library by design.
Storing and recreating objects with Python’s pickle.dumps library is also tested; this can be faster than using JSON
at the cost of being binary data.
Unlike pure components, it is not straightforward to determine what the equilibrium state is for mixtures. Different
algorithms are used such as sequential substitution and Gibbs minimization. All of those require initial guesses, which
usually come from simpler thermodynamic models. While in practice it is possible to determine the equilibrium com-
position to an N-phase problem, in theory a global optimization algorithm must be used.
More details on this topic can be found in the thermo.flash module.
TWO
• Object Structure
• UNIFAC Example
• Notes on Performance
• Other features
• Activity Coefficient Identities
• References
Vapor-liquid and liquid-liquid equilibria systems can have all sorts of different behavior. Raoult’s law can describe only
temperature and pressure dependence, so a correction factor that adds dependence on composition called the “activity
coefficient” is often used. This is a separate approach to using an equation of state, but because direct vapor pressure
correlations are used with the activity coefficients, a higher-accuracy result can be obtained for phase equilibria.
While these models are often called “activity coefficient models”, they are in fact actually a prediction for excess Gibbs
energy. The activity coefficients that are used for phase equilibria are derived from the partial mole number derivative
of excess Gibbs energy according to the following expression:
(︃ 𝜕𝑛 𝐺𝐸 )︃
𝑖
𝜕𝑛𝑖
𝛾𝑖 = exp
𝑅𝑇
11
thermo Documentation, Release 0.2.24
𝑛
∑︁ ⎛ 𝑛 ⎞
∑︁
𝑥𝑗 𝜏𝑗𝑖 𝐺𝑗𝑖 𝑥𝑚 𝜏𝑚𝑗 𝐺𝑚𝑗
𝑛 ⎜ ⎟
𝑗=1 ∑︁ 𝑥𝑗 𝐺𝑖𝑗 ⎜⎜𝜏𝑖𝑗 − 𝑚=1
⎟
ln(𝛾𝑖 ) = 𝑛 + 𝑛 ⎜ 𝑛
⎟
⎟
∑︁ ∑︁ ∑︁
𝑗=1
𝑥𝑘 𝐺𝑘𝑖 𝑥𝑘 𝐺𝑘𝑗 𝑥𝑘 𝐺𝑘𝑗
⎝ ⎠
𝑘=1 𝑘=1 𝑘=1
The models NRTL, Wilson, and UNIQUAC are the most commonly used. Each of them is regression-based - all coeffi-
cients must be found in the literature or regressed yourself. Each of these models has extensive temperature dependence
parameters in addition to the composition dependence. The temperature dependencies implemented should allow pa-
rameters from most other sources to be used here with them.
The model RegularSolution is based on the concept of a solubility parameter; with liquid molar volumes
and solubility parameters it is a predictive model. It does not show temperature dependence. Additional regression
coefficients can be used with that model also.
The UNIFAC model is a predictive group-contribution scheme. In it, each molecule is fragmented into different sections.
These sections have interaction parameters with other sections. Usually the fragmentation is not done by hand. One
online tool for doing this is the DDBST Online Group Assignment Tool.
The GibbsExcess object doesn’t know anything about phase equilibria, vapor pressure, or flash routines; it is limited in
scope to dealing with excess Gibbs energy. Because of that modularity, an initialized GibbsExcess object is designed
to be passed in an argument to a cubic equations of state that use excess Gibbs energy such as PSRK.
The other place these objects are used are in GibbsExcessLiquid objects, which brings the pieces together to con-
struct a thermodynamically (mostly) consistent phase that the flash algorithms can work with.
This modularity allows new Gibbs excess models to be written and used anywhere - so the PSRK model will happily
allow a UNIFAC object configured like VTPR.
The UNIFAC model is a group contribution based predictive model that is works using “fragmentations” of each
molecule into a number of different “groups” and their “counts”,
The DDBST has published numerous sample problems using UNIFAC; a simple binary system from example P05.22a
in2 with n-hexane and butanone-2 is shown below:
The solution given by the DDBST has the activity coefficient values [1.428, 1.365], which match those calculated by
the UNIFAC object:
>>> GE.gammas()
[1.4276025835, 1.3646545010]
Many other properties are also implemented, a few of which are shown below:
2 Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process Simulation. John Wiley & Sons,
2019.
Note that the UFIP and UFSG variables contain the actual interaction parameters; none are hardcoded with the class,
so the class could be used for regression. The version parameter controls which variant of UNIFAC to use, as there
are quite a few. The different UNIFAC models implemented include original UNIFAC, Dortmund UNIFAC, PSRK,
VTPR, Lyngby/Larsen, and UNIFAC KT. Interaction parameters for all models are included as well, but the version
argument is not connected to the data files.
For convenience, a number of molecule fragmentations are distributed with the UNIFAC code. All fragmentations were
obtained through the DDBST online portal, where molecular structure files can be submitted. This has the advantage
that what is submitted is unambiguous; there are no worries about CAS numbers like how graphite and diamond have a
different CAS number while being the same element or Air having a CAS number despite being a mixture. Accordingly,
The index in these distributed data files are InChI keys, which can be obtained from chemicals.identifiers or in
various places online.
Please note that the identifying integer in these {group: count} elements are not necessarily the same in different
UNIFAC versions, making them a royal pain.
Initializing the object for the first time is a not a high performance operation as certain checks need to be done and
data structures set up. Some pieces of the equations of the Gibbs excess model may depend only on temperature or
composition, instead of depending on both. Each model implements the method to_T_xs which should be used to
create a new object at the new temperature and/or composition. The design of the object is to lazy-calculate properties,
and to be immutable: calculations at new temperatures and compositions are done in a new object.
Note also that the __repr__ string for each model is designed to allow lossless reconstruction of the model. This is
very useful when building test cases.
˓→ 476.4], [26.76, 26.76, 0.0]], [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]],␣
˓→[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]), version=0)
When working with small numbers of components (5 or under), PyPy offers the best performance and using the model
with Python lists as inputs is the fastest way to perform the calculations even in CPython.
If working with many components or if Numpy arrays are desired as inputs and outputs, numpy arrays can be provided
as inputs. This will have a negative impact on performance unless the numba interface is used:
The numba interface will speed code up and allow calculations with dozens of components. The numba interface
requires all inputs to be numpy arrays and all of its outputs are also numba arrays.
As an example of the performance benefits, a 200-component UNIFAC gamma calculation takes 10.6 ms in CPython
and 318 µs when accelerated by Numba. In this case PyPy takes at 664 µs.
When the same benchmark is performed with 10 components, the calculation takes 387 µs in CPython, 88.6 µs with
numba, and 36.2 µs with PyPy.
It can be quite important to use the to_T_xs method re-use parts of the calculation; for UNIFAC, several terms depends
only on temperature. If the 200 component calculation is repeated with those already calculated, the timings are 3.26
ms in CPython, 127 µs with numba, and 125 µs with PyPy.
The limiting infinite-dilution activity coefficients can be obtained with a call to gammas_infinite_dilution
>>> GE.gammas_infinite_dilution()
[3.5659995166, 4.32849696]
All activity coefficient models offer a as_json method and a from_json to serialize the object state for transport over
a network, storing to disk, and passing data between processes.
Other json libraries can be used besides the standard json library by design.
Storing and recreating objects with Python’s pickle.dumps library is also tested; this can be faster than using JSON
at the cost of being binary data.
All models have a __hash__ method that can be used to compare different models to see if they are absolutely identical
(including which values have been calculated already).
They also have a model_hash method that can be used to compare different models to see if they have identical model
parameters.
They also have a state_hash method that can be used to compare different models to see if they have identical
temperature, composition, and model parameters.
A set of useful equations are as follows. For more information, the reader is directed to1 ,? ,3 ,4 , and5 ; no one source
contains all this information.
𝜕𝑔 𝐸
ℎ𝐸 = −𝑇 + 𝑔𝐸
𝜕𝑇
𝜕ℎ𝐸 𝜕 2 𝑔𝐸
= −𝑇
𝜕𝑇 𝜕𝑇 2
𝜕ℎ𝐸 𝜕 2 𝑔𝐸 𝜕𝑔 𝐸
= −𝑇 +
𝜕𝑥𝑖 𝜕𝑇 𝜕𝑥𝑖 𝜕𝑥𝑖
ℎ𝐸 − 𝑔 𝐸
𝑠𝐸 =
𝑇
𝜕𝑠𝐸 −𝜕𝑔 𝐸 𝜕ℎ𝐸
(︂ )︂
1 (𝐺 + 𝐻)
= + −
𝜕𝑇 𝑇 𝜕𝑇 𝜕𝑇 𝑇
𝜕𝑆 𝐸 1 𝜕ℎ𝐸 𝜕𝑔 𝐸
(︂ )︂
= −
𝜕𝑥𝑖 𝑇 𝜕𝑥𝑖 𝜕𝑥𝑖
⎛ 2 𝐸 ⎞
𝜕 𝐺
𝜕𝛾𝑖 𝜕𝑥 𝜕𝑥
= 𝛾𝑖 ⎝ 𝑖 𝑗 ⎠
𝜕𝑛𝑖 𝑅𝑇
𝜕𝑛𝑖 𝐺𝐸 𝐸
(︃ 𝜕 2 𝑛𝐺𝐸 )︃ (︃ 𝜕𝑛 )︃
𝑖𝐺
𝜕𝛾𝑖 𝜕𝑇 𝜕𝑛𝑖 𝜕𝑛𝑖 𝜕𝑛𝑖
= − exp
𝜕𝑇 𝑅𝑇 𝑅𝑇 2 𝑅𝑇
1 Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill
Professional, 2000.
3 Nevers, Noel de. Physical and Chemical Equilibrium for Chemical Engineers. 2nd edition. Wiley, 2012.
4 Elliott, J., and Carl Lira. Introductory Chemical Engineering Thermodynamics. 2nd edition. Upper Saddle River, NJ: Prentice Hall, 2012.
5 Walas, Dr Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
2.6 References
THREE
17
thermo Documentation, Release 0.2.24
For every chemical property, there are lots and lots of methods. The methods can be grouped by which phase they
apply to, although some methods are valid for both liquids and gases.
Properties calculations be separated into three categories:
• Properties of chemicals that depend on temperature. Some properties have weak dependence on pressure, like
surface tension, and others have no dependence on pressure like vapor pressure by definition.
• Properties of chemicals that depend on temperature and pressure. Some properties have weak dependence on
pressure like thermal conductivity, while other properties depend on pressure fundamentally, like gas volume.
• Properties of mixtures, that depend on temperature and pressure and composition. Some properties like gas
mixture heat capacity require the pressure as an input but do not use it.
These properties are implemented in an object oriented way, with the actual functional algorithms themselves having
been separated out into the chemicals library. The goal of these objects is to make it easy to experiment with different
methods.
The base classes for the three respective types of properties are:
• TDependentProperty
• TPDependentProperty
• MixtureProperty
The specific classes for the three respective types of properties are:
• HeatCapacityGas, HeatCapacityLiquid, HeatCapacitySolid, VolumeSolid, VaporPressure,
SublimationPressure, EnthalpyVaporization, EnthalpySublimation, Permittivity,
SurfaceTension.
• VolumeGas, VolumeLiquid, ViscosityGas, ViscosityLiquid, ThermalConductivityGas,
ThermalConductivityLiquid
• HeatCapacityGasMixture, HeatCapacityLiquidMixture, HeatCapacitySolidMixture,
VolumeGasMixture, VolumeLiquidMixture, VolumeSolidMixture, ViscosityLiquidMixture,
ViscosityGasMixture, ThermalConductivityLiquidMixture, ThermalConductivityGasMixture,
SurfaceTensionMixture
The following examples introduce how to use some of the methods of the TDependentProperty objects. The API
documentation for TDependentProperty as well as each specific property such as VaporPressure should be con-
sulted for full details.
All arguments and information the property object requires must be provided in the constructor of the object. If a piece
of information is not provided, whichever methods require it will not be available for that object.
Various data files will be searched to see if information such as Antoine coefficients is available for the compound
during the initialization. This behavior can be avoided by setting the optional load_data argument to False. Loading
data requires pandas, uses more RAM, and is a once-per-process procedure that takes 20-1000 ms per property. For
some applications it may be advantageous to provide your own data instead of using the provided data files.
As many methods may be available, a single method is always selected automatically during initialization. This method
can be inspected with the method property; if no methods are available, method will be None. method is also a valid
parameter when constructing the object, but if the method specified is not available an exception will be raised.
>>> ethanol_psat.all_methods
{'ANTOINE_POLING', 'EDALAT', 'WAGNER_POLING', 'SANJARI', 'COOLPROP', 'LEE_KESLER_PSAT',
˓→'DIPPR_PERRY_8E', 'VDI_PPDS', 'WAGNER_MCGARRY', 'VDI_TABULAR', 'AMBROSE_WALTON',
˓→'BOILING_CRITICAL'}
Calculation of the property at a specific temperature is as easy as calling the object which triggers the __call__
method:
>>> ethanol_psat(300.0)
8753.8160
>>> ethanol_psat.T_dependent_property(300.0)
8753.8160
The caching of __call__ is quite basic - the previously specified temperature is stored, and if the new T is the same
as the previous T the previously calculated result is returned.
There is a lower-level interface for calculating properties with a specified method by name, calculate.
T_dependent_property is a wrapper around calculate that includes validation of the result.
Each correlation is associated with temperature limits. These can be inspected as part of the T_limits attribute which
is loaded on creation of the property object.
>>> ethanol_psat.T_limits
{'WAGNER_MCGARRY': (293.0, 513.92), 'WAGNER_POLING': (159.05, 513.92), 'ANTOINE_POLING':␣
˓→(276.5, 369.54), 'DIPPR_PERRY_8E': (159.05, 514.0), 'COOLPROP': (159.1, 514.71), 'VDI_
Because there is often a need to obtain a property outside the range of the correlation, there are some extrapolation
methods available; depending on the method these may be enabled by default. The full list of extrapolation methods
can be see here.
For vapor pressure, there are actually two separate extrapolation techniques used, one for the low-pressure and ther-
modynamically reasonable region and another for extrapolating even past the critical point. This can be useful for
obtaining initial estimates of phase equilibrium.
The low-pressure region uses log(𝑃𝑠𝑎𝑡 ) = 𝐴 − 𝐵/𝑇 , where the coefficients A and B are calculated from
the low-temperature limit and its temperature derivative. The default high-temperature extrapolation is 𝑃𝑠𝑎𝑡 =
exp (𝐴 + 𝐵/𝑇 + 𝐶 log(𝑇 )). The coefficients are also determined from the high-temperature limits and its first two
temperature derivatives.
When extrapolation is turned on, it is used automatically if a property is requested out of range:
The default extrapolation methods may be changed in the future, but can be manually specified also by changing the
value of the extrapolation attribute. For example, if the linear extrapolation method is set, extrapolation will be
linear instead of using those fit equations. Because not all properties are suitable for linear extrapolation, some methods
have a default transform to make the property behave as linearly as possible. This is also used in tabular interpolation:
The low-temperature linearly extrapolated value is actually the same as before, because it performs a 1/T transform and
a log(P) transform on the output, which results in the fit being the same as the default equation for vapor pressure.
To better understand what methods are available, the valid_methods method checks all available correlations against
their temperature limits.
>>> ethanol_psat.valid_methods(100)
['AMBROSE_WALTON', 'LEE_KESLER_PSAT', 'EDALAT', 'BOILING_CRITICAL', 'SANJARI']
If the temperature is not provided, all available methods are returned; the returned value favors the methods by the
ranking defined in thermo, with the currently selected method as the first item.
>>> ethanol_psat.valid_methods()
['WAGNER_MCGARRY', 'WAGNER_POLING', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'COOLPROP', 'ANTOINE_
˓→POLING', 'VDI_TABULAR', 'AMBROSE_WALTON', 'LEE_KESLER_PSAT', 'EDALAT', 'BOILING_
˓→CRITICAL', 'SANJARI']
3.1.5 Plotting
It is also possible to compare the correlations graphically with the method plot_T_dependent_property.
>>> ethanol_psat.plot_T_dependent_property(Tmin=300)
106
ANTOINE_POLING
Vapor pressure, Pa
AMBROSE_WALTON
WAGNER_MCGARRY
VDI_PPDS
SANJARI
105 DIPPR_PERRY_8E
BOILING_CRITICAL
EDALAT
LEE_KESLER_PSAT
VDI_TABULAR
104 WAGNER_POLING
ANTOINE_WEBBOOK
300 350 400 450 500
Temperature, K
By default all methods are shown in the plot, but a smaller selection of methods can be specified. The following example
compares 30 points in the temperature range 400 K to 500 K, with three of the best methods.
It is also possible to plot the nth derivative of the methods with the order parameter. The following plot shows the first
derivative of vapor pressure of three estimation methods, a tabular source being interpolated, and ‘DIPPR_PERRY_8E’
as a reference method.
Plots show how the extrapolation methods work. By default plots do not show extrapolated values from methods, but
this can be forced by setting only_valid to False. It is easy to see that extrapolation is designed to show the correct
trend, but that individual methods will have very different extrapolations.
106
LEE_KESLER_PSAT
6 × 104 VDI_TABULAR
DIPPR_PERRY_8E
4 × 104
3 × 104
2 × 104
10 27
10 51
Vapor pressure, Pa
10 75
10 99
10 123
10 147
10 171 VDI_TABULAR
DIPPR_PERRY_8E
0 100 200 300 400 500
Temperature, K
It may also be helpful to see the derivative with respect to temperature of methods. This can be done with the order
keyword:
AMBROSE_WALTON
104 VDI_PPDS
WAGNER_MCGARRY
103
102
101
Higher order derivatives are also supported; most derivatives are numerically calculated, so there may be some noise.
The derivative plot is particularly good at illustrating what happens at the critical point, when extrapolation takes over
from the actual formulas.
˓→valid=False, order=2)
There is also functionality for reversing the calculation - finding out which temperature produces a specific property
value. The method is solve_property. For vapor pressure, we can use this technique to find out the normal boiling
point as follows:
>>> ethanol_psat.solve_property(101325)
351.43136
AMBROSE_WALTON
VDI_PPDS
WAGNER_MCGARRY
104
103
500 505 510 515 520 525
Temperature, K
>>> ethanol_psat.T_dependent_property_derivative(300)
498.882
The derivatives are numerical unless a special implementation has been added to the property’s
calculate_derivative method.
Higher order derivatives are available as well with the order argument. All higher-order derivatives are numerical, and
they tend to have reduced numerical precision due to floating point limitations.
When the property is heat capacity, this calculation represents a change in enthalpy:
∫︁ 𝑇2
∆𝐻 = 𝐶𝑝 𝑑𝑇
𝑇1
When the property is heat capacity, this calculation represents a change in entropy:
∫︁ 𝑇2
𝐶𝑝
∆𝑆 = 𝑑𝑇
𝑇1 𝑇
Where speed has been important so far, these integrals have been implemented analytically in a property object’s
calculate_integral and calculate_integral_over_T method; otherwise the integration is performed numer-
ically.
A common scenario is that there are no correlations available for a compound, and that estimation methods are not
applicable. However, there may be a few experimental data points available in the literature. In this case, the data can
be specified and used directly with the add_tabular_data method. Extrapolation can often show the correct trends
for these properties from even a few data points.
In the example below, we take 5 data points on the vapor pressure of water from 300 K to 350 K, and use them
to extrapolate and estimate the triple temperature and critical temperature (assuming we know the triple and critical
pressures).
While a great many property methods have been implemented, there is always the case where a new one must be added.
To support that, the method add_method will add a user-specified method and switch the method selected to the newly
added method.
As an example, we can compare the default vapor pressure formulation for n-hexane against a set of Antoine coefficients
on the NIST WebBook.
We can, again, extrapolate quite easily and estimate the triple temperature and critical temperature from these correla-
tions (if we know the triple pressure and critical pressure).
Optionally, some derivatives and integrals can be provided for new methods as well. This avoids having to compute
derivatives or integrals numerically. SymPy may be helpful to find these analytical derivatives or integrals in many
cases, as in the following example:
Note that adding methods like this breaks the ability to export as json and the repr of the object is no longer complete.
While adding entirely new methods is useful, it is more common to want to use different coefficients in an existing
equation. A number of different equations are recognized, and accept/require the parameters as per their function name
in e.g. chemicals.vapor_pressure.Antoine. More than one set of coefficients can be added for each model. After
adding a new correlation the method is set to that method.
>>> obj = VaporPressure()
>>> obj.add_correlation(name='WebBook', model='Antoine', Tmin=177.70, Tmax=264.93, A=3.
˓→45604+5, B=1044.038, C=-53.893)
>>> obj(200)
20.43298036711
It is also possible to specify the parameters in the constructor of the object as well:
>>> obj(200)
20.43298036711
More than one set of parameters and more than one model may be specified this way; the model name is the same, with
‘_parameters’ appended to it.
For a full list of supported correlations (and their names), see add_correlation.
Thermo contains functionality for performing regression to obtain equation coefficients from experimental data.
Data is obtained from the DDBST for the vapor pressure of acetone (http://www.ddbst.com/en/EED/PCP/VAP_C4.
php), and coefficients are regressed for several methods. There is data from five sources on that page, but no uncertain-
ties are available; the fit will treat each data point equally.
>>> Ts = [203.65, 209.55, 212.45, 234.05, 237.04, 243.25, 249.35, 253.34, 257.25, 262.12,
˓→ 264.5, 267.05, 268.95, 269.74, 272.95, 273.46, 275.97, 276.61, 277.23, 282.03, 283.06,
˓→ 288.94, 291.49, 293.15, 293.15, 293.85, 294.25, 294.45, 294.6, 294.63, 294.85, 297.05,
˓→ 297.45, 298.15, 298.15, 298.15, 298.15, 298.15, 299.86, 300.75, 301.35, 303.15, 303.
˓→15, 304.35, 304.85, 305.45, 306.25, 308.15, 308.15, 308.15, 308.22, 308.35, 308.45,␣
(continues on
˓→308.85, 309.05, 311.65, 311.85, 311.85, 311.95, 312.25, 314.68, 314.85, 317.75, next page)
317.85,
˓→ 318.05, 318.15, 318.66, 320.35, 320.35, 320.45, 320.65, 322.55, 322.65, 322.85, 322.
˓→95, 322.95, 323.35, 323.55, 324.65, 324.75, 324.85, 324.85, 325.15, 327.05, 327.15,␣
3.1. Temperature Dependent Properties 29
˓→327.2, 327.25, 327.35, 328.22, 328.75, 328.85, 333.73, 338.95]
thermo Documentation, Release 0.2.24
˓→24598, 25131, 25665, 25931, 25998, 26079, 26264, 29064, 29598, 30397, 30544, 30611,␣
˓→30784, 30851, 32636, 33931, 34864, 37637, 37824, 39330, 40130, 41063, 42396, 45996,␣
˓→46090, 46356, 45462, 46263, 46396, 47129, 47396, 52996, 52929, 53262, 53062, 53796,␣
˓→58169, 59328, 66395, 66461, 67461, 67661, 67424, 72927, 73127, 73061, 73927, 79127,␣
˓→79527, 80393, 79927, 80127, 81993, 80175, 85393, 85660, 85993, 86260, 86660, 92726,␣
The fitting function returns the regressed coefficients, and optionally some statistics. The mean absolute relative error
or “MAE” is often a good parameter for determining the goodness of fit; Antoine yielded an error of about 1%.
There are lots of methods available; Antoine was just used (the returned coefficients are in units of K and Pa with a base
of 10), but for comparison several more are as well. Note that some require the critical temperature and/or pressure.
>>> Tc, Pc = 508.1, 4700000.0
>>> res, stats = TDependentProperty.fit_data_to_model(Ts=Ts, data=Psats, model='Yaws_Psat
˓→', do_statistics=True, multiple_tries=True)
>>> stats['MAE']
0.0106
>>> res, stats = TDependentProperty.fit_data_to_model(Ts=Ts, data=Psats, model='Wagner',␣
˓→do_statistics=True, multiple_tries=True, model_kwargs={'Tc': Tc, 'Pc': Pc})
A very common scenario is that some coefficients are desired to be fixed in the regression. This is supported with the
model_kwargs attribute. For example, in the above DIPPR101 case we can fix the E coefficient to 1 as follows:
>>> res, stats = TDependentProperty.fit_data_to_model(Ts=Ts, data=Psats, model='DIPPR101
˓→', do_statistics=True, multiple_tries=3, model_kwargs={'E': -1})
Similarly, the feature is often used to set unneeded coefficients to zero In this case the TDE_PVExpansion function has
up to 8 parameters but only three are justified.
>>> res, stats = TDependentProperty.fit_data_to_model(Ts=Ts, data=Psats, model='TDE_
˓→PVExpansion', do_statistics=True, multiple_tries=True, model_kwargs={'a4': 0.0, 'a5':␣
Fitting coefficients is a complicated numerical problem. MINPACK’s lmfit implements Levenberg-Marquardt with a
number of tricks, and is used through SciPy in the fitting by default. Other minimization algorithms are supported, but
generally don’t do nearly as well. All minimization algorithms can only converge to a minima near points that they
evaluate, and the choice of initial guesses is quite important. For many methods, there are several hardcoded guesses.
By default, each of those guesses are evaluated and the minimization is initialized with the best guess. However,
for maximum accuracy, multiple_tries should be set to True, and all initial guesses are converged, and the best fit is
returned.
Initial guesses for parameters can also be provided. In the below example, the initial parameters from http://ddbonline.
ddbst.com/AntoineCalculation/AntoineCalculationCGI.exe for acetone are provided as initial guesses (converting them
to a Pa and K basis, from mmHg and deg C).
In this case the initial guesses are good, but different parameters are still obtained by the fitting algorithm.
To speed up these calculations, an interface to numba is available. Simply set use_numba to True. Note that the first
regression per session may be slower as it has to compile the function.
In the following example, data for the molar volume of three phases of liquid oxygen are added, from Roder, H. M. “The
Molar Volume (Density) of Solid Oxygen in Equilibrium with Vapor.” Journal of Physical and Chemical Reference Data
7, no. 3 (1978): 949–58.
Each of the phases is treated as a different method. After fitting the data to linear and quadratic fits, the results are
plotted.
>>> Ts_gamma = [42.801, 44.0, 46.0, 48.0, 50.0, 52.0, 54.0, 54.361]
>>> Vms_gamma = [23.05e-6, 23.06e-6, 23.18e-6, 23.30e-6, 23.43e-6, 23.55e-6, 23.67e-6,␣
˓→23.69e-6]
The pressure dependent objects work much like the temperature dependent ones; in fact, they subclass
TDependentProperty. They have many new methods that require pressure as an input however. They work in two
parts: a low-pressure correlation component, and a high-pressure correlation component. The high-pressure compo-
nent usually but not always requires a low-pressure calculation to be performed first as its input.
All arguments and information the property object requires must be provided in the constructor of the object. If a
piece of information is not provided, whichever methods require it will not be available for that object. Many pressure-
dependent property correlations are actually dependent on other properties being calculated first. A mapping of those
dependencies is as follows:
• Liquid molar volume: Depends on VaporPressure
• Gas viscosity: Depends on VolumeGas
• Liquid viscosity: Depends on VaporPressure
• Gas thermal conductivity: Depends on VolumeGas, HeatCapacityGas, ViscosityGas
The required input objects should be created first, and provided as an input to the dependent object:
˓→method_P="LUCAS")
Various data files will be searched to see if information such as DIPPR expression coefficients are available for the
compound during the initialization. This behavior can be avoided by setting the optional load_data argument to False.
The pressure and temperature dependent object selects a low-pressure and a high-pressure method automatically during
initialization. These method can be inspected with the method and method_P properties. If no low-pressure methods
are available, method will be None. If no high-pressure methods are available, method_P will be None. method and
method_P are also valid parameters when constructing the object, but if either of the methods specified is not available
an exception will be raised.
All available low-pressure methods can be found by inspecting the all_methods attribute:
>>> water_mu.all_methods
{'COOLPROP', 'DIPPR_PERRY_8E', 'VISWANATH_NATARAJAN_3', 'VDI_PPDS', 'LETSOU_STIEL'}
All available high-pressure methods can be found by inspecting the all_methods_P attribute:
>>> water_mu.all_methods_P
{'COOLPROP', 'LUCAS'}
Changing the low-pressure method or the high-pressure method is as easy as setting a new value to the attribute:
Calculation of the property at a specific temperature and pressure is as easy as calling the object which triggers the
__call__ method:
The caching of __call__ is quite basic - the previously specified temperature and pressure are stored, and if the new
T and P are the same as the previous T and P the previously calculated result is returned.
There is a lower-level interface for calculating properties with a specified method by name, calculate_P.
TP_dependent_property is a wrapper around calculate_P that includes validation of the result.
The above examples all show using calculating the property with a pressure specified. The same
TDependentProperty methods are available too, so all the low-pressure calculation calls are also available.
The same temperature limits and low-pressure extrapolation methods are available as for TDependentProperty.
>>> water_mu.valid_methods(T=480)
['DIPPR_PERRY_8E', 'COOLPROP', 'VDI_PPDS', 'LETSOU_STIEL']
>>> water_mu.extrapolation
'linear'
To better understand what methods are available, the valid_methods_P method checks all available high-pressure
correlations against their temperature and pressure limits.
If the temperature and pressure are not provided, all available methods are returned; the returned value favors the
methods by the ranking defined in thermo, with the currently selected method as the first item.
>>> water_mu.valid_methods_P()
['LUCAS', 'COOLPROP']
3.2.5 Plotting
0.00025
0.0002liquid viscosity, Pa*s
0.00015
0.0001
5e-05
1e+08
8e+07
400 6e+07
Pa
450 4e+07
re,
eratu
re, K 600 650
Pre
This can be a little confusing; but isotherms and isobars can be plotted as well, which are more straight forward. The
respective methods are plot_isotherm and plot_isobar:
0.000375
0.000374
0.000373
0.000372
0.000371
0.0006
0.0004
0.0002
>>> water_mu.solve_property(1e-3)
294.0711641
>>> water_mu.T_dependent_property_derivative(300)
-1.893961e-05
>>> water_mu.TP_dependent_property_derivative_T(300, P=1e7)
-1.927268e-05
The derivatives are numerical unless a special implementation has been added to the property’s
calculate_derivative_T and/or calculate_derivative method.
Higher order derivatives are available as well with the order argument.
Functionality for calculating the pressure derivative of the property is also implemented as
TP_dependent_property_derivative_P:
The derivatives are numerical unless a special implementation has been added to the property’s
calculate_derivative_P method.
Higher order derivatives are available as well with the order argument.
The same functionality for integrating over a property as in temperature-dependent objects is available, but only for inte-
grating over temperature using low pressure correlations. No other use cases have been identified requiring integration
over high-pressure conditions, or integration over the pressure domain.
0.04243
If there are experimentally available data for a property at high and low pressure, an interpolation table can be created
and used as follows. The CoolProp method is used to generate a small table, and is then added as a new method in the
example below.
The more data points used, the closer a property will match.
3.4 Notes
There is also the challenge that there is no clear criteria for distinguishing liquids from gases in supercritical mixtures.
If the same method is not used for liquids and gases, there will be a sudden discontinuity which can cause numerical
issues in modeling.
FOUR
• ChemicalConstantsPackage Object
– Creating ChemicalConstantsPackage Objects
– Using ChemicalConstantsPackage Objects
– Creating Smaller ChemicalConstantsPackage Objects
– Adding or Replacing Constants
– Creating ChemicalConstantsPackage Objects from chemicals
– Storing and Loading ChemicalConstantsPackage Objects
• PropertyCorrelationsPackage
These two objects are designed to contain information needed by flash algorithms. In the first iteration of thermo,
data was automatically looked up in databases and there was no way to replace that data. Thermo now keeps data and
algorithms completely separate. This has also been very helpful to make unit tests that do not change their results.
There are five places to configure the flash and phase infrastructure:
• Constant data about chemicals, like melting point or boiling point or UNIFAC groups. This information needs
to be put into an immutable ChemicalConstantsPackage object.
• Temperature-dependent data, like Antoine coefficients, Tait pressure-dependent volume parameters, or
Laliberte electrolyte viscosity interaction parameters. These are stored in TDependentProperty,
TPDependentProperty, and MixtureProperty objects. More information about configuring those to pro-
vide the desired properties can be found in property objects tutorial; this tutorial assumes you have already con-
figured them as desired. These many objects are added to an PropertyCorrelationsPackage object before
being provided to the flash algorithms.
• Phase-specific parameters that are not general and depend on a specific phase configuration for meaning; such as
a volume translation coefficient or a binary interaction parameter. This information is provided when configuring
each Phase.
• Information about bulk mixing rules or bulk property calculation methods; these don’t have true thermodynamic
definitions, and are configurable in the BulkSettings object.
• Settings of the Flash object; ideally no configuration would be required there. In some cases it might be useful
to lower the tolerances or change an algorithm.
This tutorial covers the first two places, ChemicalConstantsPackage and PropertyCorrelationsPackage.
39
thermo Documentation, Release 0.2.24
A ChemicalConstantsPackage can be created by specifying the known constant values of each chemical. All values
are technically optional; the requirements of each Flash algorithm are different, but a minimum suggested amount is
names, CASs, MWs, Tcs, Pcs, omegas, Tbs, and atomss. The list of all accepted properties can be found here.
>>> from thermo import ChemicalConstantsPackage, PropertyCorrelationsPackage
>>> constants = ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165],␣
˓→names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.
˓→617.0])
Once created, all properties, even missing ones, can be accessed as attributes using the same names as required by the
constructor:
>>> constants.MWs
[18.01528, 106.165, 106.165, 106.165]
>>> constants.Vml_STPs
[None, None, None, None]
It is the intention for these ChemicalConstantsPackage to be immutable. Python doesn’t easily allow this to be
enforced, but unexpected behavior will probably result if they are edited. If different properties are desired; create new
ChemicalConstantsPackage objects.
The __repr__ of the ChemicalConstantsPackage object returns a representation of the object that can be used to
reconstruct it:
>>> constants
ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-
˓→xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.331], Pcs=[22048320.
It is possible to create a new, smaller ChemicalConstantsPackage with fewer components by using the subset
method, which accepts either indexes or slices and returns a new object:
>>> constants.subset([0, 1])
ChemicalConstantsPackage(MWs=[18.01528, 106.165], names=['water', 'o-xylene'], omegas=[0.
˓→344, 0.3118], Pcs=[22048320.0, 3732000.0], Tcs=[647.14, 630.3])
>>> constants.subset(slice(1,3))
ChemicalConstantsPackage(MWs=[106.165, 106.165], names=['o-xylene', 'p-xylene'],␣
˓→omegas=[0.3118, 0.324], Pcs=[3732000.0, 3511000.0], Tcs=[630.3, 616.2])
>>> constants.subset([0])
ChemicalConstantsPackage(MWs=[18.01528], names=['water'], omegas=[0.344], Pcs=[22048320.
˓→0], Tcs=[647.14])
(continues on next page)
It is also possible to reduce the number of properties set with the subset methods:
It is possible to create a new ChemicalConstantsPackage with added properties and/or replacing the old properties,
from an existing object. This is helpful if better values for select properties are known. The with_new_constants
method does this.
˓→0, 3732000.0, 3511000.0, 3541000.0], Tcs=[650.0, 630.0, 620.0, 620.0], Tms=[20.0, 100.
A convenience method exists to load these constants from a different data files exists. Some values for all properties
are available; not all compounds have all properties.
>>> obj.Tbs
[337.65, 351.39, 355.36]
When working with a fixed set of components, it may be a good idea to take this generated package, select only those
properties being used, convert it to a string, and then embed that new object in a program. This will remove the need
to load various data files, and if chemicals updates data files, different results won’t be obtained from your constants
package.
>>> small_obj
ChemicalConstantsPackage(atomss=[{'C': 1, 'H': 4, 'O': 1}, {'C': 2, 'H': 6, 'O': 1}, {'C
˓→': 3, 'H': 8, 'O': 1}], CASs=['67-56-1', '64-17-5', '67-63-0'], MWs=[32.04186, 46.
Once the object is printed, the generated text can be copy/pasted as valid Python into a program:
Warning: chemicals is a project with a focus on collecting data and correlations from various sources. In no way is
it a project to critically evaluate these and provide recommendations. You are strongly encouraged to check values
from it and modify them if you want different values. If you believe there is a value which has a typographical error
please report it to the chemicals project. If data is missing or not as accuracte as you would like, and you know
of a better method or source, new methods and sources can be added to chemicals fairly easily once the data entry
is complete. It is not feasible to add individual components, so please submit a complete table of data from the
source.
For larger applications with many components, it is not as feasible to convert the ChemicalConstantsPackage to a
string and embed it in a program. For that application, the object can be converted back and forth from JSON:
4.2 PropertyCorrelationsPackage
FIVE
• Phase Objects
– Available Phases
– Serialization
– Hashing
• Flashes with Pure Compounds
– Vapor-Liquid Cubic Equation Of State Example
– Vapor-Liquid Steam Example
The framework for performing phase and flash calculations is designed around the following principles:
• Immutability
• Calculations are completely independent from any databases or lookups - every input must be provided as input
• Default to general-purpose algorithms that make no assumptions about specific systems
• Inclusion of separate flashes algorithms wherever faster algorithms can be used for specific cases
• Allow options to restart a flash from a nearby previously calculated result, with options to skip checking the
result for stability
• Use very tight tolerances on all calculations
• Expose all constants used by algorithms
A phase is designed to have a single state at any time, and contain all the information needed to compute phase-specific
properties. Phases should always be initialized at a specific molar composition zs, T and P; and new phase objects at
different conditions should be created from the existing ones with the Phase.to method (a little faster than creating
them from scratch). That method also allows the new state to be set from any two of T, P, or V. When working in the
T and P domain only, the Phase.to_TP_zs method is a little faster.
Phases are designed to be able to calculate every thermodynamic property. T and P are always attributes of the phase,
but all other properties are functions that need to be called. Some examples of these properties are V, H, S, Cp, dP_dT,
d2P_dV2, fugacities, lnphis, dlnphis_dT, and dlnphis_dP.
If a system is already known to be single-phase, the phase framework can be used directly without performing flash
calculations. This may offer a speed boost in some applications.
43
thermo Documentation, Release 0.2.24
Although the underlying equations of state often don’t distinguish between liquid or vapor phase, it was convenient to
create separate phase objects designed to hold gas, liquid, and solid phases separately.
The following phases can represent both a liquid and a vapor state. Their class is not a true indication that their
properties are liquid or gas.
• Cubic equations of state - CEOSLiquid and CEOSGas
• IAPWS-95 Water and Steam - IAPWS95Liquid and IAPWS95Gas
• Wrapper objects for CoolProp’s Helmholtz EOSs - CoolPropLiquid and CoolPropGas
The following phase objects can only represent a gas phase:
• Ideal-gas law - IdealGas
• High-accuracy properties of dry air - DryAirLemmon
The following phase objects can only represent a liquid phase:
• Ideal-liquid and/or activity coefficient models - GibbsExcessLiquid
5.1.2 Serialization
All phase models offer a as_json method and a from_json to serialize the object state for transport over a network,
storing to disk, and passing data between processes.
Other json libraries can be used besides the standard json library by design.
Storing and recreating objects with Python’s pickle.dumps library is also tested; this can be faster than using JSON
at the cost of being binary data.
5.1.3 Hashing
All models have a __hash__ method that can be used to compare different phases to see if they are absolutely identical
(including which values have been calculated already).
They also have a model_hash method that can be used to compare different phases to see if they have identical model
parameters.
They also have a state_hash method that can be used to compare different phases to see if they have identical tem-
perature, composition, and model parameters.
Pure components are really nice to work with because they have nice boundaries between each state, and the mole
fraction is always 1; there is no composition dependence. There is a separate flash interfaces for pure components.
These flashes are very mature and should be quite reliable.
The following example illustrates some of the types of flashes supported using the component methanol, the stated
critical properties, a heat capacity correlation from Poling et. al., and the Peng-Robinson equation of state.
Obtain a heat capacity object, and select a source:
Create a ChemicalConstantsPackage object which holds constant properties of the object, using a minimum of
values:
Create a PropertyCorrelationsPackage object which holds temperature-dependent property objects, also setting
skip_missing to True so no database lookups are performed:
Create liquid and gas cubic phase objects using the Peng-Robinson equation of state:
Do a T-P flash:
As you can see, the interface is convenient and supports most types of flashes. In fact, the algorithms are generic; any
of H, S, U, and can be combined with any combination of T, P, and V. Although most of the flashes shown above except
TS and TH are usually well behaved, depending on the EOS combination there may be multiple solutions. No real
guarantees can be made about which solution will be returned in those cases.
Flashes with two of H, S, and U are not implemented at present.
It is not necessary to use the same phase model for liquid and gas phases; the below example shows a flash switching
the gas phase model to SRK.
Choosing to use an inconsistent model will slow down many calculations as more checks are required; and some flashes
may have issues with discontinuities in some conditions, and simply a lack of solution in other conditions.
Not all flash calculations have been fully optimized, but the basic flashes are quite fast.
SIX
There are lots of options that get called “ideal”. The GibbsExcessLiquid object implements many of them, which means
the configuration is complicated and the defaults may not act as expected.
49
thermo Documentation, Release 0.2.24
SEVEN
API REFERENCE
This module contains a base class GibbsExcess for handling activity coefficient based models. The design is for a
sub-class to provide the minimum possible number of derivatives of Gibbs energy, and for this base class to provide
the rest of the methods. An ideal-liquid class with no excess Gibbs energy IdealSolution is also available.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Base Class
• Ideal Liquid Class
• Notes
– References
class thermo.activity.GibbsExcess
Bases: object
Class for representing an activity coefficient model. While these are typically presented as tools to compute
activity coefficients, in truth they are excess Gibbs energy models and activity coefficients are just one derived
aspect of them.
This class does not implement any activity coefficient models itself; it must be subclassed by another model. All
properties are derived with the CAS SymPy, not relying on any derivations previously published, and checked
numerically for consistency.
Different subclasses have different parameter requirements for initialization; IdealSolution is available as a
simplest model with activity coefficients of 1 to show what needs to be implemented in subclasses. It is also
intended subclasses implement the method to_T_xs, which creates a new object at the specified temperature and
composition but with the same parameters.
These objects are intended to lazy-calculate properties as much as possible, and for the temperature and compo-
sition of an object to be immutable.
Attributes
N
T
scalar
51
thermo Documentation, Release 0.2.24
xs
Methods
CpE()
Calculate and return the first temperature derivative of excess enthalpy of a liquid phase using an activity
coefficient model.
𝜕ℎ𝐸 𝜕 2 𝑔𝐸
= −𝑇
𝜕𝑇 𝜕𝑇 2
Returns
dHE_dT [float] First temperature derivative of excess enthalpy of the liquid phase, [J/mol/K]
HE()
Calculate and return the excess entropy of a liquid phase using an activity coefficient model.
𝜕𝑔 𝐸
ℎ𝐸 = −𝑇 + 𝑔𝐸
𝜕𝑇
Returns
HE [float] Excess enthalpy of the liquid phase, [J/mol]
N
SE()
Calculates the excess entropy of a liquid phase using an activity coefficient model.
ℎ𝐸 − 𝑔 𝐸
𝑠𝐸 =
𝑇
Returns
SE [float] Excess entropy of the liquid phase, [J/mol/K]
Notes
Note also the relationship of the expressions for partial excess entropy:
(︂ )︂
𝜕 ln 𝛾𝑖
𝑆𝑖𝐸 = −𝑅 𝑇 + ln 𝛾𝑖
𝜕𝑇
T
__eq__(other)
Return self==value.
__hash__()
Method to calculate and return a hash representing the exact state of the object. This includes T, xs, the
model class, and which values have already been calculated.
Returns
hash [int] Hash of the object, [-]
__repr__()
Method to create a string representation of the state of the model. Included is T, xs, and all constants
necessary to create the model. This can be passed into exec to re-create the model. Note that parsing
strings like this can be slow.
Returns
repr [str] String representation of the object, [-]
Examples
as_json()
Method to create a JSON-friendly representation of the Gibbs Excess model which can be stored, and
reloaded later.
Returns
json_repr [dict] JSON-friendly representation, [-]
Examples
d2GE_dTdns()
Calculate and return the mole number derivative of the first temperature derivative of excess Gibbs energy
of a liquid phase using an activity coefficient model.
𝜕 2 𝐺𝐸
𝜕𝑛𝑖 𝜕𝑇
Returns
d2GE_dTdns [list[float]] First mole number derivative of the temperature derivative of ex-
cess Gibbs entropy of the liquid phase, [J/(mol^2*K)]
d2nGE_dTdns()
Calculate and return the partial mole number derivative of the first temperature derivative of excess Gibbs
energy of a liquid phase using an activity coefficient model.
𝜕 2 𝑛𝐺𝐸
𝜕𝑛𝑖 𝜕𝑇
Returns
d2nGE_dTdns [list[float]] First partial mole number derivative of the temperature derivative
of excess Gibbs entropy of the liquid phase, [J/(mol*K)]
d2nGE_dninjs()
Calculate and return the second partial mole number derivative of excess Gibbs energy of a liquid phase
using an activity coefficient model.
𝜕 2 𝑛𝐺𝐸
𝜕𝑛𝑖 𝜕𝑛𝑖
Returns
d2nGE_dninjs [list[list[float]]] Second partial mole number derivative of excess Gibbs en-
ergy of a liquid phase, [J/(mol^2)]
dGE_dns()
Calculate and return the mole number derivative of excess Gibbs energy of a liquid phase using an activity
coefficient model.
𝜕𝐺𝐸
𝜕𝑛𝑖
Returns
dGE_dns [list[float]] First mole number derivative of excess Gibbs entropy of the liquid
phase, [J/(mol^2*K)]
dHE_dT()
Calculate and return the first temperature derivative of excess enthalpy of a liquid phase using an activity
coefficient model.
𝜕ℎ𝐸 𝜕 2 𝑔𝐸
= −𝑇
𝜕𝑇 𝜕𝑇 2
Returns
dHE_dT [float] First temperature derivative of excess enthalpy of the liquid phase, [J/mol/K]
dHE_dns()
Calculate and return the mole number derivative of excess enthalpy of a liquid phase using an activity
coefficient model.
𝜕ℎ𝐸
𝜕𝑛𝑖
Returns
dHE_dns [list[float]] First mole number derivative of excess enthalpy of the liquid phase,
[J/mol^2]
dHE_dxs()
Calculate and return the mole fraction derivative of excess enthalpy of a liquid phase using an activity
coefficient model.
𝜕ℎ𝐸 𝜕 2 𝑔𝐸 𝜕𝑔 𝐸
= −𝑇 +
𝜕𝑥𝑖 𝜕𝑇 𝜕𝑥𝑖 𝜕𝑥𝑖
Returns
dHE_dxs [list[float]] First mole fraction derivative of excess enthalpy of the liquid phase,
[J/mol]
dSE_dT()
Calculate and return the first temperature derivative of excess entropy of a liquid phase using an activity
coefficient model.
𝜕𝑠𝐸 1 −𝜕𝑔 𝐸 𝜕ℎ𝐸
(︂ )︂
(𝐺 + 𝐻)
= + −
𝜕𝑇 𝑇 𝜕𝑇 𝜕𝑇 𝑇
Returns
dSE_dT [float] First temperature derivative of excess entropy of the liquid phase, [J/mol/K]
dSE_dns()
Calculate and return the mole number derivative of excess entropy of a liquid phase using an activity coef-
ficient model.
𝜕𝑆 𝐸
𝜕𝑛𝑖
Returns
dSE_dns [list[float]] First mole number derivative of excess entropy of the liquid phase,
[J/(mol^2*K)]
dSE_dxs()
Calculate and return the mole fraction derivative of excess entropy of a liquid phase using an activity
coefficient model.
𝜕𝑆 𝐸 1 𝜕ℎ𝐸 𝜕𝑔 𝐸 𝜕 2 𝑔𝐸
(︂ )︂
= − =−
𝜕𝑥𝑖 𝑇 𝜕𝑥𝑖 𝜕𝑥𝑖 𝜕𝑥𝑖 𝜕𝑇
Returns
dSE_dxs [list[float]] First mole fraction derivative of excess entropy of the liquid phase,
[J/(mol*K)]
dgammas_dT()
Calculate and return the temperature derivatives of activity coefficients of a liquid phase using an activity
coefficient model.
𝜕𝑛𝑖 𝐺𝐸
(︃ 𝜕 2 𝑛𝐺𝐸 )︃ (︃ 𝜕𝑛 𝐺𝐸 )︃
𝑖
𝜕𝛾𝑖 𝜕𝑇 𝜕𝑛𝑖 𝜕𝑛𝑖 𝜕𝑛𝑖
= − exp
𝜕𝑇 𝑅𝑇 𝑅𝑇 2 𝑅𝑇
Returns
dgammas_dT [list[float]] Temperature derivatives of activity coefficients, [1/K]
dgammas_dns()
Calculate and return the mole number derivative of activity coefficients of a liquid phase using an activity
coefficient model.
⎛ 2 𝐸 ⎞
𝜕 𝐺
𝜕𝛾𝑖 𝜕𝑥 𝜕𝑥
= 𝛾𝑖 ⎝ 𝑖 𝑗 ⎠
𝜕𝑛𝑖 𝑅𝑇
Returns
dgammas_dns [list[list[float]]] Mole number derivatives of activity coefficients, [1/mol]
dnGE_dns()
Calculate and return the partial mole number derivative of excess Gibbs energy of a liquid phase using an
activity coefficient model.
𝜕𝑛𝐺𝐸
𝜕𝑛𝑖
Returns
dnGE_dns [list[float]] First partial mole number derivative of excess Gibbs entropy of the
liquid phase, [J/(mol)]
dnHE_dns()
Calculate and return the partial mole number derivative of excess enthalpy of a liquid phase using an activity
coefficient model.
𝜕𝑛ℎ𝐸
𝜕𝑛𝑖
Returns
dnHE_dns [list[float]] First partial mole number derivative of excess enthalpy of the liquid
phase, [J/mol]
dnSE_dns()
Calculate and return the partial mole number derivative of excess entropy of a liquid phase using an activity
coefficient model.
𝜕𝑛𝑆 𝐸
𝜕𝑛𝑖
Returns
dnSE_dns [list[float]] First partial mole number derivative of excess entropy of the liquid
phase, [J/(mol*K)]
classmethod from_json(json_repr)
Method to create a Gibbs Excess model from a JSON-friendly serialization of another Gibbs Excess model.
Parameters
json_repr [dict] JSON-friendly representation, [-]
Returns
model [GibbsExcess] Newly created object from the json serialization, [-]
Notes
It is important that the input string be in the same format as that created by GibbsExcess.as_json.
Examples
gammas()
Calculate and return the activity coefficients of a liquid phase using an activity coefficient model.
(︃ 𝜕𝑛 𝐺𝐸 )︃
𝑖
𝜕𝑛𝑖
𝛾𝑖 = exp
𝑅𝑇
Returns
gammas [list[float]] Activity coefficients, [-]
gammas_infinite_dilution()
Calculate and return the infinite dilution activity coefficients of each component.
Returns
gammas_infinite [list[float]] Infinite dilution activity coefficients, [-]
Notes
The algorithm is as follows. For each component, set its composition to zero. Normalize the remaining
compositions to 1. Create a new object with that composition, and calculate the activity coefficient of the
component whose concentration was set to zero.
model_hash()
Basic method to calculate a hash of the non-state parts of the model This is useful for comparing to models
to determine if they are the same, i.e. in a VLL flash it is important to know if both liquids have the same
model.
Note that the hashes should only be compared on the same system running in the same process!
Returns
model_hash [int] Hash of the object’s model parameters, [-]
scalar
state_hash()
Basic method to calculate a hash of the state of the model and its model parameters.
Note that the hashes should only be compared on the same system running in the same process!
Returns
state_hash [int] Hash of the object’s model parameters and state, [-]
xs
Examples
Attributes
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
Methods
GE()
Calculate and return the excess Gibbs energy of a liquid phase using an activity coefficient model.
𝑔𝐸 = 0
Returns
GE [float] Excess Gibbs energy of an ideal liquid, [J/mol]
d2GE_dT2()
Calculate and return the second temperature derivative of excess Gibbs energy of a liquid phase using an
activity coefficient model.
𝜕 2 𝑔𝐸
=0
𝜕𝑇 2
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy of an ideal liquid,
[J/(mol*K^2)]
d2GE_dTdxs()
Calculate and return the temperature derivative of mole fraction derivatives of excess Gibbs energy of an
ideal liquid.
𝜕 2 𝑔𝐸
=0
𝜕𝑥𝑖 𝜕𝑇
Returns
d2GE_dTdxs [list[float]] Temperature derivative of mole fraction derivatives of excess
Gibbs energy of an ideal liquid, [J/(mol*K)]
d2GE_dxixjs()
Calculate and return the second mole fraction derivatives of excess Gibbs energy of an ideal liquid.
𝜕 2 𝑔𝐸
=0
𝜕𝑥𝑖 𝜕𝑥𝑗
Returns
d2GE_dxixjs [list[list[float]]] Second mole fraction derivatives of excess Gibbs energy of
an ideal liquid, [J/mol]
d3GE_dT3()
Calculate and return the third temperature derivative of excess Gibbs energy of a liquid phase using an
activity coefficient model.
𝜕 3 𝑔𝐸
=0
𝜕𝑇 3
Returns
d3GE_dT3 [float] Third temperature derivative of excess Gibbs energy of an ideal liquid,
[J/(mol*K^3)]
d3GE_dxixjxks()
Calculate and return the third mole fraction derivatives of excess Gibbs energy of an ideal liquid.
𝜕 3 𝑔𝐸
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘
Returns
d3GE_dxixjxks [list[list[list[float]]]] Third mole fraction derivatives of excess Gibbs energy
of an ideal liquid, [J/mol]
dGE_dT()
Calculate and return the temperature derivative of excess Gibbs energy of a liquid phase using an activity
coefficient model.
𝜕𝑔 𝐸
=0
𝜕𝑇
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy of an ideal liquid,
[J/(mol*K)]
dGE_dxs()
Calculate and return the mole fraction derivatives of excess Gibbs energy of an ideal liquid.
𝜕𝑔 𝐸
=0
𝜕𝑥𝑖
Returns
dGE_dxs [list[float]] Mole fraction derivatives of excess Gibbs energy of an ideal liquid,
[J/mol]
to_T_xs(T, xs)
Method to construct a new IdealSolution instance at temperature T, and mole fractions xs with the same
parameters as the existing object.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions of each component, [-]
Returns
obj [IdealSolution] New IdealSolution object at the specified conditions [-]
Examples
7.1.3 Notes
Excellent references for working with activity coefficient models are [1] and [2].
References
This module contains a phase wrapper for obtaining properties of a pseudo-phase made of multiple other phases. This
is useful in the context of multiple liquid phases; or multiple solid phases; or looking at all the phases together.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Bulk Class
• Bulk Settings Class
Parameters
T [float] Temperature of the bulk, [K]
P [float] Pressure of the bulk, [Pa]
zs [list[float]] Mole fractions of the bulk, [-]
phases [list[Phase]] Phase objects, [-]
phase_fractions [list[float]] Molar fractions of each phase, [-]
phase_bulk [str, optional] None to represent a bulk of all present phases; ‘l’ to represent a bulk
of only liquid phases; s to represent a bulk of only solid phases, [-]
Notes
Please think carefully when retrieving a property of the bulk. If there are two liquid phases in a bulk, and a single
viscosity value is retrieved, can that be used directly for a single phase pressure drop calculation? Not with any
theoretical consistency, that’s for sure.
Attributes
beta Phase fraction of the bulk phase.
betas_mass Method to calculate and return the mass fraction of all of the phases in the bulk.
betas_volume Method to calculate and return the volume fraction of all of the phases in the
bulk.
Methods
Cp()
Method to calculate and return the constant-temperature and constant phase-fraction heat capacity of the
bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐶𝑝 = 𝐶𝑝,𝑖 𝛽𝑖
𝑖
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
Cp_ideal_gas()
Method to calculate and return the ideal-gas heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑝𝑖𝑔 = 𝑧𝑖 𝐶𝑝,𝑖
𝑖
Returns
Cp [float] Ideal gas heat capacity, [J/(mol*K)]
H()
Method to calculate and return the constant-temperature and constant phase-fraction enthalpy of the bulk
phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐻= 𝐻𝑖 𝛽𝑖
𝑖
Returns
H [float] Molar enthalpy, [J/(mol)]
H_ideal_gas()
Method to calculate and return the ideal-gas enthalpy of the phase.
∑︁
𝐻 𝑖𝑔 = 𝑧𝑖 𝐻𝑖𝑖𝑔
𝑖
Returns
H [float] Ideal gas enthalpy, [J/(mol)]
H_reactive()
Method to calculate and return the constant-temperature and constant phase-fraction reactive enthalpy of
the bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐻reactive = 𝐻reactive,𝑖 𝛽𝑖
𝑖
Returns
H_reactive [float] Reactive molar enthalpy, [J/(mol)]
Joule_Thomson()
Method to calculate and return the Joule-Thomson coefficient of the bulk according to the selected calcu-
lation methodology.
(︂ )︂
𝜕𝑇
𝜇𝐽𝑇 =
𝜕𝑃 𝐻
Returns
mu_JT [float] Joule-Thomson coefficient [K/Pa]
MW()
Method to calculate and return the molecular weight of the bulk phase. This is a phase-fraction weighted
calculation.
𝑝
∑︁
MW = MW𝑖 𝛽𝑖
𝑖
Returns
MW [float] Molecular weight, [g/mol]
Pmc()
Method to calculate and return the mechanical critical pressure of the phase.
Returns
Pmc [float] Mechanical critical pressure, [Pa]
S()
Method to calculate and return the constant-temperature and constant phase-fraction entropy of the bulk
phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝑆= 𝑆𝑖 𝛽𝑖
𝑖
Returns
S [float] Molar entropy, [J/(mol*K)]
S_ideal_gas()
Method to calculate and return the ideal-gas entropy of the phase.
(︂ )︂
𝑖𝑔
∑︁ 𝑖𝑔 𝑃 ∑︁
𝑆 = 𝑧𝑖 𝑆𝑖 − 𝑅 ln −𝑅 𝑧𝑖 ln(𝑧𝑖 )
𝑖
𝑃𝑟𝑒𝑓 𝑖
Returns
S [float] Ideal gas molar entropy, [J/(mol*K)]
S_reactive()
Method to calculate and return the constant-temperature and constant phase-fraction reactive entropy of the
bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝑆reactive = 𝑆reactive,𝑖 𝛽𝑖
𝑖
Returns
S_reactive [float] Reactive molar entropy, [J/(mol*K)]
Tmc()
Method to calculate and return the mechanical critical temperature of the phase.
Returns
Tmc [float] Mechanical critical temperature, [K]
V()
Method to calculate and return the molar volume of the bulk phase. This is a phase-fraction weighted
calculation.
𝑝
∑︁
𝑉 = 𝑉𝑖 𝛽𝑖
𝑖
Returns
V [float] Molar volume, [m^3/mol]
V_iter(force=False)
Method to calculate and return the molar volume of the bulk phase, with precision suitable for a TV calcu-
lation to calculate a matching pressure. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝑉 = 𝑉𝑖 𝛽𝑖
𝑖
Returns
V [float or mpf] Molar volume, [m^3/mol]
Vmc()
Method to calculate and return the mechanical critical volume of the phase.
Returns
Vmc [float] Mechanical critical volume, [m^3/mol]
Zmc()
Method to calculate and return the mechanical critical compressibility of the phase.
Returns
Zmc [float] Mechanical critical compressibility, [-]
property beta
Phase fraction of the bulk phase. Should always be 1 when representing all phases of a flash; but can be
less than one if representing multiple solids or liquids as a single phase in a larger mixture.
Returns
beta [float] Phase fraction of bulk, [-]
property betas_mass
Method to calculate and return the mass fraction of all of the phases in the bulk.
Returns
betas_mass [list[float]] Mass phase fractions of all the phases in the bulk object, ordered
vapor, liquid, then solid, [-]
property betas_volume
Method to calculate and return the volume fraction of all of the phases in the bulk.
Returns
betas_volume [list[float]] Volume phase fractions of all the phases in the bulk, ordered vapor,
liquid, then solid , [-]
d2P_dT2()
Method to calculate and return the second temperature derivative of pressure of the bulk according to the
selected calculation methodology.
Returns
d2P_dT2 [float] Second temperature derivative of pressure, [Pa/K^2]
d2P_dT2_frozen()
Method to calculate and return the second constant-volume derivative of pressure with respect to tempera-
ture of the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction
weighted calculation.
phases
𝜕2𝑃 𝜕2𝑃
(︂ )︂ ∑︁ (︂ )︂
= 𝛽𝑖
𝜕𝑇 2 𝑉,𝛽,𝑧𝑠 𝑖
𝜕𝑇 2 𝑖,𝑉𝑖 ,𝛽𝑖 ,𝑧𝑠𝑖
Returns
d2P_dT2_frozen [float] Frozen constant-volume second derivative of pressure with respect
to temperature of the bulk phase, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the bulk according to the selected calculation methodology.
Returns
Returns
d2P_dTdV_frozen [float] Frozen second derivative of pressure with respect to volume and
temperature of the bulk phase, [Pa*mol^2/m^6]
d2P_dV2()
Method to calculate and return the second volume derivative of pressure of the bulk according to the selected
calculation methodology.
Returns
d2P_dV2 [float] Second volume derivative of pressure, [Pa*mol^2/m^6]
d2P_dV2_frozen()
Method to calculate and return the constant-temperature second derivative of pressure with respect to vol-
ume of the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction
weighted calculation.
phases
𝜕2𝑃 𝜕2𝑃
(︂ )︂ ∑︁ (︂ )︂
= 𝛽𝑖
𝜕𝑉 2 𝑇,𝛽,𝑧𝑠 𝑖
𝜕𝑉 2 𝑖,𝑇,𝛽𝑖 ,𝑧𝑠𝑖
Returns
d2P_dV2_frozen [float] Frozen constant-temperature second derivative of pressure with re-
spect to volume of the bulk phase, [Pa*mol^2/m^6]
dA_dP()
Method to calculate and return the constant-temperature pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dA_dP [float] Constant-temperature pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dT()
Method to calculate and return the constant-pressure temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dA_dT [float] Constant-pressure temperature derivative of Helmholtz energy, [J/(mol*K)]
dG_dP()
Method to calculate and return the constant-temperature pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dG_dP [float] Constant-temperature pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dT()
Method to calculate and return the constant-pressure temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dG_dT [float] Constant-pressure temperature derivative of Gibbs free energy, [J/(mol*K)]
dP_dT()
Method to calculate and return the first temperature derivative of pressure of the bulk according to the
selected calculation methodology.
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dT_frozen()
Method to calculate and return the constant-volume derivative of pressure with respect to temperature of
the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction weighted
calculation.
(︂ )︂ phases
𝜕𝑃 ∑︁ (︂ 𝜕𝑃 )︂
= 𝛽𝑖
𝜕𝑇 𝑉,𝛽,𝑧𝑠 𝑖
𝜕𝑇 𝑖,𝑉𝑖 ,𝛽𝑖 ,𝑧𝑠𝑖
Returns
dP_dT_frozen [float] Frozen constant-volume derivative of pressure with respect to temper-
ature of the bulk phase, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the bulk according to the selected
calculation methodology.
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dP_dV_frozen()
Method to calculate and return the constant-temperature derivative of pressure with respect to volume of
the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction weighted
calculation.
(︂ )︂ phases
𝜕𝑃 ∑︁ (︂ 𝜕𝑃 )︂
= 𝛽𝑖
𝜕𝑉 𝑇,𝛽,𝑧𝑠 𝑖
𝜕𝑉 𝑖,𝑇,𝛽𝑖 ,𝑧𝑠𝑖
Returns
dP_dV_frozen [float] Frozen constant-temperature derivative of pressure with respect to
volume of the bulk phase, [Pa*mol/m^3]
dU_dP()
Method to calculate and return the constant-temperature pressure derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 −𝑉 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
Returns
dU_dT [float] Constant-pressure temperature derivative of internal energy, [J/(mol*K)]
isobaric_expansion()
Method to calculate and return the isobatic expansion coefficient of the bulk according to the selected
calculation methodology.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Returns
beta [float] Isobaric coefficient of a thermal expansion, [1/K]
k()
Calculate and return the thermal conductivity of the bulk according to the selected thermal
conductivity settings in BulkSettings, the settings in ThermalConductivityGasMixture
and ThermalConductivityLiquidMixture, and the configured pure-component settings in
ThermalConductivityGas and ThermalConductivityLiquid.
Returns
k [float] Thermal Conductivity of bulk phase calculated with mixing rules, [Pa*s]
kappa()
Method to calculate and return the isothermal compressibility of the bulk according to the selected calcu-
lation methodology.
(︂ )︂
1 𝜕𝑉
𝜅=−
𝑉 𝜕𝑃 𝑇
Returns
kappa [float] Isothermal coefficient of compressibility, [1/Pa]
mu()
Calculate and return the viscosity of the bulk according to the selected viscosity settings in BulkSettings,
the settings in ViscosityGasMixture and ViscosityLiquidMixture, and the configured pure-
component settings in ViscosityGas and ViscosityLiquid.
Returns
mu [float] Viscosity of bulk phase calculated with mixing rules, [Pa*s]
sigma()
Calculate and return the surface tension of the bulk according to the selected surface tension settings in
BulkSettings, the settings in SurfaceTensionMixture and the configured pure-component settings in
SurfaceTension.
Returns
sigma [float] Surface tension of bulk phase calculated with mixing rules, [N/m]
Notes
A value is only returned if all phases in the bulk are liquids; this property is for a liquid-ideal gas calculation,
not the interfacial tension between two liquid phases.
speed_of_sound()
Method to calculate and return the molar speed of sound of the bulk according to the selected calculation
methodology.
[︂ (︂ )︂ ]︂1/2
𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝜕𝑉 𝑇 𝐶𝑣
Returns
w [float] Speed of sound for a real gas, [m*kg^0.5/(s*mol^0.5)]
d2P_dT2 [str, optional] The method used to calculate the second constant-volume temperature
derivative of pressure of the bulk. One of D2P_DT2_METHODS, [-]
d2P_dTdV [str, optional] The method used to calculate the temperature and volume derivative
of pressure of the bulk. One of D2P_DTDV_METHODS, [-]
T_liquid_volume_ref [float, optional] Liquid molar volume reference temperature; if this
is 298.15 K exactly, the molar volumes in Vml_STPs will be used, and if it is
288.7055555555555 K exactly, Vml_60Fs will be used, and otherwise the molar liquid vol-
umes will be obtained from the temperature-dependent correlations specified, [K]
T_gas_ref [float, optional] Reference temperature to use for the calculation of ideal-gas molar
volume and flow rate, [K]
P_gas_ref [float, optional] Reference pressure to use for the calculation of ideal-gas molar vol-
ume and flow rate, [Pa]
T_normal [float, optional] “Normal” gas reference temperature for the calculation of ideal-gas
molar volume in the “normal” reference state; default 273.15 K (0 C) according to [1], [K]
P_normal [float, optional] “Normal” gas reference pressure for the calculation of ideal-gas mo-
lar volume in the “normal” reference state; default 101325 Pa (1 atm) according to [1], [Pa]
T_standard [float, optional] “Standard” gas reference temperature for the calculation of ideal-
gas molar volume in the “standard” reference state; default 288.15 K (15° C) according to
[2]; 288.7055555555555 is also often used (60° F), [K]
P_standard [float, optional] “Standard” gas reference pressure for the calculation of ideal-gas
molar volume in the “standard” reference state; default 101325 Pa (1 atm) according to [2],
[Pa]
mu_LL [str, optional] Mixing rule for multiple liquid phase liquid viscosity calculations; see
MU_LL_METHODS for available options, [-]
mu_LL_power_exponent [float, optional] Liquid-liquid viscosity power-law mixing parame-
ter, used only when a power law mixing rule is selected, [-]
mu_VL [str, optional] Mixing rule for vapor-liquid viscosity calculations; see MU_VL_METHODS
for available options, [-]
mu_VL_power_exponent [float, optional] Vapor-liquid viscosity power-law mixing parameter,
used only when a power law mixing rule is selected, [-]
k_LL [str, optional] Mixing rule for multiple liquid phase liquid thermal conductivity calcula-
tions; see K_LL_METHODS for available options, [-]
k_LL_power_exponent [float, optional] Liquid-liquid thermal conductivity power-law mixing
parameter, used only when a power law mixing rule is selected, [-]
k_VL [str, optional] Mixing rule for vapor-liquid thermal conductivity calculations; see
K_VL_METHODS for available options, [-]
k_VL_power_exponent [float, optional] Vapor-liquid thermal conductivity power-law mixing
parameter, used only when a power law mixing rule is selected, [-]
sigma_LL [str, optional] Mixing rule for multiple liquid phase, air-liquid surface tension calcu-
lations; see SIGMA_LL_METHODS for available options, [-]
sigma_LL_power_exponent [float, optional] Air-liquid Liquid-liquid surface tension power-
law mixing parameter, used only when a power law mixing rule is selected, [-]
equilibrium_perturbation [float, optional] The relative perturbation to use when calculating
equilibrium derivatives numerically; for example if this is 1e-3 and T is the perturbation
variable and the statis is 500 K, the perturbation calculation temperature will be 500.5 K,
[various]
isobaric_expansion [str, optional] Mixing rule for multiphase isobaric expansion calculations;
see BETA_METHODS for available options, [-]
speed_of_sound [str, optional] Mixing rule for multiphase speed of sound calculations; see
SPEED_OF_SOUND_METHODS for available options, [-]
kappa [str, optional] Mixing rule for multiphase kappa calculations; see KAPPA_METHODS for
available options, [-]
Joule_Thomson [str, optional] Mixing rule for multiphase Joule-Thomson calculations; see
JT_METHODS for available options, [-]
Notes
The mixing rule “MINIMUM_PHASE_PROP” selects the lowest phase value of the property, always. The
mixing rule “MAXIMUM_PHASE_PROP” selects the highest phase value of the property, always.
The mixing rule “AS_ONE_LIQUID” calculates a property using the bulk composition but applied to the liquid
model only. The mixing rule “AS_ONE_GAS” calculates a property using the bulk composition but applied to
the gas model only.
The mixing rule “FROM_DERIVATIVE_SETTINGS” is used to indicate that the property depends on other
configurable properties; and when this is the specified option, those configurations will be used in the calculation
of this property.
The mixing rule “EQUILIBRIUM_DERIVATIVE” performs derivative calculations on flashes themselves. This
is quite slow in comparison to other methods.
References
[1], [2]
Methods
as_json
as_json()
• CAS number
T [float, optional] Temperature of the chemical (default 298.15 K), [K]
P [float, optional] Pressure of the chemical (default 101325 Pa) [Pa]
Notes
Warning: The Chemical class is not designed for high-performance or the ability to use different thermo-
dynamic models. It is especially limited in its multiphase support and the ability to solve with specifications
other than temperature and pressure. It is impossible to change constant properties such as a compound’s
critical temperature in this interface.
It is recommended to switch over to the thermo.flash interface which solves those problems and is better
positioned to grow. That interface also requires users to be responsible for their chemical constants and pure
component correlations; while default values can easily be loaded for most compounds, the user is ultimately
responsible for them.
Examples
>>> Chemical('hexane')
<Chemical [hexane], T=298.15 K, P=101325 Pa>
>>> N2 = Chemical('Nitrogen')
>>> N2.Tm, N2.Tb, N2.Tc # melting, boiling, and critical points [K]
(63.15, 77.355, 126.2)
>>> N2.Pt, N2.Pc # sublimation and critical pressure [Pa]
(12526.9697368421, 3394387.5)
>>> N2.CAS, N2.formula, N2.InChI, N2.smiles, N2.atoms # CAS number, formula, InChI␣
˓→string, smiles string, dictionary of atomic elements and their count
>>> N2.Cp, N2.rho, N2.mu # Heat capacity [J/kg/K], density [kg/m^3], viscosity␣
˓→[Pa*s]
>>> N2.Cpm, N2.Vm, N2.Hvapm # heat capacity [J/mol/K], molar volume [m^3/mol],␣
˓→enthalpy of vaporization [J/mol]
A great deal of properties are available; for a complete list look at the attributes list.
For pure species, the phase is easily identified, allowing for properties to be obtained without needing to specify
the phase. However, the properties are also available in the hypothetical gas phase (when under the boiling point)
and in the hypothetical liquid phase (when above the boiling point) as these properties are needed to evaluate
mixture properties. Specify the phase of a property to be retrieved by appending ‘l’ or ‘g’ or ‘s’ to the property.
Temperature dependent properties are calculated by objects which provide many useful features related to the
properties. To determine the temperature at which nitrogen has a saturation pressure of 1 MPa:
>>> N2.VaporPressure.solve_property(1E6)
103.73528598652341
To compute an integral of the ideal-gas heat capacity of nitrogen to determine the enthalpy required for a given
change in temperature. Note the thermodynamic objects calculate values in molar units always.
Derivatives of properties can be calculated as well, as may be needed by for example heat transfer calculations:
>>> N2.SurfaceTension.T_dependent_property_derivative(77)
-0.00022695346296730534
If a property is needed at multiple temperatures or pressures, it is faster to use the object directly to perform the
calculation rather than setting the conditions for the chemical.
These objects are also how the methods by which the properties are calculated can be changed. To see the
available methods for a property:
>>> N2.VaporPressure.all_methods
set(['VDI_PPDS', 'BOILING_CRITICAL', 'WAGNER_MCGARRY', 'AMBROSE_WALTON', 'COOLPROP',
˓→ 'LEE_KESLER_PSAT', 'EOS', 'ANTOINE_POLING', 'SANJARI', 'DIPPR_PERRY_8E', 'Edalat
˓→', 'WAGNER_POLING'])
To specify the method which should be used for calculations of a property. In the example below, the Lee-kesler
correlation for vapor pressure is specified.
>>> N2.calculate(80)
>>> N2.Psat
136979.4840843189
>>> N2.VaporPressure.method = 'LEE_KESLER_PSAT'
>>> N2.Psat
134987.76815364443
For memory reduction, these objects are shared by all chemicals which are the same; new instances will use the
same specified methods.
>>> N2.VaporPressure.plot_T_dependent_property()
>>> N2.VolumeLiquid.plot_isotherm(T=77, Pmin=1E5, Pmax=1E7)
>>> N2.VolumeLiquid.plot_isobar(P=1E6, Tmin=66, Tmax=120)
>>> N2.VolumeLiquid.plot_TP_dependent_property(Tmin=60, Tmax=100, Pmin=1E5,␣
˓→Pmax=1E7)
Attributes
T [float] Temperature of the chemical, [K]
P [float] Pressure of the chemical, [Pa]
phase [str] Phase of the chemical; one of ‘s’, ‘l’, ‘g’, or ‘l/g’.
ID [str] User specified string by which the chemical’s CAS was looked up.
CAS [str] The CAS number of the chemical.
PubChem [int] PubChem Compound identifier (CID) of the chemical; all chemicals are sourced
from their database. Chemicals can be looked at online at https://pubchem.ncbi.nlm.nih.gov.
MW [float] Molecular weight of the compound, [g/mol]
formula [str] Molecular formula of the compound.
atoms [dict] dictionary of counts of individual atoms, indexed by symbol with proper capital-
ization, [-]
similarity_variable [float] Similarity variable, see chemicals.elements.
similarity_variable for the definition, [mol/g]
smiles [str] Simplified molecular-input line-entry system representation of the compound.
Vmg_STP [float] Molar volume of gas phase at 298.15 K and 101325 Pa according to the ideal
gas law, [m^3/mol]
Vms_Tm [float] Molar volume of solid phase at the melting point [m^3/mol]
rhos_Tm [float] Mass density of solid phase at the melting point [kg/m^3]
Hvap_Tbm [float] Molar enthalpy of vaporization at the normal boiling point [J/mol]
Hvap_Tb [float] Mass enthalpy of vaporization at the normal boiling point [J/kg]
Hvapm_298 [float] Molar enthalpy of vaporization at 298.15 K [J/mol]
Hvap_298 [float] Mass enthalpy of vaporization at 298.15 K [J/kg]
alpha Thermal diffusivity of the chemical at its current temperature, pressure, and phase in
units of [m^2/s].
alphag Thermal diffusivity of the gas phase of the chemical at its current temperature and pres-
sure, in units of [m^2/s].
alphal Thermal diffusivity of the liquid phase of the chemical at its current temperature and
pressure, in units of [m^2/s].
API API gravity of the liquid phase of the chemical, [degrees].
aromatic_rings Number of aromatic rings in a chemical, computed with RDKit from a chem-
ical’s SMILES.
atom_fractions Dictionary of atom:fractional occurence of the elements in a chemical.
Bvirial Second virial coefficient of the gas phase of the chemical at its current temperature
and pressure, in units of [mol/m^3].
charge Charge of a chemical, computed with RDKit from a chemical’s SMILES.
Cp Mass heat capacity of the chemical at its current phase and temperature, in units of [J/kg/K].
Cpg Gas-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cpgm Gas-phase ideal gas heat capacity of the chemical at its current temperature, in units of
[J/mol/K].
Cpl Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cplm Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K].
Cpm Molar heat capacity of the chemical at its current phase and temperature, in units of
[J/mol/K].
Cps Solid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cpsm Solid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K].
Cvg Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature,
in units of [J/kg/K].
Cvgm Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current tempera-
ture, in units of [J/mol/K].
eos Equation of state object held by the chemical; used to calculate excess thermodynamic quan-
tities, and also provides a vapor pressure curve, enthalpy of vaporization curve, fugacity,
thermodynamic partial derivatives, and more; see thermo.eos for a full listing.
Hill Hill formula of a compound.
Hvap Enthalpy of vaporization of the chemical at its current temperature, in units of [J/kg].
Hvapm Enthalpy of vaporization of the chemical at its current temperature, in units of [J/mol].
isentropic_exponent Gas-phase ideal-gas isentropic exponent of the chemical at its current
temperature, [dimensionless].
isobaric_expansion Isobaric (constant-pressure) expansion of the chemical at its current
phase and temperature, in units of [1/K].
isobaric_expansion_g Isobaric (constant-pressure) expansion of the gas phase of the chem-
ical at its current temperature and pressure, in units of [1/K].
isobaric_expansion_l Isobaric (constant-pressure) expansion of the liquid phase of the
chemical at its current temperature and pressure, in units of [1/K].
JT Joule Thomson coefficient of the chemical at its current phase and temperature, in units of
[K/Pa].
JTg Joule Thomson coefficient of the chemical in the gas phase at its current temperature and
pressure, in units of [K/Pa].
JTl Joule Thomson coefficient of the chemical in the liquid phase at its current temperature and
pressure, in units of [K/Pa].
k Thermal conductivity of the chemical at its current phase, temperature, and pressure in units
of [W/m/K].
kg Thermal conductivity of the chemical in the gas phase at its current temperature and pressure,
in units of [W/m/K].
kl Thermal conductivity of the chemical in the liquid phase at its current temperature and pres-
sure, in units of [W/m/K].
mass_fractions Dictionary of atom:mass-weighted fractional occurence of elements.
mu Viscosity of the chemical at its current phase, temperature, and pressure in units of [Pa*s].
mug Viscosity of the chemical in the gas phase at its current temperature and pressure, in units
of [Pa*s].
mul Viscosity of the chemical in the liquid phase at its current temperature and pressure, in units
of [Pa*s].
nu Kinematic viscosity of the the chemical at its current temperature, pressure, and phase in
units of [m^2/s].
nug Kinematic viscosity of the gas phase of the chemical at its current temperature and pressure,
in units of [m^2/s].
nul Kinematic viscosity of the liquid phase of the chemical at its current temperature and pres-
sure, in units of [m^2/s].
Parachor Parachor of the chemical at its current temperature and pressure, in units of
[N^0.25*m^2.75/mol].
permittivity Relative permittivity (dielectric constant) of the chemical at its current temper-
ature, [dimensionless].
Poynting Poynting correction factor [dimensionless] for use in phase equilibria methods based
on activity coefficients or other reference states.
Pr Prandtl number of the chemical at its current temperature, pressure, and phase; [dimension-
less].
Prg Prandtl number of the gas phase of the chemical at its current temperature and pressure,
[dimensionless].
Prl Prandtl number of the liquid phase of the chemical at its current temperature and pressure,
[dimensionless].
Psat Vapor pressure of the chemical at its current temperature, in units of [Pa].
PSRK_groups Dictionary of PSRK subgroup: count groups for the PSRK subgroups, as deter-
mined by DDBST’s online service.
rdkitmol RDKit object of the chemical, without hydrogen.
rdkitmol_Hs RDKit object of the chemical, with hydrogen.
rho Mass density of the chemical at its current phase and temperature and pressure, in units of
[kg/m^3].
rhog Gas-phase mass density of the chemical at its current temperature and pressure, in units
of [kg/m^3].
rhogm Molar density of the chemical in the gas phase at the current temperature and pressure,
in units of [mol/m^3].
rhol Liquid-phase mass density of the chemical at its current temperature and pressure, in units
of [kg/m^3].
rholm Molar density of the chemical in the liquid phase at the current temperature and pressure,
in units of [mol/m^3].
rhom Molar density of the chemical at its current phase and temperature and pressure, in units
of [mol/m^3].
rhos Solid-phase mass density of the chemical at its current temperature, in units of [kg/m^3].
rhosm Molar density of the chemical in the solid phase at the current temperature and pressure,
in units of [mol/m^3].
rings Number of rings in a chemical, computed with RDKit from a chemical’s SMILES.
SG Specific gravity of the chemical, [dimensionless].
SGg Specific gravity of the gas phase of the chemical, [dimensionless].
SGl Specific gravity of the liquid phase of the chemical at the specified temperature and pressure,
[dimensionless].
SGs Specific gravity of the solid phase of the chemical at the specified temperature and pressure,
[dimensionless].
sigma Surface tension of the chemical at its current temperature, in units of [N/m].
solubility_parameter Solubility parameter of the chemical at its current temperature and
pressure, in units of [Pa^0.5].
UNIFAC_Dortmund_groups Dictionary of Dortmund UNIFAC subgroup: count groups for the
Dortmund UNIFAC subgroups, as determined by DDBST’s online service.
UNIFAC_groups Dictionary of UNIFAC subgroup: count groups for the original UNIFAC sub-
groups, as determined by DDBST’s online service.
UNIFAC_R UNIFAC R (normalized Van der Waals volume), dimensionless.
UNIFAC_Q UNIFAC Q (normalized Van der Waals area), dimensionless.
Van_der_Waals_area Unnormalized Van der Waals area, in units of [m^2/mol].
Van_der_Waals_volume Unnormalized Van der Waals volume, in units of [m^3/mol].
Vm Molar volume of the chemical at its current phase and temperature and pressure, in units of
[m^3/mol].
Vmg Gas-phase molar volume of the chemical at its current temperature and pressure, in units of
[m^3/mol].
Vml Liquid-phase molar volume of the chemical at its current temperature and pressure, in units
of [m^3/mol].
Vms Solid-phase molar volume of the chemical at its current temperature, in units of [m^3/mol].
Z Compressibility factor of the chemical at its current phase and temperature and pressure, [di-
mensionless].
Zg Compressibility factor of the chemical in the gas phase at the current temperature and pres-
sure, [dimensionless].
Zl Compressibility factor of the chemical in the liquid phase at the current temperature and
pressure, [dimensionless].
Zs Compressibility factor of the chemical in the solid phase at the current temperature and pres-
sure, [dimensionless].
Methods
Reynolds([V, D])
Bond
Capillary
Grashof
Jakob
Peclet_heat
Tsat
Weber
calc_H
calc_H_excess
calc_S
calc_S_excess
calculate
calculate_PH
calculate_PS
calculate_TH
calculate_TS
set_TP_sources
set_constant_sources
set_constants
set_eos
set_ref
set_thermo
property A
Helmholtz energy of the chemical at its current temperature and pressure, in units of [J/kg].
This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also de-
pends on the molar volume of the chemical at its current conditions.
property API
API gravity of the liquid phase of the chemical, [degrees]. The reference condition is water at 15.6 °C (60
°F) and 1 atm (rho=999.016 kg/m^3, standardized).
Examples
>>> Chemical('water').API
10.
property Am
Helmholtz energy of the chemical at its current temperature and pressure, in units of [J/mol].
This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also de-
pends on the molar volume of the chemical at its current conditions.
Bond(L=None)
property Bvirial
Second virial coefficient of the gas phase of the chemical at its current temperature and pressure, in units
of [mol/m^3].
This property uses the object-oriented interface thermo.volume.VolumeGas, converting its result with
thermo.utils.B_from_Z.
Examples
Capillary(V=None)
property Cp
Mass heat capacity of the chemical at its current phase and temperature, in units of [J/kg/K].
Utilizes the object oriented interfaces thermo.heat_capacity.HeatCapacitySolid, thermo.
heat_capacity.HeatCapacityLiquid, and thermo.heat_capacity.HeatCapacityGas to perform
the actual calculation of each property. Note that those interfaces provide output in molar units (J/mol/K).
Examples
>>> w = Chemical('water')
>>> w.Cp, w.phase
(4180., 'l')
>>> Chemical('palladium').Cp
234.
property Cpg
Gas-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation
of this property at other temperatures, or specifying manually the method used to calculate it, and more -
see the object oriented interface thermo.heat_capacity.HeatCapacityGas; each Chemical instance
creates one to actually perform the calculations. Note that that interface provides output in molar units.
Examples
property Cpgm
Gas-phase ideal gas heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For
calculation of this property at other temperatures, or specifying manually the method used to calculate it,
and more - see the object oriented interface thermo.heat_capacity.HeatCapacityGas; each Chemical
instance creates one to actually perform the calculations.
Examples
>>> Chemical('water').Cpgm
33.58
>>> Chemical('water').HeatCapacityGas.T_dependent_property(320)
33.67
>>> Chemical('water').HeatCapacityGas.T_dependent_property_integral(300, 320)
672.
property Cpl
Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation of
this property at other temperatures, or specifying manually the method used to calculate it, and more - see
the object oriented interface thermo.heat_capacity.HeatCapacityLiquid; each Chemical instance
creates one to actually perform the calculations. Note that that interface provides output in molar units.
Examples
Ideal entropy change of water from 280 K to 340 K, output converted back to mass-based units of J/kg/K.
property Cplm
Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For calculation
of this property at other temperatures, or specifying manually the method used to calculate it, and more - see
the object oriented interface thermo.heat_capacity.HeatCapacityLiquid; each Chemical instance
creates one to actually perform the calculations.
Notes
Some methods give heat capacity along the saturation line, some at 1 atm but only up to the normal boiling
point, and some give heat capacity at 1 atm up to the normal boiling point and then along the saturation
line. Real-liquid heat capacity is pressure dependent, but this interface is not.
Examples
>>> Chemical('water').Cplm
75.3
>>> Chemical('water').HeatCapacityLiquid.T_dependent_property(320)
75.2
>>> Chemical('water').HeatCapacityLiquid.T_dependent_property_integral(300, 320)
1505.
property Cpm
Molar heat capacity of the chemical at its current phase and temperature, in units of [J/mol/K].
Utilizes the object oriented interfaces thermo.heat_capacity.HeatCapacitySolid, thermo.
heat_capacity.HeatCapacityLiquid, and thermo.heat_capacity.HeatCapacityGas to perform
the actual calculation of each property.
Examples
>>> Chemical('cubane').Cpm
137.
>>> Chemical('ethylbenzene', T=550, P=3E6).Cpm
294.
property Cps
Solid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation of
this property at other temperatures, or specifying manually the method used to calculate it, and more - see
the object oriented interface thermo.heat_capacity.HeatCapacitySolid; each Chemical instance
creates one to actually perform the calculations. Note that that interface provides output in molar units.
Examples
property Cpsm
Solid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For calculation of
this property at other temperatures, or specifying manually the method used to calculate it, and more - see
the object oriented interface thermo.heat_capacity.HeatCapacitySolid; each Chemical instance
creates one to actually perform the calculations.
Examples
>>> Chemical('palladium').Cpsm
24.9
>>> Chemical('palladium').HeatCapacitySolid.T_dependent_property(320)
25.
>>> sorted(Chemical('palladium').HeatCapacitySolid.all_methods)
['CRCSTD', 'LASTOVKA_S', 'PERRY151']
property Cvg
Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of
[J/kg/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an
equation of state.
Examples
property Cvgm
Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of
[J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an
equation of state.
Examples
Grashof(Tw=None, L=None)
property Hill
Hill formula of a compound. For a description of the Hill system, see chemicals.elements.
atoms_to_Hill.
Examples
property Hvap
Enthalpy of vaporization of the chemical at its current temperature, in units of [J/kg].
This property uses the object-oriented interface thermo.phase_change.EnthalpyVaporization, but
converts its results from molar to mass units.
Examples
property Hvapm
Enthalpy of vaporization of the chemical at its current temperature, in units of [J/mol]. For calculation of
this property at other temperatures, or specifying manually the method used to calculate it, and more - see
the object oriented interface thermo.phase_change.EnthalpyVaporization; each Chemical instance
creates one to actually perform the calculations.
Examples
property JT
Joule Thomson coefficient of the chemical at its current phase and temperature, in units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
>>> Chemical('water').JT
-2.21e-07
property JTg
Joule Thomson coefficient of the chemical in the gas phase at its current temperature and pressure, in units
of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Utilizes the temperature-derivative method of thermo.volume.VolumeGas and the temperature-
dependent heat capacity method thermo.heat_capacity.HeatCapacityGas to obtain the properties
required for the actual calculation.
Examples
property JTl
Joule Thomson coefficient of the chemical in the liquid phase at its current temperature and pressure, in
units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Utilizes the temperature-derivative method of thermo.volume.VolumeLiquid and the temperature-
dependent heat capacity method thermo.heat_capacity.HeatCapacityLiquid to obtain the prop-
erties required for the actual calculation.
Examples
Jakob(Tw=None)
property PSRK_groups
Dictionary of PSRK subgroup: count groups for the PSRK subgroups, as determined by DDBST’s online
service.
Examples
>>> Chemical('Cumene').PSRK_groups
{1: 2, 9: 5, 13: 1}
property Parachor
Parachor of the chemical at its current temperature and pressure, in units of [N^0.25*m^2.75/mol].
𝜎 0.25 𝑀 𝑊
𝑃 =
𝜌𝐿 − 𝜌𝑉
Calculated based on surface tension, density of the liquid phase, and molecular weight. For uses of this
property, see thermo.utils.Parachor.
The gas density is calculated using the ideal-gas law.
Examples
>>> Chemical('octane').Parachor
6.2e-05
Peclet_heat(V=None, D=None)
property Poynting
Poynting correction factor [dimensionless] for use in phase equilibria methods based on activity coeffi-
cients or other reference states. Performs the shortcut calculation assuming molar volume is independent
of pressure.
𝑉𝑙 (𝑃 − 𝑃 𝑠𝑎𝑡 )
[︂ ]︂
Poy = exp
𝑅𝑇
The full calculation normally returns values very close to the approximate ones. This property is defined
in terms of pure components only.
Notes
Examples
property Pr
Prandtl number of the chemical at its current temperature, pressure, and phase; [dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
>>> Chemical('acetone').Pr
4.1
property Prg
Prandtl number of the gas phase of the chemical at its current temperature and pressure, [dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Utilizes the temperature and pressure dependent object oriented interfaces thermo.viscosity.
ViscosityGas, thermo.thermal_conductivity.ThermalConductivityGas, and thermo.
heat_capacity.HeatCapacityGas to calculate the actual properties.
Examples
>>> Chemical('NH3').Prg
0.84
property Prl
Prandtl number of the liquid phase of the chemical at its current temperature and pressure, [dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Utilizes the temperature and pressure dependent object oriented interfaces thermo.viscosity.
ViscosityLiquid, thermo.thermal_conductivity.ThermalConductivityLiquid, and thermo.
heat_capacity.HeatCapacityLiquid to calculate the actual properties.
Examples
property Psat
Vapor pressure of the chemical at its current temperature, in units of [Pa]. For calculation of this property
at other temperatures, or specifying manually the method used to calculate it, and more - see the object
oriented interface thermo.vapor_pressure.VaporPressure; each Chemical instance creates one to
actually perform the calculations.
Examples
property R_specific
Specific gas constant, in units of [J/kg/K].
Examples
>>> Chemical('water').R_specific
461.5
Reynolds(V=None, D=None)
property SG
Specific gravity of the chemical, [dimensionless].
For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the chemical and the reference
fluid, air. For liquid and solid phase conditions, this is calculated based on a reference fluid of water at 4°C
at 1 atm, but the with the liquid or solid chemical’s density at the currently specified conditions.
Examples
>>> Chemical('MTBE').SG
0.73
property SGg
Specific gravity of the gas phase of the chemical, [dimensionless]. The reference condition is air at 15.6
°C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor of the
reference gas and the chemical both at the reference conditions, not the conditions of the chemical.
Examples
>>> Chemical('argon').SGg
1.3
property SGl
Specific gravity of the liquid phase of the chemical at the specified temperature and pressure, [dimension-
less]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). For liquids, SG is defined
that the reference chemical’s T and P are fixed, but the chemical itself varies with the specified T and P.
Examples
property SGs
Specific gravity of the solid phase of the chemical at the specified temperature and pressure, [dimension-
less]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). The SG varries with
temperature and pressure but only very slightly.
Examples
>>> Chemical('iron').SGs
7.8
Tsat(P)
property U
Internal energy of the chemical at its current temperature and pressure, in units of [J/kg].
This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also de-
pends on the molar volume of the chemical at its current conditions.
property UNIFAC_Dortmund_groups
Dictionary of Dortmund UNIFAC subgroup: count groups for the Dortmund UNIFAC subgroups, as de-
termined by DDBST’s online service.
Examples
>>> Chemical('Cumene').UNIFAC_Dortmund_groups
{1: 2, 9: 5, 13: 1}
property UNIFAC_Q
UNIFAC Q (normalized Van der Waals area), dimensionless. Used in the UNIFAC model.
Examples
>>> Chemical('decane').UNIFAC_Q
6.016
property UNIFAC_R
UNIFAC R (normalized Van der Waals volume), dimensionless. Used in the UNIFAC model.
Examples
>>> Chemical('benzene').UNIFAC_R
3.1878
property UNIFAC_groups
Dictionary of UNIFAC subgroup: count groups for the original UNIFAC subgroups, as determined by
DDBST’s online service.
Examples
>>> Chemical('Cumene').UNIFAC_groups
{1: 2, 9: 5, 13: 1}
property Um
Internal energy of the chemical at its current temperature and pressure, in units of [J/mol].
This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also de-
pends on the molar volume of the chemical at its current conditions.
property Van_der_Waals_area
Unnormalized Van der Waals area, in units of [m^2/mol].
Examples
>>> Chemical('hexane').Van_der_Waals_area
964000.0
property Van_der_Waals_volume
Unnormalized Van der Waals volume, in units of [m^3/mol].
Examples
>>> Chemical('hexane').Van_der_Waals_volume
6.8261966e-05
property Vm
Molar volume of the chemical at its current phase and temperature and pressure, in units of [m^3/mol].
Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.
VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property.
Examples
property Vmg
Gas-phase molar volume of the chemical at its current temperature and pressure, in units of [m^3/mol].
For calculation of this property at other temperatures or pressures, or specifying manually the method used
to calculate it, and more - see the object oriented interface thermo.volume.VolumeGas; each Chemical
instance creates one to actually perform the calculations.
Examples
Estimate the molar volume of the core of the sun, at 15 million K and 26.5 PetaPascals, assuming pure
helium (actually 68% helium):
property Vmg_ideal
Gas-phase molar volume of the chemical at its current temperature and pressure calculated with the ideal-
gas law, in units of [m^3/mol].
Examples
property Vml
Liquid-phase molar volume of the chemical at its current temperature and pressure, in units of [m^3/mol].
For calculation of this property at other temperatures or pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.volume.VolumeLiquid; each
Chemical instance creates one to actually perform the calculations.
Examples
property Vms
Solid-phase molar volume of the chemical at its current temperature, in units of [m^3/mol]. For calculation
of this property at other temperatures, or specifying manually the method used to calculate it, and more -
see the object oriented interface thermo.volume.VolumeSolid; each Chemical instance creates one to
actually perform the calculations.
Examples
>>> Chemical('iron').Vms
7.09e-06
Weber(V=None, D=None)
property Z
Compressibility factor of the chemical at its current phase and temperature and pressure, [dimensionless].
Examples
property Zg
Compressibility factor of the chemical in the gas phase at the current temperature and pressure, [dimen-
sionless].
Utilizes the object oriented interface and thermo.volume.VolumeGas to perform the actual calculation
of molar volume.
Examples
property Zl
Compressibility factor of the chemical in the liquid phase at the current temperature and pressure, [dimen-
sionless].
Utilizes the object oriented interface and thermo.volume.VolumeLiquid to perform the actual calcula-
tion of molar volume.
Examples
>>> Chemical('water').Zl
0.00073
property Zs
Compressibility factor of the chemical in the solid phase at the current temperature and pressure, [dimen-
sionless].
Utilizes the object oriented interface and thermo.volume.VolumeSolid to perform the actual calculation
of molar volume.
Examples
>>> Chemical('palladium').Z
0.000362
property absolute_permittivity
Absolute permittivity of the chemical at its current temperature, in units of [farad/meter]. Those units are
equivalent to ampere^2*second^4/kg/m^3.
Examples
property alpha
Thermal diffusivity of the chemical at its current temperature, pressure, and phase in units of [m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Examples
>>> Chemical('furfural').alpha
8.7e-08
property alphag
Thermal diffusivity of the gas phase of the chemical at its current temperature and pressure, in units of
[m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeGas,
thermo.thermal_conductivity.ThermalConductivityGas, and thermo.heat_capacity.
HeatCapacityGas to calculate the actual properties.
Examples
>>> Chemical('ammonia').alphag
1.69e-05
property alphal
Thermal diffusivity of the liquid phase of the chemical at its current temperature and pressure, in units of
[m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.
VolumeLiquid, thermo.thermal_conductivity.ThermalConductivityLiquid, and thermo.
heat_capacity.HeatCapacityLiquid to calculate the actual properties.
Examples
property aromatic_rings
Number of aromatic rings in a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is
not available, holds None.
Examples
>>> Chemical('Paclitaxel').aromatic_rings
3
property atom_fractions
Dictionary of atom:fractional occurence of the elements in a chemical. Useful when performing element
balances. For mass-fraction occurences, see mass_fractions.
Examples
calc_H(T, P)
calc_H_excess(T, P)
calc_S(T, P)
calc_S_excess(T, P)
calculate(T=None, P=None)
calculate_PH(P, H)
calculate_PS(P, S)
calculate_TH(T, H)
calculate_TS(T, S)
property charge
Charge of a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is not available, holds
None.
Examples
Examples
>>> Chemical('decane').draw_2d()
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=300x300 at 0x...>
Examples
>>> Chemical('cubane').draw_3d()
None
property economic_status
Dictionary of economic status indicators for the chemical.
Examples
>>> Chemical('benzene').economic_status
["US public: {'Manufactured': 6165232.1, 'Imported': 463146.474, 'Exported':␣
˓→271908.252}", '1,000,000 - 10,000,000 tonnes per annum', 'Intermediate Use␣
property eos
Equation of state object held by the chemical; used to calculate excess thermodynamic quantities, and also
provides a vapor pressure curve, enthalpy of vaporization curve, fugacity, thermodynamic partial deriva-
tives, and more; see thermo.eos for a full listing.
Examples
>>> Chemical('methane').eos.V_g
0.0244
property is_acid
Method to return whether or not this chemical is in the category acid, [-]
property is_acyl_halide
Method to return whether or not this chemical is in the category acyl_halide, [-]
property is_alcohol
Method to return whether or not this chemical is in the category alcohol, [-]
property is_aldehyde
Method to return whether or not this chemical is in the category aldehyde, [-]
property is_alkane
Method to return whether or not this chemical is in the category alkane, [-]
property is_alkene
Method to return whether or not this chemical is in the category alkene, [-]
property is_alkylaluminium
Method to return whether or not this chemical is in the category alkylaluminium, [-]
property is_alkyllithium
Method to return whether or not this chemical is in the category alkyllithium, [-]
property is_alkylmagnesium_halide
Method to return whether or not this chemical is in the category alkylmagnesium_halide, [-]
property is_alkyne
Method to return whether or not this chemical is in the category alkyne, [-]
property is_amide
Method to return whether or not this chemical is in the category amide, [-]
property is_amidine
Method to return whether or not this chemical is in the category amidine, [-]
property is_amine
Method to return whether or not this chemical is in the category amine, [-]
property is_anhydride
Method to return whether or not this chemical is in the category anhydride, [-]
property is_aromatic
Method to return whether or not this chemical is in the category aromatic, [-]
property is_azide
Method to return whether or not this chemical is in the category azide, [-]
property is_azo
Method to return whether or not this chemical is in the category azo, [-]
property is_borinic_acid
Method to return whether or not this chemical is in the category borinic_acid, [-]
property is_borinic_ester
Method to return whether or not this chemical is in the category borinic_ester, [-]
property is_boronic_acid
Method to return whether or not this chemical is in the category boronic_acid, [-]
property is_boronic_ester
Method to return whether or not this chemical is in the category boronic_ester, [-]
property is_branched_alkane
Method to return whether or not this chemical is in the category branched_alkane, [-]
property is_bromoalkane
Method to return whether or not this chemical is in the category bromoalkane, [-]
property is_carbamate
Method to return whether or not this chemical is in the category carbamate, [-]
property is_carbodithio
Method to return whether or not this chemical is in the category carbodithio, [-]
property is_carbodithioic_acid
Method to return whether or not this chemical is in the category carbodithioic_acid, [-]
property is_carbonate
Method to return whether or not this chemical is in the category carbonate, [-]
property is_carbothioic_o_acid
Method to return whether or not this chemical is in the category carbothioic_o_acid, [-]
property is_carbothioic_s_acid
Method to return whether or not this chemical is in the category carbothioic_s_acid, [-]
property is_carboxylate
Method to return whether or not this chemical is in the category carboxylate, [-]
property is_carboxylic_acid
Method to return whether or not this chemical is in the category carboxylic_acid, [-]
property is_carboxylic_anhydride
Method to return whether or not this chemical is in the category carboxylic_anhydride, [-]
property is_chloroalkane
Method to return whether or not this chemical is in the category chloroalkane, [-]
property is_cyanate
Method to return whether or not this chemical is in the category cyanate, [-]
property is_cycloalkane
Method to return whether or not this chemical is in the category cycloalkane, [-]
property is_disulfide
Method to return whether or not this chemical is in the category disulfide, [-]
property is_ester
Method to return whether or not this chemical is in the category ester, [-]
property is_ether
Method to return whether or not this chemical is in the category ether, [-]
property is_fluoroalkane
Method to return whether or not this chemical is in the category fluoroalkane, [-]
property is_haloalkane
Method to return whether or not this chemical is in the category haloalkane, [-]
property is_hydroperoxide
Method to return whether or not this chemical is in the category hydroperoxide, [-]
property is_imide
Method to return whether or not this chemical is in the category imide, [-]
property is_imine
Method to return whether or not this chemical is in the category imine, [-]
property is_inorganic
Method to return whether or not this chemical is in the category inorganic, [-]
property is_iodoalkane
Method to return whether or not this chemical is in the category iodoalkane, [-]
property is_is_hydrocarbon
Method to return whether or not this chemical is in the category is_hydrocarbon, [-]
property is_isocyanate
Method to return whether or not this chemical is in the category isocyanate, [-]
property is_isonitrile
Method to return whether or not this chemical is in the category isonitrile, [-]
property is_isothiocyanate
Method to return whether or not this chemical is in the category isothiocyanate, [-]
property is_ketone
Method to return whether or not this chemical is in the category ketone, [-]
property is_mercaptan
Method to return whether or not this chemical is in the category mercaptan, [-]
property is_methylenedioxy
Method to return whether or not this chemical is in the category methylenedioxy, [-]
property is_nitrate
Method to return whether or not this chemical is in the category nitrate, [-]
property is_nitrile
Method to return whether or not this chemical is in the category nitrile, [-]
property is_nitrite
Method to return whether or not this chemical is in the category nitrite, [-]
property is_nitro
Method to return whether or not this chemical is in the category nitro, [-]
property is_nitroso
Method to return whether or not this chemical is in the category nitroso, [-]
property is_organic
Method to return whether or not this chemical is in the category organic, [-]
property is_orthocarbonate_ester
Method to return whether or not this chemical is in the category orthocarbonate_ester, [-]
property is_orthoester
Method to return whether or not this chemical is in the category orthoester, [-]
property is_oxime
Method to return whether or not this chemical is in the category oxime, [-]
property is_peroxide
Method to return whether or not this chemical is in the category peroxide, [-]
property is_phenol
Method to return whether or not this chemical is in the category phenol, [-]
property is_phosphate
Method to return whether or not this chemical is in the category phosphate, [-]
property is_phosphine
Method to return whether or not this chemical is in the category phosphine, [-]
property is_phosphodiester
Method to return whether or not this chemical is in the category phosphodiester, [-]
property is_phosphonic_acid
Method to return whether or not this chemical is in the category phosphonic_acid, [-]
property is_polyol
Method to return whether or not this chemical is in the category polyol, [-]
property is_primary_aldimine
Method to return whether or not this chemical is in the category primary_aldimine, [-]
property is_primary_amine
Method to return whether or not this chemical is in the category primary_amine, [-]
property is_primary_ketimine
Method to return whether or not this chemical is in the category primary_ketimine, [-]
property is_pyridyl
Method to return whether or not this chemical is in the category pyridyl, [-]
property is_quat
Method to return whether or not this chemical is in the category quat, [-]
property is_secondary_aldimine
Method to return whether or not this chemical is in the category secondary_aldimine, [-]
property is_secondary_amine
Method to return whether or not this chemical is in the category secondary_amine, [-]
property is_secondary_ketimine
Method to return whether or not this chemical is in the category secondary_ketimine, [-]
property is_siloxane
Method to return whether or not this chemical is in the category siloxane, [-]
property is_silyl_ether
Method to return whether or not this chemical is in the category silyl_ether, [-]
property is_sulfide
Method to return whether or not this chemical is in the category sulfide, [-]
property is_sulfinic_acid
Method to return whether or not this chemical is in the category sulfinic_acid, [-]
property is_sulfonate_ester
Method to return whether or not this chemical is in the category sulfonate_ester, [-]
property is_sulfone
Method to return whether or not this chemical is in the category sulfone, [-]
property is_sulfonic_acid
Method to return whether or not this chemical is in the category sulfonic_acid, [-]
property is_sulfoxide
Method to return whether or not this chemical is in the category sulfoxide, [-]
property is_tertiary_amine
Method to return whether or not this chemical is in the category tertiary_amine, [-]
property is_thial
Method to return whether or not this chemical is in the category thial, [-]
property is_thiocyanate
Method to return whether or not this chemical is in the category thiocyanate, [-]
property is_thioketone
Method to return whether or not this chemical is in the category thioketone, [-]
property is_thiolester
Method to return whether or not this chemical is in the category thiolester, [-]
property is_thionoester
Method to return whether or not this chemical is in the category thionoester, [-]
property isentropic_exponent
Gas-phase ideal-gas isentropic exponent of the chemical at its current temperature, [dimensionless]. Does
not include pressure-compensation from an equation of state.
Examples
>>> Chemical('hydrogen').isentropic_exponent
1.40
property isobaric_expansion
Isobaric (constant-pressure) expansion of the chemical at its current phase and temperature, in units of
[1/K].
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
Radical change in value just above and below the critical temperature of water:
property isobaric_expansion_g
Isobaric (constant-pressure) expansion of the gas phase of the chemical at its current temperature and pres-
sure, in units of [1/K].
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Utilizes the temperature-derivative method of thermo.VolumeGas to perform the actual calculation. The
derivatives are all numerical.
Examples
property isobaric_expansion_l
Isobaric (constant-pressure) expansion of the liquid phase of the chemical at its current temperature and
pressure, in units of [1/K].
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property k
Thermal conductivity of the chemical at its current phase, temperature, and pressure in units of [W/m/K].
Utilizes the object oriented interfaces thermo.thermal_conductivity.
ThermalConductivityLiquid and thermo.thermal_conductivity.ThermalConductivityGas
to perform the actual calculation of each property.
Examples
property kg
Thermal conductivity of the chemical in the gas phase at its current temperature and pressure, in units of
[W/m/K].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.
ThermalConductivityGas; each Chemical instance creates one to actually perform the calculations.
Examples
property kl
Thermal conductivity of the chemical in the liquid phase at its current temperature and pressure, in units
of [W/m/K].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.
ThermalConductivityLiquid; each Chemical instance creates one to actually perform the calculations.
Examples
property legal_status
Dictionary of legal status indicators for the chemical.
Examples
>>> Chemical('benzene').legal_status
{'DSL': 'LISTED', 'TSCA': 'LISTED', 'EINECS': 'LISTED', 'NLP': 'UNLISTED', 'SPIN
˓→': 'LISTED'}
property mass_fractions
Dictionary of atom:mass-weighted fractional occurence of elements. Useful when performing mass bal-
ances. For atom-fraction occurences, see atom_fractions.
Examples
>>> Chemical('water').mass_fractions
{'H': 0.11189834407236524, 'O': 0.8881016559276347}
property mu
Viscosity of the chemical at its current phase, temperature, and pressure in units of [Pa*s].
Utilizes the object oriented interfaces thermo.viscosity.ViscosityLiquid and thermo.
viscosity.ViscosityGas to perform the actual calculation of each property.
Examples
property mug
Viscosity of the chemical in the gas phase at its current temperature and pressure, in units of [Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.viscosity.ViscosityGas;
each Chemical instance creates one to actually perform the calculations.
Examples
property mul
Viscosity of the chemical in the liquid phase at its current temperature and pressure, in units of [Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.viscosity.ViscosityLiquid;
each Chemical instance creates one to actually perform the calculations.
Examples
property nu
Kinematic viscosity of the the chemical at its current temperature, pressure, and phase in units of [m^2/s].
𝜇
𝜈=
𝜌
Examples
>>> Chemical('argon').nu
1.38e-05
property nug
Kinematic viscosity of the gas phase of the chemical at its current temperature and pressure, in units of
[m^2/s].
𝜇
𝜈=
𝜌
Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeGas,
thermo.viscosity.ViscosityGas to calculate the actual properties.
Examples
property nul
Kinematic viscosity of the liquid phase of the chemical at its current temperature and pressure, in units of
[m^2/s].
𝜇
𝜈=
𝜌
Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.
VolumeLiquid, thermo.viscosity.ViscosityLiquid to calculate the actual properties.
Examples
property permittivity
Relative permittivity (dielectric constant) of the chemical at its current temperature, [dimensionless].
For calculation of this property at other temperatures, or specifying manually the method used to calculate
it, and more - see the object oriented interface thermo.permittivity.PermittivityLiquid; each
Chemical instance creates one to actually perform the calculations.
Examples
property rdkitmol
RDKit object of the chemical, without hydrogen. If RDKit is not available, holds None.
For examples of what can be done with RDKit, see their website.
property rdkitmol_Hs
RDKit object of the chemical, with hydrogen. If RDKit is not available, holds None.
For examples of what can be done with RDKit, see their website.
property rho
Mass density of the chemical at its current phase and temperature and pressure, in units of [kg/m^3].
Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.
VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property.
Note that those interfaces provide output in units of m^3/mol.
Examples
property rhog
Gas-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3]. For
calculation of this property at other temperatures or pressures, or specifying manually the method used
to calculate it, and more - see the object oriented interface thermo.volume.VolumeGas; each Chemical
instance creates one to actually perform the calculations. Note that that interface provides output in molar
units.
Examples
Estimate the density of the core of the sun, at 15 million K and 26.5 PetaPascals, assuming pure helium
(actually 68% helium):
Compared to a result on Wikipedia of 150000 kg/m^3, the fundamental equation of state performs poorly.
The ideal-gas law performs somewhat better, but vastly overshoots the density prediction.
property rhogm
Molar density of the chemical in the gas phase at the current temperature and pressure, in units of [mol/m^3].
Utilizes the object oriented interface and thermo.volume.VolumeGas to perform the actual calculation
of molar volume.
Examples
property rhol
Liquid-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3]. For
calculation of this property at other temperatures and pressures, or specifying manually the method used to
calculate it, and more - see the object oriented interface thermo.volume.VolumeLiquid; each Chemical
instance creates one to actually perform the calculations. Note that that interface provides output in molar
units.
Examples
property rholm
Molar density of the chemical in the liquid phase at the current temperature and pressure, in units of
[mol/m^3].
Utilizes the object oriented interface and thermo.volume.VolumeLiquid to perform the actual calcula-
tion of molar volume.
Examples
property rhom
Molar density of the chemical at its current phase and temperature and pressure, in units of [mol/m^3].
Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.
VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property.
Note that those interfaces provide output in units of m^3/mol.
Examples
>>> Chemical('1-hexanol').rhom
7986.
property rhos
Solid-phase mass density of the chemical at its current temperature, in units of [kg/m^3]. For calculation
of this property at other temperatures, or specifying manually the method used to calculate it, and more -
see the object oriented interface thermo.volume.VolumeSolid; each Chemical instance creates one to
actually perform the calculations. Note that that interface provides output in molar units.
Examples
>>> Chemical('iron').rhos
7870.
property rhosm
Molar density of the chemical in the solid phase at the current temperature and pressure, in units of
[mol/m^3].
Utilizes the object oriented interface and thermo.volume.VolumeSolid to perform the actual calculation
of molar volume.
Examples
>>> Chemical('palladium').rhosm
112760.
property rings
Number of rings in a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is not available,
holds None.
Examples
>>> Chemical('Paclitaxel').rings
7
set_TP_sources()
set_constant_sources()
set_constants()
set_thermo()
property sigma
Surface tension of the chemical at its current temperature, in units of [N/m].
For calculation of this property at other temperatures, or specifying manually the method used to calculate
it, and more - see the object oriented interface thermo.interface.SurfaceTension; each Chemical
instance creates one to actually perform the calculations.
Examples
property solubility_parameter
Solubility parameter of the chemical at its current temperature and pressure, in units of [Pa^0.5].
√︂
∆𝐻𝑣𝑎𝑝 − 𝑅𝑇
𝛿=
𝑉𝑚
Calculated based on enthalpy of vaporization and molar volume. Normally calculated at STP. For uses of
this property, see thermo.solubility.solubility_parameter.
Examples
This module contains classes for storing data and objects which are necessary for doing thermodynamic calculations.
The intention for these classes is to serve as an in-memory storage layer between the disk and methods which do full
thermodynamic calculations.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Parameters
N [int] Number of components in the package, [-].
cmps [range] Iterator over all components, [-].
rhol_60Fs [list[float]] Liquid molar densities for each component at 60 °F, [mol/m^3].
atom_fractions [list[dict]] Breakdown of each component into its elemental fractions, as a dict,
[-].
atomss [list[dict]] Breakdown of each component into its elements and their counts, as a dict,
[-].
Carcinogens [list[dict]] Status of each component in cancer causing registries, [-].
CASs [list[str]] CAS registration numbers for each component, [-].
Ceilings [list[tuple[(float, str)]]] Ceiling exposure limits to chemicals (and their units; ppm or
mg/m^3), [various].
charges [list[float]] Charge number (valence) for each component, [-].
conductivities [list[float]] Electrical conductivities for each component, [S/m].
conductivity_Ts [list[float]] Temperatures at which the electrical conductivities for each com-
ponent were measured, [K].
dipoles [list[float]] Dipole moments for each component, [debye].
economic_statuses [list[dict]] Status of each component in in relation to import and export from
various regions, [-].
formulas [list[str]] Formulas of each component, [-].
Gfgs [list[float]] Ideal gas standard molar Gibbs free energy of formation for each component,
[J/mol].
Gfgs_mass [list[float]] Ideal gas standard Gibbs free energy of formation for each component,
[J/kg].
GWPs [list[float]] Global Warming Potentials for each component (impact/mass chemi-
cal)/(impact/mass CO2), [-].
Hcs [list[float]] Higher standard molar heats of combustion for each component, [J/mol].
Hcs_mass [list[float]] Higher standard heats of combustion for each component, [J/kg].
Hcs_lower [list[float]] Lower standard molar heats of combustion for each component, [J/mol].
Hcs_lower_mass [list[float]] Lower standard heats of combustion for each component, [J/kg].
Hfgs [list[float]] Ideal gas standard molar enthalpies of formation for each component, [J/mol].
Hfgs_mass [list[float]] Ideal gas standard enthalpies of formation for each component, [J/kg].
Hfus_Tms [list[float]] Molar heats of fusion for each component at their respective melting
points, [J/mol].
Hfus_Tms_mass [list[float]] Heats of fusion for each component at their respective melting
points, [J/kg].
Hsub_Tts [list[float]] Heats of sublimation for each component at their respective triple points,
[J/mol].
Hsub_Tts_mass [list[float]] Heats of sublimation for each component at their respective triple
points, [J/kg].
Hvap_298s [list[float]] Molar heats of vaporization for each component at 298.15 K, [J/mol].
Hvap_298s_mass [list[float]] Heats of vaporization for each component at 298.15 K, [J/kg].
Hvap_Tbs [list[float]] Molar heats of vaporization for each component at their respective nor-
mal boiling points, [J/mol].
Hvap_Tbs_mass [list[float]] Heats of vaporization for each component at their respective nor-
mal boiling points, [J/kg].
InChI_Keys [list[str]] InChI Keys for each component, [-].
InChIs [list[str]] InChI strings for each component, [-].
legal_statuses [list[dict]] Status of each component in in relation to import and export rules from
various regions, [-].
LFLs [list[float]] Lower flammability limits for each component, [-].
logPs [list[float]] Octanol-water partition coefficients for each component, [-].
molecular_diameters [list[float]] Lennard-Jones molecular diameters for each component,
[angstrom].
MWs [list[float]] Similatiry variables for each component, [g/mol].
names [list[str]] Names for each component, [-].
aliases [list[str]] Aliases for each component, [-].
ODPs [list[float]] Ozone Depletion Potentials for each component (impact/mass chemi-
cal)/(impact/mass CFC-11), [-].
omegas [list[float]] Acentric factors for each component, [-].
Parachors [list[float]] Parachors for each component, [N^0.25*m^2.75/mol].
Pcs [list[float]] Critical pressures for each component, [Pa].
phase_STPs [list[str]] Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
Psat_298s [list[float]] Vapor pressures for each component at 298.15 K, [Pa].
PSRK_groups [list[dict]] PSRK subgroup: count groups for each component, [-].
Pts [list[float]] Triple point pressures for each component, [Pa].
PubChems [list[int]] Pubchem IDs for each component, [-].
rhocs [list[float]] Molar densities at the critical point for each component, [mol/m^3].
rhocs_mass [list[float]] Densities at the critical point for each component, [kg/m^3].
rhol_STPs [list[float]] Molar liquid densities at STP for each component, [mol/m^3].
rhol_STPs_mass [list[float]] Liquid densities at STP for each component, [kg/m^3].
RIs [list[float]] Refractive indexes for each component, [-].
RI_Ts [list[float]] Temperatures at which the refractive indexes were reported for each compo-
nent, [K].
S0gs [list[float]] Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component,
[J/(mol*K)].
S0gs_mass [list[float]] Ideal gas absolute entropies at 298.15 K at 1 atm for each component,
[J/(kg*K)].
Sfgs [list[float]] Ideal gas standard molar entropies of formation for each component,
[J/(mol*K)].
Sfgs_mass [list[float]] Ideal gas standard entropies of formation for each component, [J/(kg*K)].
solubility_parameters [list[float]] Solubility parameters for each component at 298.15 K,
[Pa^0.5].
similarity_variables [list[float]] Similarity variables for each component, [mol/g].
Skins [list[bool]] Whether each compound can be absorbed through the skin or not, [-].
smiless [list[str]] SMILES identifiers for each component, [-].
STELs [list[tuple[(float, str)]]] Short term exposure limits to chemicals (and their units; ppm or
mg/m^3), [various].
StielPolars [list[float]] Stiel polar factors for each component, [-].
Stockmayers [list[float]] Lennard-Jones Stockmayer parameters (depth of potential-energy min-
imum over k) for each component, [K].
Tautoignitions [list[float]] Autoignition temperatures for each component, [K].
Tbs [list[float]] Boiling temperatures for each component, [K].
Tcs [list[float]] Critical temperatures for each component, [K].
Tms [list[float]] Melting temperatures for each component, [K].
Tflashs [list[float]] Flash point temperatures for each component, [K].
Tts [list[float]] Triple point temperatures for each component, [K].
TWAs [list[tuple[(float, str)]]] Time-weighted average exposure limits to chemicals (and their
units; ppm or mg/m^3), [various].
UFLs [list[float]] Upper flammability limits for each component, [-].
UNIFAC_Dortmund_groups [list[dict]] UNIFAC_Dortmund_group: count groups for each
component, [-].
UNIFAC_groups [list[dict]] UNIFAC_group: count groups for each component, [-].
UNIFAC_Rs [list[float]] UNIFAC R parameters for each component, [-].
UNIFAC_Qs [list[float]] UNIFAC Q parameters for each component, [-].
Van_der_Waals_areas [list[float]] Unnormalized Van der Waals areas for each component,
[m^2/mol].
Van_der_Waals_volumes [list[float]] Unnormalized Van der Waals volumes for each compo-
nent, [m^3/mol].
Vcs [list[float]] Critical molar volumes for each component, [m^3/mol].
Vml_STPs [list[float]] Liquid molar volumes for each component at STP, [m^3/mol].
Vml_Tms [list[float]] Liquid molar volumes for each component at their respective melting
points, [m^3/mol].
Vms_Tms [list[float]] Solid molar volumes for each component at their respective melting
points, [m^3/mol].
Vml_60Fs [list[float]] Liquid molar volumes for each component at 60 °F, [m^3/mol].
rhos_Tms [list[float]] Solid molar densities for each component at their respective melting
points, [mol/m^3].
rhol_60Fs_mass [list[float]] Liquid mass densities for each component at 60 °F, [kg/m^3].
rhos_Tms_mass [list[float]] Solid mass densities for each component at their melting point,
[kg/m^3].
Zcs [list[float]] Critical compressibilities for each component, [-].
n_atoms [int] Number of total atoms in a collection of 1 molecule of each species, [-].
water_index [int] Index of water in the package, [-].
Vmg_STPs [list[float]] Gas molar volumes for each component at STP; metastable if normally
another state, [m^3/mol].
rhog_STPs [list[float]] Molar gas densities at STP for each component; metastable if normally
another state, [mol/m^3].
rhog_STPs_mass [list[float]] Gas densities at STP for each component; metastable if normally
another state, [kg/m^3].
sigma_STPs [list[float]] Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or
the saturation pressure, [N/m].
sigma_Tms [list[float]] Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
sigma_Tbs [list[float]] Liquid-air surface tensions at the normal boiling point and 101325 Pa,
[N/m].
Hf_STPs [list[float]] Standard state molar enthalpies of formation for each component, [J/mol].
Hf_STPs_mass [list[float]] Standard state mass enthalpies of formation for each component,
[J/kg].
Notes
Examples
Create a package with water and the xylenes, suitable for use with equations of state:
˓→2, 617.0])
˓→0])
Methods
from_IDs(IDs)
Method to construct a new ChemicalConstantsPack-
age and PropertyCorrelationsPackage with loaded
parameters from the chemicals library, using what-
ever default methods and values happen to be in that
library.
__add__(b)
Method to create a new ChemicalConstantsPackage object from two other
ChemicalConstantsPackage objects.
Returns
new [ChemicalConstantsPackage] New object, [-]
Examples
as_json()
Method to create a JSON friendly serialization of the chemical constants package which can be stored, and
reloaded later.
Returns
json_repr [dict] Json friendly representation, [-]
Examples
static constants_from_IDs(IDs)
Method to construct a new ChemicalConstantsPackage with loaded parameters from the chemicals library,
using whatever default methods and values happen to be in that library. Expect values to change over time.
Parameters
IDs [list[str]] Identifying strings for each compound; most identifiers are accepted and all
inputs are documented in chemicals.identifiers.search_chemical, [-]
Returns
constants [ChemicalConstantsPackage] New ChemicalConstantsPackage with loaded val-
ues, [-]
Notes
Warning: chemicals is a project with a focus on collecting data and correlations from various sources.
In no way is it a project to critically evaluate these and provide recommendations. You are strongly
encouraged to check values from it and modify them if you want different values. If you believe there
is a value which has a typographical error please report it to the chemicals project. If data is missing
or not as accuracte as you would like, and you know of a better method or source, new methods and
sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add
individual components, so please submit a complete table of data from the source.
Examples
static correlations_from_IDs(IDs)
Method to construct a new PropertyCorrelationsPackage with loaded parameters from the chemicals li-
brary, using whatever default methods and values happen to be in that library. Expect values to change over
time.
Parameters
IDs [list[str]] Identifying strings for each compound; most identifiers are accepted and all
inputs are documented in chemicals.identifiers.search_chemical, [-]
Returns
correlations [PropertyCorrelationsPackage] New PropertyCorrelationsPackage with
loaded values, [-]
Notes
Warning: chemicals is a project with a focus on collecting data and correlations from various sources.
In no way is it a project to critically evaluate these and provide recommendations. You are strongly
encouraged to check values from it and modify them if you want different values. If you believe there
is a value which has a typographical error please report it to the chemicals project. If data is missing
or not as accuracte as you would like, and you know of a better method or source, new methods and
sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add
individual components, so please submit a complete table of data from the source.
Examples
static from_IDs(IDs)
Method to construct a new ChemicalConstantsPackage and PropertyCorrelationsPackage with loaded pa-
rameters from the chemicals library, using whatever default methods and values happen to be in that library.
Expect values to change over time.
Parameters
IDs [list[str]] Identifying strings for each compound; most identifiers are accepted and all
inputs are documented in chemicals.identifiers.search_chemical, [-]
Returns
constants [PropertyCorrelationsPackage] New PropertyCorrelationsPackage with loaded
values, [-]
correlations [PropertyCorrelationsPackage] New PropertyCorrelationsPackage with
loaded values, [-]
Notes
Warning: chemicals is a project with a focus on collecting data and correlations from various sources.
In no way is it a project to critically evaluate these and provide recommendations. You are strongly
encouraged to check values from it and modify them if you want different values. If you believe there
is a value which has a typographical error please report it to the chemicals project. If data is missing
or not as accuracte as you would like, and you know of a better method or source, new methods and
sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add
individual components, so please submit a complete table of data from the source.
Examples
classmethod from_json(json_repr)
Method to create a ChemicalConstantsPackage from a JSON serialization of another ChemicalCon-
stantsPackage.
Parameters
json_repr [dict] Json representation, [-]
Returns
constants [ChemicalConstantsPackage] Newly created object from the json serialization, [-]
Notes
It is important that the input be in the same format as that created by ChemicalConstantsPackage.
as_json.
Examples
Notes
It is not intended for properties to be edited in this object! One optimization is that all entirely empty
properties use the same list-of-Nones.
All properties should have been specified before constructing the first ChemicalConstantsPackage.
Examples
>>> base.subset([0])
ChemicalConstantsPackage(MWs=[18.01528], names=['water'], omegas=[0.344],␣
˓→Pcs=[22048320.0], Tcs=[647.14])
>>> base.subset(slice(1,4))
ChemicalConstantsPackage(MWs=[106.165, 106.165, 106.165], names=['o-xylene', 'p-
˓→xylene', 'm-xylene'], omegas=[0.3118, 0.324, 0.331], Pcs=[3732000.0, 3511000.
with_new_constants(**kwargs)
Method to construct a new ChemicalConstantsPackage that replaces or adds one or more properties for all
components.
Parameters
kwargs [dict[str: list[float]]] Properties specified by name [various]
Returns
new_constants [ChemicalConstantsPackage] Object with new and/or replaced properties,
[-]
Examples
ThermalConductivityGasMixture [thermo.thermal_conductivity.
ThermalConductivityGasMixture, optional] Predictor object for the thermal con-
ductivity of gas mixtures, [-]
SurfaceTensionMixture [thermo.interface.SurfaceTensionMixture, optional] Predic-
tor object for the surface tension of liquid mixtures, [-]
Examples
Create a package from CO2 and n-hexane, with ideal-gas heat capacities provided while excluding all other
properties:
˓→ 178.075])
˓→356180511425385, 175.67091124888998]))])
Create a package from various data files, creating all property objects:
Attributes
pure_correlations [tuple(str)] List of all pure component property objects, [-]
Methods
__add__(b)
Method to create a new PropertyCorrelationsPackage object from two other
PropertyCorrelationsPackage objects.
Returns
new [PropertyCorrelationsPackage] New object, [-]
Examples
subset(idxs)
Method to construct a new PropertyCorrelationsPackage that removes all components not specified in the
idxs argument.
Parameters
idxs [list[int] or Slice or None] Indexes of components that should be included; if None, all
components will be included , [-]
Returns
subset_correlations [PropertyCorrelationsPackage] Object with components, [-]
thermo.chemical_package.iapws_constants = ChemicalConstantsPackage(CASs=['7732-18-5'],
MWs=[18.015268], omegas=[0.344], Pcs=[22064000.0], Tcs=[647.096])
ChemicalConstantsPackage : Object intended to hold the IAPWS-95 water constants for use with the
thermo.phases.IAPWS95 phase object.
thermo.chemical_package.iapws_correlations =
<thermo.chemical_package.PropertyCorrelationsPackage object>
PropertyCorrelationsPackage: IAPWS correlations and properties, [-]
thermo.chemical_package.lemmon2000_constants =
ChemicalConstantsPackage(CASs=['132259-10-0'], MWs=[28.9586], omegas=[0.0335],
Pcs=[3785020.0], Tcs=[132.6312])
ChemicalConstantsPackage : Object intended to hold the Lemmon (2000) air constants for use with the
thermo.phases.DryAirLemmon phase object.
thermo.chemical_package.lemmon2000_correlations =
<thermo.chemical_package.PropertyCorrelationsPackage object>
PropertyCorrelationsPackage: Lemmon (2000) air correlations and properties, [-]
Parameters
T [float] Temperature of fluid [K]
ws [array] Weight fractions of fluid components other than water
CASRNs [array] CAS numbers of the fluid components other than water
Returns
rho [float] Solution density, [kg/m^3]
Notes
References
[1]
Examples
Parameters
T [float] Temperature of fluid [K]
ws [array] Weight fractions of fluid components other than water
c0s [list[float]] Fit coefficient, [-]
c1s [list[float]] Fit coefficient, [-]
c2s [list[float]] Fit coefficient, [-]
c3s [list[float]] Fit coefficient, [1/degC]
c4s [list[float]] Fit coefficient, [degC]
Returns
rho [float] Solution density, [kg/m^3]
References
[1]
Examples
˓→c4s=[3317.34854426537, 2589.61875022366])
1005.6947727219
(𝑐0 [1 − 𝑤𝑤 ] + 𝑐1 ) exp(10−6 [𝑡 + 𝑐4 ]2 )
𝜌𝑎𝑝𝑝,𝑖 =
(1 − 𝑤𝑤 ) + 𝑐2 + 𝑐3 𝑡
Parameters
T [float] Temperature of fluid [K]
w_w [float] Weight fraction of water in the solution, [-]
c0 [float] Fit coefficient, [-]
c1 [float] Fit coefficient, [-]
c2 [float] Fit coefficient, [-]
c3 [float] Fit coefficient, [1/degC]
c4 [float] Fit coefficient, [degC]
Returns
rho_i [float] Solute partial density, [kg/m^3]
Notes
References
[1]
Examples
thermo.electrochem.Laliberte_density_w(T )
Calculate the density of water using the form proposed by [1]. No parameters are needed, just a temperature.
Units are Kelvin and kg/m^3.
Notes
References
[1]
Examples
>>> Laliberte_density_w(298.15)
997.0448954179155
>>> Laliberte_density_w(273.15 + 50)
988.0362916114763
Parameters
T [float] Temperature of fluid [K]
ws [array] Weight fractions of fluid components other than water
CASRNs [array] CAS numbers of the fluid components other than water
Returns
Cp [float] Solution heat capacity, [J/kg/K]
Notes
A temperature range check is not included in this function. Units are Kelvin and J/kg/K.
References
[1]
Examples
Notes
A temperature range check is not included in this function. Units are Kelvin and J/kg/K.
References
[1]
Examples
˓→a6s=[1.81245930472755, 1.32062411084408])
4154.788562680796
𝛼 = 𝑎2 𝑡 + 𝑎3 exp(0.01𝑡) + 𝑎4 (1 − 𝑤𝑤 )
Parameters
T [float] Temperature of fluid [K]
w_w [float] Weight fraction of water in the solution
a1-a6 [floats] Function fit parameters
Returns
Cp_i [float] Solute partial heat capacity, [J/kg/K]
Notes
Units are Kelvin and J/kg/K. Temperature range check is not used here.
References
[1]
Examples
thermo.electrochem.Laliberte_heat_capacity_w(T )
Calculate the heat capacity of pure water in a fast but similar way as in [1]. [1] suggested the following inter-
polatative scheme, using points calculated from IAPWS-97 at a pressure of 0.1 MPa up to 95 °C and then at
saturation pressure. The maximum temperature of [1] is 140 °C.
(︂ )︂ (︂ )︂ (︂ )︂
𝑡 − 𝑡1 (𝐶𝑝3 − 2𝐶𝑝2 + 𝐶𝑝1 ) 𝑡 − 𝑡1 𝑡 − 𝑡1
𝐶𝑝𝑤 = 𝐶𝑝1 + (𝐶𝑝2 − 𝐶𝑝1 ) + −1
𝑡2 − 𝑡1 2 𝑡2 − 𝑡1 𝑡2 − 𝑡1
In this implementation, the heat capacity of water is calculated from a chebyshev approximation of the scheme
of [1] up to ~92 °C and then the heat capacity comes directly from IAPWS-95 at higher temperatures, also at the
saturation pressure. There is no discontinuity between the methods.
Parameters
T [float] Temperature of fluid [K]
Returns
Cp_w [float] Water heat capacity, [J/kg/K]
Notes
References
[1]
Examples
>>> Laliberte_heat_capacity_w(273.15+3.56)
4208.878727051538
Parameters
T [float] Temperature of fluid, [K]
ws [array] Weight fractions of fluid components other than water, [-]
CASRNs [array] CAS numbers of the fluid components other than water, [-]
Returns
mu [float] Viscosity of aqueous mixture, [Pa*s]
Notes
Temperature range check is not used here. Check is performed using NaCl at 5 degC from the first value in [1]’s
spreadsheet.
References
[1]
Examples
Parameters
T [float] Temperature of fluid, [K]
ws [array] Weight fractions of fluid components other than water, [-]
v1s [list[float]] Fit parameter, [-]
v2s [list[float]] Fit parameter, [-]
v3s [list[float]] Fit parameter, [-]
v4s [list[float]] Fit parameter, [1/degC]
v5s [list[float]] Fit parameter, [-]
v6s [list[float]] Fit parameter, [-]
Returns
mu [float] Viscosity of aqueous mixture, [Pa*s]
References
[1]
Examples
0.0015377348091189648
𝜇𝑖 =
𝑣5 (1 − 𝑤𝑤 )𝑣6 + 1
Parameters
T [float] Temperature of fluid, [K]
w_w [float] Weight fraction of water in the solution, [-]
v1 [float] Fit parameter, [-]
v2 [float] Fit parameter, [-]
v3 [float] Fit parameter, [-]
v4 [float] Fit parameter, [1/degC]
v5 [float] Fit parameter, [-]
v6 [float] Fit parameter, [-]
Returns
mu_i [float] Solute partial viscosity, [Pa*s]
Notes
Temperature range check is outside of this function. Check is performed using NaCl at 5 degC from the first
value in [1]’s spreadsheet.
References
[1]
Examples
thermo.electrochem.Laliberte_viscosity_w(T )
Calculate the viscosity of a water using the form proposed by [1]. No parameters are needed, just a temperature.
Units are Kelvin and Pa*s. t is temperature in degrees Celcius.
𝑡 + 246
𝜇𝑤 =
(0.05594𝑡 + 5.2842)𝑡 + 137.37
Parameters
T [float] Temperature of fluid, [K]
Returns
mu_w [float] Water viscosity, [Pa*s]
Notes
Original source or pure water viscosity is not cited. No temperature range is given for this equation.
References
[1]
Examples
>>> Laliberte_viscosity_w(298)
0.000893226448703328
Parameters
T [float] Temperature of liquid [K]
P [float] Pressure of the liquid [Pa]
ws [array] Weight fractions of liquid components other than water
CASRNs [array] CAS numbers of the liquid components other than water
k_w [float] Liquid thermal condiuctivity or pure water at T and P, [W/m/K]
Returns
kl [float] Liquid thermal condiuctivity, [W/m/K]
Notes
Range from 273 K to 473 K, P from 0.1 MPa to 100 MPa. C from 0 to 25 mass%. Internal untis are MPa for
pressure and weight percent.
An example is sought for this function. It is not possible to reproduce the author’s values consistently.
References
[1]
Examples
Parameters
T [float] Temperature of liquid [K]
P [float] Pressure of the liquid [Pa]
ws [list[float]] Weight fractions of liquid components other than water, [-]
Ais [list[float]] Ai coefficients which were regressed, [-]
k_w [float] Liquid thermal condiuctivity or pure water at T and P, [W/m/K]
Returns
kl [float] Liquid thermal condiuctivity, [W/m/K]
Notes
Range from 273 K to 473 K, P from 0.1 MPa to 100 MPa. C from 0 to 25 mass%. Internal untis are MPa for
pressure and weight percent.
References
[1]
Examples
Parameters
ionic_conductivities [list[float]] Ionic conductivity coefficients of each ion in the mixture
[m^2*S/mol]
zs [list[float]] Mole fractions of each ion in the mixture, [-]
rhom [float] Overall molar density of the solution, [mol/m^3]
Returns
kappa [float] Electrical conductivity of the fluid, [S/m]
Notes
The ionic conductivity coefficients should not be equivalent coefficients; for example, 0.0053 m^2*S/mol is the
equivalent conductivity coefficient of Mg+2, but this method expects twice its value - 0.0106. Both are reported
commonly in literature.
Water can be included in this caclulation by specifying a coefficient of 0. The conductivity of any electrolyte
eclipses its own conductivity by many orders of magnitude. Any other solvents present will affect the conductivity
extensively and there are few good methods to predict this effect.
References
[1]
Examples
Complex mixture of electrolytes [‘Cl-’, ‘HCO3-’, ‘SO4-2’, ‘Na+’, ‘K+’, ‘Ca+2’, ‘Mg+2’]:
22.05246783663
In the above equations, t is temperature in degrees Celcius; m is molality in mol/kg, and C is the concentration
of the elctrolytes in mol/m^3, calculated as the product of density and molality.
Parameters
T [float] Temperature of the solution, [K]
M [float] Molality of the solution with respect to one electrolyte (mol solute / kg solvent),
[mol/kg]
lambda_coeffs [list[float]] List of coefficients for the polynomial used to calculate lambda;
length-3 coefficients provided in [1], [-]
A_coeffs [list[float]] List of coefficients for the polynomial used to calculate A; length-3 coeffi-
cients provided in [1], [-]
B [float] Empirical constant for an electrolyte, [-]
multiplier [float] The multiplier to obtain the absolute conductivity from the equivalent con-
ductivity; ex 2 for CaCl2, [-]
rho [float, optional] The mass density of the aqueous mixture, [kg/m^3]
Returns
kappa [float] Electrical conductivity of the solution at the specified molality and temperature
[S/m]
Notes
Coefficients provided in [1] result in conductivity being calculated in units of mS/cm; they are converted to S/m
before returned.
References
[1]
Examples
thermo.electrochem.ionic_strength(mis, zis)
Calculate the ionic strength of a solution in one of two ways, depending on the inputs only. For Pitzer and
Bromley models, mis should be molalities of each component. For eNRTL models, mis should be mole fractions
of each electrolyte in the solution. This will sum to be much less than 1.
1 ∑︁
𝐼= 𝑀𝑖 𝑧𝑖2
2
1 ∑︁
𝐼= 𝑥𝑖 𝑧𝑖2
2
Parameters
mis [list] Molalities of each ion, or mole fractions of each ion [mol/kg or -]
zis [list] Charges of each ion [-]
Returns
I [float] ionic strength, [?]
References
[1], [2]
Examples
thermo.electrochem.conductivity(CASRN, method=None)
This function handles the retrieval of a chemical’s conductivity. Lookup is based on CASRNs. Will automatically
select a data source to use if no method is provided; returns None if the data is not available.
Function has data for approximately 100 chemicals.
Parameters
CASRN [string] CASRN [-]
Returns
kappa [float] Electrical conductivity of the fluid, [S/m]
T [float or None] Temperature at which conductivity measurement was made or None if not
available, [K]
Other Parameters
method [string, optional] A string for the method name to use, as defined by constants in con-
ductivity_methods
Notes
References
[1]
Examples
>>> conductivity('7732-18-5')
(4e-06, 291.15)
thermo.electrochem.conductivity_methods(CASRN)
Return all methods available to obtain electrical conductivity for the specified chemical.
Parameters
CASRN [str] CASRN, [-]
Returns
methods [list[str]] Methods which can be used to obtain electrical conductivity with the given
inputs.
See also:
conductivity
thermo.electrochem.conductivity_all_methods = ['LANGE_COND']
Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
thermo.electrochem.Kweq_Arcis_Tremaine_Bandura_Lvov(T, rho_w)
Calculates equilibrium constant for OH- and H+ in water, according to [1].
𝑄 = 𝜌 exp(𝛼0 + 𝛼1 𝑇 −1 + 𝛼2 𝑇 −2 𝜌2/3 )
[︂ ]︂
𝑄 −1 𝐺 18.015268
− log10 𝐾𝑤 = −2𝑛 log10 (1 + 𝑄) − 𝜌(𝛽0 + 𝛽1 𝑇 + 𝛽2 𝜌) − log10 𝐾𝑤 + 2 log10
𝑄+1 1000
Parameters
T [float] Temperature of water [K]
rho_w [float] Density of water at temperature and pressure [kg/m^3]
Returns
Kweq [float] Ionization constant of water, [-]
Notes
References
[1]
Examples
thermo.electrochem.Kweq_IAPWS(T, rho_w)
Calculates equilibrium constant for OH- and H+ in water, according to [1]. This is the most recent formulation
available.
𝑄 = 𝜌 exp(𝛼0 + 𝛼1 𝑇 −1 + 𝛼2 𝑇 −2 𝜌2/3 )
[︂ ]︂
𝑄 −1 𝐺 18.015268
− log10 𝐾𝑤 = −2𝑛 log10 (1 + 𝑄) − 𝜌(𝛽0 + 𝛽1 𝑇 + 𝛽2 𝜌) − log10 𝐾𝑤 + 2 log10
𝑄+1 1000
Parameters
T [float] Temperature of water [K]
rho_w [float] Density of water at temperature and pressure [kg/m^3]
Returns
Kweq [float] Ionization constant of water, [-]
Notes
References
[1]
Examples
thermo.electrochem.Kweq_IAPWS_gas(T )
Calculates equilibrium constant for OH- and H+ in water vapor, according to [1]. This is the most recent formu-
lation available.
𝐺
−𝑙𝑜𝑔10 𝐾𝑤 = 𝛾0 + 𝛾1 𝑇 −1 + 𝛾2 𝑇 −2 + 𝛾3 𝑇 −3
Parameters
T [float] Temperature of H2O [K]
Returns
K_w_G [float]
Notes
References
[1]
Examples
>>> Kweq_IAPWS_gas(800)
1.4379721554798815e-61
thermo.electrochem.Kweq_1981(T, rho_w)
Calculates equilibrium constant for OH- and H+ in water, according to [1]. Second most recent formulation.
Parameters
T [float] Temperature of fluid [K]
Notes
References
[1]
Examples
method [str, optional] The method to use to balance the ionimbalance; one of ‘dominant’, ‘de-
crease dominant’, ‘increase dominant’, ‘proportional insufficient ions increase’, ‘proportional
excess ions decrease’, ‘proportional cation adjustment’, ‘proportional anion adjustment’, ‘Na
or Cl increase’, ‘Na or Cl decrease’, ‘adjust’, ‘increase’, ‘decrease’, ‘makeup’].
selected_ion [ChemicalMetadata, optional] Some methods adjust only one user-specified ion;
this is that input. For the case of the ‘makeup’ method, this is a tuple of (anion, cation)
ChemicalMetadata instances and only the ion type not in excess will be used.
Returns
anions [list[ChemicalMetadata]] List of all negatively charged ions measured as being in the so-
lution; ChemicalMetadata instances after potentially adding in an ion which was not present
but specified by the user, [-]
cations [list[ChemicalMetadata]] List of all positively charged ions measured as being in the so-
lution; ChemicalMetadata instances after potentially adding in an ion which was not present
but specified by the user, [-]
anion_zs [list[float],] Mole fractions of each anion in the aqueous solution after the charge bal-
ance, [-]
cation_zs [list[float]] Mole fractions of each cation in the aqueous solution after the charge bal-
ance, [-]
z_water [float[float]] Mole fraction of the water in the solution, [-]
Notes
• ‘increase’ : An ion specified with the parameter selected_ion has its mole fraction increased as necessary
to balance the solution. An exception is raised if the specified ion alone cannot balance the solution.
• ‘decrease’ : An ion specified with the parameter selected_ion has its mole fraction decreased as necessary
to balance the solution. An exception is raised if the specified ion alone cannot balance the solution.
• ‘makeup’ : Two ions ase specified as a tuple with the parameter selected_ion. Whichever ion type is present
in the solution insufficiently is added; i.e. if the ions were Mg+2 and Cl-, and there was too much negative
charge in the solution, Mg+2 would be added until the solution was balanced.
Examples
>>> z_water
0.9504856267761288
All of these coefficients are lazy-loaded, so they must be accessed as an attribute of this module.
In [2]: Magomedovk_thermal_cond
Out[2]:
Formula Chemical Ai
CASRN
497-19-8 Na2CO3 Sodium carbonate -0.00050
584-08-7 K2CO3 Potassium carbonate 0.00160
7447-39-4 CuCl2 Cuprous chloride 0.00360
7488-54-2 Rb2SO4 Rubidium sulfate 0.00134
7601-89-0 NaClO4 Sodium perchlorate 0.00250
7646-79-9 CoCl2 Cobaltous chloride 0.00320
7664-93-9 H2SO4 Acid sulfate 0.00305
7699-45-8 ZnBr2 Zinc bromide 0.00410
7718-54-9 NiCl2 Nickelous chloride 0.00330
7758-94-3 FeCl2 Ferrous chloride 0.00294
7761-88-8 AgNO3 Silver nitrate 0.00190
7775-09-9 NaClO3 Sodium chlorate 0.00240
7778-50-9 K2Cr2O7 Potassium dichromate 0.00188
7786-81-4 NiSO4 Nickelous sulfate 0.00140
(continues on next page)
In [3]: cond_data_McCleskey
Out[3]:
formula c1 c2 ... d3 B multiplier
CASRN ...
7447-40-7 KCl 0.009385 2.533 ... 44.11 1.70 1
7647-14-5 NaCl 0.008967 2.196 ... 44.55 1.30 1
7647-01-0 HCl -0.006766 6.614 ... 48.53 0.01 1
7447-41-8 LiCl 0.008784 1.996 ... 42.79 1.00 1
7647-17-8 CsCl 0.010080 2.479 ... 41.29 1.40 1
12125-02-9 NH4Cl 0.006575 2.684 ... 30.00 0.70 1
10043-52-4 CaCl2 0.011240 2.224 ... 137.70 3.80 2
7786-30-3 MgCl2 0.009534 2.247 ... 129.80 3.10 2
10361-37-2 BaCl2 0.010380 2.346 ... 111.80 2.40 2
10476-85-4 SrCl2 0.009597 2.279 ... 60.18 0.80 2
7664-93-9 H2SO4 -0.019850 7.421 ... 1869.00 11.50 2
7757-82-6 Na2SO4 0.009501 2.317 ... 135.50 2.20 2
7778-80-5 K2SO4 0.008819 2.872 ... 247.10 5.30 2
10294-54-9 Cs2SO4 0.012730 2.457 ... 187.40 3.30 2
7778-18-9 CaSO4 0.011920 2.564 ... 644.40 9.60 2
7646-93-7 KHSO4 -0.003092 9.759 ... 1776.00 8.20 1
298-14-6 KHCO3 0.007807 2.040 ... 38.58 0.90 1
584-08-7 K2CO3 0.011450 2.726 ... 81.12 2.10 2
144-55-8 NaHCO3 0.012600 1.543 ... 52.94 1.10 1
497-19-8 Na2CO3 0.022960 5.211 ... 455.80 4.80 2
1310-73-2 NaOH 0.006936 3.872 ... 56.76 0.20 1
7681-49-4 NaF 0.007346 2.032 ... 69.99 2.30 1
(continues on next page)
In [4]: CRC_aqueous_thermodynamics
Out[4]:
Formula Name ... S(aq) Cp(aq)
CAS ...
57-12-5 CN- Cyanide ion ... 94.1 NaN
71-47-6 CHOO- Formate ion ... 92.0 -87.9
71-50-1 CH3COO- Acetate ion ... 86.6 -6.3
71-52-3 HCO3- Bicarbonate ion ... 91.2 NaN
302-04-5 SCN- Thiocyanate ion ... 144.3 -40.2
... ... ... ... ... ...
117412-24-5 BeO2-2 Beryllium dioxide ion ... -159.0 NaN
127622-32-6 Y(OH)+2 Yttrium hydroxide ion ... NaN NaN
129466-35-9 Te(OH)3+ Tellurium(IV) trihydroxide ion ... 111.7 NaN
186449-38-7 InOH+2 Indium hydroxide ion ... -88.0 NaN
2099995000-00-0 Y2(OH)2+4 Yttrium dihydroxide ion ... NaN NaN
In [5]: electrolyte_dissociation_reactions
Out[5]:
Electrolyte name Electrolyte CAS ... Cation charge Cation count
0 Diammonium Hydrogen phosphate 7783-28-0 ... 1 2
1 Ammonium Sulfate 7783-20-2 ... 1 2
2 ammonium sulfite 10196-04-0 ... 1 2
3 Ammonium phosphate 10361-65-6 ... 1 3
4 Ammonium siliconhexafluoride 16919-19-0 ... 1 2
.. ... ... ... ... ...
259 Zinc selenite 13597-46-1 ... 2 1
260 Zinc selenate 13597-54-1 ... 2 1
261 Zinc Nitrate 7779-88-6 ... 2 1
262 Zinc Chloride 7646-85-7 ... 2 1
263 Zinc Sulfate 7733-02-0 ... 2 1
In [6]: Laliberte_data
Out[6]:
Name Formula ... Max w.2 No of points in corr.2
CASRN ...
7783-20-2 Ammonium Sulfate (NH4)2SO4 ... NaN NaN
10043-01-3 Aluminum Sulfate Al2(SO4)3 ... NaN NaN
7446-70-0 Aluminum Chloride AlCl3 ... NaN NaN
10022-31-8 Barium Nitrate Ba(NO3)2 ... 0.047274 96.0
10361-37-2 Barium Chloride BaCl2 ... 0.248237 16.0
... ... ... ... ... ...
(continues on next page)
This module contains implementations of most cubic equations of state for pure components. This includes Peng-
Robinson, SRK, Van der Waals, PRSV, TWU and many other variants.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Base Class
• Standard Peng-Robinson Family EOSs
– Standard Peng Robinson
– Peng Robinson (1978)
– Peng Robinson Stryjek-Vera
– Peng Robinson Stryjek-Vera 2
– Peng Robinson Twu (1995)
– Peng Robinson Polynomial alpha Function
• Volume Translated Peng-Robinson Family EOSs
– Peng Robinson Translated
– Peng Robinson Translated Twu (1991)
– Peng Robinson Translated-Consistent
– Peng Robinson Translated (Pina-Martinez, Privat, and Jaubert Variant)
• Soave-Redlich-Kwong Family EOSs
– Standard SRK
– Twu SRK (1995)
– API SRK
– SRK Translated
– SRK Translated-Consistent
– SRK Translated (Pina-Martinez, Privat, and Jaubert Variant)
– MSRK Translated
• Van der Waals Equations of State
• Redlich-Kwong Equations of State
class thermo.eos.GCEOS
Bases: object
Class for solving a generic Pressure-explicit three-parameter cubic equation of state. Does not implement any
parameters itself; must be subclassed by an equation of state class which uses it. Works for mixtures or pure
species for all properties except fugacity. All properties are derived with the CAS SymPy, not relying on any
derivations previously published.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 2 + 𝛿𝑉 + 𝜖
The main methods (in order they are called) are GCEOS.solve, GCEOS.set_from_PT, GCEOS.
volume_solutions, and GCEOS.set_properties_from_solution.
GCEOS.solve calls GCEOS.check_sufficient_inputs, which checks if two of T, P, and V were set. It then
solves for the remaining variable. If T is missing, method GCEOS.solve_T is used; it is parameter specific,
and so must be implemented in each specific EOS. If P is missing, it is directly calculated. If V is missing, it is
calculated with the method GCEOS.volume_solutions. At this point, either three possible volumes or one user
specified volume are known. The value of a_alpha, and its first and second temperature derivative are calculated
with the EOS-specific method GCEOS.a_alpha_and_derivatives.
If V is not provided, GCEOS.volume_solutions calculates the three possible molar volumes which are solutions
to the EOS; in the single-phase region, only one solution is real and correct. In the two-phase region, all volumes
are real, but only the largest and smallest solution are physically meaningful, with the largest being that of the
gas and the smallest that of the liquid.
GCEOS.set_from_PT is called to sort out the possible molar volumes. For the case of a user-specified V,
the possibility of there existing another solution is ignored for speed. If there is only one real volume, the
method GCEOS.set_properties_from_solution is called with it. If there are two real volumes, GCEOS.
set_properties_from_solution is called once with each volume. The phase is returned by GCEOS.
set_properties_from_solution, and the volumes is set to either GCEOS.V_l or GCEOS.V_g as appropriate.
GCEOS.set_properties_from_solution is a large function which calculates all relevant partial derivatives
and properties of the EOS. 17 derivatives and excess enthalpy and entropy are calculated first. Finally, it sets all
these properties as attibutes for either the liquid or gas phase with the convention of adding on _l or _g to the
variable names, respectively.
Attributes
T [float] Temperature of cubic EOS state, [K]
P [float] Pressure of cubic EOS state, [Pa]
a [float] a parameter of cubic EOS; formulas vary with the EOS, [Pa*m^6/mol^2]
b [float] b parameter of cubic EOS; formulas vary with the EOS, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
𝑎 𝑑𝛼(𝑇 )
(︂ )︂
𝜕𝑃 𝑅
= − 2 𝑑𝑇
𝜕𝑇 𝑉 𝑉 −𝑏 𝑉 +𝑉𝛿+𝜖
dP_dT_g [float] Vapor phase temperature derivative of pressure at constant volume, [Pa/K].
𝑎 𝑑𝛼(𝑇 )
(︂ )︂
𝜕𝑃 𝑅
= − 2 𝑑𝑇
𝜕𝑇 𝑉 𝑉 −𝑏 𝑉 +𝑉𝛿+𝜖
dT_dP_g [float] Gas phase pressure derivative of temperature at constant volume, [K/Pa].
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑃 )︀
𝜕𝑃 𝑉 𝜕𝑇 𝑉
d2P_dT2_l [float] Liquid phase second derivative of pressure with respect to temperature at
constant volume, [Pa/K^2].
2
𝜕2𝑃 𝑎 𝑑 𝛼(𝑇 )
(︂ )︂
2
= − 2 𝑑𝑇
𝜕𝑇 2 𝑉 𝑉 +𝑉𝛿+𝜖
d2P_dT2_g [float] Gas phase second derivative of pressure with respect to temperature at con-
stant volume, [Pa/K^2].
2
𝜕2𝑃 𝑎 𝑑 𝑑𝑇
𝛼(𝑇 )
(︂ )︂
2
=−
𝜕𝑇 2 𝑉 𝑉2+𝑉𝛿+𝜖
d2P_dV2_l [float] Liquid phase second derivative of pressure with respect to volume at constant
temperature, [Pa*mol^2/m^6].
(︃ )︃
(︂ 2 )︂ 2
𝜕 𝑃 𝑅𝑇 𝑎 (2𝑉 + 𝛿) 𝛼(𝑇 ) 𝑎𝛼(𝑇 )
𝜕𝑉 2 𝑇
=2 3 − 3 + 2
(𝑉 − 𝑏) (𝑉 2 + 𝑉 𝛿 + 𝜖) (𝑉 2 + 𝑉 𝛿 + 𝜖)
d2P_dTdV_l [float] Liquid phase second derivative of pressure with respect to volume and then
temperature, [Pa*mol/(K*m^3)].
d2P_dTdV_g [float] Gas phase second derivative of pressure with respect to volume and then
temperature, [Pa*mol/(K*m^3)].
Cv_dep_l [float] Liquid phase departure constant volume heat capacity, [J/(mol*K)]. See
GCEOS.set_properties_from_solution for the formula.
Cv_dep_g [float] Gas phase departure constant volume heat capacity, [J/(mol*K)]. See GCEOS.
set_properties_from_solution for the formula.
c1 [float] Full value of the constant in the a parameter, set in some EOSs, [-]
c2 [float] Full value of the constant in the b parameter, set in some EOSs, [-]
A_dep_g Departure molar Helmholtz energy from ideal gas behavior for the gas phase, [J/mol].
A_dep_l Departure molar Helmholtz energy from ideal gas behavior for the liquid phase,
[J/mol].
beta_g Isobaric (constant-pressure) expansion coefficient for the gas phase, [1/K].
beta_l Isobaric (constant-pressure) expansion coefficient for the liquid phase, [1/K].
d2P_dVdP_l Second derivative of pressure with respect to molar volume and then pressure for
the liquid phase, [mol/m^3].
d2P_dVdT_g Alias of GCEOS.d2P_dTdV_g
d2P_dVdT_l Alias of GCEOS.d2P_dTdV_l
d2P_dVdT_TP_g Second derivative of pressure with respect to molar volume and then temper-
ature at constant temperature then pressure for the gas phase, [Pa*mol/m^3/K].
d2P_dVdT_TP_l Second derivative of pressure with respect to molar volume and then temper-
ature at constant temperature then pressure for the liquid phase, [Pa*mol/m^3/K].
d2rho_dP2_g Second derivative of molar density with respect to pressure for the gas phase,
[(mol/m^3)/Pa^2].
d2rho_dP2_l Second derivative of molar density with respect to pressure for the liquid phase,
[(mol/m^3)/Pa^2].
d2rho_dPdT_g Second derivative of molar density with respect to pressure and temperature for
the gas phase, [(mol/m^3)/(K*Pa)].
d2rho_dPdT_l Second derivative of molar density with respect to pressure and temperature for
the liquid phase, [(mol/m^3)/(K*Pa)].
d2rho_dT2_g Second derivative of molar density with respect to temperature for the gas phase,
[(mol/m^3)/K^2].
d2rho_dT2_l Second derivative of molar density with respect to temperature for the liquid
phase, [(mol/m^3)/K^2].
d2S_dep_dT2_g Second temperature derivative of departure entropy with respect to tempera-
ture for the gas phase, [(J/mol)/K^3].
d2S_dep_dT2_g_V Second temperature derivative of departure entropy with respect to temper-
ature at constant volume for the gas phase, [(J/mol)/K^3].
d2S_dep_dT2_l Second temperature derivative of departure entropy with respect to tempera-
ture for the liquid phase, [(J/mol)/K^3].
d2S_dep_dT2_l_V Second temperature derivative of departure entropy with respect to temper-
ature at constant volume for the liquid phase, [(J/mol)/K^3].
d2S_dep_dTdP_g Temperature and pressure derivative of departure entropy at constant pressure
then temperature for the gas phase, [(J/mol)/K^2/Pa].
d2S_dep_dTdP_l Temperature and pressure derivative of departure entropy at constant pressure
then temperature for the liquid phase, [(J/mol)/K^2/Pa].
d2T_dP2_g Second partial derivative of temperature with respect to pressure (constant volume)
for the gas phase, [K/Pa^2].
d2T_dP2_l Second partial derivative of temperature with respect to pressure (constant temper-
ature) for the liquid phase, [K/Pa^2].
d2T_dPdrho_g Derivative of temperature with respect to molar density, and pressure for the
gas phase, [K/(Pa*mol/m^3)].
d2T_dPdrho_l Derivative of temperature with respect to molar density, and pressure for the
liquid phase, [K/(Pa*mol/m^3)].
d2T_dPdV_g Second partial derivative of temperature with respect to pressure (constant vol-
ume) and then volume (constant pressure) for the gas phase, [K*mol/(Pa*m^3)].
d2T_dPdV_l Second partial derivative of temperature with respect to pressure (constant vol-
ume) and then volume (constant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
d2T_drho2_g Second derivative of temperature with respect to molar density for the gas phase,
[K/(mol/m^3)^2].
d2T_drho2_l Second derivative of temperature with respect to molar density for the liquid
phase, [K/(mol/m^3)^2].
d2T_dV2_g Second partial derivative of temperature with respect to volume (constant pressure)
for the gas phase, [K*mol^2/m^6].
d2T_dV2_l Second partial derivative of temperature with respect to volume (constant pressure)
for the liquid phase, [K*mol^2/m^6].
d2T_dVdP_g Second partial derivative of temperature with respect to pressure (constant vol-
ume) and then volume (constant pressure) for the gas phase, [K*mol/(Pa*m^3)].
d2T_dVdP_l Second partial derivative of temperature with respect to pressure (constant vol-
ume) and then volume (constant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
d2V_dP2_g Second partial derivative of volume with respect to pressure (constant temperature)
for the gas phase, [m^3/(Pa^2*mol)].
d2V_dP2_l Second partial derivative of volume with respect to pressure (constant temperature)
for the liquid phase, [m^3/(Pa^2*mol)].
d2V_dPdT_g Second partial derivative of volume with respect to pressure (constant tempera-
ture) and then presssure (constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
d2V_dPdT_l Second partial derivative of volume with respect to pressure (constant tempera-
ture) and then presssure (constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
d2V_dT2_g Second partial derivative of volume with respect to temperature (constant pressure)
for the gas phase, [m^3/(mol*K^2)].
d2V_dT2_l Second partial derivative of volume with respect to temperature (constant pressure)
for the liquid phase, [m^3/(mol*K^2)].
d2V_dTdP_g Second partial derivative of volume with respect to pressure (constant tempera-
ture) and then presssure (constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
d2V_dTdP_l Second partial derivative of volume with respect to pressure (constant tempera-
ture) and then presssure (constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
d3a_alpha_dT3 Method to calculate the third temperature derivative of 𝑎𝛼,
[J^2/mol^2/Pa/K^3].
da_alpha_dP_g_V Derivative of the a_alpha with respect to pressure at constant volume (vary-
ing T) for the gas phase, [J^2/mol^2/Pa^2].
da_alpha_dP_l_V Derivative of the a_alpha with respect to pressure at constant volume (vary-
ing T) for the liquid phase, [J^2/mol^2/Pa^2].
dbeta_dP_g Derivative of isobaric expansion coefficient with respect to pressure for the gas
phase, [1/(Pa*K)].
dbeta_dP_l Derivative of isobaric expansion coefficient with respect to pressure for the liquid
phase, [1/(Pa*K)].
dbeta_dT_g Derivative of isobaric expansion coefficient with respect to temperature for the gas
phase, [1/K^2].
dbeta_dT_l Derivative of isobaric expansion coefficient with respect to temperature for the
liquid phase, [1/K^2].
dfugacity_dP_g Derivative of fugacity with respect to pressure for the gas phase, [-].
dfugacity_dP_l Derivative of fugacity with respect to pressure for the liquid phase, [-].
dfugacity_dT_g Derivative of fugacity with respect to temperature for the gas phase, [Pa/K].
dfugacity_dT_l Derivative of fugacity with respect to temperature for the liquid phase,
[Pa/K].
dH_dep_dP_g Derivative of departure enthalpy with respect to pressure for the gas phase,
[(J/mol)/Pa].
dH_dep_dP_g_V Derivative of departure enthalpy with respect to pressure at constant volume
for the liquid phase, [(J/mol)/Pa].
dH_dep_dP_l Derivative of departure enthalpy with respect to pressure for the liquid phase,
[(J/mol)/Pa].
dH_dep_dP_l_V Derivative of departure enthalpy with respect to pressure at constant volume
for the gas phase, [(J/mol)/Pa].
dH_dep_dT_g Derivative of departure enthalpy with respect to temperature for the gas phase,
[(J/mol)/K].
dH_dep_dT_g_V Derivative of departure enthalpy with respect to temperature at constant vol-
ume for the gas phase, [(J/mol)/K].
dH_dep_dT_l Derivative of departure enthalpy with respect to temperature for the liquid phase,
[(J/mol)/K].
dH_dep_dT_l_V Derivative of departure enthalpy with respect to temperature at constant vol-
ume for the liquid phase, [(J/mol)/K].
dH_dep_dV_g_P Derivative of departure enthalpy with respect to volume at constant pressure
for the gas phase, [J/m^3].
dH_dep_dV_g_T Derivative of departure enthalpy with respect to volume at constant tempera-
ture for the gas phase, [J/m^3].
dH_dep_dV_l_P Derivative of departure enthalpy with respect to volume at constant pressure
for the liquid phase, [J/m^3].
dH_dep_dV_l_T Derivative of departure enthalpy with respect to volume at constant tempera-
ture for the gas phase, [J/m^3].
dP_drho_g Derivative of pressure with respect to molar density for the gas phase,
[Pa/(mol/m^3)].
dP_drho_l Derivative of pressure with respect to molar density for the liquid phase,
[Pa/(mol/m^3)].
dphi_dP_g Derivative of fugacity coefficient with respect to pressure for the gas phase, [1/Pa].
dphi_dP_l Derivative of fugacity coefficient with respect to pressure for the liquid phase,
[1/Pa].
dphi_dT_g Derivative of fugacity coefficient with respect to temperature for the gas phase,
[1/K].
dphi_dT_l Derivative of fugacity coefficient with respect to temperature for the liquid phase,
[1/K].
drho_dP_g Derivative of molar density with respect to pressure for the gas phase,
[(mol/m^3)/Pa].
drho_dP_l Derivative of molar density with respect to pressure for the liquid phase,
[(mol/m^3)/Pa].
drho_dT_g Derivative of molar density with respect to temperature for the gas phase,
[(mol/m^3)/K].
drho_dT_l Derivative of molar density with respect to temperature for the liquid phase,
[(mol/m^3)/K].
dS_dep_dP_g Derivative of departure entropy with respect to pressure for the gas phase,
[(J/mol)/K/Pa].
dS_dep_dP_g_V Derivative of departure entropy with respect to pressure at constant volume
for the gas phase, [(J/mol)/K/Pa].
dS_dep_dP_l Derivative of departure entropy with respect to pressure for the liquid phase,
[(J/mol)/K/Pa].
dS_dep_dP_l_V Derivative of departure entropy with respect to pressure at constant volume
for the liquid phase, [(J/mol)/K/Pa].
dS_dep_dT_g Derivative of departure entropy with respect to temperature for the gas phase,
[(J/mol)/K^2].
dS_dep_dT_g_V Derivative of departure entropy with respect to temperature at constant volume
for the gas phase, [(J/mol)/K^2].
dS_dep_dT_l Derivative of departure entropy with respect to temperature for the liquid phase,
[(J/mol)/K^2].
dS_dep_dT_l_V Derivative of departure entropy with respect to temperature at constant volume
for the liquid phase, [(J/mol)/K^2].
dS_dep_dV_g_P Derivative of departure entropy with respect to volume at constant pressure
for the gas phase, [J/K/m^3].
dS_dep_dV_g_T Derivative of departure entropy with respect to volume at constant temperature
for the gas phase, [J/K/m^3].
dS_dep_dV_l_P Derivative of departure entropy with respect to volume at constant pressure
for the liquid phase, [J/K/m^3].
dS_dep_dV_l_T Derivative of departure entropy with respect to volume at constant temperature
for the gas phase, [J/K/m^3].
dT_drho_g Derivative of temperature with respect to molar density for the gas phase,
[K/(mol/m^3)].
dT_drho_l Derivative of temperature with respect to molar density for the liquid phase,
[K/(mol/m^3)].
dZ_dP_g Derivative of compressibility factor with respect to pressure for the gas phase, [1/Pa].
dZ_dP_l Derivative of compressibility factor with respect to pressure for the liquid phase,
[1/Pa].
dZ_dT_g Derivative of compressibility factor with respect to temperature for the gas phase,
[1/K].
dZ_dT_l Derivative of compressibility factor with respect to temperature for the liquid phase,
[1/K].
Methods
property A_dep_g
Departure molar Helmholtz energy from ideal gas behavior for the gas phase, [J/mol].
property A_dep_l
Departure molar Helmholtz energy from ideal gas behavior for the liquid phase, [J/mol].
property Cp_minus_Cv_g
Cp - Cv for the gas phase, [J/mol/K].
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑝 − 𝐶𝑣 = −𝑇 /
𝜕𝑇 𝑉 𝜕𝑉 𝑇
property Cp_minus_Cv_l
Cp - Cv for the liquid phase, [J/mol/K].
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑝 − 𝐶𝑣 = −𝑇 /
𝜕𝑇 𝑉 𝜕𝑉 𝑇
Hvap(T )
Method to calculate enthalpy of vaporization for a pure fluid from an equation of state, without iteration.
𝑑𝑃 𝑠𝑎𝑡 ∆𝐻𝑣𝑎𝑝
=
𝑑𝑇 𝑇 (𝑉𝑔 − 𝑉𝑙 )
Results above the critical temperature are meaningless. A first-order polynomial is used to extrapolate
under 0.32 Tc; however, there is normally not a volume solution to the EOS which can produce that low of
a pressure.
Parameters
T [float] Temperature, [K]
Returns
Hvap [float] Increase in enthalpy needed for vaporization of liquid phase along the saturation
line, [J/mol]
Notes
Calculates vapor pressure and its derivative with Psat and dPsat_dT as well as molar volumes of the satu-
ration liquid and vapor phase in the process.
Very near the critical point this provides unrealistic results due to Psat’s polynomials being insufficiently
accurate.
References
[1]
N = 1
The number of components in the EOS
PT_surface_special(Tmin=0.0001, Tmax=10000.0, Pmin=0.01, Pmax=1000000000.0, pts=50,
show=False, color_map=None, mechanical=True, pseudo_critical=True, Psat=True,
determinant_zeros=True, phase_ID_transition=True, base_property='V',
base_min=None, base_max=None, base_selection='Gmin')
Method to create a plot of the special curves of a pure fluid - vapor pressure, determinant zeros, pseudo
critical point, and mechanical critical point.
The color background is a plot of the molar volume (by default) which has the minimum Gibbs energy (by
default). If shown with a sufficient number of points, the curve between vapor and liquid should be shown
smoothly.
When called on a mixture, this method does not have physical significance for the Psat term.
Parameters
Tmin [float, optional] Minimum temperature of calculation, [K]
Tmax [float, optional] Maximum temperature of calculation, [K]
Pmin [float, optional] Minimum pressure of calculation, [Pa]
Pmax [float, optional] Maximum pressure of calculation, [Pa]
pts [int, optional] The number of points to include in both the x and y axis [-]
show [bool, optional] Whether or not the plot should be rendered and shown; a handle to it
is returned if plot is True for other purposes such as saving the plot to a file, [-]
color_map [matplotlib.cm.ListedColormap, optional] Matplotlib colormap object, [-]
mechanical [bool, optional] Whether or not to include the mechanical critical point; this is
the same as the critical point for a pure compound but not for a mixture, [-]
pseudo_critical [bool, optional] Whether or not to include the pseudo critical point; this is
the same as the critical point for a pure compound but not for a mixture, [-]
Psat [bool, optional] Whether or not to include the vapor pressure curve; for mixtures this
is neither the bubble nor dew curve, but rather a hypothetical one which uses the same
equation as the pure components, [-]
determinant_zeros [bool, optional] Whether or not to include a curve showing when the
EOS’s determinant hits zero, [-]
phase_ID_transition [bool, optional] Whether or not to show a curve of where the PIP hits
1 exactly, [-]
base_property [str, optional] The property which should be plotted; ‘_l’ and ‘_g’ are added
automatically according to the selected phase, [-]
base_min [float, optional] If specified, the base property will values will be limited to this
value at the minimum, [-]
base_max [float, optional] If specified, the base property will values will be limited to this
value at the maximum, [-]
base_selection [str, optional] For the base property, there are often two possible phases and
but only one value can be plotted; use ‘l’ to pefer liquid-like values, ‘g’ to prefer gas-like
values, and ‘Gmin’ to prefer values of the phase with the lowest Gibbs energy, [-]
Returns
fig [matplotlib.figure.Figure] Plotted figure, only returned if plot is True, [-]
P_PIP_transition(T, low_P_limit=0.0)
Method to calculate the pressure which makes the phase identification parameter exactly 1. There are three
regions for this calculation:
• subcritical - PIP = 1 for the gas-like phase at P = 0
• initially supercritical - PIP = 1 on a curve starting at the critical point, increasing for a while, decreasing
for a while, and then curving sharply back to a zero pressure.
• later supercritical - PIP = 1 for the liquid-like phase at P = 0
Parameters
T [float] Temperature for the calculation, [K]
low_P_limit [float] What value to return for the subcritical and later region, [Pa]
Returns
P [float] Pressure which makes the PIP = 1, [Pa]
Notes
The transition between the region where this function returns values and the high temperature region that
doesn’t is the Joule-Thomson inversion point at a pressure of zero and can be directly solved for.
Examples
>>> eos.P_PIP_transition(100)
0.0
>>> low_T = eos.to(T=100.0, P=eos.P_PIP_transition(100, low_P_limit=1e-5))
>>> low_T.PIP_l, low_T.PIP_g
(45.778088191, 0.9999999997903)
>>> initial_super = eos.to(T=600.0, P=eos.P_PIP_transition(600))
>>> initial_super.P, initial_super.PIP_g
(6456282.17132, 0.999999999999)
>>> high_T = eos.to(T=900.0, P=eos.P_PIP_transition(900, low_P_limit=1e-5))
>>> high_T.P, high_T.PIP_g
(12536704.763, 0.9999999999)
P_discriminant_zero_g()
Method to calculate the pressure which zero the discriminant function of the general cubic eos, and is likely
to sit on a boundary between not having a vapor-like volume; and having a vapor-like volume.
Returns
P_discriminant_zero_g [float] Pressure which make the discriminants zero at the right con-
dition, [Pa]
Examples
In this case, the discriminant transition does not reveal a transition to two roots being available, only negative
roots becoming negative and imaginary.
P_discriminant_zero_l()
Method to calculate the pressure which zero the discriminant function of the general cubic eos, and is likely
to sit on a boundary between not having a liquid-like volume; and having a liquid-like volume.
Returns
P_discriminant_zero_l [float] Pressure which make the discriminants zero at the right con-
dition, [Pa]
Examples
P_discriminant_zeros()
Method to calculate the pressures which zero the discriminant function of the general cubic eos, at the
current temperature.
Returns
P_discriminant_zeros [list[float]] Pressures which make the discriminants zero, [Pa]
Examples
>>> eos.P_discriminant_zeros()
[478346.3, 149960391.7]
Notes
>>> eta = b
>>> B = b*P/(R*T)
>>> deltas = delta*P/(R*T)
>>> thetas = a*P/(R*T)**2
>>> epsilons = epsilon*(P/(R*T))**2
>>> etas = eta*P/(R*T)
>>> a_coeff = 1
>>> b_coeff = (deltas - B - 1)
>>> c = (thetas + epsilons - deltas*(B+1))
>>> d = -(epsilons*(B+1) + thetas*etas)
>>> disc = b_coeff*b_coeff*c*c - 4*a_coeff*c*c*c - 4*b_coeff*b_coeff*b_coeff*d -
˓→ 27*a_coeff*a_coeff*d*d + 18*a_coeff*b_coeff*c*d
P_max_at_V(V )
Dummy method. The idea behind this method, which is implemented by some subclasses, is to calculate
the maximum pressure the EOS can create at a constant volume, if one exists; returns None otherwise. This
method, as a dummy method, always returns None.
Parameters
V [float] Constant molar volume, [m^3/mol]
Returns
P [float] Maximum possible isochoric pressure, [Pa]
P_zero_g_cheb_limits = (0.0, 0.0)
P_zero_l_cheb_limits = (0.0, 0.0)
Psat(T, polish=False, guess=None)
Generic method to calculate vapor pressure for a specified T.
From Tc to 0.32Tc, uses a 10th order polynomial of the following form:
10 (︂ )︂𝑘
𝑃𝑟 ∑︁ 𝛼
ln = 𝐶𝑘 −1
𝑇𝑟 𝑇𝑟
𝑘=0
If polish is True, SciPy’s newton solver is launched with the calculated vapor pressure as an initial guess in
an attempt to get more accuracy. This may not converge however.
Results above the critical temperature are meaningless. A first-order polynomial is used to extrapolate
under 0.32 Tc; however, there is normally not a volume solution to the EOS which can produce that low of
a pressure.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to attempt to use a numerical solver to make the solution
more precise or not
Returns
Psat [float] Vapor pressure, [Pa]
Notes
EOSs sharing the same b, delta, and epsilon have the same coefficient sets.
Form for the regression is inspired from [1].
No volume solution is needed when polish=False; the only external call is for the value of a_alpha.
References
[1]
Psat_cheb_range = (0.0, 0.0)
Psat_errors(Tmin=None, Tmax=None, pts=50, plot=False, show=False, trunc_err_low=1e-18,
trunc_err_high=1.0, Pmin=1e-100)
Method to create a plot of vapor pressure and the relative error of its calculation vs. the iterative polish
approach.
Parameters
Tmin [float] Minimum temperature of calculation; if this is too low the saturation routines
will stop converging, [K]
Tmax [float] Maximum temperature of calculation; cannot be above the critical temperature,
[K]
pts [int, optional] The number of temperature points to include [-]
plot [bool] If False, the solution is returned without plotting the data, [-]
show [bool] Whether or not the plot should be rendered and shown; a handle to it is returned
if plot is True for other purposes such as saving the plot to a file, [-]
trunc_err_low [float] Minimum plotted error; values under this are rounded to 0, [-]
trunc_err_high [float] Maximum plotted error; values above this are rounded to 1, [-]
Pmin [float] Minimum pressure for the solution to work on, [Pa]
Returns
errors [list[float]] Absolute relative errors, [-]
Psats_num [list[float]] Vapor pressures calculated to full precision, [Pa]
Psats_fit [list[float]] Vapor pressures calculated with the fast solution, [Pa]
fig [matplotlib.figure.Figure] Plotted figure, only returned if plot is True, [-]
T_discriminant_zero_g(T_guess=None)
Method to calculate the temperature which zeros the discriminant function of the general cubic eos, and is
likely to sit on a boundary between not having a vapor-like volume; and having a vapor-like volume.
Parameters
T_guess [float, optional] Temperature guess, [K]
Returns
T_discriminant_zero_g [float] Temperature which make the discriminants zero at the right
condition, [K]
Notes
Examples
In this case, the discriminant transition does not reveal a transition to two roots being available, only to
there being a double (imaginary) root.
T_discriminant_zero_l(T_guess=None)
Method to calculate the temperature which zeros the discriminant function of the general cubic eos, and is
likely to sit on a boundary between not having a liquid-like volume; and having a liquid-like volume.
Parameters
T_guess [float, optional] Temperature guess, [K]
Returns
T_discriminant_zero_l [float] Temperature which make the discriminants zero at the right
condition, [K]
Notes
Examples
In this case, the discriminant transition does not reveal a transition to two roots being available, only to
there being a double (imaginary) root.
T_max_at_V(V, Pmax=None)
Method to calculate the maximum temperature the EOS can create at a constant volume, if one exists;
returns None otherwise.
Parameters
V [float] Constant molar volume, [m^3/mol]
Pmax [float] Maximum possible isochoric pressure, if already known [Pa]
Returns
T [float] Maximum possible temperature, [K]
Examples
T_min_at_V(V, Pmin=1e-15)
Returns the minimum temperature for the EOS to have the volume as specified. Under this temperature,
the pressure will go negative (and the EOS will not solve).
Tsat(P, polish=False)
Generic method to calculate the temperature for a specified vapor pressure of the pure fluid. This is simply
a bounded solver running between 0.2Tc and Tc on the Psat method.
Parameters
P [float] Vapor pressure, [Pa]
polish [bool, optional] Whether to attempt to use a numerical solver to make the solution
more precise or not
Returns
Tsat [float] Temperature of saturation, [K]
Notes
It is recommended not to run with polish=True, as that will make the calculation much slower.
property U_dep_g
Departure molar internal energy from ideal gas behavior for the gas phase, [J/mol].
property U_dep_l
Departure molar internal energy from ideal gas behavior for the liquid phase, [J/mol].
property V_dep_g
Departure molar volume from ideal gas behavior for the gas phase, [m^3/mol].
𝑅𝑇
𝑉𝑑𝑒𝑝 = 𝑉 −
𝑃
property V_dep_l
Departure molar volume from ideal gas behavior for the liquid phase, [m^3/mol].
𝑅𝑇
𝑉𝑑𝑒𝑝 = 𝑉 −
𝑃
property V_g_mpmath
The molar volume of the gas phase calculated with mpmath to a higher precision, [m^3/mol]. This is
useful for validating the cubic root solver(s). It is not quite a true arbitrary solution to the EOS, because
the constants b,`epsilon`, delta and a_alpha as well as the input arguments T and P are not calculated with
arbitrary precision. This is a feature when comparing the volume solution algorithms however as they work
with the same finite-precision variables.
V_g_sat(T )
Method to calculate molar volume of the vapor phase along the saturation line.
Parameters
T [float] Temperature, [K]
Returns
V_g_sat [float] Gas molar volume along the saturation line, [m^3/mol]
Notes
Computes Psat, and then uses volume_solutions to obtain the three possible molar volumes. The highest
value is returned.
property V_l_mpmath
The molar volume of the liquid phase calculated with mpmath to a higher precision, [m^3/mol]. This is
useful for validating the cubic root solver(s). It is not quite a true arbitrary solution to the EOS, because
the constants b,`epsilon`, delta and a_alpha as well as the input arguments T and P are not calculated with
arbitrary precision. This is a feature when comparing the volume solution algorithms however as they work
with the same finite-precision variables.
V_l_sat(T )
Method to calculate molar volume of the liquid phase along the saturation line.
Parameters
T [float] Temperature, [K]
Returns
V_l_sat [float] Liquid molar volume along the saturation line, [m^3/mol]
Notes
Computes Psat, and then uses volume_solutions to obtain the three possible molar volumes. The lowest
value is returned.
property Vc
Critical volume, [m^3/mol].
𝑍𝑐 𝑅𝑇𝑐
𝑉𝑐 =
𝑃𝑐
Vs_mpmath()
Method to calculate real roots of a cubic equation, using mpmath.
Returns
Vs [list[mpf]] Either 1 or 3 real volumes as calculated by mpmath, [m^3/mol]
Examples
>>> eos.Vs_mpmath()
[mpf('0.0000489261705320261435106226558966745'), mpf('0.
˓→000541508154451321441068958547812526'), mpf('0.
˓→0243149463942697410611501615357228')]
__repr__()
Create a string representation of the EOS - by default, include all parameters so as to make it easy to
construct new instances from states. Includes the two specified state variables, Tc, Pc, omega and any
kwargs.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
Examples
a_alpha_and_derivatives_pure(T )
Dummy method to calculate 𝑎𝛼 and its first and second derivatives. Should be implemented with the
same function signature in each EOS variant; this only raises a NotImplemented Exception. Should return
‘a_alpha’, ‘da_alpha_dT’, and ‘d2a_alpha_dT2’.
Parameters
T [float] Temperature, [K]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
a_alpha_for_Psat(T, Psat, a_alpha_guess=None)
Method to calculate which value of 𝑎𝛼 is required for a given T, Psat pair. This is a numerical solution,
but not a very complicated one.
Parameters
T [float] Temperature, [K]
Psat [float] Vapor pressure specified, [Pa]
a_alpha_guess [float] Optionally, an initial guess for the solver [J^2/mol^2/Pa]
Returns
a_alpha [float] Value calculated to match specified volume for the current EOS,
[J^2/mol^2/Pa]
Notes
The implementation of this function is a direct calculation of departure gibbs energy, which is equal in both
phases at saturation.
Examples
a_alpha_for_V(T, P, V )
Method to calculate which value of 𝑎𝛼 is required for a given T, P pair to match a specified V. This is a
straightforward analytical equation.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
Returns
a_alpha [float] Value calculated to match specified volume for the current EOS,
[J^2/mol^2/Pa]
Notes
Examples
property beta_g
Isobaric (constant-pressure) expansion coefficient for the gas phase, [1/K].
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇
property beta_l
Isobaric (constant-pressure) expansion coefficient for the liquid phase, [1/K].
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇
c1 = None
Parameter used by some equations of state in the a calculation
c2 = None
Parameter used by some equations of state in the b calculation
check_sufficient_inputs()
Method to an exception if none of the pairs (T, P), (T, V), or (P, V) are given.
property d2H_dep_dT2_g
Second temperature derivative of departure enthalpy with respect to temperature for the gas phase,
[(J/mol)/K^2].
(︁ )︁ 3
𝛿+2𝑉 (𝑇 ) 𝑑
𝑑2 2𝑇 atanh 𝑑𝑇 3 a𝛼 (𝑇 )
√
𝑑
(︀ 𝑑
2 2 8𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 16 (𝛿 + 2𝑉 (𝑇 )) 𝑇 𝑑𝑇 a𝛼
𝜕 𝐻𝑑𝑒𝑝,𝑔 𝑑 2
𝛿 −4𝜖
= 𝑃 𝑉 (𝑇 ) − (︁ )︁ + √ +
𝜕𝑇 2 𝑑𝑇 2 (𝛿+2𝑉 (𝑇 ))2 2 − 4𝜖
(︁
2
(𝛿 − 4𝜖) −1 𝛿 2
(𝛿 2 − 4𝜖) (
𝛿 2 −4𝜖
property d2H_dep_dT2_g_P
Second temperature derivative of departure enthalpy with respect to temperature for the gas phase,
[(J/mol)/K^2].
(︁ )︁ 3
𝛿+2𝑉 (𝑇 ) 𝑑
𝑑2 2𝑇 atanh 𝑑𝑇 3 a𝛼 (𝑇 )
√
𝑑
(︀ 𝑑
𝜕 2 𝐻𝑑𝑒𝑝,𝑔 𝑑2 8𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 2
𝛿 −4𝜖 16 (𝛿 + 2𝑉 (𝑇 )) 𝑇 𝑑𝑇 a𝛼
2
=𝑃 2
𝑉 (𝑇 ) − (︁ 2
)︁ + √ +
𝜕𝑇 𝑑𝑇 (𝛿+2𝑉 (𝑇 )) 2
𝛿 − 4𝜖
(︁
(𝛿 2 − 4𝜖) 2
𝛿 2 −4𝜖 −1 (𝛿 2 − 4𝜖) (
property d2H_dep_dT2_g_V
Second temperature derivative of departure enthalpy with respect to temperature at constant volume for the
gas phase, [(J/mol)/K^2].
(︁ )︁ 3 (︁ )︁ 2
(︂ 2 )︂ 2𝑇 atanh √2𝑉 +𝛿 𝑑
a𝛼 (𝑇 ) 2 2 atanh √2𝑉 +𝛿 𝑑
a𝛼 (𝑇 )
𝜕 𝐻𝑑𝑒𝑝,𝑔 𝛿 2 −4𝜖 𝑑𝑇 3 𝜕 𝛿 2 −4𝜖 𝑑𝑇 2
= √ + 𝑉 𝑃 (𝑉, 𝑇 ) + √
𝜕𝑇 2 𝑉 𝛿 2 − 4𝜖 𝜕𝑇 2 𝛿 2 − 4𝜖
property d2H_dep_dT2_l
Second temperature derivative of departure enthalpy with respect to temperature for the liquid phase,
[(J/mol)/K^2].
(︁ )︁ 3
𝛿+2𝑉 (𝑇 ) 𝑑
𝑑2 2𝑇 atanh 𝑑𝑇 3 a𝛼 (𝑇 )
√
𝑑
(︀ 𝑑
2 2 8𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 16 (𝛿 + 2𝑉 (𝑇 )) 𝑇 𝑑𝑇 a𝛼
𝜕 𝐻𝑑𝑒𝑝,𝑙 𝑑 2
𝛿 −4𝜖
= 𝑃 𝑉 (𝑇 ) − (︁ )︁ + √ +
𝜕𝑇 2 𝑑𝑇 2 (𝛿+2𝑉 (𝑇 ))2 2 − 4𝜖
(︁
2
(𝛿 − 4𝜖) −1 𝛿 2
(𝛿 2 − 4𝜖) (𝛿
𝛿 2 −4𝜖
property d2H_dep_dT2_l_P
Second temperature derivative of departure enthalpy with respect to temperature for the liquid phase,
[(J/mol)/K^2].
(︁ )︁ 3
𝛿+2𝑉 (𝑇 ) 𝑑
𝑑2 2𝑇 atanh 𝑑𝑇 3 a𝛼 (𝑇 )
√
𝑑
(︀ 𝑑
2 2 8𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 16 (𝛿 + 2𝑉 (𝑇 )) 𝑇 𝑑𝑇 a𝛼
𝜕 𝐻𝑑𝑒𝑝,𝑙 𝑑 𝛿 2 −4𝜖
=𝑃 𝑉 (𝑇 ) − (︁ )︁ + √ +
𝜕𝑇 2 𝑑𝑇 2 (𝛿+2𝑉 (𝑇 ))2 2
𝛿 − 4𝜖
(︁
(𝛿 2 − 4𝜖) 2
𝛿 2 −4𝜖 −1 (𝛿 2 − 4𝜖) (𝛿
property d2H_dep_dT2_l_V
Second temperature derivative of departure enthalpy with respect to temperature at constant volume for the
liquid phase, [(J/mol)/K^2].
(︁ )︁ 3 (︁ )︁ 2
(︂ 2
𝜕 𝐻𝑑𝑒𝑝,𝑙
)︂ 2𝑇 atanh √2𝑉 2
+𝛿
𝛿 −4𝜖
𝑑
𝑑𝑇 3 a𝛼 (𝑇 ) 𝜕 2 2 atanh √2𝑉 +𝛿 𝑑
𝛿 −4𝜖 𝑑𝑇 2
2
a𝛼 (𝑇 )
= √ + 𝑉 𝑃 (𝑉, 𝑇 ) + √
𝜕𝑇 2 𝑉 𝛿 2 − 4𝜖 𝜕𝑇 2 𝛿 2 − 4𝜖
property d2H_dep_dTdP_g
Temperature and pressure derivative of departure enthalpy at constant pressure then temperature for the gas
phase, [(J/mol)/K/Pa].
𝑑2
(︂ 2 𝜕
(︀ 𝑑 )︀ 𝜕
𝜕2 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝜕𝑃
)︂
𝜕 𝐻𝑑𝑒𝑝,𝑔 4𝑇 𝜕𝑃 𝑉 (𝑇, 𝑃 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 16 (𝛿 + 2𝑉 (𝑇, 𝑃 )) 𝑇 𝑑𝑇
=𝑃 𝑉 (𝑇, 𝑃 ) − (︁ )︁ +
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑃 (𝑇,𝑃 ))2
(𝛿 2 − 4𝜖) (𝛿+2𝑉
(︁
2 (𝑇,𝑃 ))2
𝑇,𝑃
𝛿 2 −4𝜖 −1 (𝛿 2 − 4𝜖) (𝛿+2𝑉𝛿 2 −4𝜖 −1
property d2H_dep_dTdP_l
Temperature and pressure derivative of departure enthalpy at constant pressure then temperature for the
liquid phase, [(J/mol)/K/Pa].
𝑑2
(︂ 2 𝜕
(︀ 𝑑 )︀ 𝜕
𝜕2 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝜕𝑃
)︂
𝜕 𝐻𝑑𝑒𝑝,𝑙 4𝑇 𝜕𝑃 𝑉 (𝑇, 𝑃 ) 𝑑𝑇 2 a𝛼 (𝑇 ) 16 (𝛿 + 2𝑉 (𝑇, 𝑃 )) 𝑇 𝑑𝑇 𝑉
=𝑃 𝑉 (𝑇, 𝑃 ) − (︁ 2
)︁ + )︁2
𝜕𝑇 𝜕𝑃 𝑉 𝜕𝑇 𝜕𝑃 (𝛿 2 − 4𝜖) (𝛿+2𝑉 (𝑇,𝑃 ))
(︁ 2
2
𝛿 2 −4𝜖 −1 (𝛿 2 − 4𝜖) (𝛿+2𝑉 (𝑇,𝑃 ))
𝛿 2 −4𝜖 −1
property d2P_dT2_PV_g
Second derivative of pressure with respect to temperature twice, but with pressure held constant the first
time and volume held constant the second time for the gas phase, [Pa/K^2].
𝑑 𝑑 𝑑2
(︂ 2 )︂ 𝑑
(︀ )︀ 𝑑
𝜕 𝑃 𝑅 𝑑𝑇 𝑉 (𝑇 ) −𝛿 𝑑𝑇 𝑉 (𝑇 ) − 2𝑉 (𝑇 ) 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 a𝛼 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 )
=− 2 − 2 −
𝜕𝑇 𝜕𝑇 𝑃,𝑉 (−𝑏 + 𝑉 (𝑇 )) (𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )) 𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )
property d2P_dT2_PV_l
Second derivative of pressure with respect to temperature twice, but with pressure held constant the first
time and volume held constant the second time for the liquid phase, [Pa/K^2].
𝑑 𝑑 𝑑2
(︂ 2 )︂ 𝑑
(︀ )︀ 𝑑
𝜕 𝑃 𝑅 𝑑𝑇 𝑉 (𝑇 ) −𝛿 𝑑𝑇 𝑉 (𝑇 ) − 2𝑉 (𝑇 ) 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 a𝛼 (𝑇 ) 𝑑𝑇 2 a𝛼 (𝑇 )
=− 2 − 2 −
𝜕𝑇 𝜕𝑇 𝑃,𝑉 (−𝑏 + 𝑉 (𝑇 )) (𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )) 𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )
property d2P_dTdP_g
Second derivative of pressure with respect to temperature and, then pressure; and with volume held constant
at first, then temperature, for the gas phase, [1/K].
𝑑 𝑑
(︂ 2 )︂ 𝑑
(︀ )︀ 𝑑
𝜕 𝑃 𝑅 𝑑𝑃 𝑉 (𝑃 ) −𝛿 𝑑𝑃 𝑉 (𝑃 ) − 2𝑉 (𝑃 ) 𝑑𝑃 𝑉 (𝑃 ) 𝑑𝑇 a𝛼 (𝑇 )
=− 2 − 2
𝜕𝑇 𝜕𝑃 𝑉,𝑇 (−𝑏 + 𝑉 (𝑃 )) 2
(𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 (𝑃 ))
property d2P_dTdP_l
Second derivative of pressure with respect to temperature and, then pressure; and with volume held constant
at first, then temperature, for the liquid phase, [1/K].
𝑑 𝑑
(︂ 2 )︂ 𝑑
(︀ )︀ 𝑑
𝜕 𝑃 𝑅 𝑑𝑃 𝑉 (𝑃 ) −𝛿 𝑑𝑃 𝑉 (𝑃 ) − 2𝑉 (𝑃 ) 𝑑𝑃 𝑉 (𝑃 ) 𝑑𝑇 a𝛼 (𝑇 )
=− 2 − 2
𝜕𝑇 𝜕𝑃 𝑉,𝑇 (−𝑏 + 𝑉 (𝑃 )) 2
(𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 (𝑃 ))
property d2P_dTdrho_g
Derivative of pressure with respect to molar density, and temperature for the gas phase, [Pa/(K*mol/m^3)].
𝜕2𝑃 𝜕2𝑃
= −𝑉 2
𝜕𝜌𝜕𝑇 𝜕𝑇 𝜕𝑉
property d2P_dTdrho_l
Derivative of pressure with respect to molar density, and temperature for the liquid phase,
[Pa/(K*mol/m^3)].
𝜕2𝑃 𝜕2𝑃
= −𝑉 2
𝜕𝜌𝜕𝑇 𝜕𝑇 𝜕𝑉
property d2P_dVdP_g
Second derivative of pressure with respect to molar volume and then pressure for the gas phase, [mol/m^3].
𝑑 𝑑 𝑑 𝑑
(︀ )︀
𝜕2𝑃 2𝑅𝑇 𝑑𝑃 𝑉 (𝑃 ) (−𝛿 − 2𝑉 (𝑃 )) −2𝛿 𝑑𝑃 𝑉 (𝑃 ) − 4𝑉 (𝑃 ) 𝑑𝑃 𝑉 (𝑃 ) a𝛼 (𝑇 ) 2 a𝛼 (𝑇 ) 𝑑𝑃 𝑉 (𝑃 )
= 3 − 3 + 2
𝜕𝑉 𝜕𝑃 (−𝑏 + 𝑉 (𝑃 )) 2
(𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 (𝑃 )) (𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 2 (𝑃 ))
property d2P_dVdP_l
Second derivative of pressure with respect to molar volume and then pressure for the liquid phase,
[mol/m^3].
𝑑 𝑑 𝑑 𝑑
(︀ )︀
𝜕2𝑃 2𝑅𝑇 𝑑𝑃 𝑉 (𝑃 ) (−𝛿 − 2𝑉 (𝑃 )) −2𝛿 𝑑𝑃 𝑉 (𝑃 ) − 4𝑉 (𝑃 ) 𝑑𝑃 𝑉 (𝑃 ) a𝛼 (𝑇 ) 2 a𝛼 (𝑇 ) 𝑑𝑃 𝑉 (𝑃 )
= 3 − 3 + 2
𝜕𝑉 𝜕𝑃 (−𝑏 + 𝑉 (𝑃 )) (𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 2 (𝑃 )) (𝛿𝑉 (𝑃 ) + 𝜖 + 𝑉 2 (𝑃 ))
property d2P_dVdT_TP_g
Second derivative of pressure with respect to molar volume and then temperature at constant temperature
then pressure for the gas phase, [Pa*mol/m^3/K].
𝑑 𝑑 𝑑
(︂ 2 )︂ (︀ )︀
𝜕 𝑃 2𝑅𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑅 (−𝛿 − 2𝑉 (𝑇 )) −2𝛿 𝑑𝑇 𝑉 (𝑇 ) − 4𝑉 (𝑇 ) 𝑑𝑇 𝑉 (𝑇 ) a𝛼 (𝑇 ) (−𝛿 − 2
𝜕𝑉 𝜕𝑇 𝑇,𝑃
= 3 − 2 − 3 −
(−𝑏 + 𝑉 (𝑇 )) (−𝑏 + 𝑉 (𝑇 )) (𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )) (𝛿𝑉 (𝑇
property d2P_dVdT_TP_l
Second derivative of pressure with respect to molar volume and then temperature at constant temperature
then pressure for the liquid phase, [Pa*mol/m^3/K].
𝑑 𝑑 𝑑
(︂ 2 )︂ (︀ )︀
𝜕 𝑃 2𝑅𝑇 𝑑𝑇 𝑉 (𝑇 ) 𝑅 (−𝛿 − 2𝑉 (𝑇 )) −2𝛿 𝑑𝑇 𝑉 (𝑇 ) − 4𝑉 (𝑇 ) 𝑑𝑇 𝑉 (𝑇 ) a𝛼 (𝑇 ) (−𝛿 − 2
𝜕𝑉 𝜕𝑇 𝑇,𝑃
= 3 − 2 − 3 −
(−𝑏 + 𝑉 (𝑇 )) (−𝑏 + 𝑉 (𝑇 )) (𝛿𝑉 (𝑇 ) + 𝜖 + 𝑉 2 (𝑇 )) (𝛿𝑉 (𝑇
property d2P_dVdT_g
Alias of GCEOS.d2P_dTdV_g
property d2P_dVdT_l
Alias of GCEOS.d2P_dTdV_l
property d2P_drho2_g
Second derivative of pressure with respect to molar density for the gas phase, [Pa/(mol/m^3)^2].
𝜕2𝑃 2
(︂ )︂
2 2𝜕 𝑃 𝜕𝑃
= −𝑉 −𝑉 − 2𝑉
𝜕𝜌2 𝜕𝑉 2 𝜕𝑉
property d2P_drho2_l
Second derivative of pressure with respect to molar density for the liquid phase, [Pa/(mol/m^3)^2].
𝜕2𝑃 2
(︂ )︂
2 2𝜕 𝑃 𝜕𝑃
= −𝑉 −𝑉 − 2𝑉
𝜕𝜌2 𝜕𝑉 2 𝜕𝑉
property d2S_dep_dT2_g
Second temperature derivative of departure entropy with respect to temperature for the gas phase,
[(J/mol)/K^3].
𝑑
(︁ )︁ (︁ 2 )︁
𝑑 𝑉 (𝑇 ) 𝑑 𝑑 2 𝑑𝑇 𝑉 (𝑇 ) 2𝑉 (𝑇 ) )︀2
𝑅 𝑉 (𝑇 ) − 𝑉 (𝑇 ) 𝑅 𝑉 (𝑇 ) − + 𝑑2
(︀ 𝑑
2 𝑅 𝑑𝑇 𝑅 𝑑𝑇 𝑉 (𝑇 )
𝜕 𝑆𝑑𝑒𝑝,𝑔 2 𝑉 (𝑇 )
𝑑𝑇 𝑇 𝑑𝑇 𝑑𝑇 2 𝑇 𝑇 2
=− + − + −
𝜕𝑇 2 𝑉 2 (𝑇 ) 𝑉 (𝑇 ) 𝑉 (𝑇 ) 𝑉 2 (𝑇 )
property d2S_dep_dT2_g_V
Second temperature derivative of departure entropy with respect to temperature at constant volume for the
gas phase, [(J/mol)/K^3].
𝜕
(︁ )︁ (︁ 2 )︁ (︁
𝜕 𝑃 (𝑉,𝑇 ) 𝜕 𝜕 2 𝜕𝑇 𝑃 (𝑉,𝑇 ) 2𝑃 (𝑉,𝑇 ) 𝜕
(︂ 2
𝜕 𝑆𝑑𝑒𝑝,𝑔
)︂ 𝑅 𝜕𝑇 𝑃 (𝑉, 𝑇 ) − 𝑇 𝜕𝑇 𝑃 (𝑉, 𝑇 ) 𝑅 𝜕𝑇 2 𝑃 (𝑉, 𝑇 ) − 𝑇 + 𝑇 2 𝑅 𝜕𝑇 𝑃 (𝑉, 𝑇
=− + +
𝜕𝑇 2 𝑉 𝑃 2 (𝑉, 𝑇 ) 𝑃 (𝑉, 𝑇 ) 𝑇 𝑃 (𝑉
property d2S_dep_dT2_l
Second temperature derivative of departure entropy with respect to temperature for the liquid phase,
[(J/mol)/K^3].
𝑑
(︁ )︁ (︁ 2 )︁
𝑑 𝑉 (𝑇 ) 𝑑 𝑑 2 𝑑𝑇 𝑉 (𝑇 ) 2𝑉 (𝑇 ) )︀2
𝑅 𝑉 (𝑇 ) − 𝑉 (𝑇 ) 𝑅 𝑉 (𝑇 ) − + 𝑑2
(︀ 𝑑
2 𝑅 𝑑𝑇 𝑅 𝑑𝑇 𝑉 (𝑇 )
𝜕 𝑆𝑑𝑒𝑝,𝑙 2 𝑉 (𝑇 )
𝑑𝑇 𝑇 𝑑𝑇 𝑑𝑇 2 𝑇 𝑇 2
=− + − + −
𝜕𝑇 2 𝑉 2 (𝑇 ) 𝑉 (𝑇 ) 𝑉 (𝑇 ) 𝑉 2 (𝑇 )
property d2S_dep_dT2_l_V
Second temperature derivative of departure entropy with respect to temperature at constant volume for the
liquid phase, [(J/mol)/K^3].
𝜕
(︁ )︁ (︁ 2 )︁ (︁
2 𝜕𝑇 𝑃 (𝑉,𝑇 )
(︂ 2
𝜕 𝑆𝑑𝑒𝑝,𝑙
)︂ 𝑅 𝜕𝑇 𝜕
𝑃 (𝑉, 𝑇 ) − 𝑃 (𝑉,𝑇
𝑇
) 𝜕
𝜕𝑇 𝑃 (𝑉, 𝑇 )
𝜕
𝑅 𝜕𝑇 2 𝑃 (𝑉, 𝑇 ) − 𝑇 + 2𝑃 𝑇(𝑉,𝑇
2
)
𝑅 𝜕𝑇𝜕
𝑃 (𝑉, 𝑇
= − + +
𝜕𝑇 2 𝑉 𝑃 2 (𝑉, 𝑇 ) 𝑃 (𝑉, 𝑇 ) 𝑇 𝑃 (𝑉
property d2S_dep_dTdP_g
Temperature and pressure derivative of departure entropy at constant pressure then temperature for the gas
phase, [(J/mol)/K^2/Pa].
2 2
𝜕 2 𝑆𝑑𝑒𝑝,𝑔 𝑅 𝜕 𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑃
𝜕 𝜕
𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑇𝜕𝜕𝑃 𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑃
𝜕 𝜕
(︂ )︂
𝑉 (𝑇, 𝑃 ) 𝜕𝑇 𝑉 (𝑇, 𝑃 ) 𝜕𝑇 𝑉 (𝑇, 𝑃 ) 16
= − 𝜕𝑇 𝜕𝑃 + 2
− − 2 +
𝜕𝑇 𝜕𝑃 𝑇,𝑃 𝑉 (𝑇, 𝑃 ) 𝑉 (𝑇, 𝑃 ) 𝑏 − 𝑉 (𝑇, 𝑃 ) (𝑏 − 𝑉 (𝑇, 𝑃 ))
property d2S_dep_dTdP_l
Temperature and pressure derivative of departure entropy at constant pressure then temperature for the
liquid phase, [(J/mol)/K^2/Pa].
2 2
𝜕 2 𝑆𝑑𝑒𝑝,𝑙 𝑅 𝜕𝑇𝜕𝜕𝑃 𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑃
𝜕 𝜕
𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑇𝜕𝜕𝑃 𝑉 (𝑇, 𝑃 ) 𝑅 𝜕𝑃
𝜕 𝜕
(︂ )︂
𝑉 (𝑇, 𝑃 ) 𝜕𝑇 𝑉 (𝑇, 𝑃 ) 𝜕𝑇 𝑉 (𝑇, 𝑃 ) 16
=− + 2
− − 2 +
𝜕𝑇 𝜕𝑃 𝑇,𝑃 𝑉 (𝑇, 𝑃 ) 𝑉 (𝑇, 𝑃 ) 𝑏 − 𝑉 (𝑇, 𝑃 ) (𝑏 − 𝑉 (𝑇, 𝑃 ))
property d2T_dP2_g
Second partial derivative of temperature with respect to pressure (constant volume) for the gas phase,
[K/Pa^2].
(︂ 2 )︂ (︂ 2 )︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃
= −
𝜕𝑃 2 𝑉 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_dP2_l
Second partial derivative of temperature with respect to pressure (constant temperature) for the liquid phase,
[K/Pa^2].
(︂ 2 )︂ (︂ 2 )︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃
= −
𝜕𝑃 2 𝑉 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_dPdV_g
Second partial derivative of temperature with respect to pressure (constant volume) and then volume (con-
stant pressure) for the gas phase, [K*mol/(Pa*m^3)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_dPdV_l
Second partial derivative of temperature with respect to pressure (constant volume) and then volume (con-
stant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_dPdrho_g
Derivative of temperature with respect to molar density, and pressure for the gas phase, [K/(Pa*mol/m^3)].
𝜕2𝑇 𝜕2𝑇
= −𝑉 2
𝜕𝜌𝜕𝑃 𝜕𝑃 𝜕𝑉
property d2T_dPdrho_l
Derivative of temperature with respect to molar density, and pressure for the liquid phase,
[K/(Pa*mol/m^3)].
𝜕2𝑇 𝜕2𝑇
= −𝑉 2
𝜕𝜌𝜕𝑃 𝜕𝑃 𝜕𝑉
property d2T_dV2_g
Second partial derivative of temperature with respect to volume (constant pressure) for the gas phase,
[K*mol^2/m^6].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
= − − + −
𝜕𝑉 2 𝑃 𝜕𝑉 2 𝑇 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉
property d2T_dV2_l
Second partial derivative of temperature with respect to volume (constant pressure) for the liquid phase,
[K*mol^2/m^6].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
2
= − 2
− + −
𝜕𝑉 𝑃 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉
property d2T_dVdP_g
Second partial derivative of temperature with respect to pressure (constant volume) and then volume (con-
stant pressure) for the gas phase, [K*mol/(Pa*m^3)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_dVdP_l
Second partial derivative of temperature with respect to pressure (constant volume) and then volume (con-
stant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
property d2T_drho2_g
Second derivative of temperature with respect to molar density for the gas phase, [K/(mol/m^3)^2].
𝜕2𝑇 𝜕2𝑇 𝜕𝑇
2
= −𝑉 2 (−𝑉 2 2
− 2𝑉 )
𝜕𝜌 𝜕𝑉 𝜕𝑉
property d2T_drho2_l
Second derivative of temperature with respect to molar density for the liquid phase, [K/(mol/m^3)^2].
𝜕2𝑇 𝜕2𝑇 𝜕𝑇
2
= −𝑉 2 (−𝑉 2 − 2𝑉 )
𝜕𝜌 𝜕𝑉 2 𝜕𝑉
property d2V_dP2_g
Second partial derivative of volume with respect to pressure (constant temperature) for the gas phase,
[m^3/(Pa^2*mol)].
(︂ 2 )︂ (︂ 2 )︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃
=−
𝜕𝑃 2 𝑇 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2V_dP2_l
Second partial derivative of volume with respect to pressure (constant temperature) for the liquid phase,
[m^3/(Pa^2*mol)].
(︂ 2 )︂ (︂ 2 )︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃
= −
𝜕𝑃 2 𝑇 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2V_dPdT_g
Second partial derivative of volume with respect to pressure (constant temperature) and then presssure
(constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2V_dPdT_l
Second partial derivative of volume with respect to pressure (constant temperature) and then presssure
(constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2V_dT2_g
Second partial derivative of volume with respect to temperature (constant pressure) for the gas phase,
[m^3/(mol*K^2)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
=− − + −
𝜕𝑇 2 𝑃 𝜕𝑇 2 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇
property d2V_dT2_l
Second partial derivative of volume with respect to temperature (constant pressure) for the liquid phase,
[m^3/(mol*K^2)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
= − − + −
𝜕𝑇 2 𝑃 𝜕𝑇 2 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇
property d2V_dTdP_g
Second partial derivative of volume with respect to pressure (constant temperature) and then presssure
(constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2V_dTdP_l
Second partial derivative of volume with respect to pressure (constant temperature) and then presssure
(constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑉 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
property d2a_alpha_dTdP_g_V
Derivative of the temperature derivative of a_alpha with respect to pressure at constant volume (varying
T) for the gas phase, [J^2/mol^2/Pa^2/K].
(︃ (︀ )︀ )︃
𝜕 𝜕𝑎𝛼
(︂ 2 )︂ (︂ )︂
𝜕𝑇 𝑃 𝜕 𝑎𝛼 𝜕𝑇
= ·
𝜕𝑃 𝜕𝑇 2 𝑃 𝜕𝑃 𝑉
𝑉
property d2a_alpha_dTdP_l_V
Derivative of the temperature derivative of a_alpha with respect to pressure at constant volume (varying
T) for the liquid phase, [J^2/mol^2/Pa^2/K].
(︃ (︀ )︀ )︃
𝜕 𝜕𝑎𝛼
(︂ 2 )︂ (︂ )︂
𝜕𝑇 𝑃 𝜕 𝑎𝛼 𝜕𝑇
= ·
𝜕𝑃 𝜕𝑇 2 𝑃 𝜕𝑃 𝑉
𝑉
d2phi_sat_dT2(T, polish=True)
Method to calculate the second temperature derivative of saturation fugacity coefficient of the compound.
This does require solving the EOS itself.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
d2phi_sat_dT2 [float] Second temperature derivative of fugacity coefficient along the
liquid-vapor saturation line, [1/K^2]
Notes
property d2rho_dP2_l
Second derivative of molar density with respect to pressure for the liquid phase, [(mol/m^3)/Pa^2].
)︂2
𝜕2𝜌 𝜕2𝑉 1
(︂
𝜕𝑉 1
= − +2
𝜕𝑃 2 𝜕𝑃 2 𝑉 2 𝜕𝑃 𝑉3
property d2rho_dPdT_g
Second derivative of molar density with respect to pressure and temperature for the gas phase,
[(mol/m^3)/(K*Pa)].
𝜕2𝜌 𝜕2𝑉 1
(︂ )︂ (︂ )︂
𝜕𝑉 𝜕𝑉 1
=− + 2
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑃 𝑉 2 𝜕𝑇 𝜕𝑃 𝑉 3
property d2rho_dPdT_l
Second derivative of molar density with respect to pressure and temperature for the liquid phase,
[(mol/m^3)/(K*Pa)].
𝜕2𝜌 𝜕2𝑉 1
(︂ )︂ (︂ )︂
𝜕𝑉 𝜕𝑉 1
=− 2
+ 2
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑃 𝑉 𝜕𝑇 𝜕𝑃 𝑉 3
property d2rho_dT2_g
Second derivative of molar density with respect to temperature for the gas phase, [(mol/m^3)/K^2].
)︂2
𝜕2𝜌 𝜕2𝑉 1
(︂
𝜕𝑉 1
2
=− 2 2 +2
𝜕𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝑉3
property d2rho_dT2_l
Second derivative of molar density with respect to temperature for the liquid phase, [(mol/m^3)/K^2].
)︂2
𝜕2𝜌 𝜕2𝑉 1
(︂
𝜕𝑉 1
2
=− 2 2 +2
𝜕𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝑉3
property d3a_alpha_dT3
Method to calculate the third temperature derivative of 𝑎𝛼, [J^2/mol^2/Pa/K^3]. This parameter is needed
for some higher derivatives that are needed in some flash calculations.
Returns
d3a_alpha_dT3 [float] Third temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^3]
property dH_dep_dP_g
Derivative of departure enthalpy with respect to pressure for the gas phase, [(J/mol)/Pa].
(︀ 𝑑 )︀ 𝑑
𝜕𝐻𝑑𝑒𝑝,𝑔 𝑑 4 𝑇 𝑑𝑇 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝑑𝑃 𝑉 (𝑃 )
=𝑃 𝑉 (𝑃 ) + 𝑉 (𝑃 ) + (︁ 2
)︁
𝜕𝑃 𝑑𝑃 (𝛿+2𝑉 (𝑃
(𝛿 2 − 4𝜖) − 𝛿2 −4𝜖 + 1))
property dH_dep_dP_g_V
Derivative of departure enthalpy with respect to pressure at constant volume for the liquid phase,
[(J/mol)/Pa].
(︂ (︂ 𝜕𝑎𝛼 )︂ )︂
𝜕 ( 𝜕𝑇 ) (︀ 𝜕𝑎𝛼 )︀ (︀ 𝜕𝑇 )︀ (︀ 𝜕𝑎𝛼 )︀ (︁ )︁
2 𝑇 𝑃
+ − atanh √2𝑉 +𝛿
𝜕𝑃 𝜕𝑇 𝑃 𝜕𝑃 𝑉 𝜕𝑃 𝑉 2
𝛿 −4𝜖
(︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝑇 𝑉
= −𝑅 +𝑉 + √
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝛿 2 − 4𝜖
property dH_dep_dP_l
Derivative of departure enthalpy with respect to pressure for the liquid phase, [(J/mol)/Pa].
(︀ 𝑑 )︀ 𝑑
𝜕𝐻𝑑𝑒𝑝,𝑙 𝑑 4 𝑇 𝑑𝑇 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝑑𝑃 𝑉 (𝑃 )
=𝑃 𝑉 (𝑃 ) + 𝑉 (𝑃 ) + (︁ 2
)︁
𝜕𝑃 𝑑𝑃 (𝛿+2𝑉 (𝑃
(𝛿 2 − 4𝜖) − 𝛿2 −4𝜖 + 1))
property dH_dep_dP_l_V
Derivative of departure enthalpy with respect to pressure at constant volume for the gas phase, [(J/mol)/Pa].
(︂ (︂ 𝜕𝑎𝛼 )︂ )︂
𝜕 ( 𝜕𝑇 ) (︀ 𝜕𝑎𝛼 )︀ (︀ 𝜕𝑇 )︀ (︀ 𝜕𝑎𝛼 )︀ (︁ )︁
2 𝑇 𝑃
+ − atanh √2𝑉 +𝛿
𝜕𝑃 𝜕𝑇 𝑃 𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝛿 2 −4𝜖
(︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝑇 𝑉
= −𝑅 +𝑉 + √
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝛿 2 − 4𝜖
property dH_dep_dT_g
Derivative of departure enthalpy with respect to temperature for the gas phase, [(J/mol)/K].
(︀ 𝑑 )︀ 𝑑
𝛿 + 2𝑉 (𝑇 ) 𝑑2 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝑑𝑇
(︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑔 𝑑 2𝑇 4 𝑇 𝑑𝑇 𝑉 (𝑇 )
=𝑃 𝑉 (𝑇 ) − 𝑅 + √ atanh √ 2
a𝛼 (𝑇 ) + (︁ 2
)︁
𝜕𝑇 𝑑𝑇 2
𝛿 − 4𝜖 𝛿 − 4𝜖 𝑑𝑇
2
(𝛿 2 − 4𝜖) − (𝛿+2𝑉2
(𝑇 ))
+ 1
𝛿 −4𝜖
property dH_dep_dT_g_V
Derivative of departure enthalpy with respect to temperature at constant volume for the gas phase,
[(J/mol)/K].
(︁ )︁ 2
2𝑉 +𝛿 𝑑
(︂ )︂ 2𝑇 atanh √ 𝑔 a (𝑇 )
𝜕𝐻𝑑𝑒𝑝,𝑔 𝛿 2 −4𝜖 𝑑𝑇 2 𝛼 𝜕
= −𝑅 + √ + 𝑉𝑔 𝑃 (𝑇, 𝑉 )
𝜕𝑇 𝑉
2
𝛿 − 4𝜖 𝜕𝑇
property dH_dep_dT_l
Derivative of departure enthalpy with respect to temperature for the liquid phase, [(J/mol)/K].
(︀ 𝑑 )︀ 𝑑
𝛿 + 2𝑉 (𝑇 ) 𝑑2 a𝛼 (𝑇 ) − a𝛼 (𝑇 ) 𝑑𝑇
(︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑙 𝑑 2𝑇 4 𝑇 𝑑𝑇 𝑉 (𝑇 )
=𝑃 𝑉 (𝑇 ) − 𝑅 + √ atanh √ 2
a𝛼 (𝑇 ) + (︁ 2
)︁
𝜕𝑇 𝑑𝑇 2
𝛿 − 4𝜖 2
𝛿 − 4𝜖 𝑑𝑇 2 (𝛿+2𝑉 (𝑇
(𝛿 − 4𝜖) − 𝛿2 −4𝜖 + 1))
property dH_dep_dT_l_V
Derivative of departure enthalpy with respect to temperature at constant volume for the liquid phase,
[(J/mol)/K].
(︁ )︁ 2
(︂ )︂ 2𝑇 atanh √2𝑉𝑙 +𝛿 𝑑
a (𝑇 )
𝜕𝐻𝑑𝑒𝑝,𝑙 𝛿 −4𝜖 𝑑𝑇 2 𝛼
2 𝜕
= −𝑅 + √ + 𝑉𝑙 𝑃 (𝑇, 𝑉 )
𝜕𝑇 𝑉 𝛿 2 − 4𝜖 𝜕𝑇
dH_dep_dT_sat_g(T, polish=False)
Method to calculate and return the temperature derivative of saturation vapor excess enthalpy.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
dH_dep_dT_sat_g [float] Vapor phase temperature derivative of excess enthalpy along the
liquid-vapor saturation line, [J/mol/K]
dH_dep_dT_sat_l(T, polish=False)
Method to calculate and return the temperature derivative of saturation liquid excess enthalpy.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
dH_dep_dT_sat_l [float] Liquid phase temperature derivative of excess enthalpy along the
liquid-vapor saturation line, [J/mol/K]
property dH_dep_dV_g_P
Derivative of departure enthalpy with respect to volume at constant pressure for the gas phase, [J/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝑇
= ·
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
property dH_dep_dV_g_T
Derivative of departure enthalpy with respect to volume at constant temperature for the gas phase, [J/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝐻𝑑𝑒𝑝,𝑔 𝜕𝑃
= ·
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
property dH_dep_dV_l_P
Derivative of departure enthalpy with respect to volume at constant pressure for the liquid phase, [J/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑙 𝜕𝐻𝑑𝑒𝑝,𝑙 𝜕𝑇
= ·
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
property dH_dep_dV_l_T
Derivative of departure enthalpy with respect to volume at constant temperature for the gas phase, [J/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐻𝑑𝑒𝑝,𝑙 𝜕𝐻𝑑𝑒𝑝,𝑙 𝜕𝑃
= ·
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
property dP_drho_g
Derivative of pressure with respect to molar density for the gas phase, [Pa/(mol/m^3)].
𝜕𝑃 𝜕𝑃
= −𝑉 2
𝜕𝜌 𝜕𝑉
property dP_drho_l
Derivative of pressure with respect to molar density for the liquid phase, [Pa/(mol/m^3)].
𝜕𝑃 𝜕𝑃
= −𝑉 2
𝜕𝜌 𝜕𝑉
Notes
There is a small step change at 0.32 Tc for all EOS due to the two switch between polynomials at that point.
Useful for calculating enthalpy of vaporization with the Clausius Clapeyron Equation. Derived with
SymPy’s diff and cse.
property dS_dep_dP_g
Derivative of departure entropy with respect to pressure for the gas phase, [(J/mol)/K/Pa].
𝑅 𝑑 𝑉 (𝑃 ) 𝑅 𝑑 𝑉 (𝑃 ) 𝑑 𝑑
𝑅2 𝑇
(︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑔 4 𝑑𝑃 𝑉 (𝑃 ) 𝑑𝑇 a𝛼 (𝑇 ) 𝑃 𝑑 𝑉 (𝑃 )
= − 𝑑𝑃 + 𝑑𝑃 + (︁ 2
)︁ + 𝑉 (𝑃 ) +
𝜕𝑃 𝑉 (𝑃 ) −𝑏 + 𝑉 (𝑃 ) (𝛿 2 − 4𝜖) − (𝛿+2𝑉 (𝑃 ))
+1 𝑃 𝑉 (𝑃 ) 𝑅𝑇 𝑑𝑃 𝑅𝑇
𝛿 2 −4𝜖
property dS_dep_dP_g_V
Derivative of departure entropy with respect to pressure at constant volume for the gas phase,
[(J/mol)/K/Pa].
(︁ )︁ (︂ 𝜕 ( 𝜕𝑎𝛼 ) )︂
2𝑉 +𝛿 𝑑
𝜕𝑇
(︁ )︁
2 atanh √𝛿2 −4𝜖 𝑃
𝑅 2
−
𝑃 𝑉 𝑑𝑃 𝑇 (𝑃 )
+ 𝑉
𝑅𝑇 (𝑃 ) 𝑇 (𝑃 )
𝜕𝑃
(︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑔 𝑉
2
𝑅𝑇 (𝑃 )
= √ +
𝜕𝑃 𝑉 𝛿 2 − 4𝜖 𝑃𝑉
property dS_dep_dP_l
Derivative of departure entropy with respect to pressure for the liquid phase, [(J/mol)/K/Pa].
𝑅 𝑑 𝑉 (𝑃 ) 𝑅 𝑑 𝑉 (𝑃 ) 𝑑 𝑑
𝑅2 𝑇
(︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑙 4 𝑑𝑃 𝑉 (𝑃 ) 𝑑𝑇 a𝛼 (𝑇 ) 𝑃 𝑑 𝑉 (𝑃 )
= − 𝑑𝑃 + 𝑑𝑃 + (︁ 2
)︁ + 𝑉 (𝑃 ) +
𝜕𝑃 𝑉 (𝑃 ) −𝑏 + 𝑉 (𝑃 ) (𝛿 2 − 4𝜖) − (𝛿+2𝑉 (𝑃 ))
+1 𝑃 𝑉 (𝑃 ) 𝑅𝑇 𝑑𝑃 𝑅𝑇
𝛿 2 −4𝜖
property dS_dep_dP_l_V
Derivative of departure entropy with respect to pressure at constant volume for the liquid phase,
[(J/mol)/K/Pa].
(︁ )︁ (︂ 𝜕 ( 𝜕𝑎𝛼 ) )︂
2𝑉 +𝛿 𝑃 𝑉 𝑑 𝑇 (𝑃 )
𝜕𝑇
(︁ )︁
(︂ )︂ 2 atanh √
𝛿 2 −4𝜖 𝜕𝑃
𝑃
𝑅2 − 𝑅𝑇𝑑𝑃2 (𝑃 ) + 𝑅𝑇𝑉(𝑃 ) 𝑇 (𝑃 )
𝜕𝑆𝑑𝑒𝑝,𝑙 𝑉
= √ +
𝜕𝑃 𝑉 𝛿 2 − 4𝜖 𝑃𝑉
property dS_dep_dT_g
Derivative of departure entropy with respect to temperature for the gas phase, [(J/mol)/K^2].
2
𝑅 𝑑 𝑉 (𝑇 ) 𝑅 𝑑 𝑉 (𝑇 ) 𝑑 𝑑 𝑑
𝑅2 𝑇
(︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑔 4 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 a𝛼 (𝑇 ) 2 𝑑𝑇 2 a𝛼 (𝑇 ) 𝛿 + 2𝑉 (𝑇 )
= − 𝑑𝑇 + 𝑑𝑇 + (︁ 2
)︁ + √ atanh √ +
𝜕𝑇 𝑉 (𝑇 ) −𝑏 + 𝑉 (𝑇 ) (𝛿 2 − 4𝜖) − (𝛿+2𝑉 (𝑇 ))
+1 𝛿 2 − 4𝜖 𝛿 2 − 4𝜖 𝑃 𝑉 (𝑇
𝛿 2 −4𝜖
property dS_dep_dT_g_V
Derivative of departure entropy with respect to temperature at constant volume for the gas phase,
[(J/mol)/K^2].
(︁ 𝜕 )︁ (︁ )︁ 2
𝑉 𝜕𝑇 𝑃 (𝑇,𝑉 ) 𝑉 𝑃 (𝑇,𝑉 )
(︂ )︂ 𝑅 2
𝑇 − 2 atanh √2𝑉 +𝛿 𝑑
a𝛼 (𝑇 )
𝜕𝑆𝑑𝑒𝑝,𝑔 𝑅𝑇 𝑅𝑇 2
𝛿 2 −4𝜖 𝑑𝑇 2
= + √
𝜕𝑇 𝑉 𝑉 𝑃 (𝑇, 𝑉 ) 𝛿 2 − 4𝜖
property dS_dep_dT_l
Derivative of departure entropy with respect to temperature for the liquid phase, [(J/mol)/K^2].
2
𝑅 𝑑 𝑉 (𝑇 ) 𝑅 𝑑 𝑉 (𝑇 ) 𝑑 𝑑 𝑑
𝑅2 𝑇
(︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑙 4 𝑑𝑇 𝑉 (𝑇 ) 𝑑𝑇 a𝛼 (𝑇 ) 2 𝑑𝑇 2 a𝛼 (𝑇 ) 𝛿 + 2𝑉 (𝑇 )
= − 𝑑𝑇 + 𝑑𝑇 + (︁ 2
)︁ + √ atanh √ +
𝜕𝑇 𝑉 (𝑇 ) −𝑏 + 𝑉 (𝑇 ) (𝛿 2 − 4𝜖) − (𝛿+2𝑉 2
(𝑇 ))
+ 1 𝛿 2 − 4𝜖 𝛿 2 − 4𝜖 𝑃 𝑉 (𝑇 )
𝛿 −4𝜖
property dS_dep_dT_l_V
Derivative of departure entropy with respect to temperature at constant volume for the liquid phase,
[(J/mol)/K^2].
(︁ 𝜕 )︁ (︁ )︁ 2
𝑉 𝜕𝑇 𝑃 (𝑇,𝑉 ) 𝑉 𝑃 (𝑇,𝑉 )
(︂ )︂ 𝑅 2
𝑇 − 2 atanh √2𝑉 +𝛿 𝑑
a𝛼 (𝑇 )
𝜕𝑆𝑑𝑒𝑝,𝑙 𝑅𝑇 𝑅𝑇 2
𝛿 −4𝜖 𝑑𝑇 2
2
= + √
𝜕𝑇 𝑉 𝑉 𝑃 (𝑇, 𝑉 ) 𝛿 2 − 4𝜖
dS_dep_dT_sat_g(T, polish=False)
Method to calculate and return the temperature derivative of saturation vapor excess entropy.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
dS_dep_dT_sat_g [float] Vapor phase temperature derivative of excess entropy along the
liquid-vapor saturation line, [J/mol/K^2]
dS_dep_dT_sat_l(T, polish=False)
Method to calculate and return the temperature derivative of saturation liquid excess entropy.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
dS_dep_dT_sat_l [float] Liquid phase temperature derivative of excess entropy along the
liquid-vapor saturation line, [J/mol/K^2]
property dS_dep_dV_g_P
Derivative of departure entropy with respect to volume at constant pressure for the gas phase, [J/K/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑔 𝜕𝑆𝑑𝑒𝑝,𝑔 𝜕𝑇
= ·
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
property dS_dep_dV_g_T
Derivative of departure entropy with respect to volume at constant temperature for the gas phase, [J/K/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑔 𝜕𝑆𝑑𝑒𝑝,𝑔 𝜕𝑃
= ·
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
property dS_dep_dV_l_P
Derivative of departure entropy with respect to volume at constant pressure for the liquid phase, [J/K/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑙 𝜕𝑆𝑑𝑒𝑝,𝑙 𝜕𝑇
= ·
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
property dS_dep_dV_l_T
Derivative of departure entropy with respect to volume at constant temperature for the gas phase, [J/K/m^3].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑆𝑑𝑒𝑝,𝑙 𝜕𝑆𝑑𝑒𝑝,𝑙 𝜕𝑃
= ·
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
property dT_drho_g
Derivative of temperature with respect to molar density for the gas phase, [K/(mol/m^3)].
𝜕𝑇 𝜕𝑇
=𝑉2
𝜕𝜌 𝜕𝑉
property dT_drho_l
Derivative of temperature with respect to molar density for the liquid phase, [K/(mol/m^3)].
𝜕𝑇 𝜕𝑇
=𝑉2
𝜕𝜌 𝜕𝑉
property dZ_dP_g
Derivative of compressibility factor with respect to pressure for the gas phase, [1/Pa].
(︂ )︂
𝜕𝑍 1 𝜕𝑉
= 𝑉 −
𝜕𝑃 𝑅𝑇 𝜕𝑃
property dZ_dP_l
Derivative of compressibility factor with respect to pressure for the liquid phase, [1/Pa].
(︂ )︂
𝜕𝑍 1 𝜕𝑉
= 𝑉 −
𝜕𝑃 𝑅𝑇 𝜕𝑃
property dZ_dT_g
Derivative of compressibility factor with respect to temperature for the gas phase, [1/K].
(︂ )︂
𝜕𝑍 𝑃 𝜕𝑉 𝑉
= −
𝜕𝑇 𝑅𝑇 𝜕𝑇 𝑇
property dZ_dT_l
Derivative of compressibility factor with respect to temperature for the liquid phase, [1/K].
(︂ )︂
𝜕𝑍 𝑃 𝜕𝑉 𝑉
= −
𝜕𝑇 𝑅𝑇 𝜕𝑇 𝑇
property da_alpha_dP_g_V
Derivative of the a_alpha with respect to pressure at constant volume (varying T) for the gas phase,
[J^2/mol^2/Pa^2].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑎𝛼 𝜕𝑎𝛼 𝜕𝑇
= ·
𝜕𝑃 𝑉 𝜕𝑇 𝑃 𝜕𝑃 𝑉
property da_alpha_dP_l_V
Derivative of the a_alpha with respect to pressure at constant volume (varying T) for the liquid phase,
[J^2/mol^2/Pa^2].
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑎𝛼 𝜕𝑎𝛼 𝜕𝑇
= ·
𝜕𝑃 𝑉 𝜕𝑇 𝑃 𝜕𝑃 𝑉
property dbeta_dP_g
Derivative of isobaric expansion coefficient with respect to pressure for the gas phase, [1/(Pa*K)].
𝜕2 𝜕 𝜕
𝜕𝛽𝑔 𝜕𝑇 𝜕𝑃 𝑉 (𝑇, 𝑃 )𝑔 𝜕𝑃 𝑉 (𝑇, 𝑃 )𝑔 𝜕𝑇 𝑉 (𝑇, 𝑃 )𝑔
= −
𝜕𝑃 𝑉 (𝑇, 𝑃 )𝑔 𝑉 2 (𝑇, 𝑃 )𝑔
property dbeta_dP_l
Derivative of isobaric expansion coefficient with respect to pressure for the liquid phase, [1/(Pa*K)].
𝜕2 𝜕 𝜕
𝜕𝛽𝑔 𝜕𝑇 𝜕𝑃𝑉 (𝑇, 𝑃 )𝑙 𝜕𝑃 𝑉 (𝑇, 𝑃 )𝑙 𝜕𝑇 𝑉 (𝑇, 𝑃 )𝑙
= − 2
𝜕𝑃 𝑉 (𝑇, 𝑃 )𝑙 𝑉 (𝑇, 𝑃 )𝑙
property dbeta_dT_g
Derivative of isobaric expansion coefficient with respect to temperature for the gas phase, [1/K^2].
(︁ )︁2
𝜕2 𝜕
𝑉 (𝑇, 𝑃 )𝑔
𝜕𝛽𝑔 𝜕𝑇 2 𝑉 (𝑇, 𝑃 )𝑔 𝜕𝑇
= −
𝜕𝑇 𝑉 (𝑇, 𝑃 )𝑔 𝑉 2 (𝑇, 𝑃 )𝑔
property dbeta_dT_l
Derivative of isobaric expansion coefficient with respect to temperature for the liquid phase, [1/K^2].
𝜕2
(︀ 𝜕
)︀2
𝜕𝛽𝑙 𝜕𝑇 2 𝑉 (𝑇, 𝑃 )𝑙 𝜕𝑇𝑉 (𝑇, 𝑃 )𝑙
= −
𝜕𝑇 𝑉 (𝑇, 𝑃 )𝑙 𝑉 2 (𝑇, 𝑃 )𝑙
property dfugacity_dP_g
Derivative of fugacity with respect to pressure for the gas phase, [-].
(︂ )︂
𝜕(fugacity)𝑔 𝑃 𝜕 𝜕 1 1
= −𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) 𝑒 𝑅𝑇 (−𝑇 Sdep (𝑇,𝑃 )+Hdep (𝑇,𝑃 )) + 𝑒 𝑅𝑇 (−𝑇 Sdep (𝑇,𝑃 )+Hdep (𝑇
𝜕𝑃 𝑅𝑇 𝜕𝑃 𝜕𝑃
property dfugacity_dP_l
Derivative of fugacity with respect to pressure for the liquid phase, [-].
(︂ )︂
𝜕(fugacity)𝑙 𝑃 𝜕 𝜕 1 1
= −𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) 𝑒 𝑅𝑇 (−𝑇 Sdep (𝑇,𝑃 )+Hdep (𝑇,𝑃 )) + 𝑒 𝑅𝑇 (−𝑇 Sdep (𝑇,𝑃 )+Hdep (𝑇,
𝜕𝑃 𝑅𝑇 𝜕𝑃 𝜕𝑃
property dfugacity_dT_g
Derivative of fugacity with respect to temperature for the gas phase, [Pa/K].
(︂ (︂ )︂
𝜕(fugacity)𝑔 1 𝜕 𝜕 1
=𝑃 −𝑇 Sdep (𝑇, 𝑃 ) − Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) − (−𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 )
𝜕𝑇 𝑅𝑇 𝜕𝑇 𝜕𝑇 𝑅𝑇 2
property dfugacity_dT_l
Derivative of fugacity with respect to temperature for the liquid phase, [Pa/K].
(︂ (︂ )︂
𝜕(fugacity)𝑙 1 𝜕 𝜕 1
=𝑃 −𝑇 Sdep (𝑇, 𝑃 ) − Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) − (−𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 )
𝜕𝑇 𝑅𝑇 𝜕𝑇 𝜕𝑇 𝑅𝑇 2
discriminant(T=None, P=None)
Method to compute the discriminant of the cubic volume solution with the current EOS parameters, op-
tionally at the same (assumed) T, and P or at different ones, if values are specified.
Parameters
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
Returns
discriminant [float] Discriminant, [-]
Notes
This call is quite quick; only 𝑎𝛼 is needed and if T is the same as the current object than it has already been
computed.
The formula is as follows:
(︃ (︀ 𝑃 𝑏 )︀ )︃ (︃ (︀ 𝑃 𝑏 )︀ )︃ (︃ (︀ 𝑃 𝑏 )︀
27𝑃 2 𝜖 𝑅𝑇 +1 27𝑃 2 𝑏 a𝛼 (𝑇 ) 𝑃 2 𝜖 𝑅𝑇 +1 𝑃 2 𝑏 a𝛼 (𝑇 ) 𝑃 2 𝜖 𝑅𝑇 +1 𝑃
discriminant = − − 2 2
− 3 3
− 2 2
− 3 3
+ − 2 2
−
𝑅 𝑇 𝑅 𝑇 𝑅 𝑇 𝑅 𝑇 𝑅 𝑇
Examples
property dphi_dP_g
Derivative of fugacity coefficient with respect to pressure for the gas phase, [1/Pa].
(︀ 𝜕 𝜕
)︀ −𝑇 Sdep (𝑇 ,𝑃 )+Hdep (𝑇 ,𝑃 )
𝜕𝜑 −𝑇 𝜕𝑃 Sdep (𝑇, 𝑃 ) + 𝜕𝑃 Hdep (𝑇, 𝑃 ) 𝑒 𝑅𝑇
=
𝜕𝑃 𝑅𝑇
property dphi_dP_l
Derivative of fugacity coefficient with respect to pressure for the liquid phase, [1/Pa].
(︀ 𝜕 𝜕
)︀ −𝑇 Sdep (𝑇 ,𝑃 )+Hdep (𝑇 ,𝑃 )
𝜕𝜑 −𝑇 𝜕𝑃 Sdep (𝑇, 𝑃 ) + 𝜕𝑃 Hdep (𝑇, 𝑃 ) 𝑒 𝑅𝑇
=
𝜕𝑃 𝑅𝑇
property dphi_dT_g
Derivative of fugacity coefficient with respect to temperature for the gas phase, [1/K].
(︃ )︃
𝜕 𝜕
𝜕𝜑 −𝑇 𝜕𝑇 Sdep (𝑇, 𝑃 ) − Sdep (𝑇, 𝑃 ) + 𝜕𝑇 Hdep (𝑇, 𝑃 ) −𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) −𝑇 Sdep (𝑇 ,𝑃 )+Hdep (𝑇 ,𝑃 )
= − 2
𝑒 𝑅𝑇
𝜕𝑇 𝑅𝑇 𝑅𝑇
property dphi_dT_l
Derivative of fugacity coefficient with respect to temperature for the liquid phase, [1/K].
(︃ )︃
𝜕 𝜕
𝜕𝜑 −𝑇 𝜕𝑇 Sdep (𝑇, 𝑃 ) − Sdep (𝑇, 𝑃 ) + 𝜕𝑇 Hdep (𝑇, 𝑃 ) −𝑇 Sdep (𝑇, 𝑃 ) + Hdep (𝑇, 𝑃 ) −𝑇 Sdep (𝑇 ,𝑃 )+Hdep (𝑇 ,𝑃 )
= − 2
𝑒 𝑅𝑇
𝜕𝑇 𝑅𝑇 𝑅𝑇
dphi_sat_dT(T, polish=True)
Method to calculate the temperature derivative of saturation fugacity coefficient of the compound. This
does require solving the EOS itself.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
dphi_sat_dT [float] First temperature derivative of fugacity coefficient along the liquid-
vapor saturation line, [1/K]
property drho_dP_g
Derivative of molar density with respect to pressure for the gas phase, [(mol/m^3)/Pa].
𝜕𝜌 −1 𝜕𝑉
= 2
𝜕𝑃 𝑉 𝜕𝑃
property drho_dP_l
Derivative of molar density with respect to pressure for the liquid phase, [(mol/m^3)/Pa].
𝜕𝜌 −1 𝜕𝑉
= 2
𝜕𝑃 𝑉 𝜕𝑃
property drho_dT_g
Derivative of molar density with respect to temperature for the gas phase, [(mol/m^3)/K].
𝜕𝜌 1 𝜕𝑉
=− 2
𝜕𝑇 𝑉 𝜕𝑇
property drho_dT_l
Derivative of molar density with respect to temperature for the liquid phase, [(mol/m^3)/K].
𝜕𝜌 1 𝜕𝑉
=− 2
𝜕𝑇 𝑉 𝜕𝑇
classmethod from_json(json_repr)
Method to create a eos from a JSON serialization of another eos.
Parameters
json_repr [dict] JSON-friendly representation, [-]
Returns
eos [GCEOS] Newly created object from the json serialization, [-]
Notes
It is important that the input string be in the same format as that created by GCEOS.as_json.
Examples
property fugacity_g
Fugacity for the gas phase, [Pa].
(︂ )︂
𝐺𝑑𝑒𝑝
fugacity = 𝑃 exp
𝑅𝑇
property fugacity_l
Fugacity for the liquid phase, [Pa].
(︂ )︂
𝐺𝑑𝑒𝑝
fugacity = 𝑃 exp
𝑅𝑇
property kappa_g
Isothermal (constant-temperature) expansion coefficient for the gas phase, [1/Pa].
−1 𝜕𝑉
𝜅=
𝑉 𝜕𝑃
property kappa_l
Isothermal (constant-temperature) expansion coefficient for the liquid phase, [1/Pa].
−1 𝜕𝑉
𝜅=
𝑉 𝜕𝑃
kwargs = {}
Dictionary which holds input parameters to an EOS which are non-standard; this excludes T, P, V, omega,
Tc, Pc, Vc but includes EOS specific parameters like S1 and alpha_coeffs.
kwargs_keys = ()
property lnphi_g
The natural logarithm of the fugacity coefficient for the gas phase, [-].
property lnphi_l
The natural logarithm of the fugacity coefficient for the liquid phase, [-].
model_hash()
Basic method to calculate a hash of the non-state parts of the model This is useful for comparing to models
to determine if they are the same, i.e. in a VLL flash it is important to know if both liquids have the same
model.
Note that the hashes should only be compared on the same system running in the same process!
Returns
model_hash [int] Hash of the object’s model parameters, [-]
property more_stable_phase
Checks the Gibbs energy of each possible phase, and returns ‘l’ if the liquid-like phase is more stable, and
‘g’ if the vapor-like phase is more stable.
Examples
property mpmath_volume_ratios
Method to compare, as ratios, the volumes of the implemented cubic solver versus those calculated using
mpmath.
Returns
ratios [list[mpc]] Either 1 or 3 volume ratios as calculated by mpmath, [-]
Examples
>>> eos.mpmath_volume_ratios
(mpc(real='0.99999999999999995', imag='0.0'), mpc(real='0.999999999999999965',␣
˓→imag='0.0'), mpc(real='1.00000000000000005', imag='0.0'))
property mpmath_volumes
Method to calculate to a high precision the exact roots to the cubic equation, using mpmath.
Returns
Vs [tuple[mpf]] 3 Real or not real volumes as calculated by mpmath, [m^3/mol]
Examples
>>> eos.mpmath_volumes
(mpf('0.0000489261705320261435106226558966745'), mpf('0.
˓→000541508154451321441068958547812526'), mpf('0.
˓→0243149463942697410611501615357228'))
property mpmath_volumes_float
Method to calculate real roots of a cubic equation, using mpmath, but returned as floats.
Returns
Vs [list[float]] All volumes calculated by mpmath, [m^3/mol]
Examples
>>> eos.mpmath_volumes_float
((4.892617053202614e-05+0j), (0.0005415081544513214+0j), (0.
˓→024314946394269742+0j))
multicomponent = False
Whether or not the EOS is multicomponent or not
property phi_l
Fugacity coefficient for the liquid phase, [Pa].
fugacity
𝜑=
𝑃
phi_sat(T, polish=True)
Method to calculate the saturation fugacity coefficient of the compound. This does not require solving the
EOS itself.
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to perform a rigorous calculation or to use a polynomial fit,
[-]
Returns
phi_sat [float] Fugacity coefficient along the liquid-vapor saturation line, [-]
Notes
Accuracy is generally around 1e-7. If Tr is under 0.32, the rigorous method is always used, but a solution
may not exist if both phases cannot coexist. If Tr is above 1, likewise a solution does not exist.
resolve_full_alphas()
Generic method to resolve the eos with fully calculated alpha derviatives. Re-calculates properties with the
new alpha derivatives for any previously solved roots.
property rho_g
Gas molar density, [mol/m^3].
1
𝜌𝑔 =
𝑉𝑔
property rho_l
Liquid molar density, [mol/m^3].
1
𝜌𝑙 =
𝑉𝑙
Tmax [float] Maximum temperature of calculation; cannot be above the critical temperature,
[K]
pts [int, optional] The number of temperature points to include [-]
plot [bool] If False, the calculated values and temperatures are returned without plotting the
data, [-]
show [bool] Whether or not the plot should be rendered and shown; a handle to it is returned
if plot is True for other purposes such as saving the plot to a file, [-]
both [bool] When true, append ‘_l’ and ‘_g’ and draw both the liquid and vapor property
specified and return two different sets of values.
Returns
Ts [list[float]] Logarithmically spaced temperatures in specified range, [K]
props [list[float]] The property specified if both is False; otherwise, the liquid properties,
[various]
props_g [list[float]] The gas properties, only returned if both is True, [various]
fig [matplotlib.figure.Figure] Plotted figure, only returned if plot is True, [-]
scalar = True
set_from_PT(Vs, only_l=False, only_g=False)
Counts the number of real volumes in Vs, and determines what to do. If there is only one
real volume, the method set_properties_from_solution is called with it. If there are two real vol-
umes, set_properties_from_solution is called once with each volume. The phase is returned by
set_properties_from_solution, and the volumes is set to either V_l or V_g as appropriate.
Parameters
Vs [list[float]] Three possible molar volumes, [m^3/mol]
only_l [bool] When true, if there is a liquid and a vapor root, only the liquid root (and prop-
erties) will be set.
only_g [bool] When true, if there is a liquid and a vapor root, only the vapor root (and prop-
erties) will be set.
Notes
An optimization attempt was made to remove min() and max() from this function; that is indeed possible,
but the check for handling if there are two or three roots makes it not worth it.
set_properties_from_solution(T, P, V, b, delta, epsilon, a_alpha, da_alpha_dT, d2a_alpha_dT2,
force_l=False, force_g=False)
Sets all interesting properties which can be calculated from an EOS alone. Determines which phase the
fluid is on its own; for details, see phase_identification_parameter.
The list of properties set is as follows, with all properties suffixed with ‘_l’ or ‘_g’.
dP_dT, dP_dV, dV_dT, dV_dP, dT_dV, dT_dP, d2P_dT2, d2P_dV2, d2V_dT2, d2V_dP2, d2T_dV2,
d2T_dP2, d2V_dPdT, d2P_dTdV, d2T_dPdV, H_dep, S_dep, G_dep and PIP.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
Notes
The individual formulas for the derivatives and excess properties are as follows. For definitions of beta, see
isobaric_expansion; for kappa, see isothermal_compressibility; for Cp_minus_Cv, see Cp_minus_Cv; for
phase_identification_parameter, see phase_identification_parameter.
First derivatives; in part using the Triple Product Rule [2], [3]:
𝑎 𝑑𝛼(𝑇 )
(︂ )︂
𝜕𝑃 𝑅
= − 2 𝑑𝑇
𝜕𝑇 𝑉 𝑉 −𝑏 𝑉 +𝑉𝛿+𝜖
(︂ )︂
𝜕𝑃 𝑅𝑇 𝑎 (−2𝑉 − 𝛿) 𝛼(𝑇 )
=− 2 − 2
𝜕𝑉 𝑇 (𝑉 − 𝑏) (𝑉 2 + 𝑉 𝛿 + 𝜖)
(︂ )︂ (︀ 𝜕𝑃 )︀
𝜕𝑉
= − (︀ 𝜕𝑇
𝜕𝑃
)︀𝑉
𝜕𝑇 𝑃 𝜕𝑉 𝑇
(︂ )︂ (︀ 𝜕𝑉 )︀
𝜕𝑉 𝜕𝑇 𝑃
= − (︀ 𝜕𝑃 )︀
𝜕𝑃 𝑇 𝜕𝑇 𝑉
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑉 )︀
𝜕𝑉 𝑃 𝜕𝑇 𝑃
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑃 )︀
𝜕𝑃 𝑉 𝜕𝑇 𝑉
Second derivatives with respect to one variable; those of T and V use identities shown in [1] and verified
numerically:
2
𝜕2𝑃 𝑎 𝑑 𝛼(𝑇 )
(︂ )︂
2
= − 2 𝑑𝑇
𝜕𝑇 2 𝑉 𝑉 +𝑉𝛿+𝜖
(︃ )︃
2
𝜕2𝑃
(︂ )︂
𝑅𝑇 𝑎 (2𝑉 + 𝛿) 𝛼(𝑇 ) 𝑎𝛼(𝑇 )
=2 3 − 3 + 2
𝜕𝑉 2 𝑇 (𝑉 − 𝑏) (𝑉 2 + 𝑉 𝛿 + 𝜖) (𝑉 2 + 𝑉 𝛿 + 𝜖)
Second derivatives with respect to the other two variables; those of T and V use identities shown in [1] and
verified numerically:
Excess properties
∫︁ 𝑉 [︂ ]︂ (︂ )︂ (︂ )︂
𝜕𝑃 2 𝑑𝛼(𝑇 ) 2𝑉 + 𝛿
𝐻𝑑𝑒𝑝 = 𝑇 − 𝑃 𝑑𝑉 + 𝑃 𝑉 − 𝑅𝑇 = 𝑃 𝑉 − 𝑅𝑇 + √ 𝑇𝑎 − 𝑎𝛼(𝑇 ) atanh √
∞ 𝜕𝑇 𝑉 𝛿 2 − 4𝜖 𝑑𝑇 𝛿 2 − 4𝜖
𝑉
2𝑎 𝑑𝛼(𝑇 )
∫︁ [︂ ]︂ (︂ )︂ (︂ )︂
𝜕𝑃 𝑅 𝑃𝑉 𝑃𝑉 𝑑𝑇 2𝑉 + 𝛿
𝑆𝑑𝑒𝑝 = − 𝑑𝑉 + 𝑅 ln = −𝑅 ln (𝑉 ) + 𝑅 ln + 𝑅 ln (𝑉 − 𝑏) + √ atanh √
∞ 𝜕𝑇 𝑉 𝑅𝑇 𝑅𝑇 𝛿 2 − 4𝜖 𝛿 2 − 4𝜖
𝐺𝑑𝑒𝑝 = 𝐻𝑑𝑒𝑝 − 𝑇 𝑆𝑑𝑒𝑝
(︃√︂ (︃ )︃ √︂ (︃
𝑉
√︂ √︂
𝜕2𝑃 𝛿2 𝛿2
∫︁ (︂ )︂
1 1 𝛿 1 1
𝐶𝑣,𝑑𝑒𝑝 = 𝑇 𝑑𝑉 = −𝑇 𝑎 ln 𝑉 − + + 2𝜖 − ln 𝑉 +
∞ 𝜕𝑇 2 𝛿 2 − 4𝜖 2 𝛿 2 − 4𝜖 2 𝛿 2 − 4𝜖 𝛿 2 − 4𝜖 2
References
Examples
state_hash()
Basic method to calculate a hash of the state of the model and its model parameters.
Note that the hashes should only be compared on the same system running in the same process!
Returns
state_hash [int] Hash of the object’s model parameters and state, [-]
property state_specs
Convenience method to return the two specified state specs (T, P, or V ) as a dictionary.
Examples
Notes
Constructs the object with parameters Tc, Pc, omega, and kwargs.
Examples
to_PV(P, V )
Method to construct a new EOS object at the spcified P and V. In the event the P and V match the current
object’s P and V, it will be returned unchanged.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
Returns
obj [EOS] Pure component EOS at specified P and V, [-]
Notes
Constructs the object with parameters Tc, Pc, omega, and kwargs.
Examples
to_TP(T, P)
Method to construct a new EOS object at the spcified T and P. In the event the T and P match the current
object’s T and P, it will be returned unchanged.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
Returns
obj [EOS] Pure component EOS at specified T and P, [-]
Notes
Constructs the object with parameters Tc, Pc, omega, and kwargs.
Examples
to_TV(T, V )
Method to construct a new EOS object at the spcified T and V. In the event the T and V match the current
object’s T and V, it will be returned unchanged.
Parameters
T [float] Temperature, [K]
V [float] Molar volume, [m^3/mol]
Returns
Notes
Constructs the object with parameters Tc, Pc, omega, and kwargs.
Examples
volume_error()
Method to calculate the relative absolute error in the calculated molar volumes. This is computed with
mpmath. If the number of real roots is different between mpmath and the implemented solver, an error of
1 is returned.
Parameters
T [float] Temperature, [K]
Returns
error [float] relative absolute error in molar volumes , [-]
Examples
>>> eos.volume_error()
5.2192e-17
trunc_err_high [float] Maximum plotted error; values above this are rounded to 1, [-]
color_map [matplotlib.cm.ListedColormap] Matplotlib colormap object, [-]
timing [bool] If True, plots the time taken by the volume root calculations themselves; this
can reveal whether the solvers are taking fast or slow paths quickly, [-]
Returns
errors [list[list[float]]] Relative absolute errors in the volume calculation (or timings in sec-
onds if timing is True), [-]
fig [matplotlib.figure.Figure] Plotted figure, only returned if plot is True, [-]
static volume_solutions(T, P, b, delta, epsilon, a_alpha)
Halley’s method based solver for cubic EOS volumes based on the idea of initializing from a single liquid-
like guess which is solved precisely, deflating the cubic analytically, solving the quadratic equation for
the next two volumes, and then performing two halley steps on each of them to obtain the final solutions.
This method does not calculate imaginary roots - they are set to zero on detection. This method has been
rigorously tested over a wide range of conditions.
The method uses the standard combination of bisection to provide high and low boundaries as well, to keep
the iteration always moving forward.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [tuple[float]] Three possible molar volumes, [m^3/mol]
Notes
tries [int, optional] Internal parameter as this function will call itself if it needs to; number
of previous solve attempts, [-]
Returns
Vs [tuple[complex]] Three possible molar volumes, [m^3/mol]
Notes
Sample regions where this method works perfectly are shown below:
static volume_solutions_mp(T, P, b, delta, epsilon, a_alpha, dps=50)
Solution of this form of the cubic EOS in terms of volumes, using the mpmath arbitrary precision library.
The number of decimal places returned is controlled by the dps parameter.
This function is the reference implementation which provides exactly correct solutions; other algorithms
are compared against this one.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
dps [int] Number of decimal places in the result by mpmath, [-]
Returns
Vs [tuple[complex]] Three possible molar volumes, [m^3/mol]
Notes
Although mpmath has a cubic solver, it has been found to fail to solve in some cases. Accordingly, the
algorithm is as follows:
Working precision is dps plus 40 digits; and if P < 1e-10 Pa, it is dps plus 400 digits. The input parameters
are converted exactly to mpf objects on input.
polyroots from mpmath is used with maxsteps=2000, and extra precision of 15 digits. If the solution does
not converge, 20 extra digits are added up to 8 times. If no solution is found, mpmath’s findroot is called
on the pressure error function using three initial guesses from another solver.
Needless to say, this function is quite slow.
References
[1]
Examples
Test case which presented issues for PR EOS (three roots were not being returned):
(mpf('0.0000254054613415548712260258773060137'), mpf('4.
˓→66038025602155259976574392093252'), mpf('8309.80218708657190094424659859346'))
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
𝜅 = 0.37464 + 1.54226𝜔 − 0.26992𝜔 2
Parameters
Notes
The constants in the expresions for a and b are given to full precision in the actual code, as derived in [3].
The full expression for critical compressibility is:
(︃ √︁ )︃
1 3 √ 7
𝑍𝑐 = 16 2 − 13 − √︀ √ + 11
32 3
16 2 − 13
References
Examples
Methods
P_max_at_V(V )
Method to calculate the maximum pressure the EOS can create at a constant volume, if one exists; returns
None otherwise.
Parameters
V [float] Constant molar volume, [m^3/mol]
Returns
P [float] Maximum possible isochoric pressure, [Pa]
Notes
The analytical determination of this formula involved some part of the discriminant, and much black magic.
Examples
Zc = 0.30740130869870386
Mechanical compressibility of Peng-Robinson EOS
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of Tc, kappa,
and a.
)︂2
𝑇 0.5
(︂ (︂ )︂
𝑎𝛼 = 𝑎 𝜅 − 0.5 + 1 + 1
𝑇𝑐
𝑇 0.5
(︂ (︂ )︂ )︂
𝑑𝑎𝛼 1.0𝑎𝜅
= − 0.5 0.5 𝜅 − 0.5 + 1 + 1
𝑑𝑇 𝑇 𝑇𝑐 𝑇𝑐
𝑑2 𝑎𝛼 𝑇 0.5
(︂ (︂ (︂ )︂ )︂ )︂
1 𝜅
= 0.5𝑎𝜅 − 𝜅 − 1 − 1 +
𝑑𝑇 2 𝑇 1.5 𝑇 𝑐0.5 𝑇 𝑐0.5 𝑇 1.0 𝑇 𝑐1.0
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
Examples
Dodecane at 250 K:
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for this EOS. Uses the set values of Tc, kappa, and a.
)︂2
𝑇 0.5
(︂ (︂ )︂
𝑎𝛼 = 𝑎 𝜅 − 0.5 + 1 + 1
𝑇𝑐
Parameters
T [float] Temperature at which to calculate the value, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
Examples
Dodecane at 250 K:
c1 = 0.4572355289213822
Full value of the constant in the a parameter
c2 = 0.07779607390388846
Full value of the constant in the b parameter
d3a_alpha_dT3_pure(T )
Method to calculate the third temperature derivative of a_alpha. Uses the set values of Tc, kappa, and a.
This property is not normally needed.
(︃ √︁ (︁ (︁√︁ )︁ )︁ )︃
𝑇 𝑇
𝜅 −1 −1
3𝑎𝜅 − 𝑇𝜅𝑐 +
𝑇𝑐 𝑇𝑐
3 𝑇
𝑑 𝑎𝛼
=
𝑑𝑇 3 4𝑇 2
Parameters
T [float] Temperature at which to calculate the derivative, [-]
Returns
d3a_alpha_dT3 [float] Third temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^3]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
Examples
Dodecane at 500 K:
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the PR EOS. Uses Tc, a, b, and kappa as well, obtained
from the class’s namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
The exact solution can be derived as follows, and is excluded for breviety.
After careful evaluation of the results of the analytical formula, it was discovered, that numerical preci-
sion issues required several NR refinement iterations; at at times, when the analytical value is extremely
erroneous, a call to a full numerical solver not using the analytical solution at all is required.
Examples
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
Notes
References
[1], [2]
Examples
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
𝜅 = 𝜅0 + 𝜅1 (1 + 𝑇𝑟0.5 )(0.7 − 𝑇𝑟 )
Notes
[1] recommends that kappa1 be set to 0 for Tr > 0.7. This is not done by default; the class boolean kappa1_Tr_limit
may be set to True and the problem re-solved with that specified if desired. kappa1_Tr_limit is not supported for
P-V inputs.
Solutions for P-V solve for T with SciPy’s newton solver, as there is no analytical solution for T
[2] and [3] are two more resources documenting the PRSV EOS. [4] lists kappa values for 69 additional com-
pounds. See also PRSV2. Note that tabulated kappa values should be used with the critical parameters used in
their fits. Both [1] and [4] only considered vapor pressure in fitting the parameter.
References
Examples
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of Tc, kappa0,
kappa1, and a.
The a_alpha function is shown below; the first and second derivatives are not shown for brevity.
(︃(︃ (︃√︂ )︃ (︂ )︂)︃ (︃ √︂ )︃ )︃2
𝑇 𝑇 7 𝑇
𝑎𝛼 = 𝑎 𝜅0 + 𝜅1 +1 − + − +1 +1
𝑇𝑐 𝑇𝑐 10 𝑇𝑐
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
The expressions can be derived as follows:
Examples
>>> eos.a_alpha_and_derivatives_pure(185.0)
(4.76865472591, -0.0101408587212, 3.9138298092e-05)
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for this EOS. Uses the set values of Tc, kappa0, kappa1, and a.
(︃(︃ (︃√︂ )︃ (︂ )︂)︃ (︃ √︂ )︃ )︃2
𝑇 𝑇 7 𝑇
𝑎𝛼 = 𝑎 𝜅0 + 𝜅1 +1 − + − +1 +1
𝑇𝑐 𝑇𝑐 10 𝑇𝑐
Parameters
T [float] Temperature at which to calculate the value, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
Examples
>>> eos.a_alpha_pure(185.0)
4.7686547259
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the PRSV EOS. Uses Tc, a, b, kappa0 and kappa as
well, obtained from the class’s namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
Not guaranteed to produce a solution. There are actually two solution, one much higher than normally
desired; it is possible the solver could converge on this.
class thermo.eos.PRSV2(Tc, Pc, omega, T=None, P=None, V=None, kappa1=0, kappa2=0, kappa3=0)
Bases: thermo.eos.PR
Class for solving the Peng-Robinson-Stryjek-Vera 2 equations of state for a pure compound as given in [1]. The
same as the Peng-Robinson EOS, except with a different kappa formula and with three fit parameters. Subclasses
PR, which provides only several constants. See PR for further documentation and examples.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
Notes
Note that tabulated kappa values should be used with the critical parameters used in their fits. [1] considered
only vapor pressure in fitting the parameter.
References
[1]
Examples
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of Tc, kappa0,
kappa1, kappa2, kappa3, and a.
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
Notes
The first and second derivatives of a_alpha are available through the following SymPy expression.
>>> Tr = T/Tc
>>> kappa = kappa0 + (kappa1 + kappa2*(kappa3-Tr)*(1-
˓→sqrt(Tr)))*(1+sqrt(Tr))*(Rational('0.7')-Tr)
Examples
>>> eos.a_alpha_and_derivatives_pure(311.0)
(3.7245418495, -0.0066115440470, 2.05871011677e-05)
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for this EOS. Uses the set values of Tc, kappa0, kappa1, kappa2, kappa3, and a.
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
Examples
>>> eos.a_alpha_pure(1276.0)
33.321674050
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the PRSV2 EOS. Uses Tc, a, b, kappa0, kappa1, kappa2,
and kappa3 as well, obtained from the class’s namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
Not guaranteed to produce a solution. There are actually 8 solutions, six with an imaginary component at
a tested point. The two temperature solutions are quite far apart, with one much higher than the other; it is
possible the solver could converge on the higher solution, so use T inputs with care. This extra solution is
a perfectly valid one however. The secant method is implemented at present.
Examples
Parameters
Tc [float] Critical temperature, [K]
Pc [float] Critical pressure, [Pa]
omega [float] Acentric factor, [-]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
Notes
Claimed to be more accurate than the PR, PR78 and PRSV equations.
There is no analytical solution for T. There are multiple possible solutions for T under certain conditions; no
guaranteed are provided regarding which solution is obtained.
References
[1]
Examples
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for the Twu alpha function. Uses the set values
of Tc, omega and a.
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
The derivatives are somewhat long and are not described here for brevity; they are obtainable from the
following SymPy expression.
>>> Tr = T/Tc
>>> alpha0 = Tr**(N0*(M0-1))*exp(L0*(1-Tr**(N0*M0)))
>>> alpha1 = Tr**(N1*(M1-1))*exp(L1*(1-Tr**(N1*M1)))
>>> alpha = alpha0 + omega*(alpha1-alpha0)
>>> diff(alpha, T)
>>> diff(alpha, T, T)
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for the Twu alpha function. Uses the set values of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
𝛼(𝑇 ) = 𝑓 (𝑇 )
Examples
Methanol, with alpha functions reproducing CoolProp’s implementation of its vapor pressure (up to 13 coeffi-
cients)
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives given that there is a polynomial equation
for 𝛼.
𝑎𝛼 = 𝑎 · poly(𝑇 )
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alpha_pure(T )
Method to calculate a_alpha given that there is a polynomial equation for 𝛼.
𝑎𝛼 = 𝑎 · poly(𝑇 )
Parameters
T [float] Temperature, [K]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
𝜅 = 0.37464 + 1.54226𝜔 − 0.26992𝜔 2
Parameters
Tc [float] Critical temperature, [K]
Pc [float] Critical pressure, [Pa]
omega [float] Acentric factor, [-]
alpha_coeffs [tuple or None] Coefficients which may be specified by subclasses; set to None to
use the original Peng-Robinson alpha function, [-]
c [float, optional] Volume translation parameter, [m^3/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
References
[1]
Examples
P-T initialization:
Parameters
Tc [float] Critical temperature, [K]
Pc [float] Critical pressure, [Pa]
omega [float] Acentric factor, [-]
alpha_coeffs [tuple(float[3])] Coefficients L, M, N (also called C1, C2, C3) of TWU 1991 form,
[-]
c [float, optional] Volume translation parameter, [m^3/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
Notes
This variant offers substantial improvements to the PR-type EOSs - likely getting about as accurate as this form
of cubic equation can get.
References
[1]
Examples
P-T initialization:
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 + 𝑐 − 𝑏 (𝑣 + 𝑐)(𝑣 + 𝑐 + 𝑏) + 𝑏(𝑣 + 𝑐 − 𝑏)
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
(︂ )︂𝑐3 (𝑐2 −1)
𝑇 𝑐2 𝑐3
𝑒𝑐1 (−( 𝑇𝑐 ) +1)
𝑇
𝛼=
𝑇𝑐
If c is not provided, it is estimated as:
𝑅𝑇𝑐
𝑐= (0.0198𝜔 − 0.0065)
𝑃𝑐
If alpha_coeffs is not provided, the parameters L and M are estimated from the acentric factor as follows:
Notes
This variant offers substantial improvements to the PR-type EOSs - likely getting about as accurate as this form
of cubic equation can get.
References
[1]
Examples
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 + 𝑐 − 𝑏 (𝑣 + 𝑐)(𝑣 + 𝑐 + 𝑏) + 𝑏(𝑣 + 𝑐 − 𝑏)
𝑅2 𝑇𝑐2
𝑎 = 0.45724
𝑃𝑐
𝑅𝑇𝑐
𝑏 = 0.07780
𝑃𝑐
√︀
𝛼(𝑇 ) = [1 + 𝜅(1 − 𝑇𝑟 )]2
Notes
This variant offers incremental improvements in accuracy only, but those can be fairly substantial for some sub-
stances.
References
[1]
Examples
Standard SRK
References
Examples
Methods
P_max_at_V(V )
Method to calculate the maximum pressure the EOS can create at a constant volume, if one exists; returns
None otherwise.
Parameters
V [float] Constant molar volume, [m^3/mol]
Returns
P [float] Maximum possible isochoric pressure, [Pa]
Notes
The analytical determination of this formula involved some part of the discriminant, and much black magic.
Examples
Zc = 0.3333333333333333
Mechanical compressibility of SRK EOS
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of Tc, m, and
a.
(︃ (︃ √︂ )︃ )︃2
𝑇
𝑎𝛼 = 𝑎 𝑚 − +1 +1
𝑇𝑐
√︂ (︃ (︃√︂ )︃ )︃
𝑑𝑎𝛼 𝑎𝑚 𝑇 𝑇
= 𝑚 −1 −1
𝑑𝑇 𝑇 𝑇𝑐 𝑇𝑐
√︁
𝑑2 𝑎𝛼 𝑎𝑚 𝑇𝑇𝑐
= (𝑚 + 1)
𝑑𝑇 2 2𝑇 2
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
c1 = 0.4274802335403414
Full value of the constant in the a parameter
c2 = 0.08664034996495772
Full value of the constant in the b parameter
epsilon = 0.0
epsilon is always zero for the SRK EOS
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the SRK EOS. Uses a, b, and Tc obtained from the
class’s namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
Notes
There is no analytical solution for T. There are multiple possible solutions for T under certain conditions; no
guaranteed are provided regarding which solution is obtained.
References
[1]
Examples
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for the Twu alpha function. Uses the set values
of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
The derivatives are somewhat long and are not described here for brevity; they are obtainable from the
following SymPy expression.
>>> Tr = T/Tc
>>> alpha0 = Tr**(N0*(M0-1))*exp(L0*(1-Tr**(N0*M0)))
>>> alpha1 = Tr**(N1*(M1-1))*exp(L1*(1-Tr**(N1*M1)))
>>> alpha = alpha0 + omega*(alpha1-alpha0)
>>> diff(alpha, T)
>>> diff(alpha, T, T)
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for the Twu alpha function. Uses the set values of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
API SRK
References
[1]
Examples
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Returns a_alpha, da_alpha_dT,
and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documentation. Uses the set values
of Tc, a, S1, and S2.
[︂ √ ]︂2
(︁ √︀ )︁ 1 − 𝑇𝑟
𝑎𝛼(𝑇 ) = 𝑎 1 + 𝑆1 1 − 𝑇𝑟 + 𝑆2 √
𝑇𝑟
(︃ (︃√︂ )︃ √︂ (︃ √︂ )︃)︃ (︃ (︃√︂ )︃ √︂ (︃ (︃√︂ )︃ )︃)︃
𝑑𝑎𝛼 𝑇𝑐 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
= 𝑎 2 −𝑆2 −1 + 𝑆1 + 𝑆2 𝑆2 −1 + 𝑆1 −1 −1
𝑑𝑇 𝑇 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐
(︃ √︂ √︂ √︂ √︂ √︂ √︂ )︃
𝑑2 𝑎𝛼 1 2 𝑇 𝑇 𝑇 𝑇 2 𝑇 2 𝑇
= 𝑎 3 𝑆1 𝑇 − 𝑆1 𝑆2 𝑇 + 3𝑆1 𝑆2 𝑇 𝑐 + 𝑆1 𝑇 − 3𝑆2 𝑇 𝑐 + 4𝑆2 𝑇 𝑐 + 3𝑆2 𝑇 𝑐
𝑑𝑇 2 2𝑇 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐 𝑇𝑐
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for this EOS. Uses the set values of Tc, m, and a.
(︃ (︃ √︂ )︃ )︃2
𝑇
𝑎𝛼 = 𝑎 𝑚 − +1 +1
𝑇𝑐
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the API SRK EOS. Uses a, b, and Tc obtained from the
class’s namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
If S2 is set to 0, the solution is the same as in the SRK EOS, and that is used. Otherwise, newton’s method
must be used to solve for T. There are 8 roots of T in that case, six of them real. No guarantee can be made
regarding which root will be obtained.
SRK Translated
References
[1]
Examples
P-T initialization:
SRK Translated-Consistent
Notes
This variant offers substantial improvements to the SRK-type EOSs - likely getting about as accurate as this form
of cubic equation can get.
References
[1]
Examples
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 + 𝑐 − 𝑏 (𝑉 + 𝑐)(𝑉 + 𝑐 + 𝑏)
Notes
This variant offers incremental improvements in accuracy only, but those can be fairly substantial for some sub-
stances.
References
[1]
Examples
MSRK Translated
Notes
This is an older correlation that offers lower accuracy on many properties which were sacrificed to obtain the
vapor pressure accuracy. The alpha function of this EOS does not meet any of the consistency requriements for
alpha functions.
Coefficients can be found in [2], or estimated with the method in [3]. The estimation method in [3] works as
follows, using the acentric factor and true critical compressibility:
References
Examples
Methods
estimate_MN(Tc, Pc, omega[, c]) Calculate the alpha values for the MSRK equation to
match two pressure points, and solve analytically for
the M, N required to match exactly that.
Examples
Notes
omega is allowed as an input for compatibility with the other EOS forms, but is not used.
References
[1], [2]
Examples
Attributes
omega
Methods
P_discriminant_zeros_analytical(T, b, delta, Method to calculate the pressures which zero the dis-
...) criminant function of the VDW eos.
T_discriminant_zeros_analytical([valid]) Method to calculate the temperatures which zero the
discriminant function of the VDW eos.
a_alpha_and_derivatives_pure(T) Method to calculate 𝑎𝛼 and its first and second
derivatives for this EOS.
a_alpha_pure(T) Method to calculate 𝑎𝛼.
solve_T(P, V[, solution]) Method to calculate T from a specified P and V for
the VDW EOS.
Notes
T_discriminant_zeros_analytical(valid=False)
Method to calculate the temperatures which zero the discriminant function of the VDW eos. This is an
analytical cubic function solved analytically.
Parameters
valid [bool] Whether to filter the calculated temperatures so that they are all real, and positive
only, [-]
Returns
T_discriminant_zeros [list[float]] Temperatures which make the discriminant zero, [K]
Notes
Zc = 0.375
Mechanical compressibility of VDW EOS
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of a.
𝑎𝛼 = 𝑎
𝑑𝑎𝛼
=0
𝑑𝑇
𝑑2 𝑎𝛼
=0
𝑑𝑇 2
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
a_alpha_pure(T )
Method to calculate 𝑎𝛼. Uses the set values of a.
𝑎𝛼 = 𝑎
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
delta = 0.0
delta is always zero for the VDW EOS
epsilon = 0.0
epsilon is always zero for the VDW EOS
omega = None
omega has no impact on the VDW EOS
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the VDW EOS. Uses a, and b, obtained from the class’s
namespace.
1 (︀
𝑃 𝑉 2 (𝑉 − 𝑏) + 𝑉 𝑎 − 𝑎𝑏
)︀
𝑇 = 2
𝑅𝑉
Parameters
Notes
omega is allowed as an input for compatibility with the other EOS forms, but is not used.
References
Examples
Attributes
omega
Methods
T_discriminant_zeros_analytical(valid=False)
Method to calculate the temperatures which zero the discriminant function of the RK eos. This is an
analytical function with an 11-coefficient polynomial which is solved with numpy.
Parameters
valid [bool] Whether to filter the calculated temperatures so that they are all real, and positive
only, [-]
Returns
T_discriminant_zeros [float] Temperatures which make the discriminant zero, [K]
Notes
Zc = 0.3333333333333333
Mechanical compressibility of RK EOS
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. Uses the set values of a.
𝑎
𝑎𝛼 = √︁
𝑇
𝑇𝑐
𝑑𝑎𝛼 𝑎
= − √︁
𝑑𝑇 2𝑇 𝑇 𝑇𝑐
2
𝑑 𝑎𝛼 3𝑎
2
= √︁
𝑑𝑇 4𝑇 2 𝑇𝑇𝑐
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for this EOS. Uses the set values of a.
𝑎
𝑎𝛼 = √︁
𝑇
𝑇𝑐
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
c1 = 0.4274802335403414
Full value of the constant in the a parameter
c2 = 0.08664034996495772
Full value of the constant in the b parameter
epsilon = 0.0
epsilon is always zero for the RK EOS
omega = None
omega has no impact on the RK EOS
solve_T(P, V, solution=None)
Method to calculate T from a specified P and V for the RK EOS. Uses a, and b, obtained from the class’s
namespace.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
Notes
𝑅𝑇
𝑃 =
𝑉
Parameters
Tc [float, optional] Critical temperature, [K]
Pc [float, optional] Critical pressure, [Pa]
omega [float, optional] Acentric factor, [-]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
References
[1]
Examples
Methods
Zc = 1.0
float: Critical compressibility for an ideal gas is 1
a = 0.0
float: a parameter for an ideal gas is 0
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for this EOS. All values are zero.
Parameters
T [float] Temperature at which to calculate the values, [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K^2]
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for the ideal gas law, which is zero.
Parameters
𝑃𝑉
𝑇 =
𝑅
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
solution [str or None, optional] Not used, [-]
Returns
T [float] Temperature, [K]
static volume_solutions(T, P, b=0.0, delta=0.0, epsilon=0.0, a_alpha=0.0)
Calculate the ideal-gas molar volume in a format compatible with the other cubic EOS solvers. The ideal
gas volume is the first element; and the secodn and third elements are zero. This is implemented to allow
the ideal-gas model to be compatible with the cubic models, whose equations do not work with parameters
of zero.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float, optional] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float, optional] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float, optional] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float, optional] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [list[float]] Three possible molar volumes, [m^3/mol]
Examples
Some equations of state show this behavior. At a liquid volume, if the temperature is increased, the pressure should
increase as well to create that same volume. However in some cases this is not the case as can be demonstrated for this
hypothetical dodecane-like fluid:
Through experience, it is observed that this behavior is only shown for some sets of critical constants. It was found
𝜕𝑇 𝑉 is set to zero, an analytical expression can be determined for exactly what that maxi-
that if the expression for 𝜕𝑃
mum pressure is. Some EOSs implement this function as P_max_at_V ; those that don’t, and fluids where there is no
maximum pressure, will have that method but it will return None.
The GCEOS.volume_errors method shows the relative error in the volume solution. mpmath is requried for this
functionality. It is not likely there is an error here but many problems have been found in the past.
The GCEOS.PT_surface_special method shows some of the special curves of the EOS.
The GCEOS.a_alpha_plot method shows the alpha function curve. The following sample shows the SRK’s default
alpha function for methane.
If this doesn’t look healthy, that is because it is not. There are strict thermodynamic consistency requirements that we
know of today:
• The alpha function must be positive and continuous
• The first derivative must be negative and continuous
• The second derivative must be positive and continuous
109
10 4
106
10 6
Relative error
104 10 8
P [Pa]
10 10
102 10 12
10 14
100
10 16
10 2 10 18
10 4 10 3 10 2 10 1 100 101 102 103 104
T [K]
104
P [Pa]
101
V
102
10 1
100
10 3
10 2
10 4 10 3 10 2 10 1 100 101 102 103 104
T [K]
100
10 2
(a )2
T2
a and
T
a
10 4
10 6
2.07005 × 10 1
0 1000 2000 3000 4000 5000
Temperature [K]
a [J^2/mol^2/Pa]
First derivative [J^2/mol^2/Pa/K]
Second derivative [J^2/mol^2/Pa/K^2]
10000
20000
H_dep
30000
40000
Liquid
50000 Gas
0 100 200 300 400 500
Temperature [K]
The second plot is more detailed, and is focused on the direct calculation of vapor pressure without using an iterative
solution. It shows the relative error of the fit, which normally way below where it would present any issue - only
10-100x more error than it is possible to get with floating point numbers at all.
This module contains implementations of most cubic equations of state for mixtures. This includes Peng-Robinson,
SRK, Van der Waals, PRSV, TWU and many other variants.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Base Class
• Peng-Robinson Family EOSs
– Standard Peng Robinson
– Peng Robinson (1978)
1.00
0.75
0.50
0.25
0.00
0 100 200 300 400 500
Temperature [K]
10 4
10 14
10 9
Psat [Pa]
AARD [-]
10 15
10 14
10 16 10 19
10 24
10 17
10 29
10 18
10 1 100
Tr [-]
class thermo.eos_mix.GCEOSMIX
Bases: thermo.eos.GCEOS
Class for solving a generic pressure-explicit three-parameter cubic equation of state for a mixture. Does not
implement any parameters itself; must be subclassed by a mixture equation of state class which subclasses it.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 2 + 𝛿𝑉 + 𝜖
Attributes
A_dep_g Departure molar Helmholtz energy from ideal gas behavior for the gas phase, [J/mol].
A_dep_l Departure molar Helmholtz energy from ideal gas behavior for the liquid phase,
[J/mol].
Cp_minus_Cv_g Cp - Cv for the gas phase, [J/mol/K].
Cp_minus_Cv_l Cp - Cv for the liquid phase, [J/mol/K].
U_dep_g Departure molar internal energy from ideal gas behavior for the gas phase, [J/mol].
U_dep_l Departure molar internal energy from ideal gas behavior for the liquid phase, [J/mol].
V_dep_g Departure molar volume from ideal gas behavior for the gas phase, [m^3/mol].
V_dep_l Departure molar volume from ideal gas behavior for the liquid phase, [m^3/mol].
V_g_mpmath The molar volume of the gas phase calculated with mpmath to a higher precision,
[m^3/mol].
V_l_mpmath The molar volume of the liquid phase calculated with mpmath to a higher precision,
[m^3/mol].
Vc Critical volume, [m^3/mol].
a_alpha_ijs Calculate and return the matrix (𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 .
√︀
beta_g Isobaric (constant-pressure) expansion coefficient for the gas phase, [1/K].
beta_l Isobaric (constant-pressure) expansion coefficient for the liquid phase, [1/K].
c1
c2
d2H_dep_dT2_g Second temperature derivative of departure enthalpy with respect to tempera-
ture for the gas phase, [(J/mol)/K^2].
d2H_dep_dT2_g_P Second temperature derivative of departure enthalpy with respect to tem-
perature for the gas phase, [(J/mol)/K^2].
d2H_dep_dT2_g_V Second temperature derivative of departure enthalpy with respect to tem-
perature at constant volume for the gas phase, [(J/mol)/K^2].
d2H_dep_dT2_l Second temperature derivative of departure enthalpy with respect to tempera-
ture for the liquid phase, [(J/mol)/K^2].
d2H_dep_dT2_l_P Second temperature derivative of departure enthalpy with respect to tem-
perature for the liquid phase, [(J/mol)/K^2].
d2H_dep_dT2_l_V Second temperature derivative of departure enthalpy with respect to tem-
perature at constant volume for the liquid phase, [(J/mol)/K^2].
d2H_dep_dTdP_g Temperature and pressure derivative of departure enthalpy at constant pres-
sure then temperature for the gas phase, [(J/mol)/K/Pa].
d2H_dep_dTdP_l Temperature and pressure derivative of departure enthalpy at constant pres-
sure then temperature for the liquid phase, [(J/mol)/K/Pa].
d2P_dT2_PV_g Second derivative of pressure with respect to temperature twice, but with pres-
sure held constant the first time and volume held constant the second time for the gas phase,
[Pa/K^2].
d2P_dT2_PV_l Second derivative of pressure with respect to temperature twice, but with pres-
sure held constant the first time and volume held constant the second time for the liquid
phase, [Pa/K^2].
d2P_dTdP_g Second derivative of pressure with respect to temperature and, then pressure; and
with volume held constant at first, then temperature, for the gas phase, [1/K].
d2P_dTdP_l Second derivative of pressure with respect to temperature and, then pressure; and
with volume held constant at first, then temperature, for the liquid phase, [1/K].
d2P_dTdrho_g Derivative of pressure with respect to molar density, and temperature for the gas
phase, [Pa/(K*mol/m^3)].
d2P_dTdrho_l Derivative of pressure with respect to molar density, and temperature for the
liquid phase, [Pa/(K*mol/m^3)].
d2P_dVdP_g Second derivative of pressure with respect to molar volume and then pressure for
the gas phase, [mol/m^3].
d2P_dVdP_l Second derivative of pressure with respect to molar volume and then pressure for
the liquid phase, [mol/m^3].
d2P_dVdT_TP_g Second derivative of pressure with respect to molar volume and then temper-
ature at constant temperature then pressure for the gas phase, [Pa*mol/m^3/K].
d2P_dVdT_TP_l Second derivative of pressure with respect to molar volume and then temper-
ature at constant temperature then pressure for the liquid phase, [Pa*mol/m^3/K].
d2P_dVdT_g Alias of GCEOS.d2P_dTdV_g
d2P_dVdT_l Alias of GCEOS.d2P_dTdV_l
d2P_drho2_g Second derivative of pressure with respect to molar density for the gas phase,
[Pa/(mol/m^3)^2].
d2P_drho2_l Second derivative of pressure with respect to molar density for the liquid phase,
[Pa/(mol/m^3)^2].
d2S_dep_dT2_g Second temperature derivative of departure entropy with respect to tempera-
ture for the gas phase, [(J/mol)/K^3].
d2S_dep_dT2_g_V Second temperature derivative of departure entropy with respect to temper-
ature at constant volume for the gas phase, [(J/mol)/K^3].
d2S_dep_dT2_l Second temperature derivative of departure entropy with respect to tempera-
ture for the liquid phase, [(J/mol)/K^3].
d2S_dep_dT2_l_V Second temperature derivative of departure entropy with respect to temper-
ature at constant volume for the liquid phase, [(J/mol)/K^3].
d2S_dep_dTdP_g Temperature and pressure derivative of departure entropy at constant pressure
then temperature for the gas phase, [(J/mol)/K^2/Pa].
d2S_dep_dTdP_l Temperature and pressure derivative of departure entropy at constant pressure
then temperature for the liquid phase, [(J/mol)/K^2/Pa].
d2T_dP2_g Second partial derivative of temperature with respect to pressure (constant volume)
for the gas phase, [K/Pa^2].
d2T_dP2_l Second partial derivative of temperature with respect to pressure (constant temper-
ature) for the liquid phase, [K/Pa^2].
d2T_dPdV_g Second partial derivative of temperature with respect to pressure (constant volume)
and then volume (constant pressure) for the gas phase, [K*mol/(Pa*m^3)].
d2T_dPdV_l Second partial derivative of temperature with respect to pressure (constant volume)
and then volume (constant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
d2T_dPdrho_g Derivative of temperature with respect to molar density, and pressure for the gas
phase, [K/(Pa*mol/m^3)].
d2T_dPdrho_l Derivative of temperature with respect to molar density, and pressure for the
liquid phase, [K/(Pa*mol/m^3)].
d2T_dV2_g Second partial derivative of temperature with respect to volume (constant pressure)
for the gas phase, [K*mol^2/m^6].
d2T_dV2_l Second partial derivative of temperature with respect to volume (constant pressure)
for the liquid phase, [K*mol^2/m^6].
d2T_dVdP_g Second partial derivative of temperature with respect to pressure (constant volume)
and then volume (constant pressure) for the gas phase, [K*mol/(Pa*m^3)].
d2T_dVdP_l Second partial derivative of temperature with respect to pressure (constant volume)
and then volume (constant pressure) for the liquid phase, [K*mol/(Pa*m^3)].
d2T_drho2_g Second derivative of temperature with respect to molar density for the gas phase,
[K/(mol/m^3)^2].
d2T_drho2_l Second derivative of temperature with respect to molar density for the liquid
phase, [K/(mol/m^3)^2].
d2V_dP2_g Second partial derivative of volume with respect to pressure (constant temperature)
for the gas phase, [m^3/(Pa^2*mol)].
d2V_dP2_l Second partial derivative of volume with respect to pressure (constant temperature)
for the liquid phase, [m^3/(Pa^2*mol)].
d2V_dPdT_g Second partial derivative of volume with respect to pressure (constant temperature)
and then presssure (constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
d2V_dPdT_l Second partial derivative of volume with respect to pressure (constant temperature)
and then presssure (constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
d2V_dT2_g Second partial derivative of volume with respect to temperature (constant pressure)
for the gas phase, [m^3/(mol*K^2)].
d2V_dT2_l Second partial derivative of volume with respect to temperature (constant pressure)
for the liquid phase, [m^3/(mol*K^2)].
d2V_dTdP_g Second partial derivative of volume with respect to pressure (constant temperature)
and then presssure (constant temperature) for the gas phase, [m^3/(K*Pa*mol)].
d2V_dTdP_l Second partial derivative of volume with respect to pressure (constant temperature)
and then presssure (constant temperature) for the liquid phase, [m^3/(K*Pa*mol)].
d2a_alpha_dT2_dns Helper method for calculating the mole number derivatives of
d2a_alpha_dT2.
d2a_alpha_dT2_dzs Helper method for calculating the mole number derivatives of
d2a_alpha_dT2.
d2a_alpha_dT2_ijs Calculate and return the matrix of the second temperature derivatives of
the alpha terms.
d2a_alpha_dTdP_g_V Derivative of the temperature derivative of a_alpha with respect to pres-
sure at constant volume (varying T) for the gas phase, [J^2/mol^2/Pa^2/K].
d2a_alpha_dTdP_l_V Derivative of the temperature derivative of a_alpha with respect to pres-
sure at constant volume (varying T) for the liquid phase, [J^2/mol^2/Pa^2/K].
d2a_alpha_dninjs Helper method for calculating the second partial molar derivatives of
a_alpha (hessian).
d2a_alpha_dzizjs Helper method for calculating the second composition derivatives of
a_alpha (hessian).
d2b_dninjs Helper method for calculating the second partial mole number derivatives of b.
d2b_dzizjs Helper method for calculating the second partial mole fraction derivatives of b.
d2rho_dP2_g Second derivative of molar density with respect to pressure for the gas phase,
[(mol/m^3)/Pa^2].
d2rho_dP2_l Second derivative of molar density with respect to pressure for the liquid phase,
[(mol/m^3)/Pa^2].
d2rho_dPdT_g Second derivative of molar density with respect to pressure and temperature for
the gas phase, [(mol/m^3)/(K*Pa)].
d2rho_dPdT_l Second derivative of molar density with respect to pressure and temperature for
the liquid phase, [(mol/m^3)/(K*Pa)].
d2rho_dT2_g Second derivative of molar density with respect to temperature for the gas phase,
[(mol/m^3)/K^2].
d2rho_dT2_l Second derivative of molar density with respect to temperature for the liquid
phase, [(mol/m^3)/K^2].
d3a_alpha_dT3 Method to calculate the third temperature derivative of 𝑎𝛼,
[J^2/mol^2/Pa/K^3].
d3a_alpha_dninjnks Helper method for calculating the third mole number derivatives of
a_alpha.
d3a_alpha_dzizjzks Helper method for calculating the third composition derivatives of
a_alpha.
d3b_dninjnks Helper method for calculating the third partial mole number derivatives of b.
d3b_dzizjzks Helper method for calculating the third partial mole fraction derivatives of b.
d3delta_dzizjzks Helper method for calculating the third composition derivatives of delta.
d3epsilon_dzizjzks Helper method for calculating the third composition derivatives of ep-
silon.
dH_dep_dP_g Derivative of departure enthalpy with respect to pressure for the gas phase,
[(J/mol)/Pa].
dH_dep_dP_g_V Derivative of departure enthalpy with respect to pressure at constant volume
for the liquid phase, [(J/mol)/Pa].
dH_dep_dP_l Derivative of departure enthalpy with respect to pressure for the liquid phase,
[(J/mol)/Pa].
dH_dep_dP_l_V Derivative of departure enthalpy with respect to pressure at constant volume
for the gas phase, [(J/mol)/Pa].
dH_dep_dT_g Derivative of departure enthalpy with respect to temperature for the gas phase,
[(J/mol)/K].
dH_dep_dT_g_V Derivative of departure enthalpy with respect to temperature at constant vol-
ume for the gas phase, [(J/mol)/K].
dH_dep_dT_l Derivative of departure enthalpy with respect to temperature for the liquid phase,
[(J/mol)/K].
dH_dep_dT_l_V Derivative of departure enthalpy with respect to temperature at constant vol-
ume for the liquid phase, [(J/mol)/K].
dH_dep_dV_g_P Derivative of departure enthalpy with respect to volume at constant pressure
for the gas phase, [J/m^3].
dH_dep_dV_g_T Derivative of departure enthalpy with respect to volume at constant tempera-
ture for the gas phase, [J/m^3].
dH_dep_dV_l_P Derivative of departure enthalpy with respect to volume at constant pressure
for the liquid phase, [J/m^3].
da_alpha_dP_l_V Derivative of the a_alpha with respect to pressure at constant volume (vary-
ing T) for the liquid phase, [J^2/mol^2/Pa^2].
da_alpha_dT_dns Helper method for calculating the mole number derivatives of da_alpha_dT.
da_alpha_dT_dzs Helper method for calculating the composition derivatives of da_alpha_dT.
da_alpha_dT_ijs Calculate and return the matrix for the temperature derivatives of the alpha
terms.
da_alpha_dns Helper method for calculating the mole number derivatives of a_alpha.
da_alpha_dzs Helper method for calculating the composition derivatives of a_alpha.
db_dns Helper method for calculating the mole number derivatives of b.
db_dzs Helper method for calculating the composition derivatives of b.
dbeta_dP_g Derivative of isobaric expansion coefficient with respect to pressure for the gas
phase, [1/(Pa*K)].
dbeta_dP_l Derivative of isobaric expansion coefficient with respect to pressure for the liquid
phase, [1/(Pa*K)].
dbeta_dT_g Derivative of isobaric expansion coefficient with respect to temperature for the gas
phase, [1/K^2].
dbeta_dT_l Derivative of isobaric expansion coefficient with respect to temperature for the
liquid phase, [1/K^2].
dfugacity_dP_g Derivative of fugacity with respect to pressure for the gas phase, [-].
dfugacity_dP_l Derivative of fugacity with respect to pressure for the liquid phase, [-].
dfugacity_dT_g Derivative of fugacity with respect to temperature for the gas phase, [Pa/K].
dfugacity_dT_l Derivative of fugacity with respect to temperature for the liquid phase,
[Pa/K].
dna_alpha_dT_dns Helper method for calculating the mole number derivatives of
da_alpha_dT.
dna_alpha_dns Helper method for calculating the partial molar derivatives of a_alpha.
dnb_dns Helper method for calculating the partial molar derivative of b.
dphi_dP_g Derivative of fugacity coefficient with respect to pressure for the gas phase, [1/Pa].
dphi_dP_l Derivative of fugacity coefficient with respect to pressure for the liquid phase,
[1/Pa].
dphi_dT_g Derivative of fugacity coefficient with respect to temperature for the gas phase,
[1/K].
dphi_dT_l Derivative of fugacity coefficient with respect to temperature for the liquid phase,
[1/K].
drho_dP_g Derivative of molar density with respect to pressure for the gas phase,
[(mol/m^3)/Pa].
drho_dP_l Derivative of molar density with respect to pressure for the liquid phase,
[(mol/m^3)/Pa].
drho_dT_g Derivative of molar density with respect to temperature for the gas phase,
[(mol/m^3)/K].
drho_dT_l Derivative of molar density with respect to temperature for the liquid phase,
[(mol/m^3)/K].
fugacity_g Fugacity for the gas phase, [Pa].
fugacity_l Fugacity for the liquid phase, [Pa].
kappa_g Isothermal (constant-temperature) expansion coefficient for the gas phase, [1/Pa].
kappa_l Isothermal (constant-temperature) expansion coefficient for the liquid phase, [1/Pa].
lnphi_g The natural logarithm of the fugacity coefficient for the gas phase, [-].
lnphi_l The natural logarithm of the fugacity coefficient for the liquid phase, [-].
more_stable_phase Checks the Gibbs energy of each possible phase, and returns ‘l’ if the
liquid-like phase is more stable, and ‘g’ if the vapor-like phase is more stable.
mpmath_volume_ratios Method to compare, as ratios, the volumes of the implemented cubic
solver versus those calculated using mpmath.
mpmath_volumes Method to calculate to a high precision the exact roots to the cubic equation,
using mpmath.
mpmath_volumes_float Method to calculate real roots of a cubic equation, using mpmath, but
returned as floats.
phi_g Fugacity coefficient for the gas phase, [Pa].
phi_l Fugacity coefficient for the liquid phase, [Pa].
pseudo_Pc Apply a linear mole-fraction mixing rule to compute the average critical pressure,
[Pa].
pseudo_Tc Apply a linear mole-fraction mixing rule to compute the average critical tempera-
ture, [K].
pseudo_a Apply a linear mole-fraction mixing rule to compute the average a coefficient, [-].
pseudo_omega Apply a linear mole-fraction mixing rule to compute the average omega, [-].
rho_g Gas molar density, [mol/m^3].
rho_l Liquid molar density, [mol/m^3].
sorted_volumes List of lexicographically-sorted molar volumes available from the root find-
ing algorithm used to solve the PT point.
state_specs Convenience method to return the two specified state specs (T, P, or V ) as a
dictionary.
Methods
stabiliy_iteration_Michelsen
Psat(T, polish=False)
Generic method to calculate vapor pressure of a pure-component equation of state for a specified T. An
explicit solution is used unless polish is True.
The result of this function has no physical meaning for multicomponent mixtures, and does not represent
either a dew point or a bubble point!
Parameters
T [float] Temperature, [K]
polish [bool, optional] Whether to attempt to use a numerical solver to make the solution
more precise or not
Returns
Psat [float] Vapor pressure using the pure-component approach, [Pa]
Notes
For multicomponent mixtures this may serve as a useful guess for the dew and the bubble pressure.
a_alpha_and_derivatives(T, full=True, quick=True, pure_a_alphas=True)
Method to calculate a_alpha and its first and second derivatives for an EOS with the Van der Waals mixing
rules. Uses the parent class’s interface to compute pure component values. Returns a_alpha, da_alpha_dT,
and d2a_alpha_dT2.
For use in solve_T this returns only a_alpha if full is False.
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
Parameters
T [float] Temperature, [K]
full [bool, optional] If False, calculates and returns only a_alpha
quick [bool, optional] Only the quick variant is implemented; it is little faster anyhow
pure_a_alphas [bool, optional] Whether or not to recalculate the a_alpha terms of pure com-
ponents (for the case of mixtures only) which stay the same as the composition changes (i.e
in a PT flash), [-]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K**2]
Notes
The exact expressions can be obtained with the following SymPy expression below, commented out for
brevity.
property a_alpha_ijs
Calculate and return the matrix (𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 .
√︀
Returns
a_alpha_ijs [list[list[float]]] a_alpha terms for each component with every other component,
[J^2/mol^2/Pa]
Notes
In an earlier implementation this matrix was stored each EOS solve; however, allocating that much memory
becomes quite expensive for large number of component cases and this is now calculated on-demand only.
d2G_dep_dninjs(Z)
Calculates the molar departure Gibbs energy mole number derivatives (where the mole fractions sum to 1).
No specific formula is implemented for this property - it is calculated from the mole fraction derivative.
(︂ 2 (︃(︂ )︃
𝜕 2 𝐺𝑑𝑒𝑝
)︂ )︂
𝜕 𝐺𝑑𝑒𝑝
=𝑓
𝜕𝑛𝑗 𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖,𝑗̸=𝑘 𝜕𝑥𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖,𝑗̸=𝑘
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2G_dep_dninjs [float] Departure Gibbs energy second mole number derivatives, [J/mol^3]
d2G_dep_dzizjs(Z)
Calculates the molar departure Gibbs energy second composition derivative (where the mole fractions do
not sum to 1). Verified numerically. Useful in solving for gibbs minimization calculations or for solving
for the true critical point. Also forms the basis for the molar departure Gibbs energy mole second number
derivative.
(︂ 2 )︂
𝜕 𝐺𝑑𝑒𝑝
= run SymPy code to obtain - very long!
𝜕𝑥𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖,𝑗̸=𝑘
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2G_dep_dzizjs [float] Departure Gibbs free energy second composition derivatives,
[J/mol]
Notes
The derivation for the derivative is performed as follows using SymPy. The function source code is an
optimized variant created with the cse SymPy function, and hand optimized further.
d2V_dninjs(Z)
Calculates the molar volume second mole number derivatives (where the mole fractions sum to 1). No
specific formula is implemented for this property - it is calculated from the second mole fraction derivatives.
(︂ 2 (︃(︂ )︃
𝜕2𝑉
)︂ )︂
𝜕 𝑉
=𝑓
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗 𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑘̸=𝑖,𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2V_dninjs [float] Molar volume second mole number derivatives, [m^3/mol^3]
d2V_dzizjs(Z)
Calculates the molar volume second composition derivative (where the mole fractions do not sum to 1).
Verified numerically. Used in many other derivatives, and for the molar volume second mole number
derivative.
(︂ 2 )︂
𝜕 𝑉
= run SymPy code to obtain - very long!
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑘̸=𝑖,𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2V_dzizjs [float] Molar volume second composition derivatives, [m^3/mol]
Notes
The derivation for the derivative is performed as follows using SymPy. The function source code is an
optimized variant created with the cse SymPy function, and hand optimized further.
>>> CUBIC = R*T/(V(x1, x2) - b(x1, x2)) - a_alpha(x1, x2)/(V(x1, x2)*V(x1, x2)␣
˓→+ delta(x1, x2)*V(x1, x2) + epsilon(x1, x2)) - P
property d2a_alpha_dT2_dns
Helper method for calculating the mole number derivatives of d2a_alpha_dT2. Note this is independent of
the phase.
(︂ 3 (︃(︂ )︃
𝜕 3 𝑎𝛼
)︂ )︂
𝜕 𝑎𝛼
=𝑓
𝜕𝑛𝑖 𝜕𝑇 2 𝑃,𝑛𝑖̸=𝑗 𝜕𝑧𝑖 𝜕𝑇 2 𝑃,𝑧𝑖̸=𝑗
Returns
d2a_alpha_dT2_dns [list[float]] Mole number derivative of d2a_alpha_dT2 of each com-
ponent, [kg*m^5/(mol^3*s^2*K^2)]
Notes
Returns
d2a_alpha_dT2_dzs [list[float]] Composition derivative of d2a_alpha_dT2 of each compo-
nent, [kg*m^5/(mol^2*s^2*K^2)]
Notes
Returns
d2a_alpha_dT2_ijs [list[list[float]]] Second temperature derivative of a_alpha terms for
each component with every other component, [J^2/mol^2/Pa/K^2]
Notes
In an earlier implementation this matrix was stored each EOS solve; however, allocating that much memory
becomes quite expensive for large number of component cases and this is now calculated on-demand only.
property d2a_alpha_dninjs
Helper method for calculating the second partial molar derivatives of a_alpha (hessian). Note this is inde-
pendent of the phase.
(︂ 2 )︂
𝜕 𝑎𝛼
= 2 [3(𝑎𝛼) + (𝑎𝛼)𝑖𝑗 − 2(term𝑖,𝑗 )]
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
∑︁
term𝑖,𝑗 = 𝑧𝑘 ((𝑎𝛼)𝑖𝑘 + (𝑎𝛼)𝑗𝑘 )
𝑘
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
Returns
d2a_alpha_dninjs [list[float]] Second partial molar derivative of alpha of each component,
[kg*m^5/(mol^4*s^2)]
Notes
Returns
d2a_alpha_dzizjs [list[float]] Second composition derivative of alpha of each component,
[kg*m^5/(mol^2*s^2)]
Notes
𝜕2𝑏
(︂ )︂
= 2𝑏 − 𝑏𝑖 − 𝑏𝑗
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑘
Returns
d2b_dninjs [list[list[float]]] Second Composition derivative of b of each component,
[m^3/mol^3]
Notes
𝜕2𝑏
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2b_dzizjs [list[list[float]]] Second mole fraction derivatives of b of each component,
[m^3/mol]
Notes
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2lnphi_dninjs [float] Mixture log fugacity coefficient second mole number derivatives, [-]
d2lnphi_dzizjs(Z)
Calculates the mixture log fugacity coefficient second mole fraction derivatives (where the mole fractions
do not sum to 1). No specific formula is implemented for this property - it is calculated from the second
mole fraction derivative of Gibbs free energy.
(︂ 2 (︃(︂ )︃
𝜕 2 𝐺𝑑𝑒𝑝
)︂ )︂
𝜕 ln 𝜑 1
=
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑖,𝑗̸=𝑘 𝑅𝑇 𝜕𝑥𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖,𝑗̸=𝑘
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
d2lnphi_dzizjs [float] Mixture log fugacity coefficient second mole fraction derivatives, [-]
property d3a_alpha_dninjnks
Helper method for calculating the third mole number derivatives of a_alpha. Note this is independent of
the phase.
(︃ )︃
𝜕 3 𝑎𝛼
(︂ )︂ ∑︁
= 4 −6(𝑎𝛼) − [(𝑎𝛼)𝑖,𝑗 + (𝑎𝛼)𝑖,𝑘 + (𝑎𝛼)𝑗,𝑘 ] + 3 𝑧𝑚 [(𝑎𝛼)𝑖,𝑚 + (𝑎𝛼)𝑗,𝑚 + (𝑎𝛼)𝑘,𝑚 ]
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘 𝑚
Returns
d3a_alpha_dninjnks [list[float]] Third mole number derivative of alpha of each component,
[kg*m^5/(mol^5*s^2)]
Notes
𝜕 3 𝑎𝛼
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d3a_alpha_dzizjzks [list[float]] Third composition derivative of alpha of each component,
[kg*m^5/(mol^2*s^2)]
Notes
𝜕3𝑏
(︂ )︂
= 2(−3𝑏 + 𝑏𝑖 + 𝑏𝑗 + 𝑏𝑘 )
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3b_dninjnks [list[list[list[float]]]] Third mole number derivative of b of each component,
[m^3/mol^4]
Notes
𝜕3𝑏
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗,𝑘
Returns
d3b_dzizjzks [list[list[list[float]]]] Third mole fraction derivatives of b of each component,
[m^3/mol]
Notes
𝜕3𝛿
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dzizjzks [list[list[list[float]]]] Third composition derivative of epsilon of each com-
ponent, [m^6/mol^5]
Notes
𝜕3𝜖
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d2epsilon_dzizjzks [list[list[list[float]]]] Composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
Apart from the ideal term, this is the formulation for chemical potential.
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dG_dep_dns [float] Departure Gibbs energy mole number derivatives, [J/mol^2]
dG_dep_dzs(Z)
Calculates the molar departure Gibbs energy composition derivative (where the mole fractions do not sum
to 1). Verified numerically. Useful in solving for gibbs minimization calculations or for solving for the
true critical point. Also forms the basis for the molar departure Gibbs energy mole number derivative and
molar partial departure Gibbs energy.
(︂
𝑑 𝑑 √ 22𝑉 (𝑥)
(︀ )︀
𝑑
(︀ 𝑑
)︀ 2 −𝛿(𝑥) 𝛿(𝑥) + 2 𝜖(𝑥) a𝛼 (𝑥) atanh
𝑉 (𝑥) − 𝑑𝑥 𝑑𝑥 𝑑𝑥
(︂ )︂
𝜕𝐺𝑑𝑒𝑝 𝑑 𝑅𝑇 𝑑𝑥 𝑏(𝑥) 𝛿 (𝑥)−4𝜖(𝑥)
= 𝑃 𝑉 (𝑥) − − 3
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝑑𝑥 𝑉 (𝑥) − 𝑏(𝑥) (𝛿 2 (𝑥) − 4𝜖(𝑥)) 2
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dG_dep_dzs [float] Departure Gibbs free energy composition derivatives, [J/mol]
Notes
The derivation for the derivative is performed as follows using SymPy. The function source code is an
optimized variant created with the cse SymPy function, and hand optimized further.
˓→sqrt(delta(x)**2-4*epsilon(x))-R*log(V(x))
˓→4*epsilon(x)))**2)*sqrt(delta(x)**2 - 4*epsilon(x)))
dH_dep_dns(Z)
Calculates the molar departure enthalpy mole number derivatives (where the mole fractions sum to 1). No
specific formula is implemented for this property - it is calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝐻𝑑𝑒𝑝 𝜕𝐻𝑑𝑒𝑝
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dH_dep_dns [float] Departure enthalpy mole number derivatives, [J/mol^2]
dH_dep_dzs(Z)
Calculates the molar departure enthalpy composition derivative (where the mole fractions do not sum to
1). Verified numerically. Useful in solving for enthalpy specifications in newton-type methods, and forms
the basis for the molar departure enthalpy mole number derivative and molar partial departure enthalpy.
(︂ )︂
𝜖(𝑥) atanh √2𝑉2(𝑥)+𝛿(𝑥)
(︀ 𝜕 )︀ (︀ 𝑑 𝑑
)︀ (︀
(︂ )︂ 2 𝑇 𝜕𝑇 a𝛼 (𝑇, 𝑥) − a𝛼 (𝑥) −𝛿(𝑥) 𝑑𝑥 𝛿(𝑥) + 2 𝑑𝑥 2 𝑇
𝜕𝐻𝑑𝑒𝑝 𝑑 𝛿 (𝑥)−4𝜖(𝑥)
= 𝑃 𝑉 (𝑥) + 3 +
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝑑𝑥 2
(𝛿 (𝑥) − 4𝜖(𝑥)) 2
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dH_dep_dzs [float] Departure enthalpy composition derivatives, [J/mol]
Notes
The derivation for the derivative is performed as follows using SymPy. The function source code is an
optimized variant created with the cse SymPy function, and hand optimized further.
... - a_alpha(x))*atanh((2*V(x)+delta(x))/sqrt(delta(x)**2-4*epsilon(x))))
>>> diff(H_dep, x)
P*Derivative(V(x), x) + 2*(T*Derivative(a \alpha(T, x), T) - a \alpha(x))*(-
˓→delta(x)*Derivative(delta(x), x) + 2*Derivative(epsilon(x), x))*atanh((2*V(x)␣
˓→sqrt(delta(x)**2 - 4*epsilon(x))
dS_dep_dns(Z)
Calculates the molar departure entropy mole number derivatives (where the mole fractions sum to 1). No
specific formula is implemented for this property - it is calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑆𝑑𝑒𝑝 𝜕𝑆𝑑𝑒𝑝
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dS_dep_dns [float] Departure entropy mole number derivatives, [J/mol^2/K]
dS_dep_dzs(Z)
Calculates the molar departure entropy composition derivative (where the mole fractions do not sum to 1).
Verified numerically. Useful in solving for entropy specifications in newton-type methods, and forms the
basis for the molar departure entropy mole number derivative and molar partial departure entropy.
(︂ )︂ (︃(︂ )︂ (︂ )︂ )︃
𝜕𝑆𝑑𝑒𝑝 1 𝜕𝐻𝑑𝑒𝑝 𝜕𝐺𝑑𝑒𝑝
= −
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝑇 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dS_dep_dzs [float] Departure entropy composition derivatives, [J/mol/K]
dV_dns(Z)
Calculates the molar volume mole number derivatives (where the mole fractions sum to 1). No specific
formula is implemented for this property - it is calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑉 𝜕𝑉
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dV_dns [float] Molar volume mole number derivatives, [m^3/mol^2]
dV_dzs(Z)
Calculates the molar volume composition derivative (where the mole fractions do not sum to 1). Verified
numerically. Used in many other derivatives, and for the molar volume mole number derivative and partial
molar volume calculation.
(︀ )︀3 𝑑 2 (︀ )︀2 𝑑
−𝑅𝑇 𝑉 2 (𝑥) + 𝑉 (𝑥)𝛿(𝑥) + 𝜖(𝑥) 𝑑𝑥 𝑏(𝑥) + (𝑉 (𝑥) − 𝑏(𝑥)) 𝑉 2 (𝑥) + 𝑉 (𝑥)𝛿(𝑥) + 𝜖(𝑥) 𝑑𝑥
(︂ )︂
𝜕𝑉 a𝛼 (𝑥)
= 3
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 2
−𝑅𝑇 (𝑉 (𝑥) + 𝑉 (𝑥)𝛿(𝑥) + 𝜖(𝑥)) +
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dV_dzs [float] Molar volume composition derivatives, [m^3/mol]
Notes
The derivation for the derivative is performed as follows using SymPy. The function source code is an
optimized variant created with the cse SymPy function, and hand optimized further.
dZ_dns(Z)
Calculates the compressibility mole number derivatives (where the mole fractions sum to 1). No specific
formula is implemented for this property - it is calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑍 𝜕𝑍
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dZ_dns [float] Compressibility number derivatives, [1/mol]
dZ_dzs(Z)
Calculates the compressibility composition derivatives (where the mole fractions do not sum to 1). No
specific formula is implemented for this property - it is calculated from the composition derivative of molar
volume, which does have its formula implemented.
(︂ )︂ (︂ )︂
𝜕𝑍 𝑃 𝜕𝑉
=
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝑅𝑇 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dZ_dzs [float] Compressibility composition derivative, [-]
property da_alpha_dT_dns
Helper method for calculating the mole number derivatives of da_alpha_dT. Note this is independent of
the phase.
⎡ ⎤
(︂ 2 )︂
𝜕 𝑎𝛼 ∑︁ 𝜕(𝑎𝛼)𝑖 𝜕(𝑎𝛼) 𝑗 −0.5 𝜕𝑎𝛼
= 2⎣ −𝑧𝑗 (𝑘𝑖𝑗 − 1)(𝑎𝛼)𝑖 (𝑎𝛼)𝑗 ((𝑎𝛼)𝑖 (𝑎𝛼)𝑗 ) − ⎦
𝜕𝑛𝑖 𝜕𝑇 𝑃,𝑛𝑖̸=𝑗 𝑗
𝜕𝑇 𝜕𝑇 𝜕𝑇
Returns
da_alpha_dT_dns [list[float]] Composition derivative of da_alpha_dT of each component,
[kg*m^5/(mol^3*s^2*K)]
Notes
Returns
da_alpha_dT_dzs [list[float]] Composition derivative of da_alpha_dT of each component,
[kg*m^5/(mol^2*s^2*K)]
Notes
Returns
da_alpha_dT_ijs [list[list[float]]] First temperature derivative of a_alpha terms for each
component with every other component, [J^2/mol^2/Pa/K]
Notes
In an earlier implementation this matrix was stored each EOS solve; however, allocating that much memory
becomes quite expensive for large number of component cases and this is now calculated on-demand only.
property da_alpha_dns
Helper method for calculating the mole number derivatives of a_alpha. Note this is independent of the
phase.
(︂ )︂
𝜕𝑎𝛼 ∑︁ √︁
= 2(−𝑎𝛼 + 𝑧𝑗 (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 )
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝑗
Returns
da_alpha_dns [list[float]] Mole number derivative of alpha of each component,
[kg*m^5/(mol^3*s^2)]
Notes
Returns
da_alpha_dzs [list[float]] Composition derivative of alpha of each component,
[kg*m^5/(mol^2*s^2)]
Notes
Returns
db_dns [list[float]] Composition derivative of b of each component, [m^3/mol^2]
Notes
Returns
db_dzs [list[float]] Composition derivative of b of each component, [m^3/mol]
Notes
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dfugacities_dns [list[list[float]]] Mole number derivatives of fugacities for each species, [-]
dlnfugacities_dns(phase)
Generic formula for calculating the mole number derivaitves of log fugacities for each species in a mixture.
Verified numerically. Applicable to all cubic equations of state which can be cast in the form used here.
(︂ )︂
𝜕 ln 𝑓𝑖
𝜕𝑛𝑖 𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
This property can be converted into a partial molar property to obtain the individual fugacity coefficients.
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dlnphi_dns [float] Mixture log fugacity coefficient mole number derivatives, [1/mol]
dlnphi_dzs(Z)
Calculates the mixture log fugacity coefficient mole fraction derivatives (where the mole fractions do not
sum to 1). No specific formula is implemented for this property - it is calculated from the mole fraction
derivative of Gibbs free energy.
(︂ )︂ (︃(︂ )︂ )︃
𝜕 ln 𝜑 1 𝜕𝐺𝑑𝑒𝑝
=
𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗 𝑅𝑇 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dlnphi_dzs [float] Mixture log fugacity coefficient mole fraction derivatives, [-]
dlnphis_dP(phase)
Generic formula for calculating the pressure derivaitve of log fugacity coefficients for each species in a
mixture. Verified numerically. Applicable to all cubic equations of state which can be cast in the form used
here.
Normally this routine is slower than EOS-specific ones, as it does not make assumptions that certain pa-
rameters are zero or equal to other parameters.
(︂ )︂ (︂ 2 )︂
𝜕 ln 𝜑𝑖 𝐺𝑑𝑒𝑝 𝜕 ln 𝜑
= +
𝜕𝑃 𝑇,𝑛𝑗̸=𝑖 𝜕𝑃 𝑇,𝑛 𝜕𝑃 𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dP [float] Pressure derivatives of log fugacity coefficient for each species, [1/Pa]
Notes
This expression for the partial derivative of the mixture lnphi with respect to pressure and mole number
can be derived as follows; to convert to the partial molar lnphi pressure and temperature derivative, add
::math::frac{G_{dep}/(RT)}{partial P}_{T, n}.
˓→sqrt(delta(n)**2-4*epsilon(n))-R*log(V(n, P))
˓→4*epsilon(n))
˓→sqrt(delta(n)**2 - 4*epsilon(n)))*(4*(-delta(n)*Derivative(delta(n), n) +␣
˓→ P))
dlnphis_dT(phase)
Generic formula for calculating the temperature derivaitve of log fugacity coefficients for each species in
a mixture. Verified numerically. Applicable to all cubic equations of state which can be cast in the form
used here.
Normally this routine is slower than EOS-specific ones, as it does not make assumptions that certain pa-
rameters are zero or equal to other parameters.
𝐺𝑑𝑒𝑝
𝜕 2 ln 𝜑
(︂ )︂ (︂ )︂
𝜕 ln 𝜑𝑖 𝑅𝑇
= +
𝜕𝑇 𝑃,𝑛𝑗̸=𝑖 𝜕𝑇 𝑃,𝑛 𝜕𝑇 𝜕𝑛𝑖 𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dT [float] Temperature derivatives of log fugacity coefficient for each species, [1/K]
Notes
This expression for the partial derivative of the mixture lnphi with respect to pressure and mole number
can be derived as follows; to convert to the partial molar lnphi pressure and temperature derivative, add
::math::frac{G_{dep}/(RT)}{partial T}_{P, n}.
˓→sqrt(delta(n)**2-4*epsilon(n))-R*log(V(n, T))
˓→4*epsilon(n))
dlnphis_dns(Z)
Generic formula for calculating the mole number derivaitves of log fugacity coefficients for each species
in a mixture. Verified numerically. Applicable to all cubic equations of state which can be cast in the form
used here.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑛𝑖 𝑃,𝑛𝑗̸=𝑖
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dlnphis_dns [list[list[float]]] Mole number derivatives of log fugacity coefficient for each
species, [-]
dlnphis_dzs(Z)
Generic formula for calculating the mole fraction derivaitves of log fugacity coefficients for each species
in a mixture. Verified numerically. Applicable to all cubic equations of state which can be cast in the form
used here.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑧𝑖 𝑃,𝑧𝑗̸=𝑖
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dlnphis_dzs [list[list[float]]] Mole fraction derivatives of log fugacity coefficient for each
species (such that the mole fractions do not sum to 1), [-]
dnG_dep_dns(Z)
Calculates the partial molar departure Gibbs energy. No specific formula is implemented for this property
- it is calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑛𝐺𝑑𝑒𝑝 𝜕𝐺𝑑𝑒𝑝
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dnG_dep_dns [float] Partial molar departure Gibbs energy of the phase, [J/mol]
dnH_dep_dns(Z)
Calculates the partial molar departure enthalpy. No specific formula is implemented for this property - it is
calculated from the mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑛𝐻𝑑𝑒𝑝 𝜕𝐻𝑑𝑒𝑝
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dnH_dep_dns [float] Partial molar departure enthalpies of the phase, [J/mol]
dnV_dns(Z)
Calculates the partial molar volume of the specified phase No specific formula is implemented for this
property - it is calculated from the molar volume mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑛𝑉 𝜕𝑉
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dnV_dns [float] Partial molar volume of the mixture of the specified phase, [m^3/mol]
dnZ_dns(Z)
Calculates the partial compressibility of the specified phase No specific formula is implemented for this
property - it is calculated from the compressibility mole fraction derivative.
(︂ )︂ (︃(︂ )︂ )︃
𝜕𝑛𝑍 𝜕𝑍
=𝑓
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝜕𝑥𝑖 𝑇,𝑃,𝑥𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dnZ_dns [float] Partial compressibility of the mixture of the specified phase, [-]
property dna_alpha_dT_dns
Helper method for calculating the mole number derivatives of da_alpha_dT. Note this is independent of
the phase.
⎡ ⎤
(︂ 2 )︂
𝜕 𝑛𝑎𝛼 ∑︁ 𝜕(𝑎𝛼)𝑖 𝜕(𝑎𝛼)𝑗 −0.5 𝜕𝑎𝛼 ⎦
= 2⎣ −𝑧𝑗 (𝑘𝑖𝑗 − 1)(𝑎𝛼)𝑖 (𝑎𝛼)𝑗 ((𝑎𝛼)𝑖 (𝑎𝛼)𝑗 ) − 0.5
𝜕𝑛𝑖 𝜕𝑇 𝑃,𝑛𝑖̸=𝑗 𝑗
𝜕𝑇 𝜕𝑇 𝜕𝑇
Returns
dna_alpha_dT_dns [list[float]] Composition derivative of da_alpha_dT of each compo-
nent, [kg*m^5/(mol^2*s^2*K)]
Notes
Returns
dna_alpha_dns [list[float]] Partial molar derivative of alpha of each component,
[kg*m^5/(mol^2*s^2)]
Notes
Returns
dnb_dns [list[float]] Partial molar derivative of b of each component, [m^3/mol]
Notes
Notes
It is important that the input string be in the same format as that created by GCEOS.as_json.
Examples
fugacities(only_l=False, only_g=False)
Helper method for calculating fugacity coefficients for any phases present, using either the overall mole
fractions for both phases or using specified mole fractions for each phase.
Requires fugacity_coefficients to be implemented by each subclassing EOS.
In addition to setting fugacities_l and/or fugacities_g, this also sets the fugacity coefficients phis_l and/or
phis_g.
𝑓ˆ𝑔
𝜑ˆ𝑔𝑖 = 𝑖
𝑦𝑖 𝑃
𝑓ˆ𝑙
𝜑ˆ𝑙𝑖 = 𝑖
𝑥𝑖 𝑃
Note that in a flash calculation, each phase requires their own EOS object.
Parameters
only_l [bool] When true, if there is a liquid and a vapor root, only the liquid root (and prop-
erties) will be set.
only_g [bool] When true, if there is a liquid and a vapor root, only the vapor root (and prop-
erties) will be set.
Notes
It is helpful to check that fugacity_coefficients has been implemented correctly using the following
expression, from [1].
[︂ ]︂
𝜕(𝑛 ln 𝜑)
ln 𝜑ˆ𝑖 =
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑗 ,𝑉𝑡
For reference, several expressions for fugacity of a component are as follows, shown in [1] and [2].
∫︁ 𝑃 (︃ ˆ )︃
𝑉𝑖 1
ln 𝜑ˆ𝑖 = − 𝑑𝑃
0 𝑅𝑇 𝑃
∫︁ ∞ [︂ ]︂
1 𝜕𝑃 1
ln 𝜑ˆ𝑖 = − 𝑑𝑉 − ln 𝑍
𝑉 𝑅𝑇 𝜕𝑛𝑖 𝑉
References
[1], [2]
fugacity_coefficients(Z)
Generic formula for calculating log fugacity coefficients for each species in a mixture. Verified numerically.
Applicable to all cubic equations of state which can be cast in the form used here. Normally this routine is
slower than EOS-specific ones, as it does not make assumptions that certain parameters are zero or equal
to other parameters.
(︂ )︂ (︂ )︂
𝜕𝑛 ln 𝜑 𝜕 ln 𝜑
= ln 𝜑𝑖 = ln 𝜑 + 𝑛
𝜕𝑛𝑖 𝑛𝑘̸=𝑖 𝜕𝑛𝑖 𝑛𝑘̸=𝑖
(︂ )︂ (︃(︂ )︂ )︃
𝜕 ln 𝜑 1 𝜕𝐺𝑑𝑒𝑝
=
𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗 𝑅𝑇 𝜕𝑛𝑖 𝑇,𝑃,𝑛𝑖̸=𝑗
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
log_phis [float] Log fugacity coefficient for each species, [-]
kwargs_linear = ()
Tuple of 1D arguments used by the specific EOS in addition to the conventional ones.
kwargs_square = ('kijs',)
Tuple of 2D arguments used by the specific EOS.
mechanical_critical_point()
Method to calculate the mechanical critical point of a mixture of defined composition.
The mechanical critical point is where:
𝜕𝑃 𝜕2𝑃
|𝑇 = |𝑇 = 0
𝜕𝜌 𝜕𝜌2
Returns
T [float] Mechanical critical temperature, [K]
P [float] Mechanical critical temperature, [Pa]
Notes
One useful application of the mechanical critical temperature is that the phase identification approach of
Venkatarathnam is valid only up to it.
Note that the equation of state, when solved at these conditions, will have fairly large (1e-3 - 1e-6) results
for the derivatives; but they are the minimum. This is just from floating point precision.
It can also be checked looking at the calculated molar volumes - all three (available with sorted_volumes)
will be very close (1e-5 difference in practice), again differing because of floating point error.
The algorithm here is a custom implementation, using Newton-Raphson’s method with the initial guesses
described in [1] (mole-weighted critical pressure average, critical temperature average using a quadratic
mixing rule). Normally ~4 iterations are needed to solve the system. It is relatively fast, as only one
evaluation of a_alpha and da_alpha_dT are needed per call to function and its jacobian.
References
[1], [2]
mix_kwargs_to_pure = {}
multicomponent = True
All inherited classes of GCEOSMIX are multicomponent.
nonstate_constants = ('N', 'cmps', 'Tcs', 'Pcs', 'omegas', 'kijs', 'kwargs', 'ais',
'bs')
property pseudo_Pc
Apply a linear mole-fraction mixing rule to compute the average critical pressure, [Pa].
Examples
>>> base.pseudo_Pc
3878000.0
property pseudo_Tc
Apply a linear mole-fraction mixing rule to compute the average critical temperature, [K].
Examples
>>> base.pseudo_Tc
151.9
property pseudo_a
Apply a linear mole-fraction mixing rule to compute the average a coefficient, [-].
Examples
>>> base.pseudo_a
0.17634464184
property pseudo_omega
Apply a linear mole-fraction mixing rule to compute the average omega, [-].
Examples
>>> base.pseudo_omega
0.0284
pures()
Helper method which returns a list of pure EOSs at the same T and P and base EOS as the mixture.
Returns
eos_pures [list[eos]] A list of pure-species EOSs at the same T and P as the system, [-]
Notes
This is useful for i.e. comparing mixture fugacities with the Lewis-Randall rule or when using an activity
coefficient model which require pure component fugacities.
scalar = True
Whether the model is implemented using pure-Python lists of floats, or numpy arrays of float64.
set_dnzs_derivatives_and_departures(n=True, x=True, only_l=False, only_g=False)
Sets a number of mole number and/or composition partial derivatives of thermodynamic partial derivatives.
The list of properties set is as follows, with all properties suffixed with ‘_l’ or ‘_g’
if n is True: d2P_dTdns, d2P_dVdns, d2V_dTdns, d2V_dPdns, d2T_dVdns, d2T_dPdns, d3P_dT2dns,
d3P_dV2dns, d3V_dT2dns, d3V_dP2dns, d3T_dV2dns, d3T_dP2dns, d3V_dPdTdns, d3P_dTdVdns,
d3T_dPdVdns, dV_dep_dns, dG_dep_dns, dH_dep_dns, dU_dep_dns, dS_dep_dns, dA_dep_dns
if x is True: d2P_dTdzs, d2P_dVdzs, d2V_dTdzs, d2V_dPdzs, d2T_dVdzs, d2T_dPdzs, d3P_dT2dzs,
d3P_dV2dzs, d3V_dT2dzs, d3V_dP2dzs, d3T_dV2dzs, d3T_dP2dzs, d3V_dPdTdzs, d3P_dTdVdzs,
d3T_dPdVdzs, dV_dep_dzs, dG_dep_dzs, dH_dep_dzs, dU_dep_dzs, dS_dep_dzs, dA_dep_dzs
Parameters
n [bool, optional] Whether or not to set the mole number derivatives (sums up to one), [-]
x [bool, optional] Whether or not to set the composition derivatives (does not sum up to one),
[-]
only_l [bool, optional] Whether or not to set only the liquid-like phase properties (if there
are two phases), [-]
only_g [bool, optional] Whether or not to set only the gas-like phase properties (if there are
two phases), [-]
solve_T(P, V, quick=True, solution=None)
Generic method to calculate T from a specified P and V. Provides SciPy’s newton solver, and it-
erates to solve the general equation for P, recalculating a_alpha as a function of temperature using
a_alpha_and_derivatives each iteration.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
quick [bool, optional] Unimplemented, although it may be possible to derive explicit expres-
sions as done for many pure-component EOS
solution [str or None, optional] ‘l’ or ‘g’ to specify a liquid of vapor solution (if one exists);
if None, will select a solution more likely to be real (closer to STP, attempting to avoid
temperatures like 60000 K or 0.0001 K).
Returns
T [float] Temperature, [K]
stabiliy_iteration_Michelsen(T, P, zs, Ks_initial=None, maxiter=20, xtol=1e-12, liq=True)
subset(idxs, **state_specs)
Method to construct a new GCEOSMIX that removes all components not specified in the idxs argument.
Parameters
idxs [list[int] or Slice] Indexes of components that should be included, [-]
Returns
subset_eos [GCEOSMIX] Multicomponent GCEOSMIX at the same specified specs but with a
composition normalized to 1 and with fewer components, [-]
state_specs [float] Keyword arguments which can be any of T, P, V, zs; zs is optional, as are
(T, P, V ), but if any of (T, P, V ) are specified, a second one is required as well, [various]
Notes
Subclassing equations of state require their kwargs_linear and kwargs_square attributes to be correct
for this to work. Tcs, Pcs, and omegas are always assumed to be used.
Examples
>>> kijs = [[0.0, 0.00076, 0.00171], [0.00076, 0.0, 0.00061], [0.00171, 0.00061,
˓→ 0.0]]
˓→P=101325.0, kijs=kijs)
>>> PR3.subset([1,2])
PRMIX(Tcs=[507.4, 540.3], Pcs=[3012000.0, 2736000.0], omegas=[0.305, 0.349],␣
˓→kijs=[[0.0, 0.00061], [0.00061, 0.0]], zs=[0.8193231441048036, 0.
Notes
Constructs the object with parameters Tcs, Pcs, omegas, and kwargs.
Examples
to_PV(P, V )
Method to construct a new GCEOSMIX object at the spcified P and V with the current composition. In the
event the P and V match the current object’s P and V, it will be returned unchanged.
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
Returns
obj [GCEOSMIX] Pure component GCEOSMIX at specified P and V, [-]
Notes
Constructs the object with parameters Tcs, Pcs, omegas, and kwargs.
Examples
Parameters
P [float] Pressure, [Pa]
V [float] Molar volume, [m^3/mol]
zs [list[float]] Mole fractions of each component, [-]
fugacities [bool] Whether or not to calculate and set the fugacities of each component, [-]
only_l [bool] When true, if there is a liquid and a vapor root, only the liquid root (and prop-
erties) will be set.
only_g [bool] When true, if there is a liquid and a vapor root, only the vapor root (and prop-
erties) will be set.
Returns
eos [GCEOSMIX] Multicomponent GCEOSMIX at the specified conditions [-]
Notes
A check for whether or not P, V, and zs are the same as the existing instance is performed; if it is, the
existing object is returned.
Examples
to_TP(T, P)
Method to construct a new GCEOSMIX object at the spcified T and P with the current composition. In the
event the T and P match the current object’s T and P, it will be returned unchanged.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
Returns
obj [GCEOSMIX] Pure component GCEOSMIX at specified T and P, [-]
Notes
Constructs the object with parameters Tcs, Pcs, omegas, and kwargs.
Examples
Notes
A check for whether or not T, P, and zs are the same as the existing instance is performed; if it is, the existing
object is returned.
Examples
Examples
to_TV(T, V )
Method to construct a new GCEOSMIX object at the spcified T and V with the current composition. In the
event the T and V match the current object’s T and V, it will be returned unchanged.
Parameters
T [float] Temperature, [K]
V [float] Molar volume, [m^3/mol]
Returns
obj [GCEOSMIX] Pure component GCEOSMIX at specified T and V, [-]
Notes
Constructs the object with parameters Tcs, Pcs, omegas, and kwargs.
Examples
to_mechanical_critical_point()
Method to construct a new GCEOSMIX object at the current object’s properties and composition, but which
is at the mechanical critical point.
Returns
obj [GCEOSMIX] Pure component GCEOSMIX at mechanical critical point [-]
Examples
>>> base.to_mechanical_critical_point()
RKMIX(Tcs=[126.1, 190.6], Pcs=[3394000.0, 4604000.0], omegas=[0.04, 0.011],␣
˓→kijs=[[0.0, 0.0], [0.0, 0.0]], zs=[0.6, 0.4], T=151.861, P=3908737.9)
translated = False
Whether or not the model implements volume translation.
class thermo.eos_mix.PRMIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, fugacities=True,
only_l=False, only_g=False)
Bases: thermo.eos_mix.GCEOSMIX, thermo.eos.PR
Class for solving the Peng-Robinson [1] [2] cubic equation of state for a mixture of any number of compounds.
Subclasses PR. Solves the EOS on initialization and calculates fugacities for all components in all phases.
Two of T, P, and V are needed to solve the EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 − 𝑇𝑟,𝑖 )]2
√︀
Notes
References
[1], [2]
Examples
Attributes
d2delta_dninjs Helper method for calculating the second mole number derivatives (hessian)
of delta.
d2delta_dzizjs Helper method for calculating the second composition derivatives (hessian)
of delta.
d2epsilon_dninjs Helper method for calculating the second mole number derivatives (hes-
sian) of epsilon.
d2epsilon_dzizjs Helper method for calculating the second composition derivatives (hes-
sian) of epsilon.
d3a_alpha_dT3 Method to calculate approximately the third temperature derivative of a_alpha
for the PR EOS.
d3delta_dninjnks Helper method for calculating the third partial mole number derivatives of
delta.
d3epsilon_dninjnks Helper method for calculating the third partial mole number derivatives
of epsilon.
ddelta_dns Helper method for calculating the mole number derivatives of delta.
ddelta_dzs Helper method for calculating the composition derivatives of delta.
depsilon_dns Helper method for calculating the mole number derivatives of epsilon.
depsilon_dzs Helper method for calculating the composition derivatives of epsilon.
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the PR EOS.
This vectorized implementation is added for extra speed.
)︂2
𝑇 0.5
(︂ (︂ )︂
𝑎𝛼 = 𝑎 𝜅 − 0.5 + 1 + 1
𝑇𝑐
𝑇 0.5
(︂ (︂ )︂ )︂
𝑑𝑎𝛼 1.0𝑎𝜅
= − 0.5 0.5 𝜅 − 0.5 + 1 + 1
𝑑𝑇 𝑇 𝑇𝑐 𝑇𝑐
𝑑2 𝑎𝛼
(︂ (︂ (︂ 0.5 )︂ )︂ )︂
1 𝑇 𝜅
= 0.5𝑎𝜅 − 𝜅 − 1 − 1 +
𝑑𝑇 2 𝑇 1.5 𝑇 𝑐0.5 𝑇 𝑐0.5 𝑇 1.0 𝑇 𝑐1.0
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the PR EOS. This vectorized implementation is added
for extra speed.
)︂2
𝑇 0.5
(︂ (︂ )︂
𝑎𝛼 = 𝑎 𝜅 − 0.5 + 1 + 1
𝑇𝑐
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
property d2delta_dninjs
Helper method for calculating the second mole number derivatives (hessian) of delta. Note this is indepen-
dent of the phase.
𝜕2𝛿
(︂ )︂
= 4𝑏 − 2𝑏𝑖 − 2𝑏𝑗
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2delta_dninjs [list[list[float]]] Second mole number derivative of delta of each component,
[m^3/mol^3]
Notes
Returns
d2delta_dzizjs [list[float]] Second Composition derivative of delta of each component,
[m^3/mol]
Notes
Returns
d2epsilon_dninjs [list[list[float]]] Second mole number derivative of epsilon of each com-
ponent, [m^6/mol^4]
Notes
𝜕2𝜖
(︂ )︂
= 2𝑏𝑖 𝑏𝑗
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑘̸=𝑖,𝑗
Returns
d2epsilon_dzizjs [list[list[float]]] Second composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
property d3delta_dninjnks
Helper method for calculating the third partial mole number derivatives of delta. Note this is independent
of the phase.
𝜕3𝛿
(︂ )︂
= 4(−3𝑏 + 𝑏𝑖 + 𝑏𝑗 + 𝑏𝑘 )
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dninjnks [list[list[list[float]]]] Third mole number derivative of delta of each com-
ponent, [m^3/mol^4]
Notes
𝜕3𝜖
(︂ )︂
= 24𝑏2 − 12𝑏(𝑏𝑖 + 𝑏𝑗 + 𝑏𝑘 ) + 4(𝑏𝑖 𝑏𝑗 + 𝑏𝑖 𝑏𝑘 + 𝑏𝑗 𝑏𝑘 )
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3epsilon_dninjnks [list[list[list[float]]]] Third mole number derivative of epsilon of each
component, [m^6/mol^5]
Notes
Returns
ddelta_dns [list[float]] Mole number derivative of delta of each component, [m^3/mol^2]
Notes
Returns
ddelta_dzs [list[float]] Composition derivative of delta of each component, [m^3/mol]
Notes
Returns
depsilon_dns [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^3]
Notes
Returns
depsilon_dzs [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^2]
Notes
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dP [float] Pressure derivatives of log fugacity coefficient for each species, [1/Pa]
Notes
This expression was derived using SymPy and optimized with the cse technique.
dlnphis_dT(phase)
Formula for calculating the temperature derivaitve of log fugacity coefficients for each species in a mixture
for the Peng-Robinson equation of state. Verified numerically.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑇 𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dT [float] Temperature derivatives of log fugacity coefficient for each species, [1/K]
Notes
This expression was derived using SymPy and optimized with the cse technique.
dlnphis_dzs(Z)
Calculate and return the mole fraction derivaitves of log fugacity coefficients for each species in a mixture.
This formula is specific to the Peng-Robinson equation of state.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑧𝑖 𝑃,𝑧𝑗̸=𝑖
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
dlnphis_dzs [list[list[float]]] Mole fraction derivatives of log fugacity coefficient for each
species (such that the mole fractions do not sum to 1), [-]
Notes
This formula is from [1] but is validated to match the generic implementation.
References
[1]
Examples
>>> kijs = [[0, 0.00076, 0.00171], [0.00076, 0, 0.00061], [0.00171, 0.00061, 0]]
>>> eos = PRMIX(Tcs=[469.7, 507.4, 540.3], zs=[0.8168, 0.1501, 0.0331],␣
˓→omegas=[0.249, 0.305, 0.349], Pcs=[3.369E6, 3.012E6, 2.736E6], T=322.29,␣
˓→P=101325, kijs=kijs)
>>> eos.dlnphis_dzs(eos.Z_l)
[[0.009938069276, 0.0151503498382, 0.018297235797], [-0.038517738793, -0.
˓→05958926042, -0.068438990795], [-0.07057106923, -0.10363920720, -0.
˓→14116283024]]
(continues on next page)
eos_pure
alias of thermo.eos.PR
fugacity_coefficients(Z)
Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically.
Applicable to most derivatives of the Peng-Robinson equation of state as well. Called by fugacities on
initialization, or by a solver routine which is performing a flash calculation.
[︃ ]︃ [︃ √ ]︃
ˆ 𝐵𝑖 𝐴 𝐵𝑖 2 ∑︁ 𝑍 + (1 + 2)𝐵
ln 𝜑𝑖 = (𝑍 − 1) − ln(𝑍 − 𝐵) + √ − 𝑦𝑖 (𝑎𝛼)𝑖𝑗 ln √
𝐵 2 2𝐵 𝐵 𝑎𝛼 𝑖 𝑍 − ( 2 − 1)𝐵
(𝑎𝛼)𝑃
𝐴=
𝑅2 𝑇 2
𝑏𝑃
𝐵=
𝑅𝑇
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
log_phis [float] Log fugacity coefficient for each species, [-]
class thermo.eos_mix.PR78MIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, fugacities=True,
only_l=False, only_g=False)
Bases: thermo.eos_mix.PRMIX
Class for solving the Peng-Robinson cubic equation of state for a mixture of any number of compounds according
to the 1978 variant. Subclasses PR. Solves the EOS on initialization and calculates fugacities for all components
in all phases.
Two of T, P, and V are needed to solve the EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 − 𝑇𝑟,𝑖 )]2
√︀
Parameters
Tcs [float] Critical temperatures of all compounds, [K]
Pcs [float] Critical pressures of all compounds, [Pa]
omegas [float] Acentric factors of all compounds, [-]
zs [float] Overall mole fractions of all species, [-]
kijs [list[list[float]], optional] n*n size list of lists with binary interaction parameters for the Van
der Waals mixing rules, default all 0 [-]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
fugacities [bool, optional] Whether or not to calculate fugacity related values (phis, log phis,
and fugacities); default True, [-]
only_l [bool, optional] When true, if there is a liquid and a vapor root, only the liquid root (and
properties) will be set; default False, [-]
only_g [bool, optional] When true, if there is a liquid and a vapor root, only the vapor root (and
properties) will be set; default False, [-]
Notes
References
[1], [2]
Examples
T-P initialization, nitrogen-methane at 115 K and 1 MPa, with modified acentric factors to show the difference
between PRMIX
Methods
eos_pure
alias of thermo.eos.PR78
class thermo.eos_mix.PRSVMIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, kappa1s=None,
fugacities=True, only_l=False, only_g=False)
Bases: thermo.eos_mix.PRMIX, thermo.eos.PRSV
Class for solving the Peng-Robinson-Stryjek-Vera equations of state for a mixture as given in [1]. Subclasses
PRMIX and PRSV. Solves the EOS on initialization and calculates fugacities for all components in all phases.
Inherits the method of calculating fugacity coefficients from PRMIX. Two of T, P, and V are needed to solve the
EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 − 𝑇𝑟,𝑖 )]2
√︀
0.5
𝜅𝑖 = 𝜅0,𝑖 + 𝜅1,𝑖 (1 + 𝑇𝑟,𝑖 )(0.7 − 𝑇𝑟,𝑖 )
kappa1s [list[float], optional] Fit parameter; available in [1] for over 90 compounds,
SRKMIXTranslated[-]
fugacities [bool, optional] Whether or not to calculate fugacity related values (phis, log phis,
and fugacities); default True, [-]
only_l [bool, optional] When true, if there is a liquid and a vapor root, only the liquid root (and
properties) will be set; default False, [-]
only_g [bool, optional] When true, if there is a liquid and a vapor root, only the vapor root (and
properties) will be set; default False, [-]
Notes
[1] recommends that kappa1 be set to 0 for Tr > 0.7. This is not done by default; the class boolean kappa1_Tr_limit
may be set to True and the problem re-solved with that specified if desired. kappa1_Tr_limit is not supported for
P-V inputs.
For P-V initializations, a numerical solver is used to find T.
[2] and [3] are two more resources documenting the PRSV EOS. [4] lists kappa values for 69 additional com-
pounds. See also PRSV2MIX. Note that tabulated kappa values should be used with the critical parameters used
in their fits. Both [1] and [4] only considered vapor pressure in fitting the parameter.
References
Examples
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the PRSV EOS.
This vectorized implementation is added for extra speed.
(︃(︃ (︃√︂ )︃ (︂ )︂)︃ (︃ √︂ )︃ )︃2
𝑇 𝑇 7 𝑇
𝑎𝛼 = 𝑎 𝜅0 + 𝜅1 +1 − + − +1 +1
𝑇𝑐 𝑇 𝑐 10 𝑇𝑐
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the PRSV EOS. This vectorized implementation is
added for extra speed.
(︃(︃ (︃√︂ )︃ (︂ )︂)︃ (︃ √︂ )︃ )︃2
𝑇 𝑇 7 𝑇
𝑎𝛼 = 𝑎 𝜅0 + 𝜅1 +1 − + − +1 +1
𝑇𝑐 𝑇 𝑐 10 𝑇𝑐
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
eos_pure
alias of thermo.eos.PRSV
class thermo.eos_mix.PRSV2MIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, kappa1s=None,
kappa2s=None, kappa3s=None, fugacities=True, only_l=False,
only_g=False)
Bases: thermo.eos_mix.PRMIX, thermo.eos.PRSV2
Class for solving the Peng-Robinson-Stryjek-Vera 2 equations of state for a Mixture as given in [1]. Subclasses
PRMIX and PRSV2 <thermo.eos.PRSV2>. Solves the EOS on initialization and calculates fugacities for all com-
ponents in all phases.
Inherits the method of calculating fugacity coefficients from PRMIX. Two of T, P, and V are needed to solve the
EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 − 𝑇𝑟,𝑖 )]2
√︀
0.5 0.5
𝜅𝑖 = 𝜅0,𝑖 + [𝜅1,𝑖 + 𝜅2,𝑖 (𝜅3,𝑖 − 𝑇𝑟,𝑖 )(1 − 𝑇𝑟,𝑖 )](1 + 𝑇𝑟,𝑖 )(0.7 − 𝑇𝑟,𝑖 )
Notes
References
[1]
Examples
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the PRSV2
EOS. This vectorized implementation is added for extra speed.
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the PRSV2 EOS. This vectorized implementation is
added for extra speed.
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Examples
>>> eos.a_alphas_vectorized(300)
[0.0860568595, 0.20174345803]
eos_pure
alias of thermo.eos.PRSV2
class thermo.eos_mix.TWUPRMIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, fugacities=True,
only_l=False, only_g=False)
Bases: thermo.eos_alpha_functions.TwuPR95_a_alpha, thermo.eos_mix.PRMIX
Class for solving the Twu [1] variant of the Peng-Robinson cubic equation of state for a mixture. Solves the EOS
on initialization and calculates fugacities for all components in all phases.
Two of T, P, and V are needed to solve the EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑣 − 𝑏 𝑣(𝑣 + 𝑏) + 𝑏(𝑣 − 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
(0) (1) (0)
𝛼𝑖 = 𝛼𝑖 + 𝜔𝑖 (𝛼𝑖 − 𝛼𝑖 )
𝛼(0 or 1) = 𝑇𝑟,𝑖
𝑁 (𝑀 −1) 𝑁𝑀
exp[𝐿(1 − 𝑇𝑟,𝑖 )]
For sub-critical conditions:
L0, M0, N0 = 0.125283, 0.911807, 1.948150;
L1, M1, N1 = 0.511614, 0.784054, 2.812520
For supercritical conditions:
L0, M0, N0 = 0.401219, 4.963070, -0.2;
L1, M1, N1 = 0.024955, 1.248089, -8.
Parameters
Tcs [float] Critical temperatures of all compounds, [K]
Pcs [float] Critical pressures of all compounds, [Pa]
omegas [float] Acentric factors of all compounds, [-]
Notes
For P-V initializations, a numerical solver is used to find T. Claimed to be more accurate than the PR, PR78 and
PRSV equations.
References
[1]
Examples
Methods
eos_pure
alias of thermo.eos.TWUPR
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 − 𝑇𝑟,𝑖 )]2
√︀
Notes
References
[1], [2]
Examples
˓→0]])
Attributes
d2delta_dninjs Helper method for calculating the second mole number derivatives (hessian)
of delta.
d2delta_dzizjs Helper method for calculating the second composition derivatives (hessian)
of delta.
d2epsilon_dninjs Helper method for calculating the second mole number derivatives (hes-
sian) of epsilon.
d2epsilon_dzizjs Helper method for calculating the second composition derivatives (hes-
sian) of epsilon.
d3delta_dninjnks Helper method for calculating the third partial mole number derivatives of
delta.
d3delta_dzizjzks Helper method for calculating the third composition derivatives of delta.
d3epsilon_dninjnks Helper method for calculating the third partial mole number derivatives
of epsilon.
d3epsilon_dzizjzks Helper method for calculating the third composition derivatives of ep-
silon.
ddelta_dns Helper method for calculating the mole number derivatives of delta.
ddelta_dzs Helper method for calculating the composition derivatives of delta.
depsilon_dns Helper method for calculating the mole number derivatives of epsilon.
depsilon_dzs Helper method for calculating the composition derivatives of epsilon.
Methods
property d2delta_dninjs
Helper method for calculating the second mole number derivatives (hessian) of delta. Note this is indepen-
dent of the phase. 𝑏0 refers to the original b parameter not involving any translation.
𝜕2𝛿
(︂ )︂
= 2 𝛿 − 𝑏0𝑖 − 𝑏0𝑗 − 𝑐𝑖 − 𝑐𝑗
(︀ )︀
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2delta_dninjs [list[list[float]]] Second mole number derivative of delta of each component,
[m^3/mol^3]
Notes
Returns
d2delta_dzizjs [list[float]] Second Composition derivative of delta of each component,
[m^3/mol]
Notes
Returns
d2epsilon_dninjs [list[list[float]]] Second mole number derivative of epsilon of each com-
ponent, [m^6/mol^4]
Notes
𝜕2𝜖
(︂ )︂
= −2𝑏0𝑖 𝑏0𝑗 + 2𝑏0𝑖 𝑐𝑗 + 2𝑏0𝑗 𝑐𝑖 + 2𝑐𝑖 𝑐𝑗
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑘̸=𝑖,𝑗
Returns
d2epsilon_dzizjs [list[list[float]]] Second composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
𝜕3𝛿
(︂ )︂
= 4 𝑏0𝑖 + 𝑏0𝑗 + 𝑏0𝑘 + 𝑐𝑖 + 𝑐𝑗 + 𝑐𝑘 − 6𝛿
(︀ )︀
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dninjnks [list[list[list[float]]]] Third mole number derivative of delta of each com-
ponent, [m^3/mol^4]
Notes
𝜕3𝛿
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dzizjzks [list[list[list[float]]]] Third composition derivative of epsilon of each com-
ponent, [m^6/mol^5]
Notes
𝜕3𝜖
(︂ )︂
= 4𝑏0 (3𝑏0 − 𝑏0𝑖 − 𝑏0𝑗 − 𝑏0𝑘 ) − 2𝑐(6𝑏0 − 2(𝑏0𝑖 + 𝑏0𝑗 + 𝑏0𝑘 ) + 3𝑐 − (𝑐𝑖 + 𝑐𝑗 + 𝑐𝑘 )) + 2(𝑏0 − 𝑏0𝑖 )(2
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3epsilon_dninjnks [list[list[list[float]]]] Third mole number derivative of epsilon of each
component, [m^6/mol^5]
Notes
𝜕3𝜖
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d2epsilon_dzizjzks [list[list[list[float]]]] Composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
Returns
ddelta_dns [list[float]] Mole number derivative of delta of each component, [m^3/mol^2]
Notes
Returns
ddelta_dzs [list[float]] Composition derivative of delta of each component, [m^3/mol]
Notes
Returns
depsilon_dns [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^3]
Notes
Returns
depsilon_dzs [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^2]
Notes
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
(︂ )︂𝑐3 (𝑐2 −1)
𝑇 𝑐2 𝑐3
𝑒𝑐1 (−( 𝑇𝑐 ) +1)
𝑇
𝛼𝑖 =
𝑇𝑐
If c is not provided, they are estimated as:
𝑅𝑇𝑐
𝑐= (0.0198𝜔 − 0.0065)
𝑃𝑐
If alpha_coeffs is not provided, the parameters L and M are estimated from the acentric factor as follows:
Notes
References
[1]
Examples
Methods
eos_pure
alias of thermo.eos.PRTranslatedConsistent
𝑅2 𝑇𝑐,𝑖
2
𝑎𝑖 = 0.45724
𝑃𝑐,𝑖
𝑅𝑇𝑐,𝑖
𝑏𝑖 = 0.07780
𝑃𝑐,𝑖
𝑇𝑟,𝑖 )]2
√︀
𝛼(𝑇 )𝑖 = [1 + 𝜅𝑖 (1 −
Notes
References
[1]
Examples
˓→[0.03,0]])
Methods
eos_pure
alias of thermo.eos.PRTranslatedPPJP
Standard SRK
class thermo.eos_mix.SRKMIX(Tcs, Pcs, omegas, zs, kijs=None, T=None, P=None, V=None, fugacities=True,
only_l=False, only_g=False)
Bases: thermo.eos_mix.EpsilonZeroMixingRules, thermo.eos_mix.GCEOSMIX, thermo.eos.SRK
Class for solving the Soave-Redlich-Kwong cubic equation of state for a mixture of any number of compounds.
Solves the EOS on initialization and calculates fugacities for all components in all phases.
The implemented method here is fugacity_coefficients, which implements the formula for fugacity coef-
ficients in a mixture as given in [1]. Two of T, P, and V are needed to solve the EOS.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 (𝑉 + 𝑏)
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
(︃ )︃
𝑅2 (𝑇𝑐,𝑖 )2 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √3
=
9( 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
[︃ (︃ √︃ )︃]︃2
𝑇
𝛼(𝑇 )𝑖 = 1 + 𝑚𝑖 1−
𝑇𝑐,𝑖
Notes
References
Examples
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the SRK EOS.
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
dlnphis_dP(phase)
Generic formula for calculating the pressure derivaitve of log fugacity coefficients for each species in a
mixture for the SRK EOS. Verified numerically.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑃 𝑇,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dP [float] Pressure derivatives of log fugacity coefficient for each species, [1/Pa]
Notes
This expression was derived using SymPy and optimized with the cse technique.
dlnphis_dT(phase)
Formula for calculating the temperature derivaitve of log fugacity coefficients for each species in a mixture
for the SRK equation of state. Verified numerically.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑇 𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dT [float] Temperature derivatives of log fugacity coefficient for each species, [1/K]
Notes
This expression was derived using SymPy and optimized with the cse technique.
eos_pure
alias of thermo.eos.SRK
fugacity_coefficients(Z)
Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically.
Applicable to most derivatives of the SRK equation of state as well. Called by fugacities on initializa-
tion, or by a solver routine which is performing a flash calculation.
[︃ ]︃ (︂ )︂
ˆ 𝐵𝑖 𝐴 𝐵𝑖 2 ∑︁ 𝐵
ln 𝜑𝑖 = (𝑍 − 1) − ln(𝑍 − 𝐵) + − 𝑦𝑖 (𝑎𝛼)𝑖𝑗 ln 1 +
𝐵 𝐵 𝐵 𝑎𝛼 𝑖 𝑍
𝑎𝛼𝑃
𝐴=
𝑅2 𝑇 2
𝑏𝑃
𝐵=
𝑅𝑇
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
log_phis [float] Log fugacity coefficient for each species, [-]
(︃ )︃
𝑅2 (𝑇𝑐,𝑖 )2 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √3
=
9( 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
(0,𝑖)
𝛼𝑖 = 𝛼 + 𝜔𝑖 (𝛼(1,𝑖) − 𝛼(0,𝑖) )
𝛼(0 or 1, i) = 𝑇𝑟,𝑖
𝑁 (𝑀 −1) 𝑁𝑀
exp[𝐿(1 − 𝑇𝑟,𝑖 )]
For sub-critical conditions:
L0, M0, N0 = 0.141599, 0.919422, 2.496441
L1, M1, N1 = 0.500315, 0.799457, 3.291790
For supercritical conditions:
L0, M0, N0 = 0.441411, 6.500018, -0.20
L1, M1, N1 = 0.032580, 1.289098, -8.0
Parameters
Tcs [float] Critical temperatures of all compounds, [K]
Pcs [float] Critical pressures of all compounds, [Pa]
omegas [float] Acentric factors of all compounds, [-]
zs [float] Overall mole fractions of all species, [-]
kijs [list[list[float]], optional] n*n size list of lists with binary interaction parameters for the Van
der Waals mixing rules, default all 0 [-]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
fugacities [bool, optional] Whether or not to calculate fugacity related values (phis, log phis,
and fugacities); default True, [-]
only_l [bool, optional] When true, if there is a liquid and a vapor root, only the liquid root (and
properties) will be set; default False, [-]
only_g [bool, optional] When true, if there is a liquid and a vapor root, only the vapor root (and
properties) will be set; default False, [-]
Notes
For P-V initializations, a numerical solver is used to find T. Claimed to be more accurate than the SRK equation.
References
[1]
Examples
Methods
eos_pure
alias of thermo.eos.TWUSRK
API SRK
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
[︃ √︀ ]︃2
(︁ √︀ )︁ 1 − 𝑇𝑟,𝑖
𝛼(𝑇 )𝑖 = 1 + 𝑆1,𝑖 1 − 𝑇𝑟,𝑖 + 𝑆2,𝑖 √︀
𝑇𝑟,𝑖
Notes
References
[1]
Examples
Methods
eos_pure
alias of thermo.eos.APISRK
SRK Translated
Notes
Examples
˓→03,0]])
Attributes
d2delta_dninjs Helper method for calculating the second mole number derivatives (hessian)
of delta.
d2delta_dzizjs Helper method for calculating the second composition derivatives (hessian)
of delta.
d2epsilon_dninjs Helper method for calculating the second mole number derivatives (hes-
sian) of epsilon.
d2epsilon_dzizjs Helper method for calculating the second composition derivatives (hes-
sian) of epsilon.
d3delta_dninjnks Helper method for calculating the third partial mole number derivatives of
delta.
d3delta_dzizjzks Helper method for calculating the third composition derivatives of delta.
d3epsilon_dninjnks Helper method for calculating the third partial mole number derivatives
of epsilon.
d3epsilon_dzizjzks Helper method for calculating the third composition derivatives of ep-
silon.
ddelta_dns Helper method for calculating the mole number derivatives of delta.
ddelta_dzs Helper method for calculating the composition derivatives of delta.
depsilon_dns Helper method for calculating the mole number derivatives of epsilon.
depsilon_dzs Helper method for calculating the composition derivatives of epsilon.
Methods
property d2delta_dninjs
Helper method for calculating the second mole number derivatives (hessian) of delta. Note this is indepen-
dent of the phase. 𝑏0 refers to the original b parameter not involving any translation.
𝜕2𝛿
(︂ )︂
= (𝑏0 − 𝑐𝑖 − 𝑐𝑗 ) + 4𝑐 − 𝑏0𝑖 − 𝑏0𝑗
(︀ )︀
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2delta_dninjs [list[list[float]]] Second mole number derivative of delta of each component,
[m^3/mol^3]
Notes
Returns
d2delta_dzizjs [list[float]] Second Composition derivative of delta of each component,
[m^3/mol]
Notes
Returns
d2epsilon_dninjs [list[list[float]]] Second mole number derivative of epsilon of each com-
ponent, [m^6/mol^4]
Notes
𝜕2𝜖
(︂ )︂
= 𝑏0𝑖 𝑐𝑗 + 𝑏0𝑗 𝑐𝑖 + 2𝑐𝑖 𝑐𝑗
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑇,𝑃,𝑥𝑘̸=𝑖,𝑗
Returns
d2epsilon_dzizjs [list[list[float]]] Second composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
𝜕3𝛿
(︂ )︂
= −6𝑏0 + 2(𝑏0𝑖 + 𝑏0𝑗 + 𝑏0𝑘 ) + −12𝑐 + 4(𝑐𝑖 + 𝑐𝑗 + 𝑐𝑘 )
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dninjnks [list[list[list[float]]]] Third mole number derivative of delta of each com-
ponent, [m^3/mol^4]
Notes
𝜕3𝛿
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dzizjzks [list[list[list[float]]]] Third composition derivative of epsilon of each com-
ponent, [m^6/mol^5]
Notes
𝜕3𝜖
(︂ )︂
= −2𝑏0 (3𝑐 − 𝑐𝑖 − 𝑐𝑗 − 𝑐𝑘 ) − 2𝑐(3𝑏0 − 𝑏0𝑖 − 𝑏0𝑗 − 𝑏0𝑘 ) − 4𝑐(3𝑐 − 𝑐𝑖 − 𝑐𝑗 − 𝑐𝑘 ) − (𝑏0 − 𝑏0𝑖 )(2𝑐
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3epsilon_dninjnks [list[list[list[float]]]] Third mole number derivative of epsilon of each
component, [m^6/mol^5]
Notes
𝜕3𝜖
(︂ )︂
=0
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 𝑇,𝑃,𝑥𝑚̸=𝑖,𝑗,𝑘
Returns
d2epsilon_dzizjzks [list[list[list[float]]]] Composition derivative of epsilon of each compo-
nent, [m^6/mol^2]
Notes
Returns
ddelta_dns [list[float]] Mole number derivative of delta of each component, [m^3/mol^2]
Notes
Returns
ddelta_dzs [list[float]] Composition derivative of delta of each component, [m^3/mol]
Notes
Returns
depsilon_dns [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^3]
Notes
Returns
depsilon_dzs [list[float]] Composition derivative of epsilon of each component,
[m^6/mol^2]
Notes
SRK Translated-Consistent
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
(︂ )︂𝑐3 (𝑐2 −1) (︁ (︁ )︁𝑐 𝑐 )︁
𝑇 𝑐1 − 𝑇𝑇
2 3
+1
𝛼𝑖 = 𝑒 𝑐,𝑖
𝑇𝑐,𝑖
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
(︃ )︃
𝑅2 (𝑇𝑐,𝑖 )2 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √3
=
9( 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
If cs is not provided, they are estimated as:
𝑅𝑇𝑐
𝑐= (0.0172𝜔 − 0.0096)
𝑃𝑐
If alpha_coeffs is not provided, the parameters L and M are estimated from each of the acentric factors as follows:
Notes
References
[1]
Examples
Methods
eos_pure
alias of thermo.eos.SRKTranslatedConsistent
MSRK Translated
(︃ )︃
𝑅2 (𝑇𝑐,𝑖 )2 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √3
=
9( 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
This is an older correlation that offers lower accuracy on many properties which were sacrificed to obtain the
vapor pressure accuracy. The alpha function of this EOS does not meet any of the consistency requriements for
alpha functions.
Coefficients can be found in [2], or estimated with the method in [3]. The estimation method in [3] works as
follows, using the acentric factor and true critical compressibility:
Notes
References
Examples
Methods
eos_pure
alias of thermo.eos.MSRKTranslated
class thermo.eos_mix.PSRK(Tcs, Pcs, omegas, zs, alpha_coeffs, ge_model, kijs=None, cs=None, T=None,
P=None, V=None, fugacities=True, only_l=False, only_g=False)
Bases: thermo.eos_alpha_functions.Mathias_Copeman_poly_a_alpha, thermo.eos_mix.
PSRKMixingRules, thermo.eos_mix.SRKMIXTranslated
Class for solving the Predictive Soave-Redlich-Kwong [1] equation of state for a mixture of any number of
compounds. Solves the EOS on initialization.
Two of T, P, and V are needed to solve the EOS.
Warning: This class is not complete! Fugacities and their derivatives among others are not yet implemented.
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 (𝑉 + 𝑏)
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
(︃ )︃
2 2
𝑅 (𝑇𝑐,𝑖 ) 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √ =
9( 3 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
Parameters
Tcs [float] Critical temperatures of all compounds, [K]
Pcs [float] Critical pressures of all compounds, [Pa]
omegas [float] Acentric factors of all compounds, [-]
zs [float] Overall mole fractions of all species, [-]
alpha_coeffs [list[list[float]]] Coefficients for thermo.eos_alpha_functions.
Mathias_Copeman_poly_a_alpha, [-]
ge_model [thermo.activity.GibbsExcess object] Excess Gibbs free energy model; to
match the PSRK model, this is a thermo.unifac.UNIFAC object, [-]
kijs [list[list[float]], optional] n*n size list of lists with binary interaction parameters for the Van
der Waals mixing rules, default all 0 [-]
cs [list[float], optional] Volume translation parameters; always zero in the original implementa-
tion, [m^3/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
V [float, optional] Molar volume, [m^3/mol]
fugacities [bool, optional] Whether or not to calculate fugacity related values (phis, log phis,
and fugacities); default True, [-]
only_l [bool, optional] When true, if there is a liquid and a vapor root, only the liquid root (and
properties) will be set; default False, [-]
only_g [bool, optional] When true, if there is a liquid and a vapor root, only the vapor root (and
properties) will be set; default False, [-]
References
[1]
Examples
>>> T = 313.
>>> P = 1E6
>>> ge_model = UNIFAC.from_subgroups(T=T, xs=zs, chemgroups=[{117: 1}, {1:2, 2:4}],␣
˓→subgroups=PSRKSG, interaction_data=PSRKIP, version=0)
>>> eos
(continues on next page)
˓→vs=[[0, 2], [0, 4], [1, 0]], psi_abc=([[0.0, 0.0, 919.8], [0.0, 0.0, 919.8], [-38.
˓→672, -38.672, 0.0]], [[0.0, 0.0, -3.9132], [0.0, 0.0, -3.9132], [0.8615, 0.8615,␣
Methods
eos_pure
alias of thermo.eos.SRKTranslated
Notes
References
[1], [2]
Examples
Attributes
d2delta_dninjs Helper method for calculating the second mole number derivatives (hessian)
of delta.
d2delta_dzizjs Helper method for calculating the second composition derivatives (hessian)
of delta.
d3delta_dninjnks Helper method for calculating the third partial mole number derivatives of
delta.
ddelta_dns Helper method for calculating the mole number derivatives of delta.
ddelta_dzs Helper method for calculating the composition derivatives of delta.
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the VDW EOS.
This vectorized implementation is added for extra speed.
𝑎𝛼 = 𝑎
𝑑𝑎𝛼
=0
𝑑𝑇
𝑑2 𝑎𝛼
=0
𝑑𝑇 2
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the VDW EOS. This vectorized implementation is
added for extra speed.
𝑎𝛼 = 𝑎
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
property d2delta_dninjs
Helper method for calculating the second mole number derivatives (hessian) of delta. Note this is indepen-
dent of the phase.
𝜕2𝛿
(︂ )︂
=0
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2delta_dninjs [list[list[float]]] Second mole number derivative of delta of each component,
[m^3/mol^3]
Notes
Returns
d2delta_dzizjs [list[float]] Second Composition derivative of delta of each component,
[m^3/mol]
Notes
𝜕3𝛿
(︂ )︂
=0
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dninjnks [list[list[list[float]]]] Third mole number derivative of delta of each com-
ponent, [m^3/mol^4]
Notes
Returns
ddelta_dns [list[float]] Mole number derivative of delta of each component, [m^3/mol^2]
Notes
Returns
ddelta_dzs [list[float]] Composition derivative of delta of each component, [m^3/mol]
Notes
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dP [float] Pressure derivatives of log fugacity coefficient for each species, [1/Pa]
Notes
This expression was derived using SymPy and optimized with the cse technique.
dlnphis_dT(phase)
Formula for calculating the temperature derivaitve of log fugacity coefficients for each species in a mixture
for the VDW equation of state. Verified numerically.
(︂ )︂
𝜕 ln 𝜑𝑖
𝜕𝑇 𝑃,𝑛𝑗̸=𝑖
Parameters
phase [str] One of ‘l’ or ‘g’, [-]
Returns
dlnphis_dT [float] Temperature derivatives of log fugacity coefficient for each species, [1/K]
Notes
This expression was derived using SymPy and optimized with the cse technique.
eos_pure
alias of thermo.eos.VDW
fugacity_coefficients(Z)
Literature formula for calculating fugacity coefficients for each species in a mixture. Verified numerically.
Called by fugacities on initialization, or by a solver routine which is performing a flash calculation.
[︂ (︂ )︂]︂ √
ˆ 𝑏𝑖 𝑏 2 𝑎𝑎𝑖
ln 𝜑𝑖 = − ln 𝑍 1 − −
𝑉 −𝑏 𝑉 𝑅𝑇 𝑉
Parameters
Z [float] Compressibility of the mixture for a desired phase, [-]
Returns
log_phis [float] Log fugacity coefficient for each species, [-]
References
[1]
𝑅𝑇 𝑎
𝑃 = − √
𝑉 − 𝑏 𝑉 𝑇 (𝑉 + 𝑏)
∑︁ ∑︁
𝑎= 𝑧𝑖 𝑧𝑗 𝑎𝑖𝑗
𝑖 𝑗
∑︁
𝑏= 𝑧𝑖 𝑏𝑖
𝑖
√
𝑎𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) 𝑎𝑖 𝑎𝑗
(︃ )︃
𝑅2 (𝑇𝑐,𝑖 )2 0.42748 · 𝑅2 (𝑇𝑐,𝑖 )2
𝑎𝑖 = √ =
9( 3 2 − 1)𝑃𝑐,𝑖 𝑃𝑐,𝑖
(︃ √ )︃
( 3 2 − 1) 𝑅𝑇𝑐,𝑖 0.08664 · 𝑅𝑇𝑐,𝑖
𝑏𝑖 = =
3 𝑃𝑐,𝑖 𝑃𝑐,𝑖
Parameters
Tcs [float] Critical temperatures of all compounds, [K]
Pcs [float] Critical pressures of all compounds, [Pa]
Notes
References
[1], [2]
Examples
Attributes
d2delta_dninjs Helper method for calculating the second mole number derivatives (hessian)
of delta.
d2delta_dzizjs Helper method for calculating the second composition derivatives (hessian)
of delta.
d3delta_dninjnks Helper method for calculating the third partial mole number derivatives of
delta.
ddelta_dns Helper method for calculating the mole number derivatives of delta.
ddelta_dzs Helper method for calculating the composition derivatives of delta.
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the RK EOS.
This vectorized implementation is added for extra speed.
𝑎
𝑎𝛼 = √︁
𝑇
𝑇𝑐
𝑑𝑎𝛼 𝑎
= − √︁
𝑑𝑇 2𝑇 𝑇 𝑇𝑐
2
𝑑 𝑎𝛼 3𝑎
=
𝑑𝑇 2
√︁
4𝑇 2 𝑇𝑇𝑐
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
Examples
>>> eos.a_alpha_and_derivatives_vectorized(115)
([0.1449810919468, 0.30019773677], [-0.000630352573681, -0.00130520755121], [8.
˓→2219900915e-06, 1.7024446320e-05])
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the RK EOS. This vectorized implementation is
added for extra speed.
𝑎
𝑎𝛼 = √︁
𝑇
𝑇𝑐
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Examples
>>> eos.a_alphas_vectorized(115)
[0.1449810919468, 0.30019773677]
property d2delta_dninjs
Helper method for calculating the second mole number derivatives (hessian) of delta. Note this is indepen-
dent of the phase.
𝜕2𝛿
(︂ )︂
= 2𝑏 − 𝑏𝑖 − 𝑏𝑗
𝜕𝑛𝑖 𝜕𝑛𝑗 𝑇,𝑃,𝑛𝑘̸=𝑖,𝑗
Returns
d2delta_dninjs [list[list[float]]] Second mole number derivative of delta of each component,
[m^3/mol^3]
Notes
Returns
d2delta_dzizjs [list[float]] Second Composition derivative of delta of each component,
[m^3/mol]
Notes
𝜕3𝛿
(︂ )︂
= 2(−3𝑏 + 𝑏𝑖 + 𝑏𝑗 + 𝑏𝑘 )
𝜕𝑛𝑖 𝜕𝑛𝑗 𝜕𝑛𝑘 𝑇,𝑃,𝑛𝑚̸=𝑖,𝑗,𝑘
Returns
d3delta_dninjnks [list[list[list[float]]]] Third mole number derivative of delta of each com-
ponent, [m^3/mol^4]
Notes
Returns
ddelta_dns [list[float]] Mole number derivative of delta of each component, [m^3/mol^2]
Notes
Returns
ddelta_dzs [list[float]] Composition derivative of delta of each component, [m^3/mol]
Notes
Notes
Many properties of this object are zero. Many of the arguments are not used and are provided for consistency
only.
References
[1], [2]
Examples
Methods
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for the Ideal Gas
EOS. This vectorized implementation is added for extra speed.
𝑎𝛼 = 0
𝑑𝑎𝛼
=0
𝑑𝑇
𝑑2 𝑎𝛼
=0
𝑑𝑇 2
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alphas_vectorized(T )
Method to calculate the pure-component a_alphas for the Ideal Gas EOS. This vectorized implementation
is added for extra speed.
𝑎𝛼 = 0
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
eos_pure
alias of thermo.eos.IG
class thermo.eos_mix.EpsilonZeroMixingRules
Attributes
d2epsilon_dninjs Helper method for calculating the second mole number derivatives (hes-
sian) of epsilon.
d2epsilon_dzizjs Helper method for calculating the second composition derivatives (hes-
sian) of epsilon.
d3epsilon_dninjnks Helper method for calculating the third partial mole number derivatives
of epsilon.
depsilon_dns Helper method for calculating the mole number derivatives of epsilon.
depsilon_dzs Helper method for calculating the composition derivatives of epsilon.
class thermo.eos_mix.PSRKMixingRules
Bases: object
Methods
a_alpha_and_derivatives(T[, full, quick, ...]) Method to calculate a_alpha and its first and second
derivatives for an EOS with the PSRK mixing rules.
A = -0.6466271649250525
a_alpha_and_derivatives(T, full=True, quick=True, pure_a_alphas=True)
Method to calculate a_alpha and its first and second derivatives for an EOS with the PSRK mixing rules.
Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2.
For use in some methods, this returns only a_alpha if full is False.
[︃ (︃ (︂ )︂)︃]︃
∑︁ 𝑧𝑖 𝛼𝑖 1 𝐺𝐸 ∑︁ 𝑏
𝛼 = 𝑏𝑅𝑇 + + 𝑧𝑖 ln
𝑖
𝑏𝑖 𝑅𝑇 𝐴 𝑅𝑇 𝑖
𝑏𝑖
[︃ (︃ )︃ (︃ 𝐸 )︃]︃
𝜕𝛼 ∑︁ 𝑧𝑖 𝜕𝛼𝑖 𝑧𝑖 𝛼𝑖 1 𝜕𝐺 𝐺𝐸 𝛼
𝜕𝑇 𝜕𝑇
= 𝑅𝑇 𝑏 − 2
+ − 2
+
𝜕𝑇 𝑖
𝑅𝑇 𝑏𝑖 𝑅𝑇 𝑏𝑖 𝐴 𝑅𝑇 𝑅𝑇 𝑇
∑︁ 𝑧𝑖 𝜕 2 𝛼2𝑖
[︃ (︃ )︃ [︃ (︃ )︃ )︂]︃
𝜕𝛼𝑖 ∑︁ 𝑧𝑖 𝜕𝛼𝑖
𝜕2𝛼
(︂ 𝐸 𝐸
1 𝜕 2 𝐺𝐸
(︂
𝜕𝑇 2𝑧𝑖 𝜕𝑇 2𝑧𝑖 𝛼 𝑖 2 𝜕𝑇 𝑧𝑖 𝛼 𝑖 1 𝜕𝐺 𝐺 2 𝜕𝐺
= 𝑏 − + + − + − + −
𝜕𝑇 2 𝑖
𝑏 𝑖 𝑇 𝑏 𝑖 𝑇 2𝑏
𝑖 𝑇 𝑖
𝑏 𝑖 𝑇 𝑏𝑖 𝐴 𝜕𝑇 𝑇 𝐴 𝜕𝑇 2 𝑇 𝜕𝑇
Parameters
T [float] Temperature, [K]
full [bool, optional] If False, calculates and returns only a_alpha
quick [bool, optional] Only the quick variant is implemented; it is little faster anyhow
pure_a_alphas [bool, optional] Whether or not to recalculate the a_alpha terms of pure com-
ponents (for the case of mixtures only) which stay the same as the composition changes (i.e
in a PT flash), [-]
Returns
a_alpha [float] Coefficient calculated by PSRK-specific method, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by PSRK-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by PSRK-
specific method, [J^2/mol^2/Pa/K**2]
u = 1.1
This file contains a number of overflow methods for EOSs which for various reasons are better implemented as func-
tions. Documentation is not provided for this file and no methods are intended to be used outside this library.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
These are where the bulk of the time is spent in solving the equation of state. For that reason, these functional forms
often duplicate functionality but have different performance characteristics.
Implementations which store N^2 matrices for other calculations:
thermo.eos_mix_methods.a_alpha_aijs_composition_independent(a_alphas, one_minus_kijs,
a_alpha_ijs=None,
a_alpha_roots=None,
a_alpha_ij_roots_inv=None)
Calculates the matrix (𝑎𝛼)𝑖𝑗 as well as the array (𝑎𝛼)𝑖 and the matrix √ .
√︀ 1√
(𝑎𝛼)𝑖 (𝑎𝛼)𝑗
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
This routine is efficient in both numba and PyPy, but it is generally better to avoid calculating and storing any
N^2 matrices. However, this particular calculation only depends on T so in some circumstances this can be
feasible.
Parameters
a_alphas [list[float]] EOS attractive terms, [J^2/mol^2/Pa]
one_minus_kijs [list[list[float]]] One minus the constant kijs, [-]
a_alpha_ijs [list[list[float]]] Optional output array, [J^2/mol^2/Pa]
a_alpha_roots [list[float]] Optional output array, [J/mol/Pa^0.5]
a_alpha_ij_roots_inv [list[list[float]]] Optional output array, [mol^2*Pa/J^2]
Returns
a_alpha_ijs [list[list[float]]] Matrix of (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 , [J^2/mol^2/Pa]
√︀
Examples
>>> a_alpha_ijs
[[0.249109935767, 0.36861239374], [0.36861239374, 0.64864958635]]
>>> a_alpha_roots
[0.49910914213, 0.80538784840]
>>> a_alpha_ij_roots_inv
[[4.0142919105, 2.487707997796], [2.487707997796, 1.54166443799]]
𝜕(𝑎𝛼) ∑︁ ∑︁ 𝜕(𝑎𝛼)𝑖𝑗
= 𝑧𝑖 𝑧𝑗
𝜕𝑇 𝑖 𝑗
𝜕𝑇
𝜕 2 (𝑎𝛼) ∑︁ ∑︁ 𝜕 2 (𝑎𝛼)𝑖𝑗
2
= 𝑧𝑖 𝑧𝑗
𝜕𝑇 𝑖 𝑗
𝜕𝑇 2
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
𝑑 𝑑
(︁ )︁
√︀ a𝛼i (𝑇 ) 𝑑𝑇 a𝛼j (𝑇 ) a𝛼j (𝑇 ) 𝑑𝑇 a𝛼i (𝑇 )
𝜕(𝑎𝛼)𝑖𝑗 a𝛼i (𝑇 ) a𝛼j (𝑇 ) (1 − 𝑘𝑖𝑗 ) 2 + 2
=
𝜕𝑇 a𝛼i (𝑇 ) a𝛼j (𝑇 )
(︂ 2
√︀ (a𝛼i (𝑇 ) 𝑑𝑇
𝑑
a𝛼j (𝑇 )+a𝛼j (𝑇 ) 𝑑𝑇𝑑
a𝛼i (𝑇 )) (a𝛼i (𝑇 ) 𝑑𝑇
𝑑 𝑑
a𝛼j (𝑇 )+a𝛼j (𝑇 ) 𝑑𝑇 a𝛼i (𝑇 )) 𝑑𝑇
𝑑
a𝛼j (𝑇 )
2 a𝛼i (𝑇 ) a𝛼j (𝑇 ) (𝑘𝑖𝑗 − 1) 4 a𝛼i (𝑇 ) a𝛼j (𝑇 ) − 2 a𝛼j (𝑇 )
𝜕 (𝑎𝛼)𝑖𝑗
=−
𝜕𝑇 2 a𝛼i (𝑇
Parameters
a_alphas [list[float]] EOS attractive terms, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K**2]
T [float] Temperature, not used, [K]
zs [list[float]] Mole fractions of each species
one_minus_kijs [list[list[float]]] One minus the constant kijs, [-]
a_alpha_ijs [list[list[float]], optional] Matrix of (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 , [J^2/mol^2/Pa]
√︀
Returns
a_alpha [float] EOS attractive term, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific method,
[J^2/mol^2/Pa/K]
d2a_alpha_dT2 [float] Second temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K**2]
a_alpha_ijs [list[list[float]], optional] Matrix of (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗 , [J^2/mol^2/Pa]
√︀
𝜕(𝑎𝛼)𝑖𝑗
da_alpha_dT_ijs [list[list[float]], optional] Matrix of 𝜕𝑇 , [J^2/mol^2/Pa/K]
𝜕 2 (𝑎𝛼)𝑖𝑗
d2a_alpha_dT2_ijs [list[list[float]], optional] Matrix of 𝜕𝑇 2 , [J^2/mol^2/Pa/K^2]
Examples
Parameters
a_alphas [list[float]] EOS attractive terms, [J^2/mol^2/Pa]
a_alpha_roots [list[float]] Square roots of a_alphas; provided for speed [J/mol/Pa^0.5]
T [float] Temperature, not used, [K]
zs [list[float]] Mole fractions of each species
one_minus_kijs [list[list[float]]] One minus the constant kijs, [-]
a_alpha_j_rows [list[float], optional] EOS attractive term row destimation vector (does not need
to be zeroed, should be provided to prevent allocations), [J^2/mol^2/Pa]
vec0 [list[float], optional] Empty vector, used in internal calculations, provide to avoid the allo-
cations; does not need to be zeroed, [-]
Returns
a_alpha [float] EOS attractive term, [J^2/mol^2/Pa]
a_alpha_j_rows [list[float]] EOS attractive term row sums, [J^2/mol^2/Pa]
Notes
Tried moving the i=j loop out, no difference in speed, maybe got a bit slower in PyPy.
Examples
thermo.eos_mix_methods.a_alpha_and_derivatives_quadratic_terms(a_alphas, a_alpha_roots,
da_alpha_dTs, d2a_alpha_dT2s,
T, zs, one_minus_kijs,
a_alpha_j_rows=None,
da_alpha_dT_j_rows=None)
Calculates the a_alpha term, and its first two temperature derivatives, for an equation of state along with the
vector quantities needed to compute the fugacitie and temperature derivatives of fugacities of the mixture. This
routine is efficient in both numba and PyPy.
∑︁ ∑︁
𝑎𝛼 = 𝑧𝑖 𝑧𝑗 (𝑎𝛼)𝑖𝑗
𝑖 𝑗
𝜕(𝑎𝛼) ∑︁ ∑︁ 𝜕(𝑎𝛼)𝑖𝑗
= 𝑧𝑖 𝑧𝑗
𝜕𝑇 𝑖 𝑗
𝜕𝑇
𝜕 2 (𝑎𝛼) ∑︁ ∑︁ 𝜕 2 (𝑎𝛼)𝑖𝑗
= 𝑧𝑖 𝑧𝑗
𝜕𝑇 2 𝑖 𝑗
𝜕𝑇 2
√︁
(𝑎𝛼)𝑖𝑗 = (1 − 𝑘𝑖𝑗 ) (𝑎𝛼)𝑖 (𝑎𝛼)𝑗
𝑑 𝑑
(︁ )︁
√︀ a𝛼i (𝑇 ) 𝑑𝑇 a𝛼j (𝑇 ) a𝛼j (𝑇 ) 𝑑𝑇 a𝛼i (𝑇 )
𝜕(𝑎𝛼)𝑖𝑗 a𝛼i (𝑇 ) a𝛼j (𝑇 ) (1 − 𝑘𝑖𝑗 ) 2 + 2
=
𝜕𝑇 a𝛼i (𝑇 ) a𝛼j (𝑇 )
(︂ 2
√︀ (a𝛼i (𝑇 ) 𝑑𝑇
𝑑
a𝛼j (𝑇 )+a𝛼j (𝑇 ) 𝑑𝑇𝑑
a𝛼i (𝑇 )) (a𝛼i (𝑇 ) 𝑑𝑇
𝑑 𝑑
a𝛼j (𝑇 )+a𝛼j (𝑇 ) 𝑑𝑇 a𝛼i (𝑇 )) 𝑑𝑇
𝑑
a𝛼j (𝑇 )
2 a𝛼i (𝑇 ) a𝛼j (𝑇 ) (𝑘𝑖𝑗 − 1) 4 a𝛼i (𝑇 ) a𝛼j (𝑇 ) − 2 a𝛼j (𝑇 )
𝜕 (𝑎𝛼)𝑖𝑗
=−
𝜕𝑇 2 a𝛼i (𝑇
The secondary values are as follows:
∑︁
𝑦𝑖 (𝑎𝛼)𝑖𝑗
𝑖
∑︁ 𝜕(𝑎𝛼)𝑖𝑗
𝑦𝑖
𝑖
𝜕𝑇
Parameters
a_alphas [list[float]] EOS attractive terms, [J^2/mol^2/Pa]
a_alpha_roots [list[float]] Square roots of a_alphas; provided for speed [J/mol/Pa^0.5]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by EOS-
specific method, [J^2/mol^2/Pa/K**2]
T [float] Temperature, not used, [K]
zs [list[float]] Mole fractions of each species
one_minus_kijs [list[list[float]]] One minus the constant kijs, [-]
Returns
a_alpha [float] EOS attractive term, [J^2/mol^2/Pa]
da_alpha_dT [float] Temperature derivative of coefficient calculated by EOS-specific method,
[J^2/mol^2/Pa/K]
Examples
Some of the methods implemented here are numerical while others are analytical.
The cubic EOS can be rearranged into the following polynomial form:
𝑏𝑃
𝐵′ =
𝑅𝑇
𝛿𝑃
𝛿′ =
𝑅𝑇
𝑎𝛼𝑃
𝜃′ =
(𝑅𝑇 )2
(︂ )︂2
′ 𝑃
𝜖 =𝜖
𝑅𝑇
The range of pressures, temperatures, and 𝑎𝛼 values is so large that almost all analytical solutions produce huge errors
in some conditions. Because the EOS volume cannot be under b, this often results in a root being ignored where there
should have been a liquid-like root detected.
A number of plots showing the relative error in volume calculation are shown below to demonstrate how different
methods work.
• Analytical Solvers
• Numerical Solvers
• Higher-Precision Solvers
Notes
Two sample regions where this method does not obtain the correct solution (PR EOS for hydrogen) are as follows:
References
[1]
thermo.eos_volume.volume_solutions_fast(T, P, b, delta, epsilon, a_alpha)
Solution of this form of the cubic EOS in terms of volumes. Returns three values, all with some complex part.
This is believed to be the fastest analytical formula, and while it does not suffer from the same errors as Cardano’s
formula, it has plenty of its own numerical issues.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [tuple[complex]] Three possible molar volumes, [m^3/mol]
Notes
Using explicit formulas, as can be derived in the following example, is faster than most numeric root finding
techniques, and finds all values explicitly. It takes several seconds.
A sample region where this method does not obtain the correct solution (PR EOS for methanol) is as follows:
References
[1]
thermo.eos_volume.volume_solutions_a1(T, P, b, delta, epsilon, a_alpha)
Solution of this form of the cubic EOS in terms of volumes. Returns three values, all with some complex part.
This uses an analytical solution for the cubic equation with the leading coefficient set to 1 as in the EOS case;
and the analytical solution is the one recommended by Mathematica.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [tuple[complex]] Three possible molar volumes, [m^3/mol]
Notes
A sample region where this method does not obtain the correct solution (PR EOS for methanol) is as follows:
Examples
Numerical precision is always challenging and has edge cases. The following results all havev imaginary com-
ponents, but depending on the math library used by the compiler even the first complex digit may not match!
Notes
A sample region where this method does not obtain the correct solution (SRK EOS for decane) is as follows:
Notes
A sample region where this method does not obtain the correct solution (SRK EOS for ethane) is as follows:
References
[1]
thermo.eos_volume.volume_solutions_ideal(T, P, b=0.0, delta=0.0, epsilon=0.0, a_alpha=0.0)
Calculate the ideal-gas molar volume in a format compatible with the other cubic EOS solvers. The ideal gas
volume is the first element; and the secodn and third elements are zero. This is implemented to allow the ideal-gas
model to be compatible with the cubic models, whose equations do not work with parameters of zero.
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float, optional] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float, optional] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float, optional] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float, optional] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [list[float]] Three possible molar volumes, [m^3/mol]
Examples
Notes
Returns
Vs [tuple[complex]] Three possible molar volumes, [m^3/mol]
Notes
Sample regions where this method works perfectly are shown below:
thermo.eos_volume.volume_solutions_NR_low_P(T, P, b, delta, epsilon, a_alpha)
Newton-Raphson based solver for cubic EOS volumes designed specifically for the low-pressure regime. Seeks
only two possible solutions - an ideal gas like one, and one near the eos covolume b - as the initializations are
R*T/P and b*1.000001 .
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
tries [int, optional] Internal parameter as this function will call itself if it needs to; number of
previous solve attempts, [-]
Returns
Vs [tuple[complex]] Three possible molar volumes (third one is hardcoded to 1j), [m^3/mol]
Notes
The algorithm is NR, with some checks that will switch the solver to brenth some of the time.
Notes
Although mpmath has a cubic solver, it has been found to fail to solve in some cases. Accordingly, the algorithm
is as follows:
Working precision is dps plus 40 digits; and if P < 1e-10 Pa, it is dps plus 400 digits. The input parameters are
converted exactly to mpf objects on input.
polyroots from mpmath is used with maxsteps=2000, and extra precision of 15 digits. If the solution does not
converge, 20 extra digits are added up to 8 times. If no solution is found, mpmath’s findroot is called on the
pressure error function using three initial guesses from another solver.
Needless to say, this function is quite slow.
References
[1]
Examples
Test case which presented issues for PR EOS (three roots were not being returned):
(mpf('0.0000254054613415548712260258773060137'), mpf('4.
˓→66038025602155259976574392093252'), mpf('8309.80218708657190094424659859346'))
Examples
Test case which presented issues for PR EOS (three roots were not being returned):
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
b [float] Coefficient calculated by EOS-specific method, [m^3/mol]
delta [float] Coefficient calculated by EOS-specific method, [m^3/mol]
epsilon [float] Coefficient calculated by EOS-specific method, [m^6/mol^2]
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Returns
Vs [tuple[sympy.Rational]] Three possible molar volumes, [m^3/mol]
Notes
References
[1]
Examples
This module contains implementations of the calculation of pure-component EOS 𝑎𝛼 parameters in a vectorized way.
Functions for calculating their temperature derivatives as may be necessary are included as well.
For certain alpha functions, a class is available to provide these functions to and class that inherits from it.
A mixing rule must be used on the a_alphas to get the overall a_alpha term.
𝑇𝑟,𝑖 )]2
√︀
𝑎𝑖 𝛼(𝑇 )𝑖 = 𝑎𝑖 [1 + 𝜅𝑖 (1 −
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
𝑅2 𝑇𝑐,𝑖
2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 0.45724 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
kappas [list[float]] kappa parameters of Peng-Robinson EOS; formulas vary, but the original
form uses 𝜅𝑖 = 0.37464 + 1.54226𝜔𝑖 − 0.26992𝜔𝑖2 , [-]
a_alphas [list[float], optional] Vector for pure component a_alpha terms in the cubic EOS to be
calculated and stored in, [Pa*m^6/mol^2]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
0.42748·𝑅2 (𝑇𝑐,𝑖 )2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
ms [list[float]] m parameters of SRK EOS; formulas vary, but the original form uses 𝑚𝑖 =
0.480 + 1.574𝜔𝑖 − 0.176𝜔𝑖2 , [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
𝑅2 𝑇𝑐,𝑖
2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 0.45724 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
kappa0s [list[float]] kappa0 parameters of PRSV EOS; the original form uses 𝜅0,𝑖 =
0.378893 + 1.4897153𝜔𝑖 − 0.17131848𝜔𝑖2 + 0.0196554𝜔𝑖3 , [-]
kappa1s [list[float]] Fit parameters, can be set to 0 if unknown [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
[3.81298569831]
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
𝑅2 𝑇𝑐,𝑖
2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 0.45724 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
kappa0s [list[float]] kappa0 parameters of PRSV EOS; the original form uses 𝜅0,𝑖 =
0.378893 + 1.4897153𝜔𝑖 − 0.17131848𝜔𝑖2 + 0.0196554𝜔𝑖3 , [-]
kappa1s [list[float]] Fit parameters, can be set to 0 if unknown [-]
kappa2s [list[float]] Fit parameters, can be set to 0 if unknown [-]
kappa3s [list[float]] Fit parameters, can be set to 0 if unknown [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
˓→460])
[3.2005700986984]
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
0.42748·𝑅2 (𝑇𝑐,𝑖 )2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
S1s [list[float]] S1 parameters of API SRK EOS; regressed or estimated with 𝑆1,𝑖 = 0.48508 +
1.55171𝜔𝑖 − 0.15613𝜔𝑖2 , [-]
S2s [list[float]] S2 parameters of API SRK EOS; regressed or set to zero, [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
[1.60465652994097]
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
0.42748·𝑅2 (𝑇𝑐,𝑖 )2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
Examples
𝑇 0.5
(︂ (︂ )︂ )︂
𝑑𝑎𝑖 𝛼𝑖 𝑎𝑖 𝜅𝑖
= − 0.5 0.5 𝜅𝑖 − 0.5 + 1 + 1
𝑑𝑇 𝑇 𝑇𝑐 𝑖 𝑇𝑐 𝑖
𝑑2 𝑎𝑖 𝛼𝑖
(︂ (︂ (︂ 0.5 )︂ )︂ )︂
1 𝑇 𝜅𝑖
= 0.5𝑎 𝜅
𝑖 𝑖 − 𝜅𝑖 − 1 − 1 +
𝑑𝑇 2 𝑇 1.5 𝑇𝑐 0.5
𝑖 𝑇𝑐 0.5
𝑖 𝑇 𝑇𝑐𝑖
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
𝑅2 𝑇𝑐,𝑖
2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 0.45724 𝑃𝑐,𝑖 [Pa*m^6/mol^2]
kappas [list[float]] kappa parameters of Peng-Robinson EOS; formulas vary, but the original
form uses 𝜅𝑖 = 0.37464 + 1.54226𝜔𝑖 − 0.26992𝜔𝑖2 , [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
da_alpha_dTs [list[float]] First temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K)]
d2a_alpha_dT2s [list[float]] Second temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K^2)]
Examples
˓→07440632117e-05])
ms [list[float]] m parameters of SRK EOS; formulas vary, but the original form uses 𝑚𝑖 =
0.480 + 1.574𝜔𝑖 − 0.176𝜔𝑖2 , [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
da_alpha_dTs [list[float]] First temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K)]
d2a_alpha_dT2s [list[float]] Second temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K^2)]
Examples
˓→37231823137e-05])
)︃ ⎛ (︃ )︃ ⎛ (︁√︁ )︁
√︃ √︃ 𝑇
𝜅1,𝑖 +1 𝜅
(︃(︃ )︃ (︃ (︃√︃ )︃ (︂ )︂)︃
𝑑𝑎𝑖 𝛼𝑖 𝑇 𝑇 𝑇 7 𝑇 𝑇𝑐,𝑖
= 𝑎𝑖 1− 𝜅0,𝑖 + 𝜅1,𝑖 +1 − + + 1 ⎝2 1 − ⎝− +
𝑑𝑇 𝑇𝑐,𝑖 𝑇𝑐,𝑖 𝑇𝑐,𝑖 10 𝑇𝑐,𝑖 𝑇𝑐,𝑖
⎛
√︁ (︂
⎛ ⎛ (︂√︁ )︂ ⎞ (︂ (︂√︁ )︂(︁ )︁)︂ ⎞2 𝑇
𝑇𝑐,𝑖
(︁ )︁ √︁
⎜ (︁√︁ )︁ 20 𝑇𝑇 +1 √︁
𝑇 10𝑇
−7
𝑇
𝑇𝑐,𝑖 10𝜅0,𝑖 −𝜅1,𝑖 𝑇
𝑇𝑐,𝑖 +1 10𝑇
𝑇𝑐,𝑖 −7
⎜ 𝑇 𝑐,𝑖 𝑇𝑐,𝑖 𝑇𝑐,𝑖
𝑇𝑐,𝑖 − 1
𝑎𝑖 ⎜ ⎠− ⎠ −
⎜ 𝜅1,𝑖 +
⎝ ⎝
𝑇𝑐,𝑖 𝑇 𝑇
⎝
𝑑2 𝑎𝑖 𝛼𝑖
=
𝑑𝑇 2
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
𝑅2 𝑇𝑐,𝑖
2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 0.45724 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
kappa0s [list[float]] kappa0 parameters of PRSV EOS; the original form uses 𝜅0,𝑖 =
0.378893 + 1.4897153𝜔𝑖 − 0.17131848𝜔𝑖2 + 0.0196554𝜔𝑖3 , [-]
kappa1s [list[float]] Fit parameters, can be set to 0 if unknown [-]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
da_alpha_dTs [list[float]] First temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K)]
d2a_alpha_dT2s [list[float]] Second temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K^2)]
Examples
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
da_alpha_dTs [list[float]] First temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K)]
d2a_alpha_dT2s [list[float]] Second temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K^2)]
Examples
˓→8634], kappa3s=[0.460])
Examples
𝑑𝑎𝑖 𝛼𝑖 𝑎𝑖
= − √︁
𝑑𝑇 2𝑇 𝑇
𝑇𝑐,𝑖
𝑑2 𝑎𝑖 𝛼𝑖 3𝑎𝑖
=
𝑑𝑇 2
√︁
2 𝑇
4𝑇 𝑇𝑐,𝑖
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of components, [K]
0.42748·𝑅2 (𝑇𝑐,𝑖 )2
ais [list[float]] a parameters of cubic EOS, 𝑎𝑖 = 𝑃𝑐,𝑖 , [Pa*m^6/mol^2]
Returns
a_alphas [list[float]] Pure component a_alpha terms in the cubic EOS, [Pa*m^6/mol^2]
da_alpha_dTs [list[float]] First temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K)]
d2a_alpha_dT2s [list[float]] Second temperature derivative of pure component a_alpha,
[Pa*m^6/(mol^2*K^2)]
Examples
The class-based ones van save a little code when implementing a new EOS. If there is not a standalone function available
for an alpha function, it has not yet been accelerated in a nice vectorized way.
class thermo.eos_alpha_functions.a_alpha_base
Bases: object
class thermo.eos_alpha_functions.Almeida_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Almeida et al. (1991) [1].
Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more doc-
umentation. Three coefficients needed.
(︁ )︁⃒ ⃒𝑐 −1 (︁ 𝑇𝑐,𝑖
)︁
⃒ 2
𝑐1 − 𝑇𝑇 +1 ⃒ 𝑇𝑇 −1⃒ +𝑐3 −1+ 𝑇
⃒
𝛼=𝑒 𝑐,𝑖 𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Androulakis_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Androulakis et al. (1989)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Chen_Yang_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Hamid and Yang (2017)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Seven coefficients needed.
⎛ (︂ )︂ ⎞
ln 𝑇
𝑇𝑐,𝑖
(︁ )︁
𝑇𝑐
⎝−𝑐
3 +1⎠ − 𝑇 2 +𝑐1
𝑐,𝑖
𝛼=𝑒
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Coquelet_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Coquelet et al. (2004) [1].
Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more doc-
umentation. Three coefficients needed.
(︁ )︁(︂ (︂ √︁ )︂2 (︂ √︁ )︂3 )︂2
𝑐1 − 𝑇𝑇 +1 𝑐2 − 𝑇𝑇 +1 +𝑐3 − 𝑇𝑇 +1 +1
𝑐,𝑖 𝑐,𝑖 𝑐,𝑖
𝛼=𝑒
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Gasem_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Gasem (2001) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Three coefficients needed.
(︁ (︁ )︁𝑐 )︁(︁ )︁
3 𝑇 𝑐2
− 𝑇𝑇 +1 𝑇 +𝑐1
𝛼=𝑒 𝑐,𝑖 𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Gibbons_Laughton_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Gibbons and Laughton (1984)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Two coefficients needed.
(︂ )︂ (︃√︃ )︃
𝑇 𝑇
𝛼 = 𝑐1 − 1 + 𝑐2 −1 +1
𝑇𝑐,𝑖 𝑇𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Haghtalab_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Haghtalab et al. (2010)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Three coefficients needed.
⎛ (︂ )︂ ⎞
ln 𝑇
𝑇𝑐,𝑖
(︁ )︁
𝑇𝑐
⎝−𝑐
3 +1⎠ − 𝑇 2 +𝑐1
𝑐,𝑖
𝛼=𝑒
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Harmens_Knapp_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Harmens and Knapp (1980)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Two coefficients needed.
(︃ (︃ √︃ )︃ (︂ )︂ )︃2
𝑇 𝑇𝑐,𝑖
𝛼 = 𝑐1 − + 1 − 𝑐2 1 − +1
𝑇𝑐,𝑖 𝑇
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Heyen_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Heyen (1980) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Two coefficients needed.
(︁ (︁ )︁𝑐 )︁
2
𝑐1 − 𝑇𝑇 +1
𝛼=𝑒 𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Mathias_1983_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Mathias (1983) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Two coefficients needed.
(︃ (︃ √︃ )︃ (︂ )︂ (︂ )︂ )︃2
𝑇 𝑇 𝑇
𝛼 = 𝑐1 − + 1 − 𝑐2 − + 0.7 − +1 +1
𝑇𝑐,𝑖 𝑇𝑐,𝑖 𝑇𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Mathias_Copeman_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Mathias and Copeman (1983)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Mathias_Copeman_poly_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_and_derivatives_pure
a_alpha_and_derivatives_vectorized
a_alpha_pure
a_alphas_vectorized
a_alpha_and_derivatives_pure(T )
a_alpha_and_derivatives_vectorized(T )
a_alpha_pure(T )
a_alphas_vectorized(T )
class thermo.eos_alpha_functions.Mathias_Copeman_untruncated_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Mathias and Copeman (1983)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Melhem_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Melhem et al. (1989) [1].
Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more doc-
umentation. Two coefficients needed.
(︁ )︁ (︂ √︁ )︂2
𝑐1 − 𝑇𝑇 +1 +𝑐2 − 𝑇𝑇 +1
𝑐,𝑖 𝑐,𝑖
𝛼=𝑒
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Poly_a_alpha
Bases: object
Methods
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives given that there is a polynomial equation
for 𝛼.
𝑎𝛼 = 𝑎 · poly(𝑇 )
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alpha_pure(T )
Method to calculate a_alpha given that there is a polynomial equation for 𝛼.
𝑎𝛼 = 𝑎 · poly(𝑇 )
Parameters
T [float] Temperature, [K]
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
class thermo.eos_alpha_functions.Saffari_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Saffari and Zahedi (2013)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Three coefficients needed.
(︁ )︁ (︂ √︁ )︂
𝑇 𝑐1 𝑇
𝑇𝑐,𝑖 +𝑐2 ln 𝑇𝑐,𝑖 +𝑐3 − 𝑇𝑇 +1
𝑐,𝑖
𝛼=𝑒
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Schwartzentruber_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Schwartzentruber et al. (1990)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. Three coefficients needed.
(︃ (︃ √︃ )︃ (︃ √︃ )︃ (︂ )︃2
𝑇 2 𝑐3
)︂
𝑇 𝑇 𝑇 𝑐2
𝛼 = 𝑐4 − +1 − − +1 + + 𝑐1 + 1
𝑇𝑐,𝑖 𝑇𝑐,𝑖 𝑇 𝑐2 𝑇𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Soave_1972_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Soave (1972) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Same as SRK.a_alpha_and_derivatives but slower and requiring alpha_coeffs to be set. One coeffi-
cient needed.
(︃ (︃ √︃ )︃ )︃2
𝑇
𝛼= 𝑐0 − +1 +1
𝑇𝑐,𝑖
References
[1], [2]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Soave_1984_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Soave (1984) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Two coefficients needed.
(︂ )︂ (︂ )︂
𝑇 𝑇𝑐,𝑖
𝛼 = 𝑐1 − + 1 + 𝑐2 −1 + +1
𝑇𝑐,𝑖 𝑇
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Soave_1979_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_and_derivatives_vectorized
a_alpha_pure
a_alphas_vectorized
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Soave (1979) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. Three coefficients are needed.
𝑁
𝛼 = 1 + (1 − 𝑇𝑟 )(𝑀 + )
𝑇𝑟
References
[1]
a_alpha_and_derivatives_vectorized(T )
a_alpha_pure(T )
a_alphas_vectorized(T )
class thermo.eos_alpha_functions.Soave_1993_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Soave (1983) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Two coefficient needed.
(︂ )︂ (︃ √︃ )︃2
𝑇 𝑇
𝛼 = 𝑐1 − + 1 + 𝑐2 − +1 +1
𝑇𝑐,𝑖 𝑇𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Trebble_Bishnoi_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Trebble and Bishnoi (1987)
[1]. Returns a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more
documentation. One coefficient needed.
(︁ )︁
𝑐1 − 𝑇𝑇 +1
𝛼=𝑒 𝑐,𝑖
References
[1]
a_alpha_pure(T )
class thermo.eos_alpha_functions.Twu91_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alphas_vectorized
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Twu et al. (1991) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Three coefficients needed.
(︂ )︂𝑐3 (𝑐2 −1) (︁ (︁ )︁𝑐 𝑐 )︁
𝑇 𝑐1 − 𝑇𝑇
2 3
+1
𝛼= 𝑒 𝑐,𝑖
𝑇𝑐,𝑖
References
[1]
a_alpha_and_derivatives_vectorized(T )
Method to calculate the pure-component a_alphas and their first and second derivatives for TWU91 alpha
function EOS. This vectorized implementation is added for extra speed.
(︂ )︂𝑐3 (𝑐2 −1) (︁ (︁ )︁𝑐 𝑐 )︁
𝑇 𝑐1 − 𝑇𝑇
2 3
+1
𝛼= 𝑒 𝑐,𝑖
𝑇𝑐,𝑖
Parameters
T [float] Temperature, [K]
Returns
a_alphas [list[float]] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
da_alpha_dTs [list[float]] Temperature derivative of coefficient calculated by EOS-specific
method, [J^2/mol^2/Pa/K]
d2a_alpha_dT2s [list[float]] Second temperature derivative of coefficient calculated by
EOS-specific method, [J^2/mol^2/Pa/K**2]
a_alpha_pure(T )
a_alphas_vectorized(T )
class thermo.eos_alpha_functions.TwuPR95_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_and_derivatives_vectorized
a_alphas_vectorized
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for the Twu alpha function. Uses the set values
of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
The derivatives are somewhat long and are not described here for brevity; they are obtainable from the
following SymPy expression.
>>> Tr = T/Tc
>>> alpha0 = Tr**(N0*(M0-1))*exp(L0*(1-Tr**(N0*M0)))
>>> alpha1 = Tr**(N1*(M1-1))*exp(L1*(1-Tr**(N1*M1)))
>>> alpha = alpha0 + omega*(alpha1-alpha0)
>>> diff(alpha, T)
>>> diff(alpha, T, T)
a_alpha_and_derivatives_vectorized(T )
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for the Twu alpha function. Uses the set values of Tc, omega and a.
Returns
a_alpha [float] Coefficient calculated by EOS-specific method, [J^2/mol^2/Pa]
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
a_alphas_vectorized(T )
class thermo.eos_alpha_functions.TwuSRK95_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_and_derivatives_vectorized
a_alphas_vectorized
a_alpha_and_derivatives_pure(T )
Method to calculate 𝑎𝛼 and its first and second derivatives for the Twu alpha function. Uses the set values
of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
The derivatives are somewhat long and are not described here for brevity; they are obtainable from the
following SymPy expression.
>>> Tr = T/Tc
>>> alpha0 = Tr**(N0*(M0-1))*exp(L0*(1-Tr**(N0*M0)))
>>> alpha1 = Tr**(N1*(M1-1))*exp(L1*(1-Tr**(N1*M1)))
>>> alpha = alpha0 + omega*(alpha1-alpha0)
>>> diff(alpha, T)
>>> diff(alpha, T, T)
a_alpha_and_derivatives_vectorized(T )
a_alpha_pure(T )
Method to calculate 𝑎𝛼 for the Twu alpha function. Uses the set values of Tc, omega and a.
Notes
This method does not alter the object’s state and the temperature provided can be a different than that of
the object.
a_alphas_vectorized(T )
class thermo.eos_alpha_functions.Yu_Lu_a_alpha
Bases: thermo.eos_alpha_functions.a_alpha_base
Methods
a_alpha_pure
a_alpha_and_derivatives_pure(T )
Method to calculate a_alpha and its first and second derivatives according to Yu and Lu (1987) [1]. Returns
a_alpha, da_alpha_dT, and d2a_alpha_dT2. See GCEOS.a_alpha_and_derivatives for more documenta-
tion. Four coefficients needed.
(︁ )︁(︂ 2 )︂
𝑇 𝑐3 𝑇𝑐
𝑐4 − 𝑇𝑇 +1 𝑇 𝑐2
+ 𝑇 2 +𝑐1
𝑐,𝑖 𝑐,𝑖
𝛼 = 10
References
[1]
a_alpha_pure(T )
thermo.eos_alpha_functions.Soave_1979_alpha_pure(T, Tc, M, N)
thermo.eos_alpha_functions.Chen_Yang_alpha_pure(T, Tc, omega, c1, c2, c3, c4, c5, c6, c7)
This module contains an object designed to store the result of a flash calculation and provide convinient access to all
properties of the calculated phases and bulks.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• EquilibriumState
7.12.1 EquilibriumState
Examples
The following sample shows a flash for the CO2-n-hexane system with all constants provided, using no data from
thermo.
˓→ 178.075])
... ␣
˓→HeatCapacityGases=[HeatCapacityGas(poly_fit=(50.0, 1000.0, [-3.1115474168865828e-
˓→000884685506352987, 29.266811602924644])),
... ␣
˓→HeatCapacityGas(poly_fit=(200.0, 1000.0, [1.3740654453881647e-21, -8.
˓→356180511425385, 175.67091124888998]))])
Attributes
gas_count [int] Number of gas phases present (0 or 1), [-]
liquid_count [int] Number of liquid phases present, [-]
solid_count [int] Number of solid phases present, [-]
phase_count [int] Number of phases present, [-]
gas_beta [float] Molar phase fraction of the gas phase; 0 if no gas phase is present, [-]
liquids_betas [list[float]] Liquid molar phase fractions, [-]
solids_betas [list[float]] Solid molar phase fractions, [-]
liquid_zs [list[float]] Overall mole fractions of each component in the overall liquid phase, [-]
liquid_bulk [Bulk] Liquid phase bulk, [-]
solid_zs [list[float]] Overall mole fractions of each component in the overall solid phase, [-]
solid_bulk [Bulk] Solid phase bulk, [-]
bulk [Bulk] Overall phase bulk, [-]
IDs Alias of CASs.
LF Method to return the liquid fraction of the equilibrium state.
VF Method to return the vapor fraction of the equilibrium state.
betas_liquids Method to calculate and return the fraction of the liquid phase that each liquid
phase is, by molar phase fraction.
betas_mass Method to calculate and return the mass fraction of all of the phases in the system.
betas_mass_liquids Method to calculate and return the fraction of the liquid phase that each
liquid phase is, by mass phase fraction.
betas_mass_states Method to return the mass phase fractions of each of the three fundamen-
tal types of phases.
betas_states Method to return the molar phase fractions of each of the three fundamental
types of phases.
betas_volume Method to calculate and return the volume fraction of all of the phases in the
system.
betas_volume_liquids Method to calculate and return the fraction of the liquid phase that
each liquid phase is, by volume phase fraction.
betas_volume_states Method to return the volume phase fractions of each of the three fun-
damental types of phases.
heaviest_liquid The liquid-like phase with the highest mass density, [-]
lightest_liquid The liquid-like phase with the lowest mass density, [-]
phase Method to calculate and return a string representing the phase of the mixture.
quality Method to return the mass vapor fraction of the equilibrium state.
water_index The index of the component water in the components.
water_phase The liquid-like phase with the highest water mole fraction, [-]
water_phase_index The liquid-like phase with the highest mole fraction of water, [-]
atomss Breakdown of each component into its elements and their counts, as a dict, [-].
Carcinogens Status of each component in cancer causing registries, [-].
CASs CAS registration numbers for each component, [-].
Ceilings Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
charges Charge number (valence) for each component, [-].
conductivities Electrical conductivities for each component, [S/m].
dipoles Dipole moments for each component, [debye].
economic_statuses Status of each component in in relation to import and export from various
regions, [-].
formulas Formulas of each component, [-].
Gfgs Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
Gfgs_mass Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
GWPs Global Warming Potentials for each component (impact/mass chemical)/(impact/mass
CO2), [-].
Hcs Higher standard molar heats of combustion for each component, [J/mol].
Hcs_lower Lower standard molar heats of combustion for each component, [J/mol].
Hcs_lower_mass Lower standard heats of combustion for each component, [J/kg].
Hcs_mass Higher standard heats of combustion for each component, [J/kg].
Hfgs Ideal gas standard molar enthalpies of formation for each component, [J/mol].
Hfgs_mass Ideal gas standard enthalpies of formation for each component, [J/kg].
Hfus_Tms Molar heats of fusion for each component at their respective melting points, [J/mol].
Hfus_Tms_mass Heats of fusion for each component at their respective melting points, [J/kg].
Hsub_Tts Heats of sublimation for each component at their respective triple points, [J/mol].
Hsub_Tts_mass Heats of sublimation for each component at their respective triple points,
[J/kg].
Hvap_298s Molar heats of vaporization for each component at 298.15 K, [J/mol].
Hvap_298s_mass Heats of vaporization for each component at 298.15 K, [J/kg].
Hvap_Tbs Molar heats of vaporization for each component at their respective normal boiling
points, [J/mol].
Hvap_Tbs_mass Heats of vaporization for each component at their respective normal boiling
points, [J/kg].
InChI_Keys InChI Keys for each component, [-].
InChIs InChI strings for each component, [-].
legal_statuses Status of each component in in relation to import and export rules from var-
ious regions, [-].
LFLs Lower flammability limits for each component, [-].
logPs Octanol-water partition coefficients for each component, [-].
molecular_diameters Lennard-Jones molecular diameters for each component, [angstrom].
MWs Similatiry variables for each component, [g/mol].
names Names for each component, [-].
aliases Aliases for each component, [-].
ODPs Ozone Depletion Potentials for each component (impact/mass chemical)/(impact/mass
CFC-11), [-].
omegas Acentric factors for each component, [-].
Parachors Parachors for each component, [N^0.25*m^2.75/mol].
Pcs Critical pressures for each component, [Pa].
phase_STPs Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
Psat_298s Vapor pressures for each component at 298.15 K, [Pa].
PSRK_groups PSRK subgroup: count groups for each component, [-].
Pts Triple point pressures for each component, [Pa].
PubChems Pubchem IDs for each component, [-].
rhocs Molar densities at the critical point for each component, [mol/m^3].
rhocs_mass Densities at the critical point for each component, [kg/m^3].
rhol_STPs Molar liquid densities at STP for each component, [mol/m^3].
rhol_STPs_mass Liquid densities at STP for each component, [kg/m^3].
RIs Refractive indexes for each component, [-].
S0gs Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
S0gs_mass Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
Sfgs Ideal gas standard molar entropies of formation for each component, [J/(mol*K)].
Sfgs_mass Ideal gas standard entropies of formation for each component, [J/(kg*K)].
similarity_variables Similarity variables for each component, [mol/g].
Skins Whether each compound can be absorbed through the skin or not, [-].
smiless SMILES identifiers for each component, [-].
STELs Short term exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
StielPolars Stiel polar factors for each component, [-].
Stockmayers Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over
k) for each component, [K].
Tautoignitions Autoignition temperatures for each component, [K].
Tbs Boiling temperatures for each component, [K].
Tcs Critical temperatures for each component, [K].
Tflashs Flash point temperatures for each component, [K].
Tms Melting temperatures for each component, [K].
Tts Triple point temperatures for each component, [K].
TWAs Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3),
[various].
UFLs Upper flammability limits for each component, [-].
UNIFAC_Dortmund_groups UNIFAC_Dortmund_group: count groups for each component, [-
].
UNIFAC_groups UNIFAC_group: count groups for each component, [-].
Van_der_Waals_areas Unnormalized Van der Waals areas for each component, [m^2/mol].
Van_der_Waals_volumes Unnormalized Van der Waals volumes for each component,
[m^3/mol].
Vcs Critical molar volumes for each component, [m^3/mol].
Vml_STPs Liquid molar volumes for each component at STP, [m^3/mol].
Vml_Tms Liquid molar volumes for each component at their respective melting points,
[m^3/mol].
Zcs Critical compressibilities for each component, [-].
UNIFAC_Rs UNIFAC R parameters for each component, [-].
UNIFAC_Qs UNIFAC Q parameters for each component, [-].
rhos_Tms Solid molar densities for each component at their respective melting points,
[mol/m^3].
Vms_Tms Solid molar volumes for each component at their respective melting points, [m^3/mol].
rhos_Tms_mass Solid mass densities for each component at their melting point, [kg/m^3].
solubility_parameters Solubility parameters for each component at 298.15 K, [Pa^0.5].
Vml_60Fs Liquid molar volumes for each component at 60 °F, [m^3/mol].
rhol_60Fs Liquid molar densities for each component at 60 °F, [mol/m^3].
rhol_60Fs_mass Liquid mass densities for each component at 60 °F, [kg/m^3].
conductivity_Ts Temperatures at which the electrical conductivities for each component
were measured, [K].
RI_Ts Temperatures at which the refractive indexes were reported for each component, [K].
Vmg_STPs Gas molar volumes for each component at STP; metastable if normally another state,
[m^3/mol].
rhog_STPs Molar gas densities at STP for each component; metastable if normally another
state, [mol/m^3].
rhog_STPs_mass Gas densities at STP for each component; metastable if normally another
state, [kg/m^3].
sigma_STPs Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the satura-
tion pressure, [N/m].
sigma_Tms Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
sigma_Tbs Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
Hf_STPs Standard state molar enthalpies of formation for each component, [J/mol].
Hf_STPs_mass Standard state mass enthalpies of formation for each component, [J/kg].
VaporPressures Wrapper to obtain the list of VaporPressures objects of the associated
PropertyCorrelationsPackage.
VolumeLiquids Wrapper to obtain the list of VolumeLiquids objects of the associated
PropertyCorrelationsPackage.
VolumeGases Wrapper to obtain the list of VolumeGases objects of the associated
PropertyCorrelationsPackage.
VolumeSolids Wrapper to obtain the list of VolumeSolids objects of the associated
PropertyCorrelationsPackage.
HeatCapacityGases Wrapper to obtain the list of HeatCapacityGases objects of the associated
PropertyCorrelationsPackage.
HeatCapacitySolids Wrapper to obtain the list of HeatCapacitySolids objects of the associ-
ated PropertyCorrelationsPackage.
HeatCapacityLiquids Wrapper to obtain the list of HeatCapacityLiquids objects of the asso-
ciated PropertyCorrelationsPackage.
EnthalpyVaporizations Wrapper to obtain the list of EnthalpyVaporizations objects of the
associated PropertyCorrelationsPackage.
EnthalpySublimations Wrapper to obtain the list of EnthalpySublimations objects of the as-
sociated PropertyCorrelationsPackage.
SublimationPressures Wrapper to obtain the list of SublimationPressures objects of the as-
sociated PropertyCorrelationsPackage.
PermittivityLiquids Wrapper to obtain the list of PermittivityLiquids objects of the associ-
ated PropertyCorrelationsPackage.
ViscosityLiquids Wrapper to obtain the list of ViscosityLiquids objects of the associated
PropertyCorrelationsPackage.
ViscosityGases Wrapper to obtain the list of ViscosityGases objects of the associated
PropertyCorrelationsPackage.
ThermalConductivityLiquids Wrapper to obtain the list of ThermalConductivityLiquids
objects of the associated PropertyCorrelationsPackage.
Methods
B_from_Z
activities
dfugacities_dP
dfugacities_dT
dlnphis_dP
dlnphis_dT
dlnphis_dns
dphis_dP
dphis_dT
dphis_dzs
fugacities
lnphis
phis
A()
Method to calculate and return the Helmholtz energy of the phase.
𝐴 = 𝑈 − 𝑇𝑆
Returns
A [float] Helmholtz energy, [J/mol]
API(phase=None)
Method to calculate and return the API of the phase.
141.5
API gravity = − 131.5
SG
Returns
API [float] API of the fluid [-]
A_dep()
Method to calculate and return the departure Helmholtz energy of the phase.
Returns
A_dep [float] Departure Helmholtz energy, [J/mol]
A_dep_flow(phase=None)
Method to return the flow rate of the difference between the ideal-gas Helmholtz energy of this phase and
the Helmholtz energy of the phase This method is only available when the phase is linked to an Equilibri-
umStream.
Returns
A_dep_flow [float] Flow rate of departure Helmholtz energy, [J/s]
A_dep_mass()
Method to calculate and return the departure mass Helmholtz energy of the phase.
Returns
A_dep_mass [float] Departure mass Helmholtz energy, [J/kg]
A_flow(phase=None)
Method to return the flow rate of Helmholtz energy of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
A_flow [float] Flow rate of Helmholtz energy, [J/s]
A_formation_ideal_gas(phase=None)
Method to calculate and return the ideal-gas Helmholtz energy of formation of the phase (as if the phase
was an ideal gas).
𝐴𝑖𝑔 𝑖𝑔 𝑖𝑔 𝑖𝑔
𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 − 𝑇𝑟𝑒𝑓 𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒
Returns
A_formation_ideal_gas [float] Helmholtz energy of formation of the phase on a reactive
basis as an ideal gas, [J/(mol)]
A_formation_ideal_gas_mass()
Method to calculate and return the ideal-gas formation mass Helmholtz energy of the phase.
Returns
A_formation_ideal_gas_mass [float] Formation mass Helmholtz energy, [J/kg]
A_ideal_gas(phase=None)
Method to calculate and return the ideal-gas Helmholtz energy of the phase.
𝐴𝑖𝑔 = 𝑈 𝑖𝑔 − 𝑇 𝑆 𝑖𝑔
Returns
A_ideal_gas [float] Ideal gas Helmholtz free energy, [J/(mol)]
A_ideal_gas_mass()
Method to calculate and return the mass ideal-gas Helmholtz energy of the phase.
Returns
A_ideal_gas_mass [float] Ideal gas mass Helmholtz free energy, [J/(kg)]
A_mass(phase=None)
Method to calculate and return mass Helmholtz energy of the phase.
1000𝐴𝑚𝑜𝑙𝑎𝑟
𝐴𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
A_mass [float] Mass Helmholtz energy, [J/(kg)]
A_reactive()
Method to calculate and return the Helmholtz free energy of the phase on a reactive basis.
Returns
A_reactive [float] Helmholtz free energy of the phase on a reactive basis, [J/(mol)]
A_reactive_mass()
Method to calculate and return mass Helmholtz energy on a reactive basis of the phase.
1000𝐴𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐴𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
A_reactive_mass [float] Mass Helmholtz energy on a reactive basis, [J/kg]
Actinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Actinium, [atoms/s]
Actinium_atom_flow()
Method to calculate and return the mole flow that is Actinium, [mol/s]
Actinium_atom_fraction()
Method to calculate and return the mole fraction that is Actinium element, [-]
Actinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Actinium element, [kg/s]
Actinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Actinium element, [-]
Aluminium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Aluminium, [atoms/s]
Aluminium_atom_flow()
Method to calculate and return the mole flow that is Aluminium, [mol/s]
Aluminium_atom_fraction()
Method to calculate and return the mole fraction that is Aluminium element, [-]
Aluminium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Aluminium element, [kg/s]
Aluminium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Aluminium element, [-]
Americium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Americium, [atoms/s]
Americium_atom_flow()
Method to calculate and return the mole flow that is Americium, [mol/s]
Americium_atom_fraction()
Method to calculate and return the mole fraction that is Americium element, [-]
Americium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Americium element, [kg/s]
Americium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Americium element, [-]
Antimony_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Antimony, [atoms/s]
Antimony_atom_flow()
Method to calculate and return the mole flow that is Antimony, [mol/s]
Antimony_atom_fraction()
Method to calculate and return the mole fraction that is Antimony element, [-]
Antimony_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Antimony element, [kg/s]
Antimony_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Antimony element, [-]
Argon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Argon, [atoms/s]
Argon_atom_flow()
Method to calculate and return the mole flow that is Argon, [mol/s]
Argon_atom_fraction()
Method to calculate and return the mole fraction that is Argon element, [-]
Argon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Argon element, [kg/s]
Argon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Argon element, [-]
Arsenic_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Arsenic, [atoms/s]
Arsenic_atom_flow()
Method to calculate and return the mole flow that is Arsenic, [mol/s]
Arsenic_atom_fraction()
Method to calculate and return the mole fraction that is Arsenic element, [-]
Arsenic_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Arsenic element, [kg/s]
Arsenic_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Arsenic element, [-]
Astatine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Astatine, [atoms/s]
Astatine_atom_flow()
Method to calculate and return the mole flow that is Astatine, [mol/s]
Astatine_atom_fraction()
Method to calculate and return the mole fraction that is Astatine element, [-]
Astatine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Astatine element, [kg/s]
Astatine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Astatine element, [-]
B_from_Z()
Barium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Barium, [atoms/s]
Barium_atom_flow()
Method to calculate and return the mole flow that is Barium, [mol/s]
Barium_atom_fraction()
Method to calculate and return the mole fraction that is Barium element, [-]
Barium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Barium element, [kg/s]
Barium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Barium element, [-]
Berkelium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Berkelium, [atoms/s]
Berkelium_atom_flow()
Method to calculate and return the mole flow that is Berkelium, [mol/s]
Berkelium_atom_fraction()
Method to calculate and return the mole fraction that is Berkelium element, [-]
Berkelium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Berkelium element, [kg/s]
Berkelium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Berkelium element, [-]
Beryllium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Beryllium, [atoms/s]
Beryllium_atom_flow()
Method to calculate and return the mole flow that is Beryllium, [mol/s]
Beryllium_atom_fraction()
Method to calculate and return the mole fraction that is Beryllium element, [-]
Beryllium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Beryllium element, [kg/s]
Beryllium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Beryllium element, [-]
Bismuth_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bismuth, [atoms/s]
Bismuth_atom_flow()
Method to calculate and return the mole flow that is Bismuth, [mol/s]
Bismuth_atom_fraction()
Method to calculate and return the mole fraction that is Bismuth element, [-]
Bismuth_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bismuth element, [kg/s]
Bismuth_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bismuth element, [-]
Bohrium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bohrium, [atoms/s]
Bohrium_atom_flow()
Method to calculate and return the mole flow that is Bohrium, [mol/s]
Bohrium_atom_fraction()
Method to calculate and return the mole fraction that is Bohrium element, [-]
Bohrium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bohrium element, [kg/s]
Bohrium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bohrium element, [-]
Boron_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Boron, [atoms/s]
Boron_atom_flow()
Method to calculate and return the mole flow that is Boron, [mol/s]
Boron_atom_fraction()
Method to calculate and return the mole fraction that is Boron element, [-]
Boron_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Boron element, [kg/s]
Boron_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Boron element, [-]
Bromine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bromine, [atoms/s]
Bromine_atom_flow()
Method to calculate and return the mole flow that is Bromine, [mol/s]
Bromine_atom_fraction()
Method to calculate and return the mole fraction that is Bromine element, [-]
Bromine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bromine element, [kg/s]
Bromine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bromine element, [-]
property CASs
CAS registration numbers for each component, [-].
Returns
CASs [list[str]] CAS registration numbers for each component, [-].
Cadmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cadmium, [atoms/s]
Cadmium_atom_flow()
Method to calculate and return the mole flow that is Cadmium, [mol/s]
Cadmium_atom_fraction()
Method to calculate and return the mole fraction that is Cadmium element, [-]
Cadmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cadmium element, [kg/s]
Cadmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cadmium element, [-]
Caesium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Caesium, [atoms/s]
Caesium_atom_flow()
Method to calculate and return the mole flow that is Caesium, [mol/s]
Caesium_atom_fraction()
Method to calculate and return the mole fraction that is Caesium element, [-]
Caesium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Caesium element, [kg/s]
Caesium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Caesium element, [-]
Calcium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Calcium, [atoms/s]
Calcium_atom_flow()
Method to calculate and return the mole flow that is Calcium, [mol/s]
Calcium_atom_fraction()
Method to calculate and return the mole fraction that is Calcium element, [-]
Calcium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Calcium element, [kg/s]
Calcium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Calcium element, [-]
Californium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Californium, [atoms/s]
Californium_atom_flow()
Method to calculate and return the mole flow that is Californium, [mol/s]
Californium_atom_fraction()
Method to calculate and return the mole fraction that is Californium element, [-]
Californium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Californium element, [kg/s]
Californium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Californium element, [-]
Carbon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Carbon, [atoms/s]
Carbon_atom_flow()
Method to calculate and return the mole flow that is Carbon, [mol/s]
Carbon_atom_fraction()
Method to calculate and return the mole fraction that is Carbon element, [-]
Carbon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Carbon element, [kg/s]
Carbon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Carbon element, [-]
property Carcinogens
Status of each component in cancer causing registries, [-].
Returns
Carcinogens [list[dict]] Status of each component in cancer causing registries, [-].
property Ceilings
Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Returns
Ceilings [list[tuple[(float, str)]]] Ceiling exposure limits to chemicals (and their units; ppm
or mg/m^3), [various].
Cerium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cerium, [atoms/s]
Cerium_atom_flow()
Method to calculate and return the mole flow that is Cerium, [mol/s]
Cerium_atom_fraction()
Method to calculate and return the mole fraction that is Cerium element, [-]
Cerium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cerium element, [kg/s]
Cerium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cerium element, [-]
Chlorine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Chlorine, [atoms/s]
Chlorine_atom_flow()
Method to calculate and return the mole flow that is Chlorine, [mol/s]
Chlorine_atom_fraction()
Method to calculate and return the mole fraction that is Chlorine element, [-]
Chlorine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Chlorine element, [kg/s]
Chlorine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Chlorine element, [-]
Chromium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Chromium, [atoms/s]
Chromium_atom_flow()
Method to calculate and return the mole flow that is Chromium, [mol/s]
Chromium_atom_fraction()
Method to calculate and return the mole fraction that is Chromium element, [-]
Chromium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Chromium element, [kg/s]
Chromium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Chromium element, [-]
Cobalt_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cobalt, [atoms/s]
Cobalt_atom_flow()
Method to calculate and return the mole flow that is Cobalt, [mol/s]
Cobalt_atom_fraction()
Method to calculate and return the mole fraction that is Cobalt element, [-]
Cobalt_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cobalt element, [kg/s]
Cobalt_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cobalt element, [-]
Copernicium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Copernicium, [atoms/s]
Copernicium_atom_flow()
Method to calculate and return the mole flow that is Copernicium, [mol/s]
Copernicium_atom_fraction()
Method to calculate and return the mole fraction that is Copernicium element, [-]
Copernicium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Copernicium element, [kg/s]
Copernicium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Copernicium element, [-]
Copper_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Copper, [atoms/s]
Copper_atom_flow()
Method to calculate and return the mole flow that is Copper, [mol/s]
Copper_atom_fraction()
Method to calculate and return the mole fraction that is Copper element, [-]
Copper_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Copper element, [kg/s]
Copper_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Copper element, [-]
Cp()
Method to calculate and return the constant-temperature and constant phase-fraction heat capacity of the
bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐶𝑝 = 𝐶𝑝,𝑖 𝛽𝑖
𝑖
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
Cp_Cv_ratio()
Method to calculate and return the Cp/Cv ratio of the phase.
𝐶𝑝
𝐶𝑣
Returns
Cp_Cv_ratio [float] Cp/Cv ratio, [-]
Cp_Cv_ratio_ideal_gas(phase=None)
Method to calculate and return the ratio of the ideal-gas heat capacity to its constant-volume heat capacity.
𝐶𝑝𝑖𝑔
𝐶𝑣𝑖𝑔
Returns
Cp_Cv_ratio_ideal_gas [float] Cp/Cv for the phase as an ideal gas, [-]
Cp_dep(phase=None)
Method to calculate and return the difference between the actual Cp and the ideal-gas heat capacity 𝐶𝑝𝑖𝑔 of
the phase.
𝐶𝑝𝑑𝑒𝑝 = 𝐶𝑝 − 𝐶𝑝𝑖𝑔
Returns
Cp_dep [float] Departure ideal gas heat capacity, [J/(mol*K)]
Cp_dep_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑝𝑑𝑒𝑝,𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑑𝑒𝑝,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_dep_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cp_ideal_gas(phase=None)
Method to calculate and return the ideal-gas heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑝𝑖𝑔 = 𝑧𝑖 𝐶𝑝,𝑖
𝑖
Returns
Cp [float] Ideal gas heat capacity, [J/(mol*K)]
Cp_ideal_gas_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑝𝑖𝑑𝑒𝑎𝑙,𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑖𝑑𝑒𝑎𝑙,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_ideal_gas_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cp_mass(phase=None)
Method to calculate and return mass constant pressure heat capacity of the phase.
1000𝐶𝑝𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_mass [float] Mass heat capacity, [J/(kg*K)]
Cpgs()
Method to calculate and return the pure-component ideal gas heat capacities of each species from the
thermo.heat_capacity.HeatCapacityGas objects.
Returns
Cpgs [list[float]] Ideal gas pure component heat capacities, [J/(mol*K)]
Cpls()
Method to calculate and return the pure-component liquid temperature-dependent heat capacities of each
species from the thermo.heat_capacity.HeatCapacityLiquid objects.
Note that some correlation methods for liquid heat capacity are at low pressure, and others are along the
saturation line. There is a large difference in values.
Returns
Cpls [list[float]] Pure component liquid heat capacities, [J/(mol*K)]
Cpss()
Method to calculate and return the pure-component solid heat capacities of each species from the thermo.
heat_capacity.HeatCapacitySolid objects.
Returns
Cpss [list[float]] Pure component solid heat capacities, [J/(mol*K)]
Curium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Curium, [atoms/s]
Curium_atom_flow()
Method to calculate and return the mole flow that is Curium, [mol/s]
Curium_atom_fraction()
Method to calculate and return the mole fraction that is Curium element, [-]
Curium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Curium element, [kg/s]
Curium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Curium element, [-]
Cv()
Method to calculate and return the constant-volume heat capacity Cv of the phase.
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑣 = 𝑇 / + 𝐶𝑝
𝜕𝑇 𝑉 𝜕𝑉 𝑇
Returns
Cv [float] Constant volume molar heat capacity, [J/(mol*K)]
Cv_dep(phase=None)
Method to calculate and return the difference between the actual Cv and the ideal-gas constant volume heat
capacity 𝐶𝑣𝑖𝑔 of the phase.
𝐶𝑣𝑑𝑒𝑝 = 𝐶𝑣 − 𝐶𝑣𝑖𝑔
Returns
Cv_dep [float] Departure ideal gas constant volume heat capacity, [J/(mol*K)]
Cv_dep_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑣𝑑𝑒𝑝,𝑚𝑜𝑙𝑎𝑟
𝐶𝑣𝑑𝑒𝑝,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cv_dep_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cv_ideal_gas(phase=None)
Method to calculate and return the ideal-gas constant volume heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑣𝑖𝑔 = 𝑧𝑖 𝐶𝑝,𝑖 −𝑅
𝑖
Returns
Cv [float] Ideal gas constant volume heat capacity, [J/(mol*K)]
Cv_mass(phase=None)
Method to calculate and return mass constant volume heat capacity of the phase.
1000𝐶𝑣𝑚𝑜𝑙𝑎𝑟
𝐶𝑣𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cv_mass [float] Mass constant volume heat capacity, [J/(kg*K)]
Darmstadtium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Darmstadtium, [atoms/s]
Darmstadtium_atom_flow()
Method to calculate and return the mole flow that is Darmstadtium, [mol/s]
Darmstadtium_atom_fraction()
Method to calculate and return the mole fraction that is Darmstadtium element, [-]
Darmstadtium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Darmstadtium element, [kg/s]
Darmstadtium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Darmstadtium element, [-]
Dubnium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Dubnium, [atoms/s]
Dubnium_atom_flow()
Method to calculate and return the mole flow that is Dubnium, [mol/s]
Dubnium_atom_fraction()
Method to calculate and return the mole fraction that is Dubnium element, [-]
Dubnium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Dubnium element, [kg/s]
Dubnium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Dubnium element, [-]
Dysprosium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Dysprosium, [atoms/s]
Dysprosium_atom_flow()
Method to calculate and return the mole flow that is Dysprosium, [mol/s]
Dysprosium_atom_fraction()
Method to calculate and return the mole fraction that is Dysprosium element, [-]
Dysprosium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Dysprosium element, [kg/s]
Dysprosium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Dysprosium element, [-]
Einsteinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Einsteinium, [atoms/s]
Einsteinium_atom_flow()
Method to calculate and return the mole flow that is Einsteinium, [mol/s]
Einsteinium_atom_fraction()
Method to calculate and return the mole fraction that is Einsteinium element, [-]
Einsteinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Einsteinium element, [kg/s]
Einsteinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Einsteinium element, [-]
property EnthalpySublimations
Wrapper to obtain the list of EnthalpySublimations objects of the associated
PropertyCorrelationsPackage.
property EnthalpyVaporizations
Wrapper to obtain the list of EnthalpyVaporizations objects of the associated
PropertyCorrelationsPackage.
Erbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Erbium, [atoms/s]
Erbium_atom_flow()
Method to calculate and return the mole flow that is Erbium, [mol/s]
Erbium_atom_fraction()
Method to calculate and return the mole fraction that is Erbium element, [-]
Erbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Erbium element, [kg/s]
Erbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Erbium element, [-]
Europium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Europium, [atoms/s]
Europium_atom_flow()
Method to calculate and return the mole flow that is Europium, [mol/s]
Europium_atom_fraction()
Method to calculate and return the mole fraction that is Europium element, [-]
Europium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Europium element, [kg/s]
Europium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Europium element, [-]
Fermium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Fermium, [atoms/s]
Fermium_atom_flow()
Method to calculate and return the mole flow that is Fermium, [mol/s]
Fermium_atom_fraction()
Method to calculate and return the mole fraction that is Fermium element, [-]
Fermium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Fermium element, [kg/s]
Fermium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Fermium element, [-]
Flerovium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Flerovium, [atoms/s]
Flerovium_atom_flow()
Method to calculate and return the mole flow that is Flerovium, [mol/s]
Flerovium_atom_fraction()
Method to calculate and return the mole fraction that is Flerovium element, [-]
Flerovium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Flerovium element, [kg/s]
Flerovium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Flerovium element, [-]
Fluorine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Fluorine, [atoms/s]
Fluorine_atom_flow()
Method to calculate and return the mole flow that is Fluorine, [mol/s]
Fluorine_atom_fraction()
Method to calculate and return the mole fraction that is Fluorine element, [-]
Fluorine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Fluorine element, [kg/s]
Fluorine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Fluorine element, [-]
Francium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Francium, [atoms/s]
Francium_atom_flow()
Method to calculate and return the mole flow that is Francium, [mol/s]
Francium_atom_fraction()
Method to calculate and return the mole fraction that is Francium element, [-]
Francium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Francium element, [kg/s]
Francium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Francium element, [-]
G()
Method to calculate and return the Gibbs free energy of the phase.
𝐺 = 𝐻 − 𝑇𝑆
Returns
G [float] Gibbs free energy, [J/mol]
property GWPs
Global Warming Potentials for each component (impact/mass chemical)/(impact/mass CO2), [-].
Returns
GWPs [list[float]] Global Warming Potentials for each component (impact/mass chemi-
cal)/(impact/mass CO2), [-].
G_dep()
Method to calculate and return the departure Gibbs free energy of the phase.
Returns
G_dep [float] Departure Gibbs free energy, [J/mol]
G_dep_flow(phase=None)
Method to return the flow rate of the difference between the ideal-gas Gibbs free energy of this phase and
the actual Gibbs free energy of the phase This method is only available when the phase is linked to an
EquilibriumStream.
Returns
G_dep_flow [float] Flow rate of departure Gibbs energy, [J/s]
G_dep_mass()
Method to calculate and return the mass departure Gibbs free energy of the phase.
Returns
G_dep_mass [float] Departure mass Gibbs free energy, [J/kg]
G_flow(phase=None)
Method to return the flow rate of Gibbs free energy of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
G_flow [float] Flow rate of Gibbs energy, [J/s]
G_formation_ideal_gas(phase=None)
Method to calculate and return the ideal-gas Gibbs free energy of formation of the phase (as if the phase
was an ideal gas).
𝐺𝑖𝑔 𝑖𝑔 𝑖𝑔 𝑖𝑔
𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 − 𝑇𝑟𝑒𝑓 𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒
Returns
G_formation_ideal_gas [float] Gibbs free energy of formation of the phase on a reactive
basis as an ideal gas, [J/(mol)]
G_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation Gibbs free energy of the phase.
Returns
G_formation_ideal_gas_mass [float] Formation mass Gibbs free energy, [J/kg]
G_ideal_gas(phase=None)
Method to calculate and return the ideal-gas Gibbs free energy of the phase.
𝐺𝑖𝑔 = 𝐻 𝑖𝑔 − 𝑇 𝑆 𝑖𝑔
Returns
G_ideal_gas [float] Ideal gas free energy, [J/(mol)]
G_ideal_gas_mass()
Method to calculate and return the mass ideal-gas Gibbs free energy of the phase.
Returns
G_ideal_gas_mass [float] Ideal gas mass free energy, [J/(kg)]
G_mass(phase=None)
Method to calculate and return mass Gibbs energy of the phase.
1000𝐺𝑚𝑜𝑙𝑎𝑟
𝐺𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
G_mass [float] Mass Gibbs energy, [J/(kg)]
G_min_criteria()
Method to calculate and return the Gibbs energy criteria required for comparing phase stability. This cal-
culation can be faster than calculating the full Gibbs energy. For this comparison to work, all phases must
use the ideal gas basis.
𝐺criteria = 𝐺𝑑𝑒𝑝 + 𝑅𝑇
∑︁
𝑧𝑖 ln 𝑧𝑖
𝑖
Returns
G_crit [float] Gibbs free energy like criteria [J/mol]
G_reactive()
Method to calculate and return the Gibbs free energy of the phase on a reactive basis.
Returns
G_reactive [float] Gibbs free energy of the phase on a reactive basis, [J/(mol)]
G_reactive_mass()
Method to calculate and return mass Gibbs free energy on a reactive basis of the phase.
1000𝐺𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐺𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
G_reactive_mass [float] Gibbs free energy on a reactive basis, [J/kg]
Gadolinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gadolinium, [atoms/s]
Gadolinium_atom_flow()
Method to calculate and return the mole flow that is Gadolinium, [mol/s]
Gadolinium_atom_fraction()
Method to calculate and return the mole fraction that is Gadolinium element, [-]
Gadolinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gadolinium element, [kg/s]
Gadolinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gadolinium element, [-]
Gallium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gallium, [atoms/s]
Gallium_atom_flow()
Method to calculate and return the mole flow that is Gallium, [mol/s]
Gallium_atom_fraction()
Method to calculate and return the mole fraction that is Gallium element, [-]
Gallium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gallium element, [kg/s]
Gallium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gallium element, [-]
Germanium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Germanium, [atoms/s]
Germanium_atom_flow()
Method to calculate and return the mole flow that is Germanium, [mol/s]
Germanium_atom_fraction()
Method to calculate and return the mole fraction that is Germanium element, [-]
Germanium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Germanium element, [kg/s]
Germanium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Germanium element, [-]
property Gfgs
Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
Returns
Gfgs [list[float]] Ideal gas standard molar Gibbs free energy of formation for each compo-
nent, [J/mol].
property Gfgs_mass
Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
Returns
Gfgs_mass [list[float]] Ideal gas standard Gibbs free energy of formation for each compo-
nent, [J/kg].
Gold_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gold, [atoms/s]
Gold_atom_flow()
Method to calculate and return the mole flow that is Gold, [mol/s]
Gold_atom_fraction()
Method to calculate and return the mole fraction that is Gold element, [-]
Gold_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gold element, [kg/s]
Gold_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gold element, [-]
H()
Method to calculate and return the constant-temperature and constant phase-fraction enthalpy of the bulk
phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐻= 𝐻𝑖 𝛽𝑖
𝑖
Returns
H [float] Molar enthalpy, [J/(mol)]
H_C_ratio(phase=None)
Method to calculate and return the atomic ratio of hydrogen atoms to carbon atoms, based on the current
composition of the phase.
Returns
H_C_ratio [float] H/C ratio on a molar basis, [-]
Notes
Notes
𝐻 𝑑𝑒𝑝 = 𝐻 − 𝐻 𝑖𝑔
Returns
H_dep [float] Departure enthalpy, [J/(mol)]
H_dep_flow(phase=None)
Method to return the flow rate of the difference between the ideal-gas energy of this phase and the actual
energy of the phase This method is only available when the phase is linked to an EquilibriumStream.
Returns
H_dep_flow [float] Flow rate of departure energy, [J/s]
H_dep_mass()
Method to calculate and return the mass departure enthalpy of the phase.
Returns
H_dep_mass [float] Departure mass enthalpy free energy, [J/kg]
H_flow(phase=None)
Method to return the flow rate of enthalpy of this phase. This method is only available when the phase is
linked to an EquilibriumStream.
Returns
H_flow [float] Flow rate of energy, [J/s]
H_formation_ideal_gas(phase=None)
Method to calculate and return the ideal-gas enthalpy of formation of the phase (as if the phase was an ideal
gas).
𝑖𝑔
∑︁
𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝑧𝑖 𝐻𝑓,𝑖
𝑖
Returns
H_formation_ideal_gas [float] Enthalpy of formation of the phase on a reactive basis as an
ideal gas, [J/mol]
H_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation enthalpy of the phase.
Returns
H_formation_ideal_gas_mass [float] Formation mass enthalpy, [J/kg]
H_ideal_gas(phase=None)
Method to calculate and return the ideal-gas enthalpy of the phase.
∑︁
𝐻 𝑖𝑔 = 𝑧𝑖 𝐻𝑖𝑖𝑔
𝑖
Returns
H [float] Ideal gas enthalpy, [J/(mol)]
H_ideal_gas_mass()
Method to calculate and return the mass ideal-gas enthalpy of the phase.
Returns
H_ideal_gas_mass [float] Ideal gas mass enthalpy, [J/(kg)]
H_mass(phase=None)
Method to calculate and return mass enthalpy of the phase.
1000𝐻𝑚𝑜𝑙𝑎𝑟
𝐻𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Returns
H_reactive [float] Reactive molar enthalpy, [J/(mol)]
H_reactive_mass()
Method to calculate and return mass enthalpy on a reactive basis of the phase.
1000𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
H_reactive_mass [float] Mass enthalpy on a reactive basis, [J/kg]
Hafnium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hafnium, [atoms/s]
Hafnium_atom_flow()
Method to calculate and return the mole flow that is Hafnium, [mol/s]
Hafnium_atom_fraction()
Method to calculate and return the mole fraction that is Hafnium element, [-]
Hafnium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hafnium element, [kg/s]
Hafnium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hafnium element, [-]
Hassium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hassium, [atoms/s]
Hassium_atom_flow()
Method to calculate and return the mole flow that is Hassium, [mol/s]
Hassium_atom_fraction()
Method to calculate and return the mole fraction that is Hassium element, [-]
Hassium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hassium element, [kg/s]
Hassium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hassium element, [-]
Hc(phase=None)
Method to calculate and return the molar ideal-gas higher heat of combustion of the object, [J/mol]
Returns
Hc [float] Molar higher heat of combustion, [J/(mol)]
Hc_lower(phase=None)
Method to calculate and return the molar ideal-gas lower heat of combustion of the object, [J/mol]
Returns
property Hfgs
Ideal gas standard molar enthalpies of formation for each component, [J/mol].
Returns
Hfgs [list[float]] Ideal gas standard molar enthalpies of formation for each component,
[J/mol].
property Hfgs_mass
Ideal gas standard enthalpies of formation for each component, [J/kg].
Returns
Hfgs_mass [list[float]] Ideal gas standard enthalpies of formation for each component, [J/kg].
property Hfus_Tms
Molar heats of fusion for each component at their respective melting points, [J/mol].
Returns
Hfus_Tms [list[float]] Molar heats of fusion for each component at their respective melting
points, [J/mol].
property Hfus_Tms_mass
Heats of fusion for each component at their respective melting points, [J/kg].
Returns
Hfus_Tms_mass [list[float]] Heats of fusion for each component at their respective melting
points, [J/kg].
Holmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Holmium, [atoms/s]
Holmium_atom_flow()
Method to calculate and return the mole flow that is Holmium, [mol/s]
Holmium_atom_fraction()
Method to calculate and return the mole fraction that is Holmium element, [-]
Holmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Holmium element, [kg/s]
Holmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Holmium element, [-]
property Hsub_Tts
Heats of sublimation for each component at their respective triple points, [J/mol].
Returns
Hsub_Tts [list[float]] Heats of sublimation for each component at their respective triple
points, [J/mol].
property Hsub_Tts_mass
Heats of sublimation for each component at their respective triple points, [J/kg].
Returns
Hsub_Tts_mass [list[float]] Heats of sublimation for each component at their respective
triple points, [J/kg].
Hsubs()
Method to calculate and return the pure-component enthalpy of sublimation of each species from the
thermo.phase_change.EnthalpySublimation objects.
Returns
Hsubs [list[float]] Sublimation enthalpies, [J/mol]
Notes
Warning: This is not necessarily consistent with the saturation enthalpy change calculated by a flash
algorithm.
property Hvap_298s
Molar heats of vaporization for each component at 298.15 K, [J/mol].
Returns
Hvap_298s [list[float]] Molar heats of vaporization for each component at 298.15 K, [J/mol].
property Hvap_298s_mass
Heats of vaporization for each component at 298.15 K, [J/kg].
Returns
Hvap_298s_mass [list[float]] Heats of vaporization for each component at 298.15 K, [J/kg].
property Hvap_Tbs
Molar heats of vaporization for each component at their respective normal boiling points, [J/mol].
Returns
Hvap_Tbs [list[float]] Molar heats of vaporization for each component at their respective
normal boiling points, [J/mol].
property Hvap_Tbs_mass
Heats of vaporization for each component at their respective normal boiling points, [J/kg].
Returns
Hvap_Tbs_mass [list[float]] Heats of vaporization for each component at their respective
normal boiling points, [J/kg].
Hvaps()
Method to calculate and return the pure-component enthalpy of vaporization of each species from the
thermo.phase_change.EnthalpyVaporization objects.
Returns
Hvaps [list[float]] Enthalpies of vaporization, [J/mol]
Notes
Warning: This is not necessarily consistent with the saturation enthalpy change calculated by a flash
algorithm.
Hydrogen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hydrogen, [atoms/s]
Hydrogen_atom_flow()
Method to calculate and return the mole flow that is Hydrogen, [mol/s]
Hydrogen_atom_fraction()
Method to calculate and return the mole fraction that is Hydrogen element, [-]
Hydrogen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hydrogen element, [kg/s]
Hydrogen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hydrogen element, [-]
property IDs
Alias of CASs.
property InChI_Keys
InChI Keys for each component, [-].
Returns
InChI_Keys [list[str]] InChI Keys for each component, [-].
property InChIs
InChI strings for each component, [-].
Returns
InChIs [list[str]] InChI strings for each component, [-].
Indium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Indium, [atoms/s]
Indium_atom_flow()
Method to calculate and return the mole flow that is Indium, [mol/s]
Indium_atom_fraction()
Method to calculate and return the mole fraction that is Indium element, [-]
Indium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Indium element, [kg/s]
Indium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Indium element, [-]
Iodine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iodine, [atoms/s]
Iodine_atom_flow()
Method to calculate and return the mole flow that is Iodine, [mol/s]
Iodine_atom_fraction()
Method to calculate and return the mole fraction that is Iodine element, [-]
Iodine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iodine element, [kg/s]
Iodine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iodine element, [-]
Iridium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iridium, [atoms/s]
Iridium_atom_flow()
Method to calculate and return the mole flow that is Iridium, [mol/s]
Iridium_atom_fraction()
Method to calculate and return the mole fraction that is Iridium element, [-]
Iridium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iridium element, [kg/s]
Iridium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iridium element, [-]
Iron_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iron, [atoms/s]
Iron_atom_flow()
Method to calculate and return the mole flow that is Iron, [mol/s]
Iron_atom_fraction()
Method to calculate and return the mole fraction that is Iron element, [-]
Iron_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iron element, [kg/s]
Iron_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iron element, [-]
Joule_Thomson()
Method to calculate and return the Joule-Thomson coefficient of the bulk according to the selected calcu-
lation methodology.
(︂ )︂
𝜕𝑇
𝜇𝐽𝑇 =
𝜕𝑃 𝐻
Returns
mu_JT [float] Joule-Thomson coefficient [K/Pa]
Krypton_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Krypton, [atoms/s]
Krypton_atom_flow()
Method to calculate and return the mole flow that is Krypton, [mol/s]
Krypton_atom_fraction()
Method to calculate and return the mole fraction that is Krypton element, [-]
Krypton_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Krypton element, [kg/s]
Krypton_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Krypton element, [-]
Ks(phase, phase_ref=None)
Method to calculate and return the K-values of each phase. These are NOT just liquid-vapor K values; these
are thermodynamic K values. The reference phase can be specified with phase_ref, and then the K-values
will be with respect to that phase.
𝑧𝑖,phase
𝐾𝑖 =
𝑧𝑖,ref phase
Returns
Ks [list[float]] Equilibrium K values, [-]
property LF
Method to return the liquid fraction of the equilibrium state. If no liquid is present, 0 is always returned.
Returns
LF [float] Liquid molar fraction, [-]
property LFLs
Lower flammability limits for each component, [-].
Returns
LFLs [list[float]] Lower flammability limits for each component, [-].
Lanthanum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lanthanum, [atoms/s]
Lanthanum_atom_flow()
Method to calculate and return the mole flow that is Lanthanum, [mol/s]
Lanthanum_atom_fraction()
Method to calculate and return the mole fraction that is Lanthanum element, [-]
Lanthanum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lanthanum element, [kg/s]
Lanthanum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lanthanum element, [-]
Lawrencium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lawrencium, [atoms/s]
Lawrencium_atom_flow()
Method to calculate and return the mole flow that is Lawrencium, [mol/s]
Lawrencium_atom_fraction()
Method to calculate and return the mole fraction that is Lawrencium element, [-]
Lawrencium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lawrencium element, [kg/s]
Lawrencium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lawrencium element, [-]
Lead_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lead, [atoms/s]
Lead_atom_flow()
Method to calculate and return the mole flow that is Lead, [mol/s]
Lead_atom_fraction()
Method to calculate and return the mole fraction that is Lead element, [-]
Lead_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lead element, [kg/s]
Lead_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lead element, [-]
Lithium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lithium, [atoms/s]
Lithium_atom_flow()
Method to calculate and return the mole flow that is Lithium, [mol/s]
Lithium_atom_fraction()
Method to calculate and return the mole fraction that is Lithium element, [-]
Lithium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lithium element, [kg/s]
Lithium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lithium element, [-]
Livermorium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Livermorium, [atoms/s]
Livermorium_atom_flow()
Method to calculate and return the mole flow that is Livermorium, [mol/s]
Livermorium_atom_fraction()
Method to calculate and return the mole fraction that is Livermorium element, [-]
Livermorium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Livermorium element, [kg/s]
Livermorium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Livermorium element, [-]
Lutetium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lutetium, [atoms/s]
Lutetium_atom_flow()
Method to calculate and return the mole flow that is Lutetium, [mol/s]
Lutetium_atom_fraction()
Method to calculate and return the mole fraction that is Lutetium element, [-]
Lutetium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lutetium element, [kg/s]
Lutetium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lutetium element, [-]
MW(phase=None)
Method to calculate and return the molecular weight of the phase.
∑︁
MW = 𝑧𝑖 MW𝑖
𝑖
Returns
MW [float] Molecular weight of the phase, [g/mol]
property MWs
Similatiry variables for each component, [g/mol].
Returns
MWs [list[float]] Similatiry variables for each component, [g/mol].
Magnesium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Magnesium, [atoms/s]
Magnesium_atom_flow()
Method to calculate and return the mole flow that is Magnesium, [mol/s]
Magnesium_atom_fraction()
Method to calculate and return the mole fraction that is Magnesium element, [-]
Magnesium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Magnesium element, [kg/s]
Magnesium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Magnesium element, [-]
Manganese_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Manganese, [atoms/s]
Manganese_atom_flow()
Method to calculate and return the mole flow that is Manganese, [mol/s]
Manganese_atom_fraction()
Method to calculate and return the mole fraction that is Manganese element, [-]
Manganese_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Manganese element, [kg/s]
Manganese_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Manganese element, [-]
Meitnerium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Meitnerium, [atoms/s]
Meitnerium_atom_flow()
Method to calculate and return the mole flow that is Meitnerium, [mol/s]
Meitnerium_atom_fraction()
Method to calculate and return the mole fraction that is Meitnerium element, [-]
Meitnerium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Meitnerium element, [kg/s]
Meitnerium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Meitnerium element, [-]
Mendelevium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Mendelevium, [atoms/s]
Mendelevium_atom_flow()
Method to calculate and return the mole flow that is Mendelevium, [mol/s]
Mendelevium_atom_fraction()
Method to calculate and return the mole fraction that is Mendelevium element, [-]
Mendelevium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Mendelevium element, [kg/s]
Mendelevium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Mendelevium element, [-]
Mercury_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Mercury, [atoms/s]
Mercury_atom_flow()
Method to calculate and return the mole flow that is Mercury, [mol/s]
Mercury_atom_fraction()
Method to calculate and return the mole fraction that is Mercury element, [-]
Mercury_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Mercury element, [kg/s]
Mercury_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Mercury element, [-]
Molybdenum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Molybdenum, [atoms/s]
Molybdenum_atom_flow()
Method to calculate and return the mole flow that is Molybdenum, [mol/s]
Molybdenum_atom_fraction()
Method to calculate and return the mole fraction that is Molybdenum element, [-]
Molybdenum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Molybdenum element, [kg/s]
Molybdenum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Molybdenum element, [-]
Moscovium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Moscovium, [atoms/s]
Moscovium_atom_flow()
Method to calculate and return the mole flow that is Moscovium, [mol/s]
Moscovium_atom_fraction()
Method to calculate and return the mole fraction that is Moscovium element, [-]
Moscovium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Moscovium element, [kg/s]
Moscovium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Moscovium element, [-]
N
Neodymium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neodymium, [atoms/s]
Neodymium_atom_flow()
Method to calculate and return the mole flow that is Neodymium, [mol/s]
Neodymium_atom_fraction()
Method to calculate and return the mole fraction that is Neodymium element, [-]
Neodymium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neodymium element, [kg/s]
Neodymium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neodymium element, [-]
Neon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neon, [atoms/s]
Neon_atom_flow()
Method to calculate and return the mole flow that is Neon, [mol/s]
Neon_atom_fraction()
Method to calculate and return the mole fraction that is Neon element, [-]
Neon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neon element, [kg/s]
Neon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neon element, [-]
Neptunium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neptunium, [atoms/s]
Neptunium_atom_flow()
Method to calculate and return the mole flow that is Neptunium, [mol/s]
Neptunium_atom_fraction()
Method to calculate and return the mole fraction that is Neptunium element, [-]
Neptunium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neptunium element, [kg/s]
Neptunium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neptunium element, [-]
Nickel_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nickel, [atoms/s]
Nickel_atom_flow()
Method to calculate and return the mole flow that is Nickel, [mol/s]
Nickel_atom_fraction()
Method to calculate and return the mole fraction that is Nickel element, [-]
Nickel_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nickel element, [kg/s]
Nickel_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nickel element, [-]
Nihonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nihonium, [atoms/s]
Nihonium_atom_flow()
Method to calculate and return the mole flow that is Nihonium, [mol/s]
Nihonium_atom_fraction()
Method to calculate and return the mole fraction that is Nihonium element, [-]
Nihonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nihonium element, [kg/s]
Nihonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nihonium element, [-]
Niobium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Niobium, [atoms/s]
Niobium_atom_flow()
Method to calculate and return the mole flow that is Niobium, [mol/s]
Niobium_atom_fraction()
Method to calculate and return the mole fraction that is Niobium element, [-]
Niobium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Niobium element, [kg/s]
Niobium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Niobium element, [-]
Nitrogen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nitrogen, [atoms/s]
Nitrogen_atom_flow()
Method to calculate and return the mole flow that is Nitrogen, [mol/s]
Nitrogen_atom_fraction()
Method to calculate and return the mole fraction that is Nitrogen element, [-]
Nitrogen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nitrogen element, [kg/s]
Nitrogen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nitrogen element, [-]
Nobelium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nobelium, [atoms/s]
Nobelium_atom_flow()
Method to calculate and return the mole flow that is Nobelium, [mol/s]
Nobelium_atom_fraction()
Method to calculate and return the mole fraction that is Nobelium element, [-]
Nobelium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nobelium element, [kg/s]
Nobelium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nobelium element, [-]
property ODPs
Ozone Depletion Potentials for each component (impact/mass chemical)/(impact/mass CFC-11), [-].
Returns
ODPs [list[float]] Ozone Depletion Potentials for each component (impact/mass chemi-
cal)/(impact/mass CFC-11), [-].
Oganesson_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Oganesson, [atoms/s]
Oganesson_atom_flow()
Method to calculate and return the mole flow that is Oganesson, [mol/s]
Oganesson_atom_fraction()
Method to calculate and return the mole fraction that is Oganesson element, [-]
Oganesson_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Oganesson element, [kg/s]
Oganesson_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Oganesson element, [-]
Osmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Osmium, [atoms/s]
Osmium_atom_flow()
Method to calculate and return the mole flow that is Osmium, [mol/s]
Osmium_atom_fraction()
Method to calculate and return the mole fraction that is Osmium element, [-]
Osmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Osmium element, [kg/s]
Osmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Osmium element, [-]
Oxygen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Oxygen, [atoms/s]
Oxygen_atom_flow()
Method to calculate and return the mole flow that is Oxygen, [mol/s]
Oxygen_atom_fraction()
Method to calculate and return the mole fraction that is Oxygen element, [-]
Oxygen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Oxygen element, [kg/s]
Oxygen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Oxygen element, [-]
P
PIP()
Method to calculate and return the phase identification parameter of the phase.
[︃ 2 2
]︃
𝜕 𝑃 𝜕 𝑃
𝜕𝑉 𝜕𝑇 𝜕𝑉 2
Π=𝑉 𝜕𝑃
− 𝜕𝑃
𝜕𝑇 𝜕𝑉
Returns
PIP [float] Phase identification parameter, [-]
property PSRK_groups
PSRK subgroup: count groups for each component, [-].
Returns
PSRK_groups [list[dict]] PSRK subgroup: count groups for each component, [-].
P_REF_IG = 101325.0
P_REF_IG_INV = 9.869232667160129e-06
property P_calc
Palladium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Palladium, [atoms/s]
Palladium_atom_flow()
Method to calculate and return the mole flow that is Palladium, [mol/s]
Palladium_atom_fraction()
Method to calculate and return the mole fraction that is Palladium element, [-]
Palladium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Palladium element, [kg/s]
Palladium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Palladium element, [-]
property Parachors
Parachors for each component, [N^0.25*m^2.75/mol].
Returns
Parachors [list[float]] Parachors for each component, [N^0.25*m^2.75/mol].
property Pcs
Critical pressures for each component, [Pa].
Returns
Pcs [list[float]] Critical pressures for each component, [Pa].
property PermittivityLiquids
Wrapper to obtain the list of PermittivityLiquids objects of the associated
PropertyCorrelationsPackage.
Phosphorus_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Phosphorus, [atoms/s]
Phosphorus_atom_flow()
Method to calculate and return the mole flow that is Phosphorus, [mol/s]
Phosphorus_atom_fraction()
Method to calculate and return the mole fraction that is Phosphorus element, [-]
Phosphorus_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Phosphorus element, [kg/s]
Phosphorus_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Phosphorus element, [-]
Platinum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Platinum, [atoms/s]
Platinum_atom_flow()
Method to calculate and return the mole flow that is Platinum, [mol/s]
Platinum_atom_fraction()
Method to calculate and return the mole fraction that is Platinum element, [-]
Platinum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Platinum element, [kg/s]
Platinum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Platinum element, [-]
Plutonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Plutonium, [atoms/s]
Plutonium_atom_flow()
Method to calculate and return the mole flow that is Plutonium, [mol/s]
Plutonium_atom_fraction()
Method to calculate and return the mole fraction that is Plutonium element, [-]
Plutonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Plutonium element, [kg/s]
Plutonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Plutonium element, [-]
Pmc(phase=None)
Method to calculate and return the mechanical critical pressure of the phase.
Returns
Pmc [float] Mechanical critical pressure, [Pa]
Polonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Polonium, [atoms/s]
Polonium_atom_flow()
Method to calculate and return the mole flow that is Polonium, [mol/s]
Polonium_atom_fraction()
Method to calculate and return the mole fraction that is Polonium element, [-]
Polonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Polonium element, [kg/s]
Polonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Polonium element, [-]
Potassium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Potassium, [atoms/s]
Potassium_atom_flow()
Method to calculate and return the mole flow that is Potassium, [mol/s]
Potassium_atom_fraction()
Method to calculate and return the mole fraction that is Potassium element, [-]
Potassium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Potassium element, [kg/s]
Potassium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Potassium element, [-]
Prandtl()
Method to calculate and return the Prandtl number of the phase
𝐶𝑝 𝜇 𝜈 𝐶𝑝 𝜌𝜈
𝑃𝑟 = = =
𝑘 𝛼 𝑘
Returns
Pr [float] Prandtl number []
Praseodymium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Praseodymium, [atoms/s]
Praseodymium_atom_flow()
Method to calculate and return the mole flow that is Praseodymium, [mol/s]
Praseodymium_atom_fraction()
Method to calculate and return the mole fraction that is Praseodymium element, [-]
Praseodymium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Praseodymium element, [kg/s]
Praseodymium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Praseodymium element, [-]
Promethium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Promethium, [atoms/s]
Promethium_atom_flow()
Method to calculate and return the mole flow that is Promethium, [mol/s]
Promethium_atom_fraction()
Method to calculate and return the mole fraction that is Promethium element, [-]
Promethium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Promethium element, [kg/s]
Promethium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Promethium element, [-]
Protactinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Protactinium, [atoms/s]
Protactinium_atom_flow()
Method to calculate and return the mole flow that is Protactinium, [mol/s]
Protactinium_atom_fraction()
Method to calculate and return the mole fraction that is Protactinium element, [-]
Protactinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Protactinium element, [kg/s]
Protactinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Protactinium element, [-]
property Psat_298s
Vapor pressures for each component at 298.15 K, [Pa].
Returns
Psat_298s [list[float]] Vapor pressures for each component at 298.15 K, [Pa].
Psats()
Method to calculate and return the pure-component vapor pressures of each species from the thermo.
vapor_pressure.VaporPressure objects.
Returns
Psats [list[float]] Vapor pressures, [Pa]
Notes
Warning: This is not necessarily consistent with the saturation pressure calculated by a flash algorithm.
Psubs()
Method to calculate and return the pure-component sublimation of each species from the thermo.
vapor_pressure.SublimationPressure objects.
Returns
Psubs [list[float]] Sublimation pressures, [Pa]
Notes
Warning: This is not necessarily consistent with the saturation pressure calculated by a flash algorithm.
property Pts
Triple point pressures for each component, [Pa].
Returns
Pts [list[float]] Triple point pressures for each component, [Pa].
property PubChems
Pubchem IDs for each component, [-].
Returns
PubChems [list[int]] Pubchem IDs for each component, [-].
property Q
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Q_calc
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Qg
Method to return the volume flow rate of this phase as an ideal gas, using the configured temperature
T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to an Equilibri-
umStream. This method totally ignores phase equilibrium.
Returns
Qg [float] Ideal gas flow rate of the phase, [m^3/s]
property Qg_calc
Method to return the volume flow rate of this phase as an ideal gas, using the configured temperature
T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to an Equilibri-
umStream. This method totally ignores phase equilibrium.
Returns
Qg [float] Ideal gas flow rate of the phase, [m^3/s]
property Qgs
Method to return the volume flow rate of each component in this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to
an EquilibriumStream. This method totally ignores phase equilibrium.
Returns
Qgs [float] Ideal gas flow rates of the components in the phase, [m^3/s]
property Qgs_calc
Method to return the volume flow rate of each component in this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to
an EquilibriumStream. This method totally ignores phase equilibrium.
Returns
Qgs [float] Ideal gas flow rates of the components in the phase, [m^3/s]
property Ql
Method to return the volume flow rate of this phase as an ideal liquid, using the configured standard molar
volumes Vml_STPs. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Radon_atom_fraction()
Method to calculate and return the mole fraction that is Radon element, [-]
Radon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Radon element, [kg/s]
Radon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Radon element, [-]
Rhenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rhenium, [atoms/s]
Rhenium_atom_flow()
Method to calculate and return the mole flow that is Rhenium, [mol/s]
Rhenium_atom_fraction()
Method to calculate and return the mole fraction that is Rhenium element, [-]
Rhenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rhenium element, [kg/s]
Rhenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rhenium element, [-]
Rhodium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rhodium, [atoms/s]
Rhodium_atom_flow()
Method to calculate and return the mole flow that is Rhodium, [mol/s]
Rhodium_atom_fraction()
Method to calculate and return the mole fraction that is Rhodium element, [-]
Rhodium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rhodium element, [kg/s]
Rhodium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rhodium element, [-]
Roentgenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Roentgenium, [atoms/s]
Roentgenium_atom_flow()
Method to calculate and return the mole flow that is Roentgenium, [mol/s]
Roentgenium_atom_fraction()
Method to calculate and return the mole fraction that is Roentgenium element, [-]
Roentgenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Roentgenium element, [kg/s]
Roentgenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Roentgenium element, [-]
Rubidium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rubidium, [atoms/s]
Rubidium_atom_flow()
Method to calculate and return the mole flow that is Rubidium, [mol/s]
Rubidium_atom_fraction()
Method to calculate and return the mole fraction that is Rubidium element, [-]
Rubidium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rubidium element, [kg/s]
Rubidium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rubidium element, [-]
Ruthenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Ruthenium, [atoms/s]
Ruthenium_atom_flow()
Method to calculate and return the mole flow that is Ruthenium, [mol/s]
Ruthenium_atom_fraction()
Method to calculate and return the mole fraction that is Ruthenium element, [-]
Ruthenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Ruthenium element, [kg/s]
Ruthenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Ruthenium element, [-]
Rutherfordium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rutherfordium, [atoms/s]
Rutherfordium_atom_flow()
Method to calculate and return the mole flow that is Rutherfordium, [mol/s]
Rutherfordium_atom_fraction()
Method to calculate and return the mole fraction that is Rutherfordium element, [-]
Rutherfordium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rutherfordium element, [kg/s]
Rutherfordium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rutherfordium element, [-]
S()
Method to calculate and return the constant-temperature and constant phase-fraction entropy of the bulk
phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝑆= 𝑆𝑖 𝛽𝑖
𝑖
Returns
S [float] Molar entropy, [J/(mol*K)]
property S0gs
Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
Returns
S0gs [list[float]] Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component,
[J/(mol*K)].
property S0gs_mass
Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
Returns
S0gs_mass [list[float]] Ideal gas absolute entropies at 298.15 K at 1 atm for each component,
[J/(kg*K)].
SG(phase=None)
Method to calculate and return the standard liquid specific gravity of the phase, using constant liquid pure
component densities not calculated by the phase object, at 60 °F.
Returns
SG [float] Specific gravity of the liquid, [-]
Notes
The reference density of water is from the IAPWS-95 standard - 999.0170824078306 kg/m^3.
SG_gas(phase=None)
Method to calculate and return the specific gravity of the phase with respect to a gas reference density.
Returns
SG_gas [float] Specific gravity of the gas, [-]
Notes
𝑆 𝑑𝑒𝑝 = 𝑆 − 𝑆 𝑖𝑔
Returns
S_dep [float] Departure entropy, [J/(mol*K)]
S_dep_flow(phase=None)
Method to return the flow rate of the difference between the ideal-gas entropy of this phase and the actual
entropy of the phase This method is only available when the phase is linked to an EquilibriumStream.
Returns
S_dep_flow [float] Flow rate of departure entropy, [J/(K*s)]
S_dep_mass()
Method to calculate and return the mass departure entropy of the phase.
Returns
S_dep_mass [float] Departure mass entropy free energy, [J/(kg*K)]
S_flow(phase=None)
Method to return the flow rate of entropy of this phase. This method is only available when the phase is
linked to an EquilibriumStream.
Returns
S_flow [float] Flow rate of entropy, [J/(K*s)]
S_formation_ideal_gas(phase=None)
Method to calculate and return the ideal-gas entropy of formation of the phase (as if the phase was an ideal
gas).
𝑖𝑔
∑︁
𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝑧𝑖 𝑆𝑓,𝑖
𝑖
Returns
S_formation_ideal_gas [float] Entropy of formation of the phase on a reactive basis as an
ideal gas, [J/(mol*K)]
S_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation entropy of the phase.
Returns
S_formation_ideal_gas_mass [float] Formation mass entropy, [J/(kg*K)]
S_ideal_gas(phase=None)
Method to calculate and return the ideal-gas entropy of the phase.
(︂ )︂
∑︁ 𝑃 ∑︁
𝑆 𝑖𝑔 = 𝑧𝑖 𝑆𝑖𝑖𝑔 − 𝑅 ln −𝑅 𝑧𝑖 ln(𝑧𝑖 )
𝑖
𝑃𝑟𝑒𝑓 𝑖
Returns
S [float] Ideal gas molar entropy, [J/(mol*K)]
S_ideal_gas_mass()
Method to calculate and return the mass ideal-gas entropy of the phase.
Returns
S_ideal_gas_mass [float] Ideal gas mass entropy, [J/(kg*K)]
S_mass(phase=None)
Method to calculate and return mass entropy of the phase.
1000𝑆𝑚𝑜𝑙𝑎𝑟
𝑆𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
S_mass [float] Mass enthalpy, [J/(kg*K)]
S_reactive()
Method to calculate and return the constant-temperature and constant phase-fraction reactive entropy of the
bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝑆reactive = 𝑆reactive,𝑖 𝛽𝑖
𝑖
Returns
S_reactive [float] Reactive molar entropy, [J/(mol*K)]
S_reactive_mass()
Method to calculate and return mass entropy on a reactive basis of the phase.
1000𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Returns
Sfgs [list[float]] Ideal gas standard molar entropies of formation for each component,
[J/(mol*K)].
property Sfgs_mass
Ideal gas standard entropies of formation for each component, [J/(kg*K)].
Returns
Sfgs_mass [list[float]] Ideal gas standard entropies of formation for each component,
[J/(kg*K)].
Silicon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Silicon, [atoms/s]
Silicon_atom_flow()
Method to calculate and return the mole flow that is Silicon, [mol/s]
Silicon_atom_fraction()
Method to calculate and return the mole fraction that is Silicon element, [-]
Silicon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Silicon element, [kg/s]
Silicon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Silicon element, [-]
Silver_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Silver, [atoms/s]
Silver_atom_flow()
Method to calculate and return the mole flow that is Silver, [mol/s]
Silver_atom_fraction()
Method to calculate and return the mole fraction that is Silver element, [-]
Silver_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Silver element, [kg/s]
Silver_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Silver element, [-]
property Skins
Whether each compound can be absorbed through the skin or not, [-].
Returns
Skins [list[bool]] Whether each compound can be absorbed through the skin or not, [-].
Sodium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Sodium, [atoms/s]
Sodium_atom_flow()
Method to calculate and return the mole flow that is Sodium, [mol/s]
Sodium_atom_fraction()
Method to calculate and return the mole fraction that is Sodium element, [-]
Sodium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Sodium element, [kg/s]
Sodium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Sodium element, [-]
property StielPolars
Stiel polar factors for each component, [-].
Returns
StielPolars [list[float]] Stiel polar factors for each component, [-].
property Stockmayers
Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over k) for each component,
[K].
Returns
Stockmayers [list[float]] Lennard-Jones Stockmayer parameters (depth of potential-energy
minimum over k) for each component, [K].
Strontium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Strontium, [atoms/s]
Strontium_atom_flow()
Method to calculate and return the mole flow that is Strontium, [mol/s]
Strontium_atom_fraction()
Method to calculate and return the mole fraction that is Strontium element, [-]
Strontium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Strontium element, [kg/s]
Strontium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Strontium element, [-]
property SublimationPressures
Wrapper to obtain the list of SublimationPressures objects of the associated
PropertyCorrelationsPackage.
Sulfur_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Sulfur, [atoms/s]
Sulfur_atom_flow()
Method to calculate and return the mole flow that is Sulfur, [mol/s]
Sulfur_atom_fraction()
Method to calculate and return the mole fraction that is Sulfur element, [-]
Sulfur_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Sulfur element, [kg/s]
Sulfur_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Sulfur element, [-]
property SurfaceTensionMixture
Wrapper to obtain the list of SurfaceTensionMixture objects of the associated
PropertyCorrelationsPackage.
property SurfaceTensions
Wrapper to obtain the list of SurfaceTensions objects of the associated PropertyCorrelationsPackage.
T
property TWAs
Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Returns
Tellurium_atom_fraction()
Method to calculate and return the mole fraction that is Tellurium element, [-]
Tellurium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tellurium element, [kg/s]
Tellurium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tellurium element, [-]
Tennessine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tennessine, [atoms/s]
Tennessine_atom_flow()
Method to calculate and return the mole flow that is Tennessine, [mol/s]
Tennessine_atom_fraction()
Method to calculate and return the mole fraction that is Tennessine element, [-]
Tennessine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tennessine element, [kg/s]
Tennessine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tennessine element, [-]
Terbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Terbium, [atoms/s]
Terbium_atom_flow()
Method to calculate and return the mole flow that is Terbium, [mol/s]
Terbium_atom_fraction()
Method to calculate and return the mole fraction that is Terbium element, [-]
Terbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Terbium element, [kg/s]
Terbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Terbium element, [-]
property Tflashs
Flash point temperatures for each component, [K].
Returns
Tflashs [list[float]] Flash point temperatures for each component, [K].
Thallium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thallium, [atoms/s]
Thallium_atom_flow()
Method to calculate and return the mole flow that is Thallium, [mol/s]
Thallium_atom_fraction()
Method to calculate and return the mole fraction that is Thallium element, [-]
Thallium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thallium element, [kg/s]
Thallium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thallium element, [-]
property ThermalConductivityGasMixture
Wrapper to obtain the list of ThermalConductivityGasMixture objects of the associated
PropertyCorrelationsPackage.
property ThermalConductivityGases
Wrapper to obtain the list of ThermalConductivityGases objects of the associated
PropertyCorrelationsPackage.
property ThermalConductivityLiquidMixture
Wrapper to obtain the list of ThermalConductivityLiquidMixture objects of the associated
PropertyCorrelationsPackage.
property ThermalConductivityLiquids
Wrapper to obtain the list of ThermalConductivityLiquids objects of the associated
PropertyCorrelationsPackage.
Thorium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thorium, [atoms/s]
Thorium_atom_flow()
Method to calculate and return the mole flow that is Thorium, [mol/s]
Thorium_atom_fraction()
Method to calculate and return the mole fraction that is Thorium element, [-]
Thorium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thorium element, [kg/s]
Thorium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thorium element, [-]
Thulium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thulium, [atoms/s]
Thulium_atom_flow()
Method to calculate and return the mole flow that is Thulium, [mol/s]
Thulium_atom_fraction()
Method to calculate and return the mole fraction that is Thulium element, [-]
Thulium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thulium element, [kg/s]
Thulium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thulium element, [-]
Tin_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tin, [atoms/s]
Tin_atom_flow()
Method to calculate and return the mole flow that is Tin, [mol/s]
Tin_atom_fraction()
Method to calculate and return the mole fraction that is Tin element, [-]
Tin_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tin element, [kg/s]
Tin_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tin element, [-]
Titanium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Titanium, [atoms/s]
Titanium_atom_flow()
Method to calculate and return the mole flow that is Titanium, [mol/s]
Titanium_atom_fraction()
Method to calculate and return the mole fraction that is Titanium element, [-]
Titanium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Titanium element, [kg/s]
Titanium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Titanium element, [-]
Tmc(phase=None)
Method to calculate and return the mechanical critical temperature of the phase.
Returns
Tmc [float] Mechanical critical temperature, [K]
property Tms
Melting temperatures for each component, [K].
Returns
Tms [list[float]] Melting temperatures for each component, [K].
property Tts
Triple point temperatures for each component, [K].
Returns
Tts [list[float]] Triple point temperatures for each component, [K].
Tungsten_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tungsten, [atoms/s]
Tungsten_atom_flow()
Method to calculate and return the mole flow that is Tungsten, [mol/s]
Tungsten_atom_fraction()
Method to calculate and return the mole fraction that is Tungsten element, [-]
Tungsten_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tungsten element, [kg/s]
Tungsten_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tungsten element, [-]
U()
Method to calculate and return the internal energy of the phase.
𝑈 = 𝐻 − 𝑃𝑉
Returns
U [float] Internal energy, [J/mol]
property UFLs
Upper flammability limits for each component, [-].
Returns
UFLs [list[float]] Upper flammability limits for each component, [-].
property UNIFAC_Dortmund_groups
UNIFAC_Dortmund_group: count groups for each component, [-].
Returns
Returns
U_dep [float] Departure internal energy, [J/mol]
U_dep_flow(phase=None)
Method to return the flow rate of the difference between the ideal-gas internal energy of this phase and the
actual internal energy of the phase This method is only available when the phase is linked to an Equilibri-
umStream.
Returns
U_dep_flow [float] Flow rate of departure internal energy, [J/s]
U_dep_mass()
Method to calculate and return the departure mass internal energy of the phase.
Returns
U_dep_mass [float] Departure mass internal energy, [J/kg]
U_flow(phase=None)
Method to return the flow rate of internal energy of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
U_flow [float] Flow rate of internal energy, [J/s]
U_formation_ideal_gas(phase=None)
Method to calculate and return the ideal-gas internal energy of formation of the phase (as if the phase was
an ideal gas).
𝑖𝑔 𝑖𝑔 𝑖𝑔
𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 − 𝑃𝑟𝑒𝑓 𝑉 𝑖𝑔
Returns
𝑈 𝑖𝑔 = 𝐻 𝑖𝑔 − 𝑃 𝑉 𝑖𝑔
Returns
U_ideal_gas [float] Ideal gas internal energy, [J/(mol)]
U_ideal_gas_mass()
Method to calculate and return the mass ideal-gas internal energy of the phase.
Returns
U_ideal_gas_mass [float] Ideal gas mass internal energy, [J/(kg)]
U_mass(phase=None)
Method to calculate and return mass internal energy of the phase.
1000𝑈𝑚𝑜𝑙𝑎𝑟
𝑈𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
U_mass [float] Mass internal energy, [J/(kg)]
U_reactive()
Method to calculate and return the internal energy of the phase on a reactive basis.
𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 − 𝑃 𝑉
Returns
U_reactive [float] Internal energy of the phase on a reactive basis, [J/(mol)]
U_reactive_mass()
Method to calculate and return mass internal energy on a reactive basis of the phase.
1000𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
U_reactive_mass [float] Mass internal energy on a reactive basis, [J/kg]
Uranium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Uranium, [atoms/s]
Uranium_atom_flow()
Method to calculate and return the mole flow that is Uranium, [mol/s]
Uranium_atom_fraction()
Method to calculate and return the mole fraction that is Uranium element, [-]
Uranium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Uranium element, [kg/s]
Uranium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Uranium element, [-]
V()
Method to calculate and return the molar volume of the bulk phase. This is a phase-fraction weighted
calculation.
𝑝
∑︁
𝑉 = 𝑉𝑖 𝛽𝑖
𝑖
Returns
V [float] Molar volume, [m^3/mol]
property VF
Method to return the vapor fraction of the equilibrium state. If no vapor/gas is present, 0 is always returned.
Returns
VF [float] Vapor molar fraction, [-]
property VF_calc
V_dep()
Method to calculate and return the departure (from ideal gas behavior) molar volume of the phase.
𝑅𝑇
𝑉𝑑𝑒𝑝 = 𝑉 −
𝑃
Returns
V_dep [float] Departure molar volume, [m^3/mol]
V_gas(phase=None)
Method to calculate and return the ideal-gas molar volume of the phase at the chosen reference temperature
and pressure, according to the temperature variable T_gas_ref and pressure variable P_gas_ref of the
thermo.bulk.BulkSettings.
𝑅𝑇𝑟𝑒𝑓
𝑉 𝑖𝑔 =
𝑃𝑟𝑒𝑓
Returns
V_gas [float] Ideal gas molar volume at the reference temperature and pressure, [m^3/mol]
V_gas_normal(phase=None)
Method to calculate and return the ideal-gas molar volume of the phase at the normal temperature and
pressure, according to the temperature variable T_normal and pressure variable P_normal of the thermo.
bulk.BulkSettings.
𝑅𝑇𝑛𝑜𝑟𝑚
𝑉 𝑖𝑔 =
𝑃𝑛𝑜𝑟𝑚
Returns
V_gas_normal [float] Ideal gas molar volume at normal temperature and pressure,
[m^3/mol]
V_gas_standard(phase=None)
Method to calculate and return the ideal-gas molar volume of the phase at the standard temperature and pres-
sure, according to the temperature variable T_standard and pressure variable P_standard of the thermo.
bulk.BulkSettings.
𝑅𝑇𝑠𝑡𝑑
𝑉 𝑖𝑔 =
𝑃𝑠𝑡𝑑
Returns
V_gas_standard [float] Ideal gas molar volume at standard temperature and pressure,
[m^3/mol]
V_ideal_gas(phase=None)
Method to calculate and return the ideal-gas molar volume of the phase.
𝑅𝑇
𝑉 𝑖𝑔 =
𝑃
Returns
V [float] Ideal gas molar volume, [m^3/mol]
V_iter(phase=None, force=False)
Method to calculate and return the volume of the phase in a way suitable for a TV resolution to converge
on the same pressure. This often means the return value of this method is an mpmath mpf. This dummy
method simply returns the implemented V method.
Returns
V [float or mpf] Molar volume, [m^3/mol]
V_liquid_ref(phase=None)
Method to calculate and return the liquid reference molar volume according to the temperature variable
T_liquid_volume_ref of thermo.bulk.BulkSettings and the composition of the phase.
∑︁
𝑉 = 𝑧𝑖 𝑉𝑖
𝑖
Returns
V_liquid_ref [float] Liquid molar volume at the reference condition, [m^3/mol]
V_liquids_ref()
Method to calculate and return the liquid reference molar volumes according to the temperature variable
T_liquid_volume_ref of thermo.bulk.BulkSettings.
Returns
V_liquids_ref [list[float]] Liquid molar volumes at the reference condition, [m^3/mol]
V_mass(phase=None)
Method to calculate and return the specific volume of the phase.
1000 · 𝑉 𝑀
𝑉𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
V_mass [float] Specific volume of the phase, [m^3/kg]
property Van_der_Waals_areas
Unnormalized Van der Waals areas for each component, [m^2/mol].
Returns
Van_der_Waals_areas [list[float]] Unnormalized Van der Waals areas for each component,
[m^2/mol].
property Van_der_Waals_volumes
Unnormalized Van der Waals volumes for each component, [m^3/mol].
Returns
Van_der_Waals_volumes [list[float]] Unnormalized Van der Waals volumes for each com-
ponent, [m^3/mol].
Vanadium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Vanadium, [atoms/s]
Vanadium_atom_flow()
Method to calculate and return the mole flow that is Vanadium, [mol/s]
Vanadium_atom_fraction()
Method to calculate and return the mole fraction that is Vanadium element, [-]
Vanadium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Vanadium element, [kg/s]
Vanadium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Vanadium element, [-]
property VaporPressures
Wrapper to obtain the list of VaporPressures objects of the associated PropertyCorrelationsPackage.
property Vcs
Critical molar volumes for each component, [m^3/mol].
Returns
Vcs [list[float]] Critical molar volumes for each component, [m^3/mol].
Vfgs(phase=None)
Method to calculate and return the ideal-gas volume fractions of the components of the phase. This is the
same as the mole fractions.
Returns
Vfgs [list[float]] Ideal-gas volume fractions of the components of the phase, [-]
property Vfgs_calc
Vfls(phase=None)
Method to calculate and return the ideal-liquid volume fractions of the components of the phase, us-
ing the standard liquid densities at the temperature variable T_liquid_volume_ref of thermo.bulk.
BulkSettings and the composition of the phase.
Returns
Vfls [list[float]] Ideal-liquid volume fractions of the components of the phase, [-]
property Vfls_calc
property ViscosityGasMixture
Wrapper to obtain the list of ViscosityGasMixture objects of the associated
PropertyCorrelationsPackage.
property ViscosityGases
Wrapper to obtain the list of ViscosityGases objects of the associated PropertyCorrelationsPackage.
property ViscosityLiquidMixture
Wrapper to obtain the list of ViscosityLiquidMixture objects of the associated
PropertyCorrelationsPackage.
property ViscosityLiquids
Wrapper to obtain the list of ViscosityLiquids objects of the associated PropertyCorrelationsPackage.
Vls()
Method to calculate and return the pure-component liquid temperature-dependent molar volume of each
species from the thermo.volume.VolumeLiquid objects.
These values are normally along the saturation line.
Returns
Vls [list[float]] Pure component temperature dependent liquid molar volume, [m^3/mol]
Vmc(phase=None)
Method to calculate and return the mechanical critical volume of the phase.
Returns
Vmc [float] Mechanical critical volume, [m^3/mol]
property Vmg_STPs
Gas molar volumes for each component at STP; metastable if normally another state, [m^3/mol].
Returns
Vmg_STPs [list[float]] Gas molar volumes for each component at STP; metastable if nor-
mally another state, [m^3/mol].
property Vml_60Fs
Liquid molar volumes for each component at 60 °F, [m^3/mol].
Returns
Vml_60Fs [list[float]] Liquid molar volumes for each component at 60 °F, [m^3/mol].
property Vml_STPs
Liquid molar volumes for each component at STP, [m^3/mol].
Returns
Vml_STPs [list[float]] Liquid molar volumes for each component at STP, [m^3/mol].
property Vml_Tms
Liquid molar volumes for each component at their respective melting points, [m^3/mol].
Returns
Vml_Tms [list[float]] Liquid molar volumes for each component at their respective melting
points, [m^3/mol].
property Vms_Tms
Solid molar volumes for each component at their respective melting points, [m^3/mol].
Returns
Vms_Tms [list[float]] Solid molar volumes for each component at their respective melting
points, [m^3/mol].
property VolumeGasMixture
Wrapper to obtain the list of VolumeGasMixture objects of the associated
PropertyCorrelationsPackage.
property VolumeGases
Wrapper to obtain the list of VolumeGases objects of the associated PropertyCorrelationsPackage.
property VolumeLiquidMixture
Wrapper to obtain the list of VolumeLiquidMixture objects of the associated
PropertyCorrelationsPackage.
property VolumeLiquids
Wrapper to obtain the list of VolumeLiquids objects of the associated PropertyCorrelationsPackage.
property VolumeSolidMixture
Wrapper to obtain the list of VolumeSolidMixture objects of the associated
PropertyCorrelationsPackage.
property VolumeSolids
Wrapper to obtain the list of VolumeSolids objects of the associated PropertyCorrelationsPackage.
Vss()
Method to calculate and return the pure-component solid temperature-dependent molar volume of each
species from the thermo.volume.VolumeSolid objects.
Returns
Vss [list[float]] Pure component temperature dependent solid molar volume, [m^3/mol]
Wobbe_index(phase=None)
Method to calculate and return the molar Wobbe index of the object, [J/mol].
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index [float] Molar Wobbe index, [J/(mol)]
Wobbe_index_lower(phase=None)
Method to calculate and return the molar lower Wobbe index of the object, [J/mol].
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower [float] Molar lower Wobbe index, [J/(mol)]
Wobbe_index_lower_mass(phase=None)
Method to calculate and return the lower mass Wobbe index of the object, [J/kg].
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_mass [float] Mass lower Wobbe index, [J/(kg)]
Wobbe_index_lower_normal(phase=None)
Method to calculate and return the volumetric normal lower Wobbe index of the object, [J/m^3]. The
normal gas volume is used in this calculation.
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_normal [float] Volumetric normal lower Wobbe index, [J/(m^3)]
Wobbe_index_lower_standard(phase=None)
Method to calculate and return the volumetric standard lower Wobbe index of the object, [J/m^3]. The
standard gas volume is used in this calculation.
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_standard [float] Volumetric standard lower Wobbe index, [J/(m^3)]
Wobbe_index_mass(phase=None)
Method to calculate and return the mass Wobbe index of the object, [J/kg].
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index_mass [float] Mass Wobbe index, [J/(kg)]
Wobbe_index_normal(phase=None)
Method to calculate and return the volumetric normal Wobbe index of the object, [J/m^3]. The normal gas
volume is used in this calculation.
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index [float] Volumetric normal Wobbe index, [J/(m^3)]
Wobbe_index_standard(phase=None)
Method to calculate and return the volumetric standard Wobbe index of the object, [J/m^3]. The standard
gas volume is used in this calculation.
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index_standard [float] Volumetric standard Wobbe index, [J/(m^3)]
Xenon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Xenon, [atoms/s]
Xenon_atom_flow()
Method to calculate and return the mole flow that is Xenon, [mol/s]
Xenon_atom_fraction()
Method to calculate and return the mole fraction that is Xenon element, [-]
Xenon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Xenon element, [kg/s]
Xenon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Xenon element, [-]
Ytterbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Ytterbium, [atoms/s]
Ytterbium_atom_flow()
Method to calculate and return the mole flow that is Ytterbium, [mol/s]
Ytterbium_atom_fraction()
Method to calculate and return the mole fraction that is Ytterbium element, [-]
Ytterbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Ytterbium element, [kg/s]
Ytterbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Ytterbium element, [-]
Yttrium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Yttrium, [atoms/s]
Yttrium_atom_flow()
Method to calculate and return the mole flow that is Yttrium, [mol/s]
Yttrium_atom_fraction()
Method to calculate and return the mole fraction that is Yttrium element, [-]
Yttrium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Yttrium element, [kg/s]
Yttrium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Yttrium element, [-]
Z()
Method to calculate and return the compressibility factor of the phase.
𝑃𝑉
𝑍=
𝑅𝑇
Returns
Z [float] Compressibility factor, [-]
property Zcs
Critical compressibilities for each component, [-].
Returns
Zcs [list[float]] Critical compressibilities for each component, [-].
Zinc_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Zinc, [atoms/s]
Zinc_atom_flow()
Method to calculate and return the mole flow that is Zinc, [mol/s]
Zinc_atom_fraction()
Method to calculate and return the mole fraction that is Zinc element, [-]
Zinc_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Zinc element, [kg/s]
Zinc_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Zinc element, [-]
Zirconium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Zirconium, [atoms/s]
Zirconium_atom_flow()
Method to calculate and return the mole flow that is Zirconium, [mol/s]
Zirconium_atom_fraction()
Method to calculate and return the mole fraction that is Zirconium element, [-]
Zirconium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Zirconium element, [kg/s]
Zirconium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Zirconium element, [-]
Zmc(phase=None)
Method to calculate and return the mechanical critical compressibility of the phase.
Returns
Zmc [float] Mechanical critical compressibility, [-]
activities(phase=None)
property aliases
Aliases for each component, [-].
Returns
aliases [list[str]] Aliases for each component, [-].
alpha()
Method to calculate and return the thermal diffusivity of the phase.
𝑘
𝛼=
𝜌𝐶𝑝
Returns
alpha [float] Thermal diffusivity, [m^2/s]
ammonia_molar_weight()
Method to calculate and return the effective quantiy of ammonia in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the ammonia component.
ammonia_partial_pressure()
Method to calculate and return the ideal partial pressure of ammonia, [Pa]
argon_molar_weight()
Method to calculate and return the effective quantiy of argon in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the argon component.
argon_partial_pressure()
Method to calculate and return the ideal partial pressure of argon, [Pa]
atom_content(phase=None)
Method to calculate and return the number of moles of each atom in the phase per mole of the phase; returns
a dictionary of atom counts, containing only those elements who are present.
Returns
atom_content [dict[str: float]] Atom counts, [-]
atom_count_flows(phase=None)
Method to calculate and return the atom count flow rates of the phase; returns a dictionary of atom count
flows, containing only those elements who are present.
Returns
atom_count_flows [dict[str: float]] Atom flows, [atoms/s]
atom_flows(phase=None)
Method to calculate and return the atomic flow rates of the phase; returns a dictionary of atom flows,
containing only those elements who are present.
Returns
atom_flows [dict[str: float]] Atom flows, [mol/s]
atom_fractions(phase=None)
Method to calculate and return the atomic composition of the phase; returns a dictionary of atom fraction
(by count), containing only those elements who are present.
Returns
atom_fractions [dict[str: float]] Atom fractions, [-]
atom_mass_flows(phase=None)
Method to calculate and return the atomic mass flow rates of the phase; returns a dictionary of atom mass
flows, containing only those elements who are present.
Returns
atom_mass_flows [dict[str: float]] Atom mass flows, [kg/s]
atom_mass_fractions(phase=None)
Method to calculate and return the atomic mass fractions of the phase; returns a dictionary of atom fraction
(by mass), containing only those elements who arxe present.
Returns
atom_mass_fractions [dict[str: float]] Atom mass fractions, [-]
property atomss
Breakdown of each component into its elements and their counts, as a dict, [-].
Returns
atomss [list[dict]] Breakdown of each component into its elements and their counts, as a dict,
[-].
betas
property betas_liquids
Method to calculate and return the fraction of the liquid phase that each liquid phase is, by molar phase
fraction. If the system is VLLL with phase fractions of 0.125 vapor, and [.25, .125, .5] for the three liquids
phases respectively, the return value would be [0.28571428, 0.142857142, 0.57142857].
Returns
betas_liquids [list[float]] Molar phase fractions of the overall liquid phase, [-]
property betas_mass
Method to calculate and return the mass fraction of all of the phases in the system.
Returns
betas_mass [list[float]] Mass phase fractions of all the phases, ordered vapor, liquid, then
solid , [-]
property betas_mass_liquids
Method to calculate and return the fraction of the liquid phase that each liquid phase is, by mass phase
fraction. If the system is VLLL with mass phase fractions of 0.125 vapor, and [.25, .125, .5] for the three
liquids phases respectively, the return value would be [0.28571428, 0.142857142, 0.57142857].
Returns
betas_mass_liquids [list[float]] Mass phase fractions of the overall liquid phase, [-]
property betas_mass_states
Method to return the mass phase fractions of each of the three fundamental types of phases.
Returns
betas_mass_states [list[float, 3]] List containing the mass phase fraction of gas, liquid, and
solid, [-]
property betas_states
Method to return the molar phase fractions of each of the three fundamental types of phases.
Returns
betas_states [list[float, 3]] List containing the molar phase fraction of gas, liquid, and solid,
[-]
property betas_volume
Method to calculate and return the volume fraction of all of the phases in the system.
Returns
betas_volume [list[float]] Volume phase fractions of all the phases, ordered vapor, liquid,
then solid , [-]
property betas_volume_liquids
Method to calculate and return the fraction of the liquid phase that each liquid phase is, by volume phase
fraction. If the system is VLLL with volume phase fractions of 0.125 vapor, and [.25, .125, .5] for the three
liquids phases respectively, the return value would be [0.28571428, 0.142857142, 0.57142857].
Returns
betas_volume_liquids [list[float]] Volume phase fractions of the overall liquid phase, [-]
property betas_volume_states
Method to return the volume phase fractions of each of the three fundamental types of phases.
Returns
betas_volume_states [list[float, 3]] List containing the volume phase fraction of gas, liquid,
and solid, [-]
bulk
carbon_dioxide_molar_weight()
Method to calculate and return the effective quantiy of carbon_dioxide in the phase as a molar weight,
[g/mol].
This is the molecular weight of the phase times the mass fraction of the carbon_dioxide component.
carbon_dioxide_partial_pressure()
Method to calculate and return the ideal partial pressure of carbon_dioxide, [Pa]
property charges
Charge number (valence) for each component, [-].
Returns
charges [list[float]] Charge number (valence) for each component, [-].
concentrations()
Method to return the molar concentrations of each component in the phase in units of mol/m^3. Molarity
is a term used in chemistry for a similar concept, usually given in units of mol/L.
Returns
Returns
d2P_dT2_frozen [float] Frozen constant-volume second derivative of pressure with respect
to temperature of the bulk phase, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the bulk according to the selected calculation methodology.
Returns
d2P_dTdV [float] Second volume derivative of pressure, [mol*Pa^2/(J*K)]
d2P_dTdV_frozen()
Method to calculate and return the second derivative of pressure with respect to volume and temperature of
the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction weighted
calculation.
phases
𝜕2𝑃 𝜕2𝑃
(︂ )︂ ∑︁ (︂ )︂
= 𝛽𝑖
𝜕𝑉 𝜕𝑇 𝛽,𝑧𝑠 𝑖
𝜕𝑉 𝜕𝑇 𝑖,𝛽𝑖 ,𝑧𝑠𝑖
Returns
d2P_dTdV_frozen [float] Frozen second derivative of pressure with respect to volume and
temperature of the bulk phase, [Pa*mol^2/m^6]
d2P_dV2()
Method to calculate and return the second volume derivative of pressure of the bulk according to the selected
calculation methodology.
Returns
d2P_dV2 [float] Second volume derivative of pressure, [Pa*mol^2/m^6]
d2P_dV2_frozen()
Method to calculate and return the constant-temperature second derivative of pressure with respect to vol-
ume of the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction
weighted calculation.
phases
𝜕2𝑃 𝜕2𝑃
(︂ )︂ ∑︁ (︂ )︂
= 𝛽𝑖
𝜕𝑉 2 𝑇,𝛽,𝑧𝑠 𝑖
𝜕𝑉 2 𝑖,𝑇,𝛽𝑖 ,𝑧𝑠𝑖
Returns
d2P_dV2_frozen [float] Frozen constant-temperature second derivative of pressure with re-
spect to volume of the bulk phase, [Pa*mol^2/m^6]
dA_dP()
Method to calculate and return the constant-temperature pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dA_dP [float] Constant-temperature pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dP_T()
Method to calculate and return the constant-temperature pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dA_dP [float] Constant-temperature pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dP_V()
Method to calculate and return the constant-volume pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐻 𝜕𝑇 𝜕𝑆
= −𝑉 −𝑆 −𝑇
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dA_dP_V [float] Constant-volume pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dT()
Method to calculate and return the constant-pressure temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dA_dT [float] Constant-pressure temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dT_P()
Method to calculate and return the constant-pressure temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dA_dT [float] Constant-pressure temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dT_V()
Method to calculate and return the constant-volume temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐻 𝜕𝑃 𝜕𝑆
= −𝑉 −𝑇 −𝑆
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dA_dT_V [float] Constant-volume temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dV_P()
Method to calculate and return the constant-pressure volume derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐴 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dA_dV_P [float] Constant-pressure volume derivative of Helmholtz energy, [J/(m^3)]
dA_dV_T()
Method to calculate and return the constant-temperature volume derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐴 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dA_dV_T [float] Constant-temperature volume derivative of Helmholtz energy, [J/(m^3)]
dA_mass_dP()
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑇
Returns
dA_mass_dP [float] The pressure derivative of mass Helmholtz energy of the phase at con-
stant temperature, [J/mol/Pa]
dA_mass_dP_T()
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑇
Returns
dA_mass_dP_T [float] The pressure derivative of mass Helmholtz energy of the phase at
constant temperature, [J/mol/Pa]
dA_mass_dP_V()
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
volume.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑉
Returns
dA_mass_dP_V [float] The pressure derivative of mass Helmholtz energy of the phase at
constant volume, [J/mol/Pa]
dA_mass_dT()
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑃
Returns
dA_mass_dT [float] The temperature derivative of mass Helmholtz energy of the phase at
constant pressure, [J/mol/K]
dA_mass_dT_P()
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑃
Returns
dA_mass_dT_P [float] The temperature derivative of mass Helmholtz energy of the phase
at constant pressure, [J/mol/K]
dA_mass_dT_V()
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
volume.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑉
Returns
dA_mass_dT_V [float] The temperature derivative of mass Helmholtz energy of the phase
at constant volume, [J/mol/K]
dA_mass_dV_P()
Method to calculate and return the volume derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑉 𝑃
Returns
dA_mass_dV_P [float] The volume derivative of mass Helmholtz energy of the phase at
constant pressure, [J/mol/m^3/mol]
dA_mass_dV_T()
Method to calculate and return the volume derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑉 𝑇
Returns
dA_mass_dV_T [float] The volume derivative of mass Helmholtz energy of the phase at
constant temperature, [J/mol/m^3/mol]
dCv_dP_T()
Method to calculate the pressure derivative of Cv, constant volume heat capacity, at constant temperature.
(︂ )︂
𝜕𝐶𝑣 𝑑 𝑑 𝑑
= −𝑇 dPdTV (𝑃 ) dVdTP (𝑃 ) − 𝑇 dVdTP (𝑃 ) dPdTV (𝑃 ) + Cp (𝑃 )
𝜕𝑃 𝑇 𝑑𝑃 𝑑𝑃 𝑑𝑃
Returns
dCv_dP_T [float] Pressure derivative of constant volume heat capacity at constant temper-
ature, [J/mol/K/Pa]
Notes
𝑇 dPdTV 2 (𝑇 ) 𝑑𝑇
𝑑 𝑑
dPdTV (𝑇 ) dPdTV 2 (𝑇 )
(︂ )︂
𝜕𝐶𝑣 dPdVT (𝑇 ) 2𝑇 dPdTV (𝑇 ) 𝑑𝑇 𝑑
=− + + + Cp (𝑇 )
𝜕𝑇 𝑃 dPdVT 2 (𝑇 ) dPdVT (𝑇 ) dPdVT (𝑇 ) 𝑑𝑇
Returns
dCv_dT_P [float] Temperature derivative of constant volume heat capacity at constant pres-
sure, [J/mol/K^2]
Notes
(︂ )︂
𝜕𝐶𝑣mass
𝜕𝑃 𝑇
Returns
dCv_mass_dP_T [float] The pressure derivative of mass Constant-volume heat capacity of
the phase at constant temperature, [J/(mol*K)/Pa]
dCv_mass_dT_P()
Method to calculate and return the temperature derivative of mass Constant-volume heat capacity of the
phase at constant pressure.
(︂ )︂
𝜕𝐶𝑣mass
𝜕𝑇 𝑃
Returns
dCv_mass_dT_P [float] The temperature derivative of mass Constant-volume heat capacity
of the phase at constant pressure, [J/(mol*K)/K]
dG_dP()
Method to calculate and return the constant-temperature pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dG_dP [float] Constant-temperature pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dP_T()
Method to calculate and return the constant-temperature pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dG_dP [float] Constant-temperature pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dP_V()
Method to calculate and return the constant-volume pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝑇 𝜕𝐻
= −𝑇 −𝑆 +
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dG_dP_V [float] Constant-volume pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dT()
Method to calculate and return the constant-pressure temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dG_dT [float] Constant-pressure temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dT_P()
Method to calculate and return the constant-pressure temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dG_dT [float] Constant-pressure temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dT_V()
Method to calculate and return the constant-volume temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dG_dT_V [float] Constant-volume temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dV_P()
Method to calculate and return the constant-pressure volume derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝐺 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dG_dV_P [float] Constant-pressure volume derivative of Gibbs free energy, [J/(m^3)]
dG_dV_T()
Method to calculate and return the constant-temperature volume derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝐺 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dG_dV_T [float] Constant-temperature volume derivative of Gibbs free energy, [J/(m^3)]
dG_mass_dP()
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑇
Returns
dG_mass_dP [float] The pressure derivative of mass Gibbs free energy of the phase at con-
stant temperature, [J/mol/Pa]
dG_mass_dP_T()
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑇
Returns
dG_mass_dP_T [float] The pressure derivative of mass Gibbs free energy of the phase at
constant temperature, [J/mol/Pa]
dG_mass_dP_V()
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
volume.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑉
Returns
dG_mass_dP_V [float] The pressure derivative of mass Gibbs free energy of the phase at
constant volume, [J/mol/Pa]
dG_mass_dT()
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑃
Returns
dG_mass_dT [float] The temperature derivative of mass Gibbs free energy of the phase at
constant pressure, [J/mol/K]
dG_mass_dT_P()
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑃
Returns
dG_mass_dT_P [float] The temperature derivative of mass Gibbs free energy of the phase
at constant pressure, [J/mol/K]
dG_mass_dT_V()
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
volume.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑉
Returns
dG_mass_dT_V [float] The temperature derivative of mass Gibbs free energy of the phase
at constant volume, [J/mol/K]
dG_mass_dV_P()
Method to calculate and return the volume derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑉 𝑃
Returns
dG_mass_dV_P [float] The volume derivative of mass Gibbs free energy of the phase at
constant pressure, [J/mol/m^3/mol]
dG_mass_dV_T()
Method to calculate and return the volume derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑉 𝑇
Returns
dG_mass_dV_T [float] The volume derivative of mass Gibbs free energy of the phase at
constant temperature, [J/mol/m^3/mol]
dH_dP()
Method to calculate and return the pressure derivative of enthalpy of the phase at constant pressure.
Returns
dH_dP_T [float] Pressure derivative of enthalpy, [J/(mol*Pa)]
dH_dP_T()
Method to calculate and return the pressure derivative of enthalpy of the phase at constant pressure.
Returns
dH_dP_T [float] Pressure derivative of enthalpy, [J/(mol*Pa)]
dH_dT()
Method to calculate and return the constant-temperature and constant phase-fraction heat capacity of the
bulk phase. This is a phase-fraction weighted calculation.
𝑝
∑︁
𝐶𝑝 = 𝐶𝑝,𝑖 𝛽𝑖
𝑖
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
dH_dT_P()
Method to calculate and return the temperature derivative of enthalpy of the phase at constant pressure.
Returns
dH_dT_P [float] Temperature derivative of enthalpy, [J/(mol*K)]
dH_mass_dP()
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑇
Returns
dH_mass_dP [float] The pressure derivative of mass enthalpy of the phase at constant tem-
perature, [J/mol/Pa]
dH_mass_dP_T()
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑇
Returns
dH_mass_dP_T [float] The pressure derivative of mass enthalpy of the phase at constant
temperature, [J/mol/Pa]
dH_mass_dP_V()
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant volume.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑉
Returns
dH_mass_dP_V [float] The pressure derivative of mass enthalpy of the phase at constant
volume, [J/mol/Pa]
dH_mass_dT()
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑃
Returns
dH_mass_dT [float] The temperature derivative of mass enthalpy of the phase at constant
pressure, [J/mol/K]
dH_mass_dT_P()
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑃
Returns
dH_mass_dT_P [float] The temperature derivative of mass enthalpy of the phase at constant
pressure, [J/mol/K]
dH_mass_dT_V()
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant volume.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑉
Returns
dH_mass_dT_V [float] The temperature derivative of mass enthalpy of the phase at constant
volume, [J/mol/K]
dH_mass_dV_P()
Method to calculate and return the volume derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑉 𝑃
Returns
dH_mass_dV_P [float] The volume derivative of mass enthalpy of the phase at constant
pressure, [J/mol/m^3/mol]
dH_mass_dV_T()
Method to calculate and return the volume derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑉 𝑇
Returns
dH_mass_dV_T [float] The volume derivative of mass enthalpy of the phase at constant
temperature, [J/mol/m^3/mol]
dP_dP_A()
Method to calculate and return the pressure derivative of pressure of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐴
Returns
dP_dP_A [float] The pressure derivative of pressure of the phase at constant Helmholtz en-
ergy, [Pa/Pa]
dP_dP_G()
Method to calculate and return the pressure derivative of pressure of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐺
Returns
dP_dP_G [float] The pressure derivative of pressure of the phase at constant Gibbs energy,
[Pa/Pa]
dP_dP_H()
Method to calculate and return the pressure derivative of pressure of the phase at constant enthalpy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐻
Returns
dP_dP_H [float] The pressure derivative of pressure of the phase at constant enthalpy,
[Pa/Pa]
dP_dP_S()
Method to calculate and return the pressure derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝑆
Returns
dP_dP_S [float] The pressure derivative of pressure of the phase at constant entropy, [Pa/Pa]
dP_dP_U()
Method to calculate and return the pressure derivative of pressure of the phase at constant internal energy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝑈
Returns
dP_dP_U [float] The pressure derivative of pressure of the phase at constant internal energy,
[Pa/Pa]
dP_dT()
Method to calculate and return the first temperature derivative of pressure of the bulk according to the
selected calculation methodology.
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dT_A()
Method to calculate and return the temperature derivative of pressure of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐴
Returns
dP_dT_A [float] The temperature derivative of pressure of the phase at constant Helmholtz
energy, [Pa/K]
dP_dT_G()
Method to calculate and return the temperature derivative of pressure of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐺
Returns
dP_dT_G [float] The temperature derivative of pressure of the phase at constant Gibbs en-
ergy, [Pa/K]
dP_dT_H()
Method to calculate and return the temperature derivative of pressure of the phase at constant enthalpy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐻
Returns
dP_dT_H [float] The temperature derivative of pressure of the phase at constant enthalpy,
[Pa/K]
dP_dT_S()
Method to calculate and return the temperature derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝑆
Returns
dP_dT_S [float] The temperature derivative of pressure of the phase at constant entropy,
[Pa/K]
dP_dT_U()
Method to calculate and return the temperature derivative of pressure of the phase at constant internal
energy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝑈
Returns
dP_dT_U [float] The temperature derivative of pressure of the phase at constant internal
energy, [Pa/K]
dP_dT_frozen()
Method to calculate and return the constant-volume derivative of pressure with respect to temperature of
the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction weighted
calculation.
(︂ )︂ phases (︂ )︂
𝜕𝑃 ∑︁ 𝜕𝑃
= 𝛽𝑖
𝜕𝑇 𝑉,𝛽,𝑧𝑠 𝑖
𝜕𝑇 𝑖,𝑉𝑖 ,𝛽𝑖 ,𝑧𝑠𝑖
Returns
dP_dT_frozen [float] Frozen constant-volume derivative of pressure with respect to temper-
ature of the bulk phase, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the bulk according to the selected
calculation methodology.
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dP_dV_A()
Method to calculate and return the volume derivative of pressure of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐴
Returns
dP_dV_A [float] The volume derivative of pressure of the phase at constant Helmholtz en-
ergy, [Pa/m^3/mol]
dP_dV_G()
Method to calculate and return the volume derivative of pressure of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐺
Returns
dP_dV_G [float] The volume derivative of pressure of the phase at constant Gibbs energy,
[Pa/m^3/mol]
dP_dV_H()
Method to calculate and return the volume derivative of pressure of the phase at constant enthalpy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐻
Returns
dP_dV_H [float] The volume derivative of pressure of the phase at constant enthalpy,
[Pa/m^3/mol]
dP_dV_S()
Method to calculate and return the volume derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝑆
Returns
dP_dV_S [float] The volume derivative of pressure of the phase at constant entropy,
[Pa/m^3/mol]
dP_dV_U()
Method to calculate and return the volume derivative of pressure of the phase at constant internal energy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝑈
Returns
dP_dV_U [float] The volume derivative of pressure of the phase at constant internal energy,
[Pa/m^3/mol]
dP_dV_frozen()
Method to calculate and return the constant-temperature derivative of pressure with respect to volume of
the bulk phase, at constant phase fractions and phase compositions. This is a molar phase-fraction weighted
calculation.
(︂ )︂ phases (︂ )︂
𝜕𝑃 ∑︁ 𝜕𝑃
= 𝛽𝑖
𝜕𝑉 𝑇,𝛽,𝑧𝑠 𝑖
𝜕𝑉 𝑖,𝑇,𝛽𝑖 ,𝑧𝑠𝑖
Returns
dP_dV_frozen [float] Frozen constant-temperature derivative of pressure with respect to
volume of the bulk phase, [Pa*mol/m^3]
dP_drho_A()
Method to calculate and return the density derivative of pressure of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐴
Returns
dP_drho_A [float] The density derivative of pressure of the phase at constant Helmholtz
energy, [Pa/mol/m^3]
dP_drho_G()
Method to calculate and return the density derivative of pressure of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐺
Returns
dP_drho_G [float] The density derivative of pressure of the phase at constant Gibbs energy,
[Pa/mol/m^3]
dP_drho_H()
Method to calculate and return the density derivative of pressure of the phase at constant enthalpy.
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐻
Returns
dP_drho_H [float] The density derivative of pressure of the phase at constant enthalpy,
[Pa/mol/m^3]
dP_drho_S()
Method to calculate and return the density derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝜌 𝑆
Returns
dP_drho_S [float] The density derivative of pressure of the phase at constant entropy,
[Pa/mol/m^3]
dP_drho_U()
Method to calculate and return the density derivative of pressure of the phase at constant internal energy.
(︂ )︂
𝜕𝑃
𝜕𝜌 𝑈
Returns
dP_drho_U [float] The density derivative of pressure of the phase at constant internal energy,
[Pa/mol/m^3]
dS_dP()
Method to calculate and return the pressure derivative of entropy of the phase at constant pressure.
Returns
dS_dP_T [float] Pressure derivative of entropy, [J/(mol*K*Pa)]
dS_dP_T()
Method to calculate and return the pressure derivative of entropy of the phase at constant pressure.
Returns
dS_dP_T [float] Pressure derivative of entropy, [J/(mol*K*Pa)]
dS_dV_P()
Method to calculate and return the volume derivative of entropy of the phase at constant pressure.
Returns
dS_dV_P [float] Volume derivative of entropy, [J/(K*m^3)]
dS_dV_T()
Method to calculate and return the volume derivative of entropy of the phase at constant temperature.
Returns
dS_dV_T [float] Volume derivative of entropy, [J/(K*m^3)]
dS_mass_dP()
Method to calculate and return the pressure derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑇
Returns
dS_mass_dP [float] The pressure derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/Pa]
dS_mass_dP_T()
Method to calculate and return the pressure derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑇
Returns
dS_mass_dP_T [float] The pressure derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/Pa]
dS_mass_dP_V()
Method to calculate and return the pressure derivative of mass entropy of the phase at constant volume.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑉
Returns
dS_mass_dP_V [float] The pressure derivative of mass entropy of the phase at constant vol-
ume, [J/(mol*K)/Pa]
dS_mass_dT()
Method to calculate and return the temperature derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑃
Returns
dS_mass_dT [float] The temperature derivative of mass entropy of the phase at constant
pressure, [J/(mol*K)/K]
dS_mass_dT_P()
Method to calculate and return the temperature derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑃
Returns
dS_mass_dT_P [float] The temperature derivative of mass entropy of the phase at constant
pressure, [J/(mol*K)/K]
dS_mass_dT_V()
Method to calculate and return the temperature derivative of mass entropy of the phase at constant volume.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑉
Returns
dS_mass_dT_V [float] The temperature derivative of mass entropy of the phase at constant
volume, [J/(mol*K)/K]
dS_mass_dV_P()
Method to calculate and return the volume derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑉 𝑃
Returns
dS_mass_dV_P [float] The volume derivative of mass entropy of the phase at constant pres-
sure, [J/(mol*K)/m^3/mol]
dS_mass_dV_T()
Method to calculate and return the volume derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑉 𝑇
Returns
dS_mass_dV_T [float] The volume derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/m^3/mol]
dT_dP_A()
Method to calculate and return the pressure derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐴
Returns
dT_dP_A [float] The pressure derivative of temperature of the phase at constant Helmholtz
energy, [K/Pa]
dT_dP_G()
Method to calculate and return the pressure derivative of temperature of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐺
Returns
dT_dP_G [float] The pressure derivative of temperature of the phase at constant Gibbs en-
ergy, [K/Pa]
dT_dP_H()
Method to calculate and return the pressure derivative of temperature of the phase at constant enthalpy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐻
Returns
dT_dP_H [float] The pressure derivative of temperature of the phase at constant enthalpy,
[K/Pa]
dT_dP_S()
Method to calculate and return the pressure derivative of temperature of the phase at constant entropy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝑆
Returns
dT_dP_S [float] The pressure derivative of temperature of the phase at constant entropy,
[K/Pa]
dT_dP_U()
Method to calculate and return the pressure derivative of temperature of the phase at constant internal
energy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝑈
Returns
dT_dP_U [float] The pressure derivative of temperature of the phase at constant internal
energy, [K/Pa]
dT_dT_A()
Method to calculate and return the temperature derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐴
Returns
dT_dT_A [float] The temperature derivative of temperature of the phase at constant
Helmholtz energy, [K/K]
dT_dT_G()
Method to calculate and return the temperature derivative of temperature of the phase at constant Gibbs
energy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐺
Returns
dT_dT_G [float] The temperature derivative of temperature of the phase at constant Gibbs
energy, [K/K]
dT_dT_H()
Method to calculate and return the temperature derivative of temperature of the phase at constant enthalpy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐻
Returns
dT_dT_H [float] The temperature derivative of temperature of the phase at constant en-
thalpy, [K/K]
dT_dT_S()
Method to calculate and return the temperature derivative of temperature of the phase at constant entropy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝑆
Returns
dT_dT_S [float] The temperature derivative of temperature of the phase at constant entropy,
[K/K]
dT_dT_U()
Method to calculate and return the temperature derivative of temperature of the phase at constant internal
energy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝑈
Returns
dT_dT_U [float] The temperature derivative of temperature of the phase at constant internal
energy, [K/K]
dT_dV_A()
Method to calculate and return the volume derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐴
Returns
dT_dV_A [float] The volume derivative of temperature of the phase at constant Helmholtz
energy, [K/m^3/mol]
dT_dV_G()
Method to calculate and return the volume derivative of temperature of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐺
Returns
dT_dV_G [float] The volume derivative of temperature of the phase at constant Gibbs en-
ergy, [K/m^3/mol]
dT_dV_H()
Method to calculate and return the volume derivative of temperature of the phase at constant enthalpy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐻
Returns
dT_dV_H [float] The volume derivative of temperature of the phase at constant enthalpy,
[K/m^3/mol]
dT_dV_S()
Method to calculate and return the volume derivative of temperature of the phase at constant entropy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝑆
Returns
dT_dV_S [float] The volume derivative of temperature of the phase at constant entropy,
[K/m^3/mol]
dT_dV_U()
Method to calculate and return the volume derivative of temperature of the phase at constant internal energy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝑈
Returns
dT_dV_U [float] The volume derivative of temperature of the phase at constant internal
energy, [K/m^3/mol]
dT_drho_A()
Method to calculate and return the density derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐴
Returns
dT_drho_A [float] The density derivative of temperature of the phase at constant Helmholtz
energy, [K/mol/m^3]
dT_drho_G()
Method to calculate and return the density derivative of temperature of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐺
Returns
dT_drho_G [float] The density derivative of temperature of the phase at constant Gibbs
energy, [K/mol/m^3]
dT_drho_H()
Method to calculate and return the density derivative of temperature of the phase at constant enthalpy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐻
Returns
dT_drho_H [float] The density derivative of temperature of the phase at constant enthalpy,
[K/mol/m^3]
dT_drho_S()
Method to calculate and return the density derivative of temperature of the phase at constant entropy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝑆
Returns
dT_drho_S [float] The density derivative of temperature of the phase at constant entropy,
[K/mol/m^3]
dT_drho_U()
Method to calculate and return the density derivative of temperature of the phase at constant internal energy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝑈
Returns
dT_drho_U [float] The density derivative of temperature of the phase at constant internal
energy, [K/mol/m^3]
dU_dP()
Method to calculate and return the constant-temperature pressure derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 −𝑉 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dU_dP [float] Constant-temperature pressure derivative of internal energy, [J/(mol*Pa)]
dU_dP_T()
Method to calculate and return the constant-temperature pressure derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 −𝑉 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dU_dP [float] Constant-temperature pressure derivative of internal energy, [J/(mol*Pa)]
dU_dP_V()
Method to calculate and return the constant-volume pressure derivative of internal energy.
(︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝐻
= −𝑉
𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dU_dP_V [float] Constant-volume pressure derivative of internal energy, [J/(mol*Pa)]
dU_dT()
Method to calculate and return the constant-pressure temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 +
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dU_dT [float] Constant-pressure temperature derivative of internal energy, [J/(mol*K)]
dU_dT_P()
Method to calculate and return the constant-pressure temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 +
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dU_dT [float] Constant-pressure temperature derivative of internal energy, [J/(mol*K)]
dU_dT_V()
Method to calculate and return the constant-volume temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝐻 𝜕𝑃
= −𝑉
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dU_dT_V [float] Constant-volume temperature derivative of internal energy, [J/(mol*K)]
dU_dV_P()
Method to calculate and return the constant-pressure volume derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑈 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dU_dV_P [float] Constant-pressure volume derivative of internal energy, [J/(m^3)]
dU_dV_T()
Method to calculate and return the constant-temperature volume derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑈 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dU_dV_T [float] Constant-temperature volume derivative of internal energy, [J/(m^3)]
dU_mass_dP()
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑇
Returns
dU_mass_dP [float] The pressure derivative of mass internal energy of the phase at constant
temperature, [J/mol/Pa]
dU_mass_dP_T()
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑇
Returns
dU_mass_dP_T [float] The pressure derivative of mass internal energy of the phase at con-
stant temperature, [J/mol/Pa]
dU_mass_dP_V()
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
volume.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑉
Returns
dU_mass_dP_V [float] The pressure derivative of mass internal energy of the phase at con-
stant volume, [J/mol/Pa]
dU_mass_dT()
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑃
Returns
dU_mass_dT [float] The temperature derivative of mass internal energy of the phase at con-
stant pressure, [J/mol/K]
dU_mass_dT_P()
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑃
Returns
dU_mass_dT_P [float] The temperature derivative of mass internal energy of the phase at
constant pressure, [J/mol/K]
dU_mass_dT_V()
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
volume.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑉
Returns
dU_mass_dT_V [float] The temperature derivative of mass internal energy of the phase at
constant volume, [J/mol/K]
dU_mass_dV_P()
Method to calculate and return the volume derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑉 𝑃
Returns
dU_mass_dV_P [float] The volume derivative of mass internal energy of the phase at con-
stant pressure, [J/mol/m^3/mol]
dU_mass_dV_T()
Method to calculate and return the volume derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑉 𝑇
Returns
dU_mass_dV_T [float] The volume derivative of mass internal energy of the phase at con-
stant temperature, [J/mol/m^3/mol]
dV_dP_A()
Method to calculate and return the pressure derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐴
Returns
dV_dP_A [float] The pressure derivative of volume of the phase at constant Helmholtz en-
ergy, [m^3/mol/Pa]
dV_dP_G()
Method to calculate and return the pressure derivative of volume of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐺
Returns
dV_dP_G [float] The pressure derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/Pa]
dV_dP_H()
Method to calculate and return the pressure derivative of volume of the phase at constant enthalpy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐻
Returns
dV_dP_H [float] The pressure derivative of volume of the phase at constant enthalpy,
[m^3/mol/Pa]
dV_dP_S()
Method to calculate and return the pressure derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝑆
Returns
dV_dP_S [float] The pressure derivative of volume of the phase at constant entropy,
[m^3/mol/Pa]
dV_dP_U()
Method to calculate and return the pressure derivative of volume of the phase at constant internal energy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝑈
Returns
dV_dP_U [float] The pressure derivative of volume of the phase at constant internal energy,
[m^3/mol/Pa]
dV_dT_A()
Method to calculate and return the temperature derivative of volume of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐴
Returns
dV_dT_A [float] The temperature derivative of volume of the phase at constant Helmholtz
energy, [m^3/mol/K]
dV_dT_G()
Method to calculate and return the temperature derivative of volume of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐺
Returns
dV_dT_G [float] The temperature derivative of volume of the phase at constant Gibbs en-
ergy, [m^3/mol/K]
dV_dT_H()
Method to calculate and return the temperature derivative of volume of the phase at constant enthalpy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐻
Returns
dV_dT_H [float] The temperature derivative of volume of the phase at constant enthalpy,
[m^3/mol/K]
dV_dT_S()
Method to calculate and return the temperature derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝑆
Returns
dV_dT_S [float] The temperature derivative of volume of the phase at constant entropy,
[m^3/mol/K]
dV_dT_U()
Method to calculate and return the temperature derivative of volume of the phase at constant internal energy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝑈
Returns
dV_dT_U [float] The temperature derivative of volume of the phase at constant internal
energy, [m^3/mol/K]
dV_dV_A()
Method to calculate and return the volume derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐴
Returns
dV_dV_A [float] The volume derivative of volume of the phase at constant Helmholtz en-
ergy, [m^3/mol/m^3/mol]
dV_dV_G()
Method to calculate and return the volume derivative of volume of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐺
Returns
dV_dV_G [float] The volume derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/m^3/mol]
dV_dV_H()
Method to calculate and return the volume derivative of volume of the phase at constant enthalpy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐻
Returns
dV_dV_H [float] The volume derivative of volume of the phase at constant enthalpy,
[m^3/mol/m^3/mol]
dV_dV_S()
Method to calculate and return the volume derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝑆
Returns
dV_dV_S [float] The volume derivative of volume of the phase at constant entropy,
[m^3/mol/m^3/mol]
dV_dV_U()
Method to calculate and return the volume derivative of volume of the phase at constant internal energy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝑈
Returns
dV_dV_U [float] The volume derivative of volume of the phase at constant internal energy,
[m^3/mol/m^3/mol]
dV_drho_A()
Method to calculate and return the density derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐴
Returns
dV_drho_A [float] The density derivative of volume of the phase at constant Helmholtz
energy, [m^3/mol/mol/m^3]
dV_drho_G()
Method to calculate and return the density derivative of volume of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐺
Returns
dV_drho_G [float] The density derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/mol/m^3]
dV_drho_H()
Method to calculate and return the density derivative of volume of the phase at constant enthalpy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐻
Returns
dV_drho_H [float] The density derivative of volume of the phase at constant enthalpy,
[m^3/mol/mol/m^3]
dV_drho_S()
Method to calculate and return the density derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝑆
Returns
dV_drho_S [float] The density derivative of volume of the phase at constant entropy,
[m^3/mol/mol/m^3]
dV_drho_U()
Method to calculate and return the density derivative of volume of the phase at constant internal energy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝑈
Returns
dV_drho_U [float] The density derivative of volume of the phase at constant internal energy,
[m^3/mol/mol/m^3]
dfugacities_dP(phase=None)
dfugacities_dT(phase=None)
property dipoles
Dipole moments for each component, [debye].
Returns
dipoles [list[float]] Dipole moments for each component, [debye].
dlnphis_dP(phase=None)
dlnphis_dT(phase=None)
dlnphis_dns(phase=None)
dphis_dP(phase=None)
dphis_dT(phase=None)
dphis_dzs(phase=None)
drho_dP_A()
Method to calculate and return the pressure derivative of density of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐴
Returns
drho_dP_A [float] The pressure derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/Pa]
drho_dP_G()
Method to calculate and return the pressure derivative of density of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐺
Returns
drho_dP_G [float] The pressure derivative of density of the phase at constant Gibbs energy,
[mol/m^3/Pa]
drho_dP_H()
Method to calculate and return the pressure derivative of density of the phase at constant enthalpy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐻
Returns
drho_dP_H [float] The pressure derivative of density of the phase at constant enthalpy,
[mol/m^3/Pa]
drho_dP_S()
Method to calculate and return the pressure derivative of density of the phase at constant entropy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝑆
Returns
drho_dP_S [float] The pressure derivative of density of the phase at constant entropy,
[mol/m^3/Pa]
drho_dP_U()
Method to calculate and return the pressure derivative of density of the phase at constant internal energy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝑈
Returns
drho_dP_U [float] The pressure derivative of density of the phase at constant internal energy,
[mol/m^3/Pa]
drho_dT_A()
Method to calculate and return the temperature derivative of density of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐴
Returns
drho_dT_A [float] The temperature derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/K]
drho_dT_G()
Method to calculate and return the temperature derivative of density of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐺
Returns
drho_dT_G [float] The temperature derivative of density of the phase at constant Gibbs
energy, [mol/m^3/K]
drho_dT_H()
Method to calculate and return the temperature derivative of density of the phase at constant enthalpy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐻
Returns
drho_dT_H [float] The temperature derivative of density of the phase at constant enthalpy,
[mol/m^3/K]
drho_dT_S()
Method to calculate and return the temperature derivative of density of the phase at constant entropy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝑆
Returns
drho_dT_S [float] The temperature derivative of density of the phase at constant entropy,
[mol/m^3/K]
drho_dT_U()
Method to calculate and return the temperature derivative of density of the phase at constant internal energy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝑈
Returns
drho_dT_U [float] The temperature derivative of density of the phase at constant internal
energy, [mol/m^3/K]
drho_dV_A()
Method to calculate and return the volume derivative of density of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐴
Returns
drho_dV_A [float] The volume derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/m^3/mol]
drho_dV_G()
Method to calculate and return the volume derivative of density of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐺
Returns
drho_dV_G [float] The volume derivative of density of the phase at constant Gibbs energy,
[mol/m^3/m^3/mol]
drho_dV_H()
Method to calculate and return the volume derivative of density of the phase at constant enthalpy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐻
Returns
drho_dV_H [float] The volume derivative of density of the phase at constant enthalpy,
[mol/m^3/m^3/mol]
drho_dV_S()
Method to calculate and return the volume derivative of density of the phase at constant entropy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝑆
Returns
drho_dV_S [float] The volume derivative of density of the phase at constant entropy,
[mol/m^3/m^3/mol]
drho_dV_U()
Method to calculate and return the volume derivative of density of the phase at constant internal energy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝑈
Returns
drho_dV_U [float] The volume derivative of density of the phase at constant internal energy,
[mol/m^3/m^3/mol]
drho_drho_A()
Method to calculate and return the density derivative of density of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐴
Returns
drho_drho_A [float] The density derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/mol/m^3]
drho_drho_G()
Method to calculate and return the density derivative of density of the phase at constant Gibbs energy.
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐺
Returns
drho_drho_G [float] The density derivative of density of the phase at constant Gibbs energy,
[mol/m^3/mol/m^3]
drho_drho_H()
Method to calculate and return the density derivative of density of the phase at constant enthalpy.
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐻
Returns
drho_drho_H [float] The density derivative of density of the phase at constant enthalpy,
[mol/m^3/mol/m^3]
drho_drho_S()
Method to calculate and return the density derivative of density of the phase at constant entropy.
(︂ )︂
𝜕𝜌
𝜕𝜌 𝑆
Returns
drho_drho_S [float] The density derivative of density of the phase at constant entropy,
[mol/m^3/mol/m^3]
drho_drho_U()
Method to calculate and return the density derivative of density of the phase at constant internal energy.
(︂ )︂
𝜕𝜌
𝜕𝜌 𝑈
Returns
drho_drho_U [float] The density derivative of density of the phase at constant internal en-
ergy, [mol/m^3/mol/m^3]
property economic_statuses
Status of each component in in relation to import and export from various regions, [-].
Returns
economic_statuses [list[dict]] Status of each component in in relation to import and export
from various regions, [-].
property energy
Method to return the energy (enthalpy times flow rate) of this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
energy [float] Enthalpy flow rate, [W]
property energy_calc
Method to return the energy (enthalpy times flow rate) of this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
energy [float] Enthalpy flow rate, [W]
property energy_reactive
Method to return the reactive energy (reactive enthalpy times flow rate) of this phase. This method is only
available when the phase is linked to an EquilibriumStream.
Returns
energy_reactive [float] Reactive enthalpy flow rate, [W]
property energy_reactive_calc
Method to return the reactive energy (reactive enthalpy times flow rate) of this phase. This method is only
available when the phase is linked to an EquilibriumStream.
Returns
energy_reactive [float] Reactive enthalpy flow rate, [W]
flash_convergence
flash_specs
flashed = True
flasher
property formulas
Formulas of each component, [-].
Returns
formulas [list[str]] Formulas of each component, [-].
fugacities(phase=None)
gas
gas_beta
gas_count
property heaviest_liquid
The liquid-like phase with the highest mass density, [-]
Returns
heaviest_liquid [Phase or None] Phase with the highest mass density or None if there are no
liquid like phases, [-]
helium_molar_weight()
Method to calculate and return the effective quantiy of helium in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the helium component.
helium_partial_pressure()
Method to calculate and return the ideal partial pressure of helium, [Pa]
humidity_ratio(phase=None)
Method to calculate and return the humidity ratio of the phase; normally defined as the kg water/kg dry air,
the definition here is kg water/(kg rest of the phase) [-]
𝑤𝐻2𝑂
humidity ratio = HR =
1 − 𝑤𝐻2𝑂
Returns
humidity_ratio [float] Humidity ratio, [-]
hydrogen_molar_weight()
Method to calculate and return the effective quantiy of hydrogen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the hydrogen component.
hydrogen_partial_pressure()
Method to calculate and return the ideal partial pressure of hydrogen, [Pa]
hydrogen_sulfide_molar_weight()
Method to calculate and return the effective quantiy of hydrogen_sulfide in the phase as a molar weight,
[g/mol].
This is the molecular weight of the phase times the mass fraction of the hydrogen_sulfide component.
hydrogen_sulfide_partial_pressure()
Method to calculate and return the ideal partial pressure of hydrogen_sulfide, [Pa]
isentropic_exponent()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 𝑉 𝑘 = const.
(︂ )︂
𝑉 𝐶𝑝 𝜕𝑃
𝑘=−
𝑃 𝐶𝑣 𝜕𝑉 𝑇
Returns
k_PV [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_PT()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 (1−𝑘) 𝑇 𝑘 = const.
1
𝑘= 𝑃
(︀ 𝜕𝑉 )︀
1− 𝐶𝑝 𝜕𝑇 𝑃
Returns
k_PT [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_PV()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 𝑉 𝑘 = const.
(︂ )︂
𝑉 𝐶𝑝 𝜕𝑃
𝑘=−
𝑃 𝐶𝑣 𝜕𝑉 𝑇
Returns
k_PV [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_TV()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑇 𝑉 𝑘−1 = const.
(︂ )︂
𝑉 𝜕𝑃
𝑘 =1+
𝐶𝑣 𝜕𝑇 𝑉
Returns
k_TV [float] Isentropic exponent of a real fluid, [-]
isobaric_expansion()
Method to calculate and return the isobatic expansion coefficient of the bulk according to the selected
calculation methodology.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Returns
beta [float] Isobaric coefficient of a thermal expansion, [1/K]
isothermal_bulk_modulus()
Method to calculate and return the isothermal bulk modulus of the phase.
(︂ )︂
𝜕𝑃
𝐾𝑇 = −𝑉
𝜕𝑉 𝑇
Returns
isothermal_bulk_modulus [float] Isothermal bulk modulus, [Pa]
k()
Calculate and return the thermal conductivity of the bulk according to the selected thermal
conductivity settings in BulkSettings, the settings in ThermalConductivityGasMixture
and ThermalConductivityLiquidMixture, and the configured pure-component settings in
ThermalConductivityGas and ThermalConductivityLiquid.
Returns
k [float] Thermal Conductivity of bulk phase calculated with mixing rules, [Pa*s]
kappa()
Method to calculate and return the isothermal compressibility of the bulk according to the selected calcu-
lation methodology.
(︂ )︂
1 𝜕𝑉
𝜅=−
𝑉 𝜕𝑃 𝑇
Returns
kappa [float] Isothermal coefficient of compressibility, [1/Pa]
kgs()
Method to calculate and return the pure-component gas temperature-dependent thermal conductivity of
each species from the thermo.thermal_conductivity.ThermalConductivityGas objects.
These values are normally at low pressure, not along the saturation line.
Returns
kgs [list[float]] Pure component temperature dependent gas thermal conductivities,
[W/(m*K)]
kinematic_viscosity()
Method to calculate and return the kinematic viscosity of the phase, [m^2/s]
Returns
nu [float] Kinematic viscosity, [m^2/s]
kls()
Method to calculate and return the pure-component liquid temperature-dependent thermal conductivity of
each species from the thermo.thermal_conductivity.ThermalConductivityLiquid objects.
These values are normally at low pressure, not along the saturation line.
Returns
kls [list[float]] Pure component temperature dependent liquid thermal conductivities,
[W/(m*K)]
property legal_statuses
Status of each component in in relation to import and export rules from various regions, [-].
Returns
legal_statuses [list[dict]] Status of each component in in relation to import and export rules
from various regions, [-].
property lightest_liquid
The liquid-like phase with the lowest mass density, [-]
Returns
lightest_liquid [Phase or None] Phase with the lowest mass density or None if there are no
liquid like phases, [-]
liquid0
liquid1
liquid2
liquid_bulk = None
liquid_count
liquid_zs
liquids
liquids_betas
lnphis(phase=None)
property logPs
Octanol-water partition coefficients for each component, [-].
Returns
logPs [list[float]] Octanol-water partition coefficients for each component, [-].
log_zs()
Method to calculate and return the log of mole fractions specified. These are used in calculating entropy
and in many other formulas.
ln 𝑧𝑖
Returns
log_zs [list[float]] Log of mole fractions, [-]
m()
Method to return the mass flow rate of this phase. This method is only available when the phase is linked
to an EquilibriumStream.
Returns
m [float] Mass flow of the phase, [kg/s]
property m_calc
max_liquid_phases = 1
methane_molar_weight()
Method to calculate and return the effective quantiy of methane in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the methane component.
methane_partial_pressure()
Method to calculate and return the ideal partial pressure of methane, [Pa]
property molecular_diameters
Lennard-Jones molecular diameters for each component, [angstrom].
Returns
molecular_diameters [list[float]] Lennard-Jones molecular diameters for each component,
[angstrom].
ms()
Method to return the mass flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ms [float] Mass flow of the components in the phase, [kg/s]
property ms_calc
Method to return the mass flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ms [float] Mass flow of the components in the phase, [kg/s]
mu()
Calculate and return the viscosity of the bulk according to the selected viscosity settings in BulkSettings,
the settings in ViscosityGasMixture and ViscosityLiquidMixture, and the configured pure-
component settings in ViscosityGas and ViscosityLiquid.
Returns
mu [float] Viscosity of bulk phase calculated with mixing rules, [Pa*s]
mugs()
Method to calculate and return the pure-component gas temperature-dependent viscosity of each species
from the thermo.viscosity.ViscosityGas objects.
These values are normally at low pressure, not along the saturation line.
Returns
mugs [list[float]] Pure component temperature dependent gas viscosities, [Pa*s]
muls()
Method to calculate and return the pure-component liquid temperature-dependent viscosity of each species
from the thermo.viscosity.ViscosityLiquid objects.
These values are normally at low pressure, not along the saturation line.
Returns
muls [list[float]] Pure component temperature dependent liquid viscosities, [Pa*s]
n()
Method to return the molar flow rate of this phase. This method is only available when the phase is linked
to an EquilibriumStream.
Returns
n [float] Molar flow of the phase, [mol/s]
property n_calc
property names
Names for each component, [-].
Returns
names [list[str]] Names for each component, [-].
nitrogen_molar_weight()
Method to calculate and return the effective quantiy of nitrogen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the nitrogen component.
nitrogen_partial_pressure()
Method to calculate and return the ideal partial pressure of nitrogen, [Pa]
ns()
Method to return the molar flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ns [float] Molar flow of the components in the phase, [mol/s]
property ns_calc
Method to return the molar flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ns [float] Molar flow of the components in the phase, [mol/s]
nu()
Method to calculate and return the kinematic viscosity of the phase, [m^2/s]
Returns
nu [float] Kinematic viscosity, [m^2/s]
property omegas
Acentric factors for each component, [-].
Returns
omegas [list[float]] Acentric factors for each component, [-].
oxygen_molar_weight()
Method to calculate and return the effective quantiy of oxygen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the oxygen component.
oxygen_partial_pressure()
Method to calculate and return the ideal partial pressure of oxygen, [Pa]
partial_pressures()
Method to return the partial pressures of each component in the phase. Note that this is the conventional
definition assumed in almost every source; there is also a non-ideal definition.
𝑃𝑖 = 𝑧𝑖 𝑃
Returns
partial_pressures [list[float]] Partial pressures of all the components in the phase, [Pa]
property phase
Method to calculate and return a string representing the phase of the mixture. The return string uses ‘V’
to represent the gas phase, ‘L’ to represent a liquid phase, and ‘S’ to represent a solid phase (always in that
order).
A state with three liquids, two solids, and a gas would return ‘VLLLSS’.
Returns
phase [str] Phase string, [-]
property phase_STPs
Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
Returns
phase_STPs [list[str]] Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
phase_count
phases
phis(phase=None)
pseudo_Pc(phase=None)
Method to calculate and return the pseudocritical pressure calculated using Kay’s rule (linear mole frac-
tions):
∑︁
𝑃𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑃𝑐,𝑖
𝑖
Returns
pseudo_Pc [float] Pseudocritical pressure of the phase, [Pa]
pseudo_Tc(phase=None)
Method to calculate and return the pseudocritical temperature calculated using Kay’s rule (linear mole
fractions):
∑︁
𝑇𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑇𝑐,𝑖
𝑖
Returns
pseudo_Tc [float] Pseudocritical temperature of the phase, [K]
pseudo_Vc(phase=None)
Method to calculate and return the pseudocritical volume calculated using Kay’s rule (linear mole frac-
tions):
∑︁
𝑉𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑉𝑐,𝑖
𝑖
Returns
pseudo_Vc [float] Pseudocritical volume of the phase, [m^3/mol]
pseudo_Zc(phase=None)
Method to calculate and return the pseudocritical compressibility calculated using Kay’s rule (linear mole
fractions):
∑︁
𝑍𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑍𝑐,𝑖
𝑖
Returns
pseudo_Zc [float] Pseudocritical compressibility of the phase, [-]
pseudo_omega(phase=None)
Method to calculate and return the pseudocritical acentric factor calculated using Kay’s rule (linear mole
fractions):
∑︁
𝜔𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝜔𝑖
𝑖
Returns
pseudo_omega [float] Pseudo acentric factor of the phase, [-]
property quality
Method to return the mass vapor fraction of the equilibrium state. If no vapor/gas is present, 0 is always
returned. This is normally called the quality.
Returns
quality [float] Vapor mass fraction, [-]
reacted = False
rho()
Method to calculate and return the molar density of the phase.
𝜌 = 𝑓 𝑟𝑎𝑐1𝑉
Returns
rho [float] Molar density, [mol/m^3]
rho_mass(phase=None)
Method to calculate and return mass density of the phase.
𝑀𝑊
𝜌=
1000 · 𝑉 𝑀
Returns
rho_mass [float] Mass density, [kg/m^3]
rho_mass_liquid_ref(phase=None)
Method to calculate and return the liquid reference mass density according to the temperature variable
T_liquid_volume_ref of thermo.bulk.BulkSettings and the composition of the phase.
Returns
rho_mass_liquid_ref [float] Liquid mass density at the reference condition, [kg/m^3]
property rhocs
Molar densities at the critical point for each component, [mol/m^3].
Returns
rhocs [list[float]] Molar densities at the critical point for each component, [mol/m^3].
property rhocs_mass
Densities at the critical point for each component, [kg/m^3].
Returns
rhocs_mass [list[float]] Densities at the critical point for each component, [kg/m^3].
property rhog_STPs
Molar gas densities at STP for each component; metastable if normally another state, [mol/m^3].
Returns
rhog_STPs [list[float]] Molar gas densities at STP for each component; metastable if nor-
mally another state, [mol/m^3].
property rhog_STPs_mass
Gas densities at STP for each component; metastable if normally another state, [kg/m^3].
Returns
rhog_STPs_mass [list[float]] Gas densities at STP for each component; metastable if nor-
mally another state, [kg/m^3].
property rhol_60Fs
Liquid molar densities for each component at 60 °F, [mol/m^3].
Returns
rhol_60Fs [list[float]] Liquid molar densities for each component at 60 °F, [mol/m^3].
property rhol_60Fs_mass
Liquid mass densities for each component at 60 °F, [kg/m^3].
Returns
rhol_60Fs_mass [list[float]] Liquid mass densities for each component at 60 °F, [kg/m^3].
property rhol_STPs
Molar liquid densities at STP for each component, [mol/m^3].
Returns
rhol_STPs [list[float]] Molar liquid densities at STP for each component, [mol/m^3].
property rhol_STPs_mass
Liquid densities at STP for each component, [kg/m^3].
Returns
rhol_STPs_mass [list[float]] Liquid densities at STP for each component, [kg/m^3].
property rhos_Tms
Solid molar densities for each component at their respective melting points, [mol/m^3].
Returns
rhos_Tms [list[float]] Solid molar densities for each component at their respective melting
points, [mol/m^3].
property rhos_Tms_mass
Solid mass densities for each component at their melting point, [kg/m^3].
Returns
rhos_Tms_mass [list[float]] Solid mass densities for each component at their melting point,
[kg/m^3].
settings
sigma()
Calculate and return the surface tension of the bulk according to the selected surface tension settings in
BulkSettings, the settings in SurfaceTensionMixture and the configured pure-component settings in
SurfaceTension.
Returns
sigma [float] Surface tension of bulk phase calculated with mixing rules, [N/m]
Notes
A value is only returned if all phases in the bulk are liquids; this property is for a liquid-ideal gas calculation,
not the interfacial tension between two liquid phases.
property sigma_STPs
Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the saturation pressure, [N/m].
Returns
sigma_STPs [list[float]] Liquid-air surface tensions at 298.15 K and the higher of 101325
Pa or the saturation pressure, [N/m].
property sigma_Tbs
Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
Returns
sigma_Tbs [list[float]] Liquid-air surface tensions at the normal boiling point and 101325
Pa, [N/m].
property sigma_Tms
Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
Returns
sigma_Tms [list[float]] Liquid-air surface tensions at the melting point and 101325 Pa,
[N/m].
sigmas()
Method to calculate and return the pure-component surface tensions of each species from the thermo.
interface.SurfaceTension objects.
Returns
sigmas [list[float]] Surface tensions, [N/m]
property similarity_variables
Similarity variables for each component, [mol/g].
Returns
similarity_variables [list[float]] Similarity variables for each component, [mol/g].
property smiless
SMILES identifiers for each component, [-].
Returns
smiless [list[str]] SMILES identifiers for each component, [-].
solid_bulk = None
solid_count
solids
solids_betas
property solubility_parameters
Solubility parameters for each component at 298.15 K, [Pa^0.5].
Returns
solubility_parameters [list[float]] Solubility parameters for each component at 298.15 K,
[Pa^0.5].
speed_of_sound()
Method to calculate and return the molar speed of sound of the bulk according to the selected calculation
methodology.
[︂ (︂ )︂ ]︂1/2
2 𝜕𝑃 𝐶𝑝
𝑤 = −𝑉
𝜕𝑉 𝑇 𝐶𝑣
A similar expression based on molar density is:
[︂(︂ )︂ ]︂1/2
𝜕𝑃 𝐶𝑝
𝑤=
𝜕𝜌 𝑇 𝐶𝑣
Returns
w [float] Speed of sound for a real gas, [m*kg^0.5/(s*mol^0.5)]
speed_of_sound_ideal_gas()
Method to calculate and return the molar speed of sound of an ideal gas phase at the current conditions.
[︂ (︂ )︂ ]︂1/2
𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝜕𝑉 𝑇 𝐶𝑣
−𝑃 2
(︂ )︂
𝜕𝑃
=
𝜕𝑉 𝑇 𝑅𝑇
Returns
w [float] Speed of sound for a real gas, [m*kg^0.5/(s*mol^0.5)]
speed_of_sound_ideal_gas_mass()
Method to calculate and return the mass speed of sound of an ideal gas phase at the current conditions.
√︀
𝑐 = 𝑘𝑅𝑠𝑝𝑒𝑐𝑖𝑓 𝑖𝑐,𝑖𝑑𝑒𝑎𝑙𝑔𝑎𝑠 𝑇
Returns
w [float] Speed of sound for an ideal gas, [m/s]
speed_of_sound_mass()
Method to calculate and return the speed of sound of the phase.
[︂ (︂ )︂ ]︂1/2
1000 𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝑀 𝑊 𝜕𝑉 𝑇 𝐶𝑣
Returns
w [float] Speed of sound for a real gas, [m/s]
thermal_diffusivity()
Method to calculate and return the thermal diffusivity of the phase.
𝑘
𝛼=
𝜌𝐶𝑝
Returns
alpha [float] Thermal diffusivity, [m^2/s]
value(name, phase=None)
Method to retrieve a property from a string. This more or less wraps getattr, but also allows for the property
to be returned for a specific phase if phase is provided.
name could be a python property like ‘Tms’ or a callable method like ‘H’; and if the property is on a per-
phase basis like ‘betas_mass’, a phase object can be provided as the second argument and only the value
for that phase will be returned.
Parameters
name [str] String representing the property, [-]
phase [thermo.phase.Phase, optional] Phase to retrieve the property for only (if speci-
fied), [-]
Returns
value [various] Value specified, [various]
property water_index
The index of the component water in the components. None if water is not present. Water is recognized by
its CAS number.
Returns
water_index [int] The index of the component water, [-]
water_molar_weight()
Method to calculate and return the effective quantiy of water in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the water component.
water_partial_pressure()
Method to calculate and return the ideal partial pressure of water, [Pa]
property water_phase
The liquid-like phase with the highest water mole fraction, [-]
Returns
water_phase [Phase or None] Phase with the highest water mole fraction or None if there
are no liquid like phases with water, [-]
property water_phase_index
The liquid-like phase with the highest mole fraction of water, [-]
Returns
water_phase_index [int] Index into the attribute EquilibriumState.liquids which
refers to the liquid-like phase with the highest water mole fraction, [-]
ws(phase=None)
Method to calculate and return the mass fractions of the phase, [-]
Returns
ws [list[float]] Mass fractions, [-]
property ws_calc
ws_no_water(phase=None)
Method to calculate and return the mass fractions of all species in the phase, normalized to a water-free
basis (the mass fraction of water returned is zero).
Returns
ws_no_water [list[float]] Mass fractions on a water free basis, [-]
zs
property zs_calc
zs_no_water(phase=None)
Method to calculate and return the mole fractions of all species in the phase, normalized to a water-free
basis (the mole fraction of water returned is zero).
Returns
zs_no_water [list[float]] Mole fractions on a water free basis, [-]
This module contains classes and functions for performing flash calculations.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Main Interfaces
– Pure Components
– Vapor-Liquid Systems
– Vapor and Multiple Liquid Systems
– Base Flash Class
• Specific Flash Algorithms
Pure Components
Parameters
constants [ChemicalConstantsPackage object] Package of chemical constants; these are
used as boundaries at times, initial guesses other times, and in all cases these properties
are accessible as attributes of the resulting EquilibriumState object, [-]
correlations [PropertyCorrelationsPackage] Package of chemical T-dependent proper-
ties; these are used as boundaries at times, for initial guesses other times, and in all cases
these properties are accessible as attributes of the resulting EquilibriumState object, [-]
gas [Phase object] A single phase which can represent the gas phase, [-]
liquids [list[Phase]] A list of phases for representing the liquid phase; normally only one liquid
phase is present for a pure-component system, but multiple liquids are allowed for the re-
ally weird cases like having both parahydrogen and orthohydrogen. The liquid phase which
calculates a lower Gibbs free energy is always used. [-]
solids [list[Phase]] A list of phases for representing the solid phase; it is very common for
multiple solid forms of a compound to exist. For water ice, the list is very long - normally
ice is in phase Ih but other phases are Ic, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII,
XIV, XV, XVI, Square ice, and Amorphous ice. It is less common for there to be published,
reliable, thermodynamic models for these different phases; for water there is the IAPWS-06
model for Ih, and another model here for phases Ih, Ic, II, III, IV, V, VI, IX, XI, XII. [-]
settings [BulkSettings object] Object containing settings for calculating bulk and transport
properties, [-]
Notes
The algorithms in this object are mostly from [1] and [2]. They all boil down to newton methods with analytical
derivatives. The phase with the lowest Gibbs energy is the most stable if there are multiple solutions.
Phase input combinations which have specific simplifying assumptions (and thus more speed) are:
• a CEOSLiquid and a CEOSGas with the same (consistent) parameters
• a CEOSGas with the IGMIX eos and a GibbsExcessLiquid
• a IAPWS95Liquid and a IAPWS95Gas
• a CoolPropLiquid and a CoolPropGas
Additional information that can be provided in the ChemicalConstantsPackage object and
PropertyCorrelationsPackage object that may help convergence is:
• Tc, Pc, omega, Tb, and atoms
• Gas heat capacity correlations
• Liquid molar volume correlations
• Heat of vaporization correlations
References
[1], [2]
Examples
Create all the necessary objects using all of the default parameters for decane and do a flash at 300 K and 1 bar:
˓→Pa>]>
Attributes
VL_IG_hack [bool] Whether or not to trust the saturation curve of the liquid phase; applied
automatically to the GibbsExcessLiquid phase if there is a single liquid only, [-]
VL_EOS_hacks [bool] Whether or not to trust the saturation curve of the EOS liquid phase;
applied automatically to the CEOSLiquid phase if there is a single liquid only, [-]
TPV_HSGUA_guess_maxiter [int] Maximum number of iterations to try when converging a
shortcut model for flashes with one (T, P, V ) spec and one (H, S, G, U, A) spec, [-]
TPV_HSGUA_guess_xtol [float] Convergence tolerance in the iteration variable when converg-
ing a shortcut model for flashes with one (T, P, V ) spec and one (H, S, G, U, A) spec, [-]
TPV_HSGUA_maxiter [int] Maximum number of iterations to try when converging a flashes
with one (T, P, V ) spec and one (H, S, G, U, A) spec; this is on a per-phase basis, so if there
is a liquid and a gas phase, the maximum number of iterations that could end up being tried
would be twice this, [-]
TPV_HSGUA_xtol [float] Convergence tolerance in the iteration variable dimension when con-
verging a flash with one (T, P, V ) spec and one (H, S, G, U, A) spec, [-]
TVF_maxiter [int] Maximum number of iterations to try when converging a flashes with a
temperature and vapor fraction specification, [-]
Vapor-Liquid Systems
Parameters
constants [ChemicalConstantsPackage object] Package of chemical constants; these are
used as boundaries at times, initial guesses other times, and in all cases these properties
are accessible as attributes of the resulting EquilibriumState object, [-]
correlations [PropertyCorrelationsPackage] Package of chemical T-dependent proper-
ties; these are used as boundaries at times, for initial guesses other times, and in all cases
these properties are accessible as attributes of the resulting EquilibriumState object, [-]
gas [Phase object] A single phase which can represent the gas phase, [-]
liquid [Phase] A single phase which can represent the liquid phase, [-]
settings [BulkSettings object] Object containing settings for calculating bulk and transport
properties, [-]
Notes
The algorithms in this object are mostly from [1], [2] and [3]. Sequential substitution without acceleration is
used by default to converge two-phase systems.
Quasi-newton methods are used by default to converge bubble and dew point calculations.
Flashes with one (T, P, V ) spec and one (H, S, G, U, A) spec are solved by a 1D search over PT flashes.
Additional information that can be provided in the ChemicalConstantsPackage object and
PropertyCorrelationsPackage object that may help convergence is:
• Tc, Pc, omega, Tb, and atoms
• Gas heat capacity correlations
• Liquid molar volume correlations
• Heat of vaporization correlations
Warning: If this flasher is used on systems that can form two or more liquid phases, and the flash specs
are in that region, there is no guarantee which solution is returned. Sometimes it is almost random, jumping
back and forth and providing nasty discontinuities.
References
Examples
For the system methane-ethane-nitrogen with a composition [0.965, 0.018, 0.017], calculate the vapor fraction
of the system and equilibrium phase compositions at 110 K and 1 bar. Use the Peng-Robinson equation of state
and the chemsep sample interaction parameter database.
A few more flashes with the same system to showcase the functionality of the flash interface:
Attributes
PT_SS_MAXITER [int] Maximum number of sequential substitution iterations to try when
converging a two-phase solution, [-]
PT_SS_TOL [float] Convergence tolerance in sequential substitution [-]
PT_SS_POLISH [bool] When set to True, flashes which are very near a vapor fraction of 0 or
1 are converged to a higher tolerance to ensure the solution is correct; without this, a flash
might converge to a vapor fraction of -1e-7 and be called single phase, but with this the
correct solution may be found to be 1e-8 and will be correctly returned as two phase.[-]
PT_SS_POLISH_VF [float] What tolerance to a vapor fraction of 0 or 1; this is an absolute
vapor fraction value, [-]
PT_SS_POLISH_MAXITER [int] Maximum number of sequential substitution iterations to
try when converging a two-phase solution that has been detected to be very sensitive, with a
vapor fraction near 0 or 1 [-]
PT_SS_POLISH_TOL [float] Convergence tolerance in sequential substitution when converg-
ing a two-phase solution that has been detected to be very sensitive, with a vapor fraction
near 0 or 1 [-]
PT_STABILITY_MAXITER [int] Maximum number of iterations to try when converging a
stability test, [-]
PT_STABILITY_XTOL [float] Convergence tolerance in the stability test [-]
DEW_BUBBLE_VF_K_COMPOSITION_INDEPENDENT_XTOL [float] Convergence
tolerance in Newton solver for bubble, dew, and vapor fraction spec flashes when both the
liquid and gas model’s K values do not dependent on composition, [-]
DEW_BUBBLE_QUASI_NEWTON_XTOL [float] Convergence tolerance in quasi-Newton
bubble and dew point flashes, [-]
DEW_BUBBLE_QUASI_NEWTON_MAXITER [int] Maximum number of iterations to use
in quasi-Newton bubble and dew point flashes, [-]
DEW_BUBBLE_NEWTON_XTOL [float] Convergence tolerance in Newton bubble and dew
point flashes, [-]
DEW_BUBBLE_NEWTON_MAXITER [int] Maximum number of iterations to use in New-
ton bubble and dew point flashes, [-]
TPV_HSGUA_BISECT_XTOL [float] Tolerance in the iteration variable when converging a
flash with one (T, P, V ) spec and one (H, S, G, U, A) spec using a bisection-type solver, [-]
Parameters
constants [ChemicalConstantsPackage object] Package of chemical constants; these are
used as boundaries at times, initial guesses other times, and in all cases these properties
are accessible as attributes of the resulting EquilibriumState object, [-]
correlations [PropertyCorrelationsPackage] Package of chemical T-dependent proper-
ties; these are used as boundaries at times, for initial guesses other times, and in all cases
these properties are accessible as attributes of the resulting EquilibriumState object, [-]
gas [Phase object] A single phase which can represent the gas phase, [-]
liquids [list[Phase]] A list of phase objects that can represent the liquid phases; if working with
a VLL system with a consistent model, specify the same liquid phase twice; the length of
this list is the maximum number of liquid phases that will be searched for, [-]
solids [list[Phase]] Not used, [-]
settings [BulkSettings object] Object containing settings for calculating bulk and transport
properties, [-]
Notes
The algorithms in this object are mostly from [1], [2] and [3]. Sequential substitution without acceleration is
used by default to converge multiphase systems.
Additional information that can be provided in the ChemicalConstantsPackage object and
PropertyCorrelationsPackage object that may help convergence is:
• Tc, Pc, omega, Tb, and atoms
• Gas heat capacity correlations
• Liquid molar volume correlations
• Heat of vaporization correlations
References
Examples
A three-phase flash of butanol, water, and ethanol with the SRK EOS without BIPs:
˓→614560475001724])),
Attributes
class thermo.flash.Flash
Bases: object
Base class for performing flash calculations. All Flash objects need to inherit from this, and common methods
can be added to it.
Methods
flash ([zs, T, P, VF, SF, V, H, S, G, U, A, ...]) Method to perform a flash calculation and return the
result as an EquilibriumState object.
plot_PT(zs[, Pmin, Pmax, pts, branches, ...]) Method to create a plot of the phase envelope as can
be calculated from a series of pressure & vapor frac-
tion spec flashes.
plot_Pxy(T[, pts, ignore_errors, values, show]) Method to create a Pxy plot for a binary system (hold-
ing temperature constant); the mole fraction of the
first species is varied.
plot_TP(zs[, Tmin, Tmax, pts, branches, ...]) Method to create a plot of the phase envelope as can
be calculated from a series of temperature & vapor
fraction spec flashes.
plot_Txy(P[, pts, ignore_errors, values, show]) Method to create a Txy plot for a binary system (hold-
ing pressure constant); the mole fraction of the first
species is varied.
plot_ternary([T, P, scale]) Method to create a ternary plot of the system at either
a specified temperature or pressure.
plot_xy([P, T, pts, ignore_errors, values, ...]) Method to create a xy diagram for a binary system.
flash(zs=None, T=None, P=None, VF=None, SF=None, V=None, H=None, S=None, G=None, U=None,
A=None, solution=None, hot_start=None, retry=False, dest=None, rho=None, rho_mass=None,
H_mass=None, S_mass=None, G_mass=None, U_mass=None, A_mass=None, spec_fun=None,
H_reactive=None)
Method to perform a flash calculation and return the result as an EquilibriumState object. This generic
interface allows flashes with any combination of valid specifications; if a flash is unimplemented and error
will be raised.
Parameters
zs [list[float], optional] Mole fractions of each component, required unless there is only one
component, [-]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
VF [float, optional] Vapor fraction, [-]
SF [float, optional] Solid fraction, [-]
V [float, optional] Molar volume of the overall bulk, [m^3/mol]
H [float, optional] Molar enthalpy of the overall bulk, [J/mol]
S [float, optional] Molar entropy of the overall bulk, [J/(mol*K)]
G [float, optional] Molar Gibbs free energy of the overall bulk, [J/mol]
U [float, optional] Molar internal energy of the overall bulk, [J/mol]
A [float, optional] Molar Helmholtz energy of the overall bulk, [J/mol]
solution [str or int, optional] When multiple solutions exist, if more than one is found they
will be sorted by T (and then P) increasingly; this number will index into the multiple
solution array. Negative indexing is supported. ‘high’ is an alias for 0, and ‘low’ an alias
for -1. Setting this parameter may make a flash slower because in some cases more checks
are performed. [-]
hot_start [EquilibriumState] A previously converged flash or initial guessed state from
which the flash can begin; this parameter can save time in some cases, [-]
retry [bool] Usually for flashes like UV or PH, there are multiple sets of possible iteration
variables. For the UV case, the prefered iteration variable is P, so each iteration a PV
solve is done on the phase; but equally the flash can be done iterating on T, where a TV
solve is done on the phase each iteration. Depending on the tolerances, the flash type, the
thermodynamic consistency of the phase, and other factors, it is possible the flash can fail.
If retry is set to True, the alternate variable set will be iterated as a backup if the first flash
fails. [-]
dest [None or EquilibriumState or EquilibriumStream] What type of object the flash
result is set into; leave as None to obtain the normal EquilibriumState results, [-]
rho [float, optional] Molar density of the overall bulk; this is trivially converted to a V spec,
[mol/m^3]
rho_mass [float, optional] Mass density of the overall bulk; this is trivially converted to a
rho spec, [kg/m^3]
H_mass [float, optional] Mass enthalpy of the overall bulk; this is trivially converted to a H
spec, [J/kg]
S_mass [float, optional] Mass entropy of the overall bulk; this is trivially converted to a S
spec, [J/(kg*K)]
G_mass [float, optional] Mass Gibbs free energy of the overall bulk; this is trivially converted
to a G spec, [J/kg]
U_mass [float, optional] Mass internal energy of the overall bulk; this is trivially converted
to a U spec, [J/kg]
A_mass [float, optional] Mass Helmholtz energy of the overall bulk; this is trivially con-
verted to a A spec, [J/kg]
H_reactive [float, optional] Molar reactive enthalpy, [J/mol]
Returns
results [EquilibriumState] Equilibrium object containing the state of the phases after the
flash calculation [-]
Notes
Warning: Not all flash specifications have a unique solution. Not all flash specifications will con-
verge, whether from a bad model, bad inputs, or simply a lack of convergence by the implemented
algorithms. You are welcome to submit these cases to the author but the library is provided AS IS, with
NO SUPPORT.
Warning: The most likely thermodynamic methods to converge are thermodynamically consistent
ones. This means e.g. an ideal liquid and an ideal gas; or an equation of state for both phases. Mixing
thermodynamic models increases the possibility of multiple solutions, discontinuities, and other not-fun
issues for the algorithms.
Returns
Ts [list[float]] Temperatures, [K]
P_dews [list[float]] Bubble point pressures at the evaluated points, [Pa]
P_bubbles [list[float]] Dew point pressures at the evaluated points, [Pa]
branch_Ps [None or list[list[float]]] Pressures which yield the equilibrium vapor fractions
specified; formatted as [[P1_VFx, P2_VFx, . . . Pn_VFx], . . . , [P1_VFy, P2_VFy, . . .
Pn_VFy]], [Pa]
plot_Txy(P, pts=30, ignore_errors=True, values=False, show=True)
Method to create a Txy plot for a binary system (holding pressure constant); the mole fraction of the first
species is varied.
Parameters
P [float] Pressure for the plot, [Pa]
pts [int, optional] The number of points to calculated for each vapor fraction value, [-]
ignore_errors [bool, optional] Whether to fail on a calculation failure, or to ignore the bad
point, [-]
values [bool, optional] If True, the calculated values will be returned instead of plotted, [-]
show [bool, optional] If True, the plot will be created and displayed; if False and values is
False, the plot Figure object will be returned but not displayed; and if False and values is
False, no plot will be created or shown [-]
Returns
fig [Figure] Plot object, [-]
z1 [list[float]] Mole fractions of the first component at each point, [-]
z2 [list[float]] Mole fractions of the second component at each point, [-]
T_dews [list[float]] Bubble point temperatures at the evaluated points, [K]
T_bubbles [list[float]] Dew point temperatures at the evaluated points, [K]
plot_ternary(T=None, P=None, scale=10)
Method to create a ternary plot of the system at either a specified temperature or pressure.
Parameters
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
plot_xy(P=None, T=None, pts=30, ignore_errors=True, values=False, show=True, VF=0.0)
Method to create a xy diagram for a binary system. Either a temperature or pressure can be specified. By
default, bubble point flashes are performed; this can be varied by changing VF.
Parameters
P [float, optional] The specified pressure, [Pa]
T [float, optional] The specified temperature, [K]
pts [int, optional] The number of points in the plot [-]
ignore_errors [bool, optional] Whether to fail on a calculation failure, or to ignore the bad
point, [-]
values [bool, optional] If True, the calculated values will be returned instead of plotted, [-]
show [bool, optional] If True, the plot will be created and displayed; if False and values is
False, the plot Figure object will be returned but not displayed; and if False and values is
False, no plot will be created or shown [-]
Returns
fig [Figure] Plot object, [-]
z1 [list[float]] Overall mole fractions of the first component at each point, [-]
z2 [list[float]] Overall mole fractions of the second component at each point, [-]
x1 [list[float]] Liquid mole fractions of component 1 at each point, [-]
y1 [list[float]] Vapor mole fractions of component 1 at each point, [-]
It is recommended to use the Flash classes, which are designed to have generic interfaces. The implemented specific
flash algorithms may be changed in the future, but reading their source code may be helpful for instructive purposes.
This module contains various methods for identifying functional groups in molecules. This functionality requires the
RDKit library to work.
For submitting pull requests, please use the GitHub issue tracker.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
restrict_atoms [Iterable[str]] Atoms that cannot be found in an organic molecule, [-]
organic_smiles [Iterable[str]] Smiles that are hardcoded to be organic, [-]
inorganic_smiles [Iterable[str]] Smiles that are hardcoded to be inorganic, [-]
Returns
is_organic [bool] Whether or not the compound is a organic or not, [-].
Examples
thermo.functional_groups.is_inorganic(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is inorganic.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_inorganic [bool] Whether or not the compound is inorganic or not, [-].
Examples
thermo.functional_groups.is_hydrocarbon(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an hydrocarbon (molecule con-
taining hydrogen and carbon only)
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_hydrocarbon [bool] Whether or not the compound is a hydrocarbon or not, [-].
Examples
thermo.functional_groups.is_alkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkane, also refered to as a
paraffin. All bonds in the molecule must be single carbon-carbon or carbon-hydrogen.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkane [bool] Whether or not the compound is an alkane or not, [-].
Examples
thermo.functional_groups.is_cycloalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a cycloalkane, also refered to as
a naphthenes.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_cycloalkane [bool] Whether or not the compound is a cycloalkane or not, [-].
Examples
thermo.functional_groups.is_branched_alkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a branched alkane, also refered to
as an isoparaffin. All bonds in the molecule must be single carbon-carbon or carbon-hydrogen.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_branched_alkane [bool] Whether or not the compound is a branched alkane or not, [-].
Examples
thermo.functional_groups.is_alkene(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkene. Alkenes are also refered
to as olefins.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkene [bool] Whether or not the compound is a alkene or not, [-].
Examples
thermo.functional_groups.is_alkyne(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkyne.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkyne [bool] Whether or not the compound is a alkyne or not, [-].
Examples
thermo.functional_groups.is_aromatic(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is aromatic.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_aromatic [bool] Whether or not the compound is aromatic or not, [-].
Examples
thermo.functional_groups.is_alcohol(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alcohol functional groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alcohol [bool] Whether or not the compound is an alcohol, [-].
Examples
thermo.functional_groups.is_polyol(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a polyol (more than 1 alcohol
functional groups).
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_polyol [bool] Whether or not the compound is a polyol, [-].
Examples
thermo.functional_groups.is_ketone(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a ketone.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_ketone [bool] Whether or not the compound is a ketone, [-].
Examples
thermo.functional_groups.is_aldehyde(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an aldehyde.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_aldehyde [bool] Whether or not the compound is an aldehyde, [-].
Examples
thermo.functional_groups.is_carboxylic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylic acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carboxylic_acid [bool] Whether or not the compound is a carboxylic acid, [-].
Examples
thermo.functional_groups.is_ether(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an ether.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_ether [bool] Whether or not the compound is an ether, [-].
Examples
thermo.functional_groups.is_phenol(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phenol.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_phenol [bool] Whether or not the compound is a phenol, [-].
Examples
thermo.functional_groups.is_ester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an ester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_ester [bool] Whether or not the compound is an ester, [-].
Examples
thermo.functional_groups.is_anhydride(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an anhydride.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_anhydride [bool] Whether or not the compound is an anhydride, [-].
Examples
thermo.functional_groups.is_acyl_halide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a acyl halide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_acyl_halide [bool] Whether or not the compound is a acyl halide, [-].
Examples
thermo.functional_groups.is_carbonate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbonate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbonate [bool] Whether or not the compound is a carbonate, [-].
Examples
thermo.functional_groups.is_carboxylate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carboxylate [bool] Whether or not the compound is a carboxylate, [-].
Examples
thermo.functional_groups.is_hydroperoxide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a hydroperoxide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_hydroperoxide [bool] Whether or not the compound is a hydroperoxide, [-].
Examples
thermo.functional_groups.is_peroxide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a peroxide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_peroxide [bool] Whether or not the compound is a peroxide, [-].
Examples
thermo.functional_groups.is_orthoester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a orthoester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_orthoester [bool] Whether or not the compound is a orthoester, [-].
Examples
thermo.functional_groups.is_methylenedioxy(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a methylenedioxy.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_methylenedioxy [bool] Whether or not the compound is a methylenedioxy, [-].
Examples
thermo.functional_groups.is_orthocarbonate_ester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a orthocarbonate ester .
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_orthocarbonate_ester [bool] Whether or not the compound is a orthocarbonate ester , [-].
Examples
thermo.functional_groups.is_carboxylic_anhydride(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylic anhydride .
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carboxylic_anhydride [bool] Whether or not the compound is a carboxylic anhydride, [-].
Examples
thermo.functional_groups.is_amide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a amide RC(=O)NRR group.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_amide [bool] Whether or not the compound is a amide or not, [-].
Examples
thermo.functional_groups.is_amidine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a amidine RC(NR)NR2 group.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_amidine [bool] Whether or not the compound is a amidine or not, [-].
Examples
thermo.functional_groups.is_amine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a amine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_amine [bool] Whether or not the compound is a amine, [-].
Examples
thermo.functional_groups.is_primary_amine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary amine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_primary_amine [bool] Whether or not the compound is a primary amine, [-].
Examples
thermo.functional_groups.is_secondary_amine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary amine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_secondary_amine [bool] Whether or not the compound is a secondary amine, [-].
Examples
thermo.functional_groups.is_tertiary_amine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a tertiary amine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_tertiary_amine [bool] Whether or not the compound is a tertiary amine, [-].
Examples
thermo.functional_groups.is_quat(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a quat.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_quat [bool] Whether or not the compound is a quat, [-].
Examples
thermo.functional_groups.is_imine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a imine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_imine [bool] Whether or not the compound is a imine, [-].
Examples
thermo.functional_groups.is_primary_ketimine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary ketimine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_primary_ketimine [bool] Whether or not the compound is a primary ketimine, [-].
Examples
thermo.functional_groups.is_secondary_ketimine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary ketimine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_secondary_ketimine [bool] Whether or not the compound is a secondary ketimine, [-].
Examples
True
thermo.functional_groups.is_primary_aldimine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary aldimine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_primary_aldimine [bool] Whether or not the compound is a primary aldimine, [-].
Examples
thermo.functional_groups.is_secondary_aldimine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary aldimine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_secondary_aldimine [bool] Whether or not the compound is a secondary aldimine, [-].
Examples
thermo.functional_groups.is_imide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a imide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_imide [bool] Whether or not the compound is a imide, [-].
Examples
thermo.functional_groups.is_azide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a azide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_azide [bool] Whether or not the compound is a azide, [-].
Examples
thermo.functional_groups.is_azo(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a azo.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_azo [bool] Whether or not the compound is a azo, [-].
Examples
thermo.functional_groups.is_cyanate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a cyanate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_cyanate [bool] Whether or not the compound is a cyanate, [-].
Examples
thermo.functional_groups.is_isocyanate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isocyanate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_isocyanate [bool] Whether or not the compound is a isocyanate, [-].
Examples
thermo.functional_groups.is_nitrate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_nitrate [bool] Whether or not the compound is a nitrate, [-].
Examples
thermo.functional_groups.is_nitrile(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrile.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_nitrile [bool] Whether or not the compound is a nitrile, [-].
Examples
thermo.functional_groups.is_isonitrile(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isonitrile.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_isonitrile [bool] Whether or not the compound is a isonitrile, [-].
Examples
thermo.functional_groups.is_nitrite(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrite.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_nitrite [bool] Whether or not the compound is a nitrite, [-].
Examples
thermo.functional_groups.is_nitro(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitro.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_nitro [bool] Whether or not the compound is a nitro, [-].
Examples
thermo.functional_groups.is_nitroso(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitroso.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_nitroso [bool] Whether or not the compound is a nitroso, [-].
Examples
thermo.functional_groups.is_oxime(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a oxime.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_oxime [bool] Whether or not the compound is a oxime, [-].
Examples
thermo.functional_groups.is_pyridyl(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a pyridyl.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_pyridyl [bool] Whether or not the compound is a pyridyl, [-].
Examples
thermo.functional_groups.is_carbamate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbamate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbamate [bool] Whether or not the compound is a carbamate, [-].
Examples
thermo.functional_groups.is_mercaptan(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a mercaptan R-SH group. This
is also called a thiol.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_mercaptan [bool] Whether or not the compound is a mercaptan or not, [-].
Examples
thermo.functional_groups.is_sulfide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfide. This group excludes
disulfides.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfide [bool] Whether or not the compound is a sulfide, [-].
Examples
thermo.functional_groups.is_disulfide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a disulfide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_disulfide [bool] Whether or not the compound is a disulfide, [-].
Examples
thermo.functional_groups.is_sulfoxide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfoxide.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfoxide [bool] Whether or not the compound is a sulfoxide, [-].
Examples
thermo.functional_groups.is_sulfone(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfone.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfone [bool] Whether or not the compound is a sulfone, [-].
Examples
thermo.functional_groups.is_sulfinic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfinic acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfinic_acid [bool] Whether or not the compound is a sulfinic acid, [-].
Examples
thermo.functional_groups.is_sulfonic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfonic acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfonic_acid [bool] Whether or not the compound is a sulfonic acid, [-].
Examples
thermo.functional_groups.is_sulfonate_ester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfonate ester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_sulfonate_ester [bool] Whether or not the compound is a sulfonate ester, [-].
Examples
thermo.functional_groups.is_thiocyanate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thiocyanate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_thiocyanate [bool] Whether or not the compound is a thiocyanate, [-].
Examples
thermo.functional_groups.is_isothiocyanate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isothiocyanate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_isothiocyanate [bool] Whether or not the compound is a isothiocyanate, [-].
Examples
thermo.functional_groups.is_thioketone(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thioketone.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_thioketone [bool] Whether or not the compound is a thioketone, [-].
Examples
thermo.functional_groups.is_thial(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thial.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_thial [bool] Whether or not the compound is a thial, [-].
Examples
thermo.functional_groups.is_carbothioic_s_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a Carbothioic S-acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbothioic_s_acid [bool] Whether or not the compound is a Carbothioic S-acid, [-].
Examples
thermo.functional_groups.is_carbothioic_o_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a Carbothioic S-acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbothioic_o_acid [bool] Whether or not the compound is a Carbothioic S-acid, [-].
Examples
thermo.functional_groups.is_thiolester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thiolester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_thiolester [bool] Whether or not the compound is a thiolester, [-].
Examples
thermo.functional_groups.is_thionoester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thionoester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_thionoester [bool] Whether or not the compound is a thionoester, [-].
Examples
thermo.functional_groups.is_carbodithioic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbodithioic acid .
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbodithioic_acid [bool] Whether or not the compound is a carbodithioic acid , [-].
Examples
thermo.functional_groups.is_carbodithio(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbodithio.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_carbodithio [bool] Whether or not the compound is a carbodithio, [-].
Examples
thermo.functional_groups.is_siloxane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a siloxane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_siloxane [bool] Whether or not the compound is a siloxane, [-].
Examples
thermo.functional_groups.is_silyl_ether(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any silyl ether functional groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_silyl_ether [bool] Whether or not the compound is an silyl ether, [-].
Examples
thermo.functional_groups.is_boronic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has any boronic acid functional
groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_boronic_acid [bool] Whether or not the compound is an boronic acid, [-].
Examples
thermo.functional_groups.is_boronic_ester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a boronic ester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_boronic_ester [bool] Whether or not the compound is a boronic ester, [-].
Examples
thermo.functional_groups.is_borinic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a borinic acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_borinic_acid [bool] Whether or not the compound is a borinic acid, [-].
Examples
thermo.functional_groups.is_borinic_ester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a borinic ester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_borinic_ester [bool] Whether or not the compound is a borinic ester, [-].
Examples
thermo.functional_groups.is_phosphine(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphine.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_phosphine [bool] Whether or not the compound is a phosphine, [-].
Examples
thermo.functional_groups.is_phosphonic_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphonic_acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_phosphonic_acid [bool] Whether or not the compound is a phosphonic_acid, [-].
Examples
thermo.functional_groups.is_phosphodiester(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphodiester.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_phosphodiester [bool] Whether or not the compound is a phosphodiester, [-].
Examples
thermo.functional_groups.is_phosphate(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphate.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_phosphate [bool] Whether or not the compound is a phosphate, [-].
Examples
˓→'))
True
thermo.functional_groups.is_haloalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a haloalkane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_haloalkane [bool] Whether or not the compound is a haloalkane, [-].
Examples
thermo.functional_groups.is_fluoroalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a fluoroalkane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_fluoroalkane [bool] Whether or not the compound is a fluoroalkane, [-].
Examples
thermo.functional_groups.is_chloroalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a chloroalkane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_chloroalkane [bool] Whether or not the compound is a chloroalkane, [-].
Examples
thermo.functional_groups.is_bromoalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a bromoalkane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_bromoalkane [bool] Whether or not the compound is a bromoalkane, [-].
Examples
thermo.functional_groups.is_iodoalkane(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a iodoalkane.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_iodoalkane [bool] Whether or not the compound is a iodoalkane, [-].
Examples
thermo.functional_groups.is_alkyllithium(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkyllithium functional groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkyllithium [bool] Whether or not the compound is an alkyllithium, [-].
Examples
thermo.functional_groups.is_alkylaluminium(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkylaluminium functional
groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkylaluminium [bool] Whether or not the compound is an alkylaluminium, [-].
Examples
thermo.functional_groups.is_alkylmagnesium_halide(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkylmagnesium_halide func-
tional groups.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_alkylmagnesium_halide [bool] Whether or not the compound is an alkylmagnesium_halide,
[-].
Examples
thermo.functional_groups.is_acid(mol)
Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an acid.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
is_acid [bool] Whether or not the compound is a acid, [-].
Examples
thermo.functional_groups.count_ring_ring_attatchments(mol)
Given a rdkit.Chem.rdchem.Mol object, count the number of times a ring in the molecule is bonded with another
ring in the molecule.
An easy explanation is cubane - each edge of the cube is a ring uniquely bonding with another ring; so this
function returns twelve.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
Returns
ring_ring_attatchments [bool] The number of ring-ring bonds, [-].
Examples
thermo.functional_groups.count_rings_attatched_to_rings(mol, allow_neighbors=True,
atom_rings=None)
Given a rdkit.Chem.rdchem.Mol object, count the number of rings in the molecule that are attatched to another
ring. if allow_neighbors is True, any bond to another atom that is part of a ring is allowed; if it is False, the rings
have to share a wall.
Parameters
mol [rdkit.Chem.rdchem.Mol] Molecule [-]
allow_neighbors [bool] Whether or not to count neighboring rings or just ones sharing a wall,
[-]
atom_rings [rdkit.Chem.rdchem.RingInfo, optional] Internal parameter, used for performance
only
Returns
rings_attatched_to_rings [bool] The number of rings bonded to other rings, [-].
Examples
Notes
𝑎=0
𝑏=0
For ‘ketone’, ‘aldehyde’, ‘alkyl nitrile’, ‘ether’, ‘carboxylic acid’, or ‘ester’ types of chemicals:
𝑏=0
For ‘alkyl halide’, ‘mercaptan’, ‘sulfide’, or ‘disulfide’ types of chemicals:
𝑏=0
For ‘alkanol’ types of chemicals (except methanol):
𝑎 = 0.0878
𝑏 = 0.00908 + 0.0006957𝜇𝑟
For methanol:
𝑎 = 0.0878
𝑏 = 0.0525
For water:
𝑎 = −0.0109
𝑏=0
If required, the form of dipole moment used in the calculation of some types of a and b values is as follows:
𝜇2 (𝑃 𝑐/101325.0)
𝜇𝑟 = 100000
𝑇 𝑐2
References
[1], [2]
This module contains implementations of TDependentProperty representing liquid, vapor, and solid heat capacity.
A variety of estimation and data methods are available as included in the chemicals library. Additionally liquid, vapor,
and solid mixture heat capacity predictor objects are implemented subclassing MixtureProperty.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
chemicals.heat_capacity.Zabransky_quasi_polynomial
chemicals.heat_capacity.Zabransky_cubic
chemicals.heat_capacity.Rowlinson_Poling
chemicals.heat_capacity.Rowlinson_Bondi
chemicals.heat_capacity.Dadgostar_Shaw
chemicals.heat_capacity.Shomate
Notes
A string holding each method’s name is assigned to the following variables in this module, intended
as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_liquid_methods.
ZABRANSKY_SPLINE, ZABRANSKY_QUASIPOLYNOMIAL, ZABRANSKY_SPLINE_C, and
ZABRANSKY_QUASIPOLYNOMIAL_C:
Rigorous expressions developed in [1] following critical evaluation of the available data. The
spline methods use the form described in Zabransky_cubic over short ranges with varying co-
efficients to obtain a wider range. The quasi-polynomial methods use the form described in
Zabransky_quasi_polynomial, more suitable for extrapolation, and over then entire range. Re-
spectively, there is data available for 588, 146, 51, and 26 chemicals. ‘C’ denotes constant- pressure
data available from more precise experiments. The others are heat capacity values averaged over a
temperature changed.
ZABRANSKY_SPLINE_SAT and ZABRANSKY_QUASIPOLYNOMIAL_SAT:
Rigorous expressions developed in [1] following critical evaluation of the available data. The
spline method use the form described in Zabransky_cubic over short ranges with varying co-
efficients to obtain a wider range. The quasi-polynomial method use the form described in
Zabransky_quasi_polynomial, more suitable for extrapolation, and over their entire range. Re-
spectively, there is data available for 203, and 16 chemicals. Note that these methods are for the
saturation curve!
VDI_TABULAR:
Tabular data up to the critical point available in [5]. Note that this data is along the saturation curve.
ROWLINSON_POLING:
CSP method described in Rowlinson_Poling. Requires a ideal gas heat capacity value at the same
temperature as it is to be calculated.
ROWLINSON_BONDI:
CSP method described in Rowlinson_Bondi. Requires a ideal gas heat capacity value at the same
temperature as it is to be calculated.
COOLPROP:
CoolProp external library; with select fluids from its library. Range is limited to that of the equations
of state it uses, as described in [3]. Very slow.
DADGOSTAR_SHAW:
A basic estimation method using the similarity variable concept; requires only molecular structure,
so is very convenient. See Dadgostar_Shaw for details.
POLING_CONST:
Constant values in [2] at 298.15 K; available for 245 liquids.
CRCSTD:
Constant values tabulated in [4] at 298.15 K; data is available for 433 liquids.
References
Examples
Methods
calculate(T, method)
Method to calculate heat capacity of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate heat capacity, [K]
method [str] Name of the method to use
Returns
Cp [float] Heat capacity of the liquid at T, [J/mol/K]
name = 'Liquid heat capacity'
property_max = 10000.0
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be
obscenely high.
property_min = 1
Allow very low heat capacities; arbitrarily set; liquid heat capacity should always be somewhat substantial.
ranked_methods = ['ZABRANSKY_SPLINE', 'ZABRANSKY_QUASIPOLYNOMIAL',
'ZABRANSKY_SPLINE_C', 'ZABRANSKY_QUASIPOLYNOMIAL_C', 'ZABRANSKY_SPLINE_SAT',
'ZABRANSKY_QUASIPOLYNOMIAL_SAT', 'WEBBOOK_SHOMATE', 'JANAF', 'VDI_TABULAR',
'COOLPROP', 'DADGOSTAR_SHAW', 'ROWLINSON_POLING', 'ROWLINSON_BONDI', 'POLING_CONST',
'CRCSTD']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods.
For the CSP method Rowlinson_Poling, the model is considered valid for all temperatures. The simple
method Dadgostar_Shaw is considered valid for all temperatures. For tabular data, extrapolation outside
of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is considered
valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'J/mol/K'
thermo.heat_capacity.heat_capacity_liquid_methods = ['ZABRANSKY_SPLINE',
'ZABRANSKY_QUASIPOLYNOMIAL', 'ZABRANSKY_SPLINE_C', 'ZABRANSKY_QUASIPOLYNOMIAL_C',
'ZABRANSKY_SPLINE_SAT', 'ZABRANSKY_QUASIPOLYNOMIAL_SAT', 'WEBBOOK_SHOMATE',
'VDI_TABULAR', 'ROWLINSON_POLING', 'ROWLINSON_BONDI', 'COOLPROP', 'DADGOSTAR_SHAW',
'POLING_CONST', 'CRCSTD']
Holds all methods available for the HeatCapacityLiquid class, for use in iterating over them.
chemicals.heat_capacity.TRCCp
chemicals.heat_capacity.Shomate
chemicals.heat_capacity.Lastovka_Shaw
chemicals.heat_capacity.Rowlinson_Poling
chemicals.heat_capacity.Rowlinson_Bondi
thermo.joback.Joback
Notes
A string holding each method’s name is assigned to the following variables in this module, intended
as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_gas_methods.
TRCIG: A rigorous expression derived in [1] for modeling gas heat capacity. Coefficients for 1961 chemicals
are available.
POLING_POLY: Simple polynomials in [2] not suitable for extrapolation. Data is available for 308 chemicals.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [3]. The heat capacity and enthalpy are implemented analytically
and fairly fast; the entropy integral has no analytical integral and so is numerical. CoolProp’s amazing
coefficient collection is used directly in Python.
LASTOVKA_SHAW: A basic estimation method using the similarity variable concept; requires only molecu-
lar structure, so is very convenient. See Lastovka_Shaw for details.
CRCSTD: Constant values tabulated in [4] at 298.15 K; data is available for 533 gases.
POLING_CONST: Constant values in [2] at 298.15 K; available for 348 gases.
VDI_TABULAR: Tabular data up to the critical point available in [5]. Note that this data is along the saturation
curve.
WEBBOOK_SHOMATE: Shomate form coefficients from [6] for ~700 compounds.
JOBACK: An estimation method for organic substances in [7]
References
Examples
Methods
calculate(T, method)
Method to calculate surface tension of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate heat capacity, [K]
method [str] Method name to use
Returns
Cp [float] Calculated heat capacity, [J/mol/K]
name = 'gas heat capacity'
property_max = 10000.0
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be
obscenely high.
property_min = 0
Heat capacities have a minimum value of 0 at 0 K.
ranked_methods = ['TRCIG', 'WEBBOOK_SHOMATE', 'JANAF', 'POLING_POLY', 'COOLPROP',
'JOBACK', 'LASTOVKA_SHAW', 'CRCSTD', 'POLING_CONST', 'VDI_TABULAR']
Default rankings of the available methods.
test_method_validity(T, method)
Method to test the validity of a specified method for a given temperature.
‘TRC’ and ‘Poling’ both have minimum and maimum temperatures. The constant temperatures in POL-
ING_CONST and CRCSTD are considered valid for 50 degrees around their specified temperatures.
Lastovka_Shaw is considered valid for the whole range of temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to determine the validity of the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a specifid method is valid
units = 'J/mol/K'
thermo.heat_capacity.heat_capacity_gas_methods = ['COOLPROP', 'TRCIG', 'WEBBOOK_SHOMATE',
'POLING_POLY', 'LASTOVKA_SHAW', 'CRCSTD', 'POLING_CONST', 'JOBACK', 'VDI_TABULAR']
Holds all methods available for the HeatCapacityGas class, for use in iterating over them.
chemicals.heat_capacity.Lastovka_solid
chemicals.heat_capacity.Shomate
Notes
A string holding each method’s name is assigned to the following variables in this module, intended
as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_solid_methods.
PERRY151: Simple polynomials with vaious exponents selected for each expression. Coefficients are in units
of calories/mol/K. The full expression is:
𝐶𝑝 = 𝑎 + 𝑏𝑇 + 𝑐/𝑇 2 + 𝑑𝑇 2
References
Examples
>>> CpSolid(200)
131.205824
Methods
calculate(T, method)
Method to calculate heat capacity of a solid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate heat capacity, [K]
method [str] Name of the method to use
Returns
Cp [float] Heat capacity of the solid at T, [J/mol/K]
name = 'solid heat capacity'
property_max = 10000.0
Maximum value of Heat capacity; arbitrarily set.
property_min = 0
Heat capacities have a minimum value of 0 at 0 K.
ranked_methods = ['WEBBOOK_SHOMATE', 'JANAF', 'PERRY151', 'CRCSTD', 'LASTOVKA_S']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
tabular data, extrapolation outside of the range is used if tabular_extrapolation_permitted is set;
if it is, the extrapolation is considered valid for all temperatures. For the Lastovka_solid method, it is
considered valid under 10000K.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'J/mol/K'
thermo.heat_capacity.heat_capacity_solid_methods = ['WEBBOOK_SHOMATE', 'PERRY151',
'CRCSTD', 'LASTOVKA_S']
Holds all methods available for the HeatCapacitySolid class, for use in iterating over them.
Notes
Methods
calculate(T, P, zs, ws, method) Method to calculate heat capacity of a liquid mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the heat capacity above.
Tmin
Minimum temperature at which no method can calculate the heat capacity under.
calculate(T, P, zs, ws, method)
Method to calculate heat capacity of a liquid mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
Cplm [float] Molar heat capacity of the liquid mixture at the given conditions, [J/mol]
name = 'Liquid heat capacity'
property_max = 10000.0
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be
obscenely high.
property_min = 1
Allow very low heat capacities; arbitrarily set; liquid heat capacity should always be somewhat substantial.
ranked_methods = ['LALIBERTE', 'LINEAR']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Method name to use
Returns
Notes
Methods
calculate(T, P, zs, ws, method) Method to calculate heat capacity of a gas mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the heat capacity above.
Tmin
Minimum temperature at which no method can calculate the heat capacity under.
calculate(T, P, zs, ws, method)
Method to calculate heat capacity of a gas mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
Notes
Methods
calculate(T, P, zs, ws, method) Method to calculate heat capacity of a solid mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the heat capacity above.
Tmin
Minimum temperature at which no method can calculate the heat capacity under.
calculate(T, P, zs, ws, method)
Method to calculate heat capacity of a solid mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
Cpsm [float] Molar heat capacity of the solid mixture at the given conditions, [J/mol]
name = 'Solid heat capacity'
property_max = 10000.0
Maximum value of Heat capacity; arbitrarily set.
property_min = 0
Heat capacities have a minimum value of 0 at 0 K.
ranked_methods = ['LINEAR']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
This module contains implementations of TDependentProperty representing liquid-air surface tension. A variety of
estimation and data methods are available as included in the chemicals library. Additionally a liquid mixture surface
tension predictor objects are implemented subclassing MixtureProperty.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Vml [float or callable, optional] Liquid molar volume at a given temperature and pressure or
callable for the same, [m^3/mol]
Cpl [float or callable, optional] Molar heat capacity of the fluid at a pressure and temperature or
or callable for the same, [J/mol/K]
load_data [bool, optional] If False, do not load property coefficients from data sources in files
[-]
extrapolation [str or None] None to not extrapolate; see TDependentProperty for a full list
of all options, [-]
method [str or None, optional] If specified, use this method by default and do not use the ranked
sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
See also:
chemicals.interface.REFPROP_sigma
chemicals.interface.Somayajulu
chemicals.interface.Jasper
chemicals.interface.Brock_Bird
chemicals.interface.Sastri_Rao
chemicals.interface.Pitzer
chemicals.interface.Zuo_Stenby
chemicals.interface.Miqueu
chemicals.interface.Aleem
chemicals.interface.sigma_IAPWS
Notes
VDI_TABULAR: Tabular data in [6] along the saturation curve; interpolation is as set by the user or the default.
References
Methods
calculate(T, method)
Method to calculate surface tension of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate surface tension, [K]
method [str] Name of the method to use
Returns
sigma [float] Surface tension of the liquid at T, [N/m]
name = 'Surface tension'
property_max = 4.0
Maximum valid value of surface tension. Set to roughly twice that of cobalt at its melting point.
property_min = 0
Mimimum valid value of surface tension. This occurs at the critical point exactly.
ranked_methods = ['IAPWS', 'REFPROP', 'SOMAYAJULU2', 'SOMAYAJULU', 'VDI_PPDS',
'VDI_TABULAR', 'JASPER', 'MIQUEU', 'BROCK_BIRD', 'SASTRI_RAO', 'PITZER',
'ZUO_STENBY', 'Aleem']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
CSP methods, the models are considered valid from 0 K to the critical point. For tabular data, extrapolation
outside of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is
considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'N/m'
chemicals.interface.Winterfeld_Scriven_Davis
chemicals.interface.Diguilio_Teja
Notes
References
[1]
Methods
calculate(T, P, zs, ws, method) Method to calculate surface tension of a liquid mix-
ture at temperature T, pressure P, mole fractions zs
and weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate surface tension of a liquid mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
sigma [float] Surface tension of the liquid at given conditions, [N/m]
name = 'Surface tension'
property_max = 4.0
Maximum valid value of surface tension. Set to roughly twice that of cobalt at its melting point.
property_min = 0
Mimimum valid value of surface tension. This occurs at the critical point exactly.
ranked_methods = ['Winterfeld, Scriven, and Davis (1978)', 'Diguilio and Teja
(1988)', 'LINEAR']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
This module contains a small database of interaction parameters. Only two data sets are currently included, both from
ChemSep. If you would like to add parameters to this project please make a referenced compilation of values and
submit them on GitHub.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
class thermo.interaction_parameters.InteractionParameterDB
Basic database framework for interaction parameters.
Methods
Examples
Examples
0.0533
Examples
Parameters
name [str] Name of the data table, [-]
CASs [Iterable[str]] CAS numbers; they do not need to be sorted, [-]
ip [str] Name of the parameter to retrieve, [-]
T [float, optional] Temperature of the system, [-]
Returns
values [list[list[float]]] Interaction parameters specified by ip, [-]
Examples
get_tables_with_type(ip_type)
Get a list of tables which have a type of a parameter.
Parameters
ip_type [str] Name of the parameter type, [-]
Returns
table_names [list[str]] Interaction parameter tables including ip, [-]
Examples
Examples
load_json(file, name)
Load a json file from disk containing interaction coefficients.
The format for the file is as follows:
A data key containing a dictionary with a key:
• CAS1 CAS2 [str] The CAS numbers of both components, sorted from small to high as integers; they
should have the ‘-’ symbols still in them and have a single space between them; if these are ternary
or higher parameters, follow the same format for the other CAS numbers, [-]
• values [dict[str][various]] All of the values listed in the metadata element necessary keys; they are
None if missing.
A metadata key containing:
• symmetric [bool] Whether or not the interaction coefficients are missing.
• source [str] Where the data came from.
• components [int] The number of components each interaction parameter is for; 2 for binary, 3 for
ternary, etc.
• necessary keys [list[str]] Which elements are required in the data.
• P dependent [bool] Whether or not the interaction parameters are pressure dependent.
• missing [dict[str][float]] Values which are missing are returned with these values
• type [One of ‘PR kij’, ‘SRK kij’, etc; used to group data but not] tied into anything else.
• T dependent [bool] Whether or not the data is T-dependent.
Parameters
file [str] Path to json file on disk which contains interaction coefficients, [-]
name [str] Name that the data read should be referred to by, [-]
validate_table(name)
Basic method which checks that all CAS numbers are valid, and that all elements of the data have non-nan
values. Raises an exception if any of the data is missing or is a nan value.
thermo.interaction_parameters.IPDB =
<thermo.interaction_parameters.InteractionParameterDB object>
Basic database framework for interaction parameters.
Exmple database with NRTL and PR values from ChemSep. This is lazy-loaded, access it as
thermo.interaction_parameters.IPDB.
class thermo.interaction_parameters.ScalarParameterDB
Basic database framework for scalar parameters of various thermodynamic models. The following keys are used:
Peng-Robinson
Twu Volume-translated Peng-Robinson: TwuPRL, TwuPRM, TwuPRN, TwuPRc
Methods
get_parameter_automatic(CAS, parameter) Get an interaction parameter for the first table con-
taining the value.
get_parameter_specific(name, CAS, parame- Get a parameter from a table.
ter)
get_parameter_vector(name, CASs, parameter) Get a list of parameters from a specified source for
the specified parameter.
get_tables_with_type(parameter) Get a list of tables which have a parameter.
has_parameter_specific(name, CAS, parame- Check if a parameter exists in a table.
ter)
load_json
SPDB
Example scalar parameters for models. This is lazy-loaded, access it as
thermo.interaction_parameters.SPDB.
>>> economic_status(CASRN='98-00-0')
["US public: {'Manufactured': 0.0, 'Imported': 10272.711, 'Exported': 184.127}",
˓→'10,000 - 100,000 tonnes per annum', 'OECD HPV Chemicals']
Notes
References
Examples
>>> legal_status('64-17-5')
{'DSL': 'LISTED', 'TSCA': 'LISTED', 'EINECS': 'LISTED', 'NLP': 'UNLISTED', 'SPIN':
˓→'LISTED'}
thermo.law.load_economic_data()
thermo.law.load_law_data()
This module contains a class NRTL for performing activity coefficient calculations with the NRTL model. An older,
functional calculation for activity coefficients only is also present, NRTL_gammas.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• NRTL Class
• NRTL Functional Calculations
• NRTL Regression Calculations
Notes
In addition to the methods presented here, the methods of its base class thermo.activity.GibbsExcess are
available as well.
References
[1], [2]
Examples
The DDBST has published numerous problems showing this model a simple binary system, Example P05.01b
in [2], shows how to use parameters from the DDBST which are in units of calorie and need the gas constant as
a multiplier:
The solution given by the DDBST has the same values [1.936, 1.154], and can be found here:
http://chemthermo.ddbst.com/Problems_Solutions/Mathcad_Files/P05.01b%20VLE%20Behavior%20of%
20Ethanol%20-%20Water%20Using%20NRTL.xps
Attributes
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
Methods
to_T_xs(T, xs)
Method to construct a new NRTL instance at temperature T, and mole fractions xs with the same parameters
as the existing object.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions of each component, [-]
Returns
obj [NRTL] New NRTL object at the specified conditions [-]
Notes
If the new temperature is the same temperature as the existing temperature, if the tau, Gs, or alphas terms
or their derivatives have been calculated, they will be set to the new object as well.
taus()
Calculate and return the tau terms for the NRTL model for a specified temperature.
𝐵𝑖𝑗 𝐺𝑖𝑗
𝜏𝑖𝑗 = 𝐴𝑖𝑗 + + 𝐸𝑖𝑗 ln 𝑇 + 𝐹𝑖𝑗 𝑇 + 2 + 𝐻𝑖𝑗 𝑇 2
𝑇 𝑇
Returns
taus [list[list[float]]] tau terms, asymmetric matrix [-]
Notes
Returns
alphas [list[list[float]]] alpha terms, possibly asymmetric matrix [-]
Notes
alpha values (and therefore cij and dij are normally symmetrical; but this is not strictly required.
Some sources suggest the c term should be fit to a given system; but the d term should be fit for an entire
chemical family to avoid overfitting.
Recommended values for cij according to one source are:
0.30 Nonpolar substances with nonpolar substances; low deviation from ideality. 0.20 Hydrocarbons that
are saturated interacting with polar liquids that do not associate, or systems that for multiple liquid phases
which are immiscible 0.47 Strongly self associative systems, interacting with non-polar substances
alpha_coeffs should be a list[list[cij, dij]] so a 3d array
Gs()
Calculates and return the G terms in the NRTL model for a specified temperature.
Returns
Gs [list[list[float]]] G terms, asymmetric matrix [-]
dGs_dT()
Calculates and return the first temperature derivative of G terms in the NRTL model for a specified tem-
perature.
(︂ )︂
𝜕𝐺𝑖𝑗 𝑑 𝑑
= −𝛼(𝑇 ) 𝜏 (𝑇 ) − 𝜏 (𝑇 ) 𝛼(𝑇 ) 𝑒−𝛼(𝑇 )𝜏 (𝑇 )
𝜕𝑇 𝑑𝑇 𝑑𝑇
Returns
dGs_dT [list[list[float]]] Temperature derivative of G terms, asymmetric matrix [1/K]
Notes
d2Gs_dT2()
Calculates and return the second temperature derivative of G terms in the NRTL model for a specified
temperature.
(︃(︂ )︂2 )︃
𝜕 2 𝐺𝑖𝑗 𝑑 𝑑 𝑑2 𝑑 𝑑
= 𝛼(𝑇 ) 𝜏 (𝑇 ) + 𝜏 (𝑇 ) 𝛼(𝑇 ) − 𝛼(𝑇 ) 2 𝜏 (𝑇 ) − 2 𝛼(𝑇 ) 𝜏 (𝑇 ) 𝑒−𝛼(𝑇 )𝜏 (𝑇 )
𝜕𝑇 2 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇
Returns
d2Gs_dT2 [list[list[float]]] Second temperature derivative of G terms, asymmetric matrix
[1/K^2]
Notes
d3Gs_dT3()
Calculates and return the third temperature derivative of G terms in the NRTL model for a specified tem-
perature.
)︂3 (︂
𝜕 3 𝐺𝑖𝑗 𝑑2
(︂ )︂ (︂
𝑑 𝑑 𝑑 𝑑 𝑑 𝑑
= 𝛼(𝑇 ) 𝜏 (𝑇 ) + 𝜏 (𝑇 ) 𝛼(𝑇 ) + 3𝛼(𝑇 ) 𝜏 (𝑇 ) + 3𝜏 (𝑇 ) 𝛼(𝑇 ) 𝛼(𝑇 ) 2 𝜏 (𝑇 ) + 2 𝛼(𝑇 ) 𝜏 (
𝜕𝑇 3 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇 𝑑𝑇
Returns
d3Gs_dT3 [list[list[float]]] Third temperature derivative of G terms, asymmetric matrix
[1/K^3]
Notes
GE()
Calculate and return the excess Gibbs energy of a liquid phase represented by the NRTL model.
∑︀
𝑗 𝜏𝑗𝑖 𝐺𝑗𝑖 𝑥𝑗
∑︁
𝐸
𝑔 = 𝑅𝑇 𝑥𝑖 ∑︀
𝑖 𝑗 𝐺𝑗𝑖 𝑥𝑗
Returns
GE [float] Excess Gibbs energy, [J/mol]
dGE_dT()
Calculate and return the first tempreature derivative of excess Gibbs energy of a liquid phase represented
by the NRTL model.
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy, [J/(mol*K)]
d2GE_dT2()
Calculate and return the second tempreature derivative of excess Gibbs energy of a liquid phase represented
by the NRTL model.
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy, [J/(mol*K^2)]
dGE_dxs()
Calculate and return the mole fraction derivatives of excess Gibbs energy of a liquid represented by the
NRTL model.
𝜕𝑔 𝐸
𝜕𝑥𝑖
Returns
dGE_dxs [list[float]] Mole fraction derivatives of excess Gibbs energy, [J/mol]
d2GE_dxixjs()
Calculate and return the second mole fraction derivatives of excess Gibbs energy of a liquid represented by
the NRTL model.
[︃
𝜕 2 𝑔𝐸
∑︀ ∑︀ (︂ ∑︀
𝐺𝑖𝑗 𝜏𝑖𝑗 𝐺𝑗𝑖 𝜏𝑗𝑖𝑖𝑗 ( 𝑚 𝑥𝑚 𝐺𝑚𝑗 𝜏𝑚𝑗 )𝐺𝑖𝑗 ( 𝑚 𝑥𝑚 𝐺𝑚𝑖 𝜏𝑚𝑖 )𝐺𝑗𝑖 ∑︁ 2𝑥𝑘 ( 𝑚 𝑥𝑚 𝜏𝑚
= 𝑅𝑇 + ∑︀ + ∑︀ − ∑︀ − ∑︀ ∑︀
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑚 𝑥𝑚 𝐺𝑚𝑗 𝑚 𝑥𝑚 𝐺𝑚𝑖 ( 𝑚 𝑥𝑚 𝐺𝑚𝑗 )2 ( 𝑚 𝑥𝑚 𝐺𝑚𝑖 )2 ( 𝑚 𝑥𝑚
𝑘
Returns
d2GE_dxixjs [list[list[float]]] Second mole fraction derivatives of excess Gibbs energy,
[J/mol]
d2GE_dTdxs()
Calculate and return the temperature derivative of mole fraction derivatives of excess Gibbs energy of a
liquid represented by the NRTL model.
⎡ ⎛ (︃ 𝜕𝜏 𝜕𝐺 𝜕𝐺 𝜕𝐺
𝜕 2 𝑔𝐸
∑︀ ∑︀ ∑︀
∑︁ 𝑥𝑗 (𝐺𝑖𝑗 𝜕𝑇𝑖𝑗 + 𝜏𝑖𝑗 𝜕𝑇𝑖𝑗 ) 𝑥𝑗 𝐺𝑖𝑗 𝜏𝑖𝑗 ( 𝑘 𝑥𝑘 𝜕𝑇𝑘𝑗 ) 𝑥𝑗 𝜕𝑇𝑖𝑗 ( 𝑘 𝑥𝑘 𝐺𝑘𝑗 𝜏𝑘𝑗 ) 𝑥𝑗 𝐺𝑖𝑗 ( 𝑘 𝑥𝑘
= 𝑅 ⎣−𝑇 ⎝ − ∑︀ + ∑︀ + ∑︀ + ∑︀
𝜕𝑥𝑖 𝜕𝑇 𝑗 𝑘 𝑥𝑘 𝐺𝑘𝑗 ( 𝑘 𝑥𝑘 𝐺𝑘𝑗 )2 ( 𝑘 𝑥𝑘 𝐺𝑘𝑗 )2 (
Returns
d2GE_dTdxs [list[float]] Temperature derivative of mole fraction derivatives of excess
Gibbs energy, [J/(mol*K)]
Returns
gammas [list[float]] Activity coefficient for each species in the liquid mixture, [-]
Notes
Most correlations for the interaction parameters include some of the terms shown in the following form:
𝐵𝑖𝑗 𝐶𝑖𝑗
𝜏𝑖𝑗 = 𝐴𝑖𝑗 + + 2 + 𝐷𝑖𝑗 ln (𝑇 ) + 𝐸𝑖𝑗 𝑇 𝐹𝑖𝑗
𝑇 𝑇
The original form of this model used the temperature dependence of taus in the form (values can be found in the
literature, often with units of calories/mol):
𝑏𝑖𝑗
𝜏𝑖𝑗 =
𝑅𝑇
For this model to produce ideal acitivty coefficients (gammas = 1), all interaction parameters should be 0; the
value of alpha does not impact the calculation when that is the case.
References
[1], [2]
Examples
xs [list[float]] Liquid mole fractions of each species in the format x0_0, x1_0, (component 1
point1, component 2 point 1), x0_1, x1_1, (component 1 point2, component 2 point 2), . . .
[-]
tau12 [float] tau parameter for 12, [-]
tau21 [float] tau parameter for 21, [-]
alpha12 [float] alpha parameter for 12, [-]
alpha21 [float] alpha parameter for 21, [-]
gammas [list[float], optional] Array to store the activity coefficient for each species in the liquid
mixture, indexed the same as xs; can be omitted or provided for slightly better performance
[-]
Returns
gammas [list[float]] Activity coefficient for each species in the liquid mixture, indexed the same
as xs, [-]
Examples
>>> NRTL_gammas_binaries([.1, .9, 0.3, 0.7, .85, .15], 0.1759, 0.7991, .2, .3)
[2.121421, 1.011342, 1.52177, 1.09773, 1.016062, 1.841391]
ws [list or dict, optional] Mass fractions of all components in the mixture [-]
Vfls [list or dict, optional] Volume fractions of all components as a hypothetical liquid phase
based on pure component densities [-]
Vfgs [list, or dict optional] Volume fractions of all components as a hypothetical gas phase based
on pure component densities [-]
T [float, optional] Temperature of the mixture (default 298.15 K), [K]
P [float, optional] Pressure of the mixture (default 101325 Pa) [Pa]
VF [float, optional] Vapor fraction (mole basis) of the mixture, [-]
Hm [float, optional] Molar enthalpy of the mixture, [J/mol]
H [float, optional] Mass enthalpy of the mixture, [J/kg]
Sm [float, optional] Molar entropy of the mixture, [J/mol/K]
S [float, optional] Mass entropy of the mixture, [J/kg/K]
pkg [object] The thermodynamic property package to use for flash calculations; one of the
caloric packages in thermo.property_package; defaults to the ideal model [-]
Vf_TP [tuple(2, float), optional] The (T, P) at which the volume fractions are specified to be at,
[K] and [Pa]
Notes
Warning: The Mixture class is not designed for high-performance or the ability to use different thermody-
namic models. It is especially limited in its multiphase support and the ability to solve with specifications
other than temperature and pressure. It is impossible to change constant properties such as a compound’s
critical temperature in this interface.
It is recommended to switch over to the thermo.flash interface which solves those problems and is better
positioned to grow. That interface also requires users to be responsible for their chemical constants and pure
component correlations; while default values can easily be loaded for most compounds, the user is ultimately
responsible for them.
Examples
For mixtures with large numbers of components, it may be confusing to enter the composition separate from the
names of the chemicals. For that case, the syntax using dictionaries as follows is supported with any composition
specification:
Attributes
MW [float] Mole-weighted average molecular weight all chemicals in the mixture, [g/mol]
IDs [list of str] Names of all the species in the mixture as given in the input, [-]
names [list of str] Names of all the species in the mixture, [-]
CASs [list of str] CAS numbers of all species in the mixture, [-]
MWs [list of float] Molecular weights of all chemicals in the mixture, [g/mol]
Tms [list of float] Melting temperatures of all chemicals in the mixture, [K]
Tbs [list of float] Boiling temperatures of all chemicals in the mixture, [K]
Tcs [list of float] Critical temperatures of all chemicals in the mixture, [K]
Pcs [list of float] Critical pressures of all chemicals in the mixture, [Pa]
Vcs [list of float] Critical volumes of all chemicals in the mixture, [m^3/mol]
Zcs [list of float] Critical compressibilities of all chemicals in the mixture, [-]
rhocs [list of float] Critical densities of all chemicals in the mixture, [kg/m^3]
rhocms [list of float] Critical molar densities of all chemicals in the mixture, [mol/m^3]
omegas [list of float] Acentric factors of all chemicals in the mixture, [-]
StielPolars [list of float] Stiel Polar factors of all chemicals in the mixture, see chemicals.
acentric.Stiel_polar_factor for the definition, [-]
Tts [list of float] Triple temperatures of all chemicals in the mixture, [K]
Pts [list of float] Triple pressures of all chemicals in the mixture, [Pa]
Hfuss [list of float] Enthalpy of fusions of all chemicals in the mixture, [J/kg]
Hfusms [list of float] Molar enthalpy of fusions of all chemicals in the mixture, [J/mol]
Hsubs [list of float] Enthalpy of sublimations of all chemicals in the mixture, [J/kg]
Hsubms [list of float] Molar enthalpy of sublimations of all chemicals in the mixture, [J/mol]
Hfms [list of float] Molar enthalpy of formations of all chemicals in the mixture, [J/mol]
Hfs [list of float] Enthalpy of formations of all chemicals in the mixture, [J/kg]
Gfms [list of float] Molar Gibbs free energies of formation of all chemicals in the mixture,
[J/mol]
Gfs [list of float] Gibbs free energies of formation of all chemicals in the mixture, [J/kg]
Sfms [list of float] Molar entropy of formation of all chemicals in the mixture, [J/mol/K]
Sfs [list of float] Entropy of formation of all chemicals in the mixture, [J/kg/K]
S0ms [list of float] Standard absolute entropies of all chemicals in the mixture, [J/mol/K]
S0s [list of float] Standard absolute entropies of all chemicals in the mixture, [J/kg/K]
Hcms [list of float] Molar higher heats of combustions of all chemicals in the mixture, [J/mol]
Hcs [list of float] Higher heats of combustions of all chemicals in the mixture, [J/kg]
Hcms_lower [list of float] Molar lower heats of combustions of all chemicals in the mixture,
[J/mol]
Hcs_lower [list of float] Higher lower of combustions of all chemicals in the mixture, [J/kg]
Tflashs [list of float] Flash points of all chemicals in the mixture, [K]
Tautoignitions [list of float] Autoignition points of all chemicals in the mixture, [K]
LFLs [list of float] Lower flammability limits of the gases in an atmosphere at STP, mole frac-
tions, [-]
UFLs [list of float] Upper flammability limit of the gases in an atmosphere at STP, mole frac-
tions, [-]
TWAs [list of list of tuple(quantity, unit)] Time-Weighted Average limits on worker exposure to
dangerous chemicals.
STELs [list of tuple(quantity, unit)] Short-term Exposure limits on worker exposure to danger-
ous chemicals.
Ceilings [list of tuple(quantity, unit)] Ceiling limits on worker exposure to dangerous chemicals.
Skins [list of bool] Whether or not each of the chemicals can be absorbed through the skin.
Carcinogens [list of str or dict] Carcinogen status information for each chemical in the mixture.
Chemicals [list of Chemical instances] Chemical instances used in calculating mixture proper-
ties, [-]
dipoles [list of float] Dipole moments of all chemicals in the mixture in debye, [3.33564095198e-
30 ampere*second^2]
Stockmayers [list of float] Lennard-Jones depth of potential-energy minimum over k for all
chemicals in the mixture, [K]
molecular_diameters [list of float] Lennard-Jones molecular diameters of all chemicals in the
mixture, [angstrom]
GWPs [list of float] Global warming potentials (default 100-year outlook) (impact/mass chem-
ical)/(impact/mass CO2) of all chemicals in the mixture, [-]
ODPs [list of float] Ozone Depletion potentials (impact/mass chemical)/(impact/mass CFC-11),
of all chemicals in the mixture, [-]
logPs [list of float] Octanol-water partition coefficients of all chemicals in the mixture, [-]
Psat_298s [list of float] Vapor pressure of the chemicals in the mixture at 298.15 K, [Pa]
phase_STPs [list of str] Phase of the chemicals in the mixture at 298.15 K and 101325 Pa; one
of ‘s’, ‘l’, ‘g’, or ‘l/g’.
Vml_Tbs [list of float] Molar volumes of the chemicals in the mixture as liquids at their normal
boiling points, [m^3/mol]
Vml_Tms [list of float] Molar volumes of the chemicals in the mixture as liquids at their melting
points, [m^3/mol]
Vml_STPs [list of float] Molar volume of the chemicals in the mixture as liquids at 298.15 K
and 101325 Pa, [m^3/mol]
rhoml_STPs [list of float] Molar densities of the chemicals in the mixture as liquids at 298.15
K and 101325 Pa, [mol/m^3]
Vmg_STPs [list of float] Molar volume of the chemicals in the mixture as gases at 298.15 K
and 101325 Pa, [m^3/mol]
Vms_Tms [list of float] Molar volumes of solid phase at the melting point [m^3/mol]
rhos_Tms [list of float] Mass densities of solid phase at the melting point [kg/m^3]
Hvap_Tbms [list of float] Molar enthalpies of vaporization of the chemicals in the mixture at
their normal boiling points, [J/mol]
Hvap_Tbs [list of float] Mass enthalpies of vaporization of the chemicals in the mixture at their
normal boiling points, [J/kg]
alpha Thermal diffusivity of the mixture at its current temperature, pressure, and phase in units
of [m^2/s].
alphag Thermal diffusivity of the gas phase of the mixture if one exists at its current temperature
and pressure, in units of [m^2/s].
alphags Pure component thermal diffusivities of the chemicals in the mixture in the gas phase
at the current temperature and pressure, in units of [m^2/s].
alphal Thermal diffusivity of the liquid phase of the mixture if one exists at its current temper-
ature and pressure, in units of [m^2/s].
alphals Pure component thermal diffusivities of the chemicals in the mixture in the liquid
phase at the current temperature and pressure, in units of [m^2/s].
A Helmholtz energy of the mixture at its current state, in units of [J/kg].
Am Helmholtz energy of the mixture at its current state, in units of [J/mol].
atom_fractions Dictionary of atomic fractions for each atom in the mixture.
atom_fractionss List of dictionaries of atomic fractions for all chemicals in the mixture.
atomss List of dictionaries of atom counts for all chemicals in the mixture.
Bvirial Second virial coefficient of the gas phase of the mixture at its current temperature,
pressure, and composition in units of [mol/m^3].
charges Charges for all chemicals in the mixture, [faraday].
Cp Mass heat capacity of the mixture at its current phase and temperature, in units of [J/kg/K].
Cpg Gas-phase heat capacity of the mixture at its current temperature , and composition in units
of [J/kg/K].
Cpgm Gas-phase heat capacity of the mixture at its current temperature and composition, in units
of [J/mol/K].
Cpgms Gas-phase ideal gas heat capacity of the chemicals at its current temperature, in units of
[J/mol/K].
Cpgs Gas-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cpl Liquid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/kg/K].
Cplm Liquid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/mol/K].
Cplms Liquid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/mol/K].
Cpls Liquid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cpm Molar heat capacity of the mixture at its current phase and temperature, in units of
[J/mol/K].
Cps Solid-phase heat capacity of the mixture at its current temperature and composition, in units
of [J/kg/K].
Cpsm Solid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/mol/K].
Cpsms Solid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/mol/K].
Cpss Solid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cvg Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature,
in units of [J/kg/K].
Cvgm Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature
and composition, in units of [J/mol/K].
Cvgms Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in
the mixture at its current temperature, in units of [J/mol/K].
Cvgs Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in
the mixture at its current temperature, in units of [J/kg/K].
economic_statuses List of dictionaries of the economic status for all chemicals in the mix-
ture.
eos Equation of state object held by the mixture.
formulas Chemical formulas for all chemicals in the mixture.
Hvapms Pure component enthalpies of vaporization of the chemicals in the mixture at its current
temperature, in units of [J/mol].
Hvaps Enthalpy of vaporization of the chemicals in the mixture at its current temperature, in
units of [J/kg].
InChI_Keys InChI keys for all chemicals in the mixture.
InChIs InChI strings for all chemicals in the mixture.
isentropic_exponent Gas-phase ideal-gas isentropic exponent of the mixture at its current
temperature, [dimensionless].
isentropic_exponents Gas-phase pure component ideal-gas isentropic exponent of the
chemicals in the mixture at its current temperature, [dimensionless].
isobaric_expansion Isobaric (constant-pressure) expansion of the mixture at its current
phase, temperature, and pressure in units of [1/K].
isobaric_expansion_g Isobaric (constant-pressure) expansion of the gas phase of the mix-
ture at its current temperature and pressure, in units of [1/K].
isobaric_expansion_gs Pure component isobaric (constant-pressure) expansions of the
chemicals in the mixture in the gas phase at its current temperature and pressure, in units
of [1/K].
nugs Pure component kinematic viscosities of the gas phase of the chemicals in the mixture at
its current temperature and pressure, in units of [m^2/s].
nul Kinematic viscosity of the liquid phase of the mixture if one exists at its current temperature
and pressure, in units of [m^2/s].
nuls Pure component kinematic viscosities of the liquid phase of the chemicals in the mixture
at its current temperature and pressure, in units of [m^2/s].
permittivites Pure component relative permittivities of the chemicals in the mixture at its
current temperature, [dimensionless].
Pr Prandtl number of the mixture at its current temperature, pressure, and phase; [dimension-
less].
Prg Prandtl number of the gas phase of the mixture if one exists at its current temperature and
pressure, [dimensionless].
Prgs Pure component Prandtl numbers of the gas phase of the chemicals in the mixture at its
current temperature and pressure, [dimensionless].
Prl Prandtl number of the liquid phase of the mixture if one exists at its current temperature
and pressure, [dimensionless].
Prls Pure component Prandtl numbers of the liquid phase of the chemicals in the mixture at its
current temperature and pressure, [dimensionless].
Psats Pure component vapor pressures of the chemicals in the mixture at its current tempera-
ture, in units of [Pa].
PSRK_groups List of dictionaries of PSRK subgroup: count groups for each chemical in the
mixture.
PubChems PubChem Component ID numbers for all chemicals in the mixture.
rho Mass density of the mixture at its current phase and temperature and pressure, in units of
[kg/m^3].
rhog Gas-phase mass density of the mixture at its current temperature, pressure, and composi-
tion in units of [kg/m^3].
rhogm Molar density of the mixture in the gas phase at the current temperature, pressure, and
composition in units of [mol/m^3].
rhogms Pure component molar densities of the chemicals in the gas phase at the current tem-
perature and pressure, in units of [mol/m^3].
rhogm_STP Molar density of the mixture in the gas phase at 298.15 K and 101.325 kPa, and the
current composition, in units of [mol/m^3].
rhogs Pure-component gas-phase mass densities of the chemicals in the mixture at its current
temperature and pressure, in units of [kg/m^3].
rhog_STP Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current
composition in units of [kg/m^3].
rhol Liquid-phase mass density of the mixture at its current temperature, pressure, and com-
position in units of [kg/m^3].
rholm Molar density of the mixture in the liquid phase at the current temperature, pressure, and
composition in units of [mol/m^3].
rholms Pure component molar densities of the chemicals in the mixture in the liquid phase at
the current temperature and pressure, in units of [mol/m^3].
rholm_STP Molar density of the mixture in the liquid phase at 298.15 K and 101.325 kPa, and
the current composition, in units of [mol/m^3].
rhols Pure-component liquid-phase mass density of the chemicals in the mixture at its current
temperature and pressure, in units of [kg/m^3].
rhol_STP Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the
current composition in units of [kg/m^3].
rhom Molar density of the mixture at its current phase and temperature and pressure, in units of
[mol/m^3].
rhosms Pure component molar densities of the chemicals in the solid phase at the current tem-
perature and pressure, in units of [mol/m^3].
rhoss Pure component solid-phase mass density of the chemicals in the mixture at its current
temperature, in units of [kg/m^3].
ringss List of ring counts for all chemicals in the mixture.
sigma Surface tension of the mixture at its current temperature and composition, in units of
[N/m].
sigmas Pure component surface tensions of the chemicals in the mixture at its current temper-
ature, in units of [N/m].
smiless SMILES strings for all chemicals in the mixture.
solubility_parameters Pure component solubility parameters of the chemicals in the mix-
ture at its current temperature and pressure, in units of [Pa^0.5].
synonymss Lists of synonyms for all chemicals in the mixture.
U Internal energy of the mixture at its current state, in units of [J/kg].
Um Internal energy of the mixture at its current state, in units of [J/mol].
UNIFAC_Dortmund_groups List of dictionaries of Dortmund UNIFAC subgroup: count groups
for each chemcial in the mixture.
UNIFAC_groups List of dictionaries of UNIFAC subgroup: count groups for each chemical in
the mixture.
Vm Molar volume of the mixture at its current phase and temperature and pressure, in units of
[m^3/mol].
Vmg Gas-phase molar volume of the mixture at its current temperature, pressure, and composi-
tion in units of [m^3/mol].
Vmgs Pure component gas-phase molar volumes of the chemicals in the mixture at its current
temperature and pressure, in units of [m^3/mol].
Vmg_STP Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current
composition in units of [m^3/mol].
Vml Liquid-phase molar volume of the mixture at its current temperature, pressure, and compo-
sition in units of [m^3/mol].
Vmls Pure component liquid-phase molar volumes of the chemicals in the mixture at its current
temperature and pressure, in units of [m^3/mol].
Vml_STP Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the cur-
rent composition in units of [m^3/mol].
Vmss Pure component solid-phase molar volumes of the chemicals in the mixture at its current
temperature, in units of [m^3/mol].
Z Compressibility factor of the mixture at its current phase and temperature and pressure, [di-
mensionless].
Zg Compressibility factor of the mixture in the gas phase at the current temperature, pressure,
and composition, [dimensionless].
Zgs Pure component compressibility factors of the chemicals in the mixture in the gas phase at
the current temperature and pressure, [dimensionless].
Zg_STP Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the
current composition, [dimensionless].
Zl Compressibility factor of the mixture in the liquid phase at the current temperature, pressure,
and composition, [dimensionless].
Zls Pure component compressibility factors of the chemicals in the liquid phase at the current
temperature and pressure, [dimensionless].
Zl_STP Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and
the current composition, [dimensionless].
Zss Pure component compressibility factors of the chemicals in the mixture in the solid phase
at the current temperature and pressure, [dimensionless].
Methods
Bond
Capillary
Grashof
Jakob
Peclet_heat
Reynolds
Weber
compound_index
eos_pures
flash_caloric
properties
set_Chemical_property_objects
set_TP_sources
set_constant_sources
set_constants
set_eos
set_property_package
property A
Helmholtz energy of the mixture at its current state, in units of [J/kg].
This property requires that the property package of the mixture found a solution to the given state variables.
It also depends on the molar volume of the mixture at its current conditions.
property API
API gravity of the hypothetical liquid phase of the mixture, [degrees]. The reference condition is water at
15.6 °C (60 °F) and 1 atm (rho=999.016 kg/m^3, standardized).
Examples
property Am
Helmholtz energy of the mixture at its current state, in units of [J/mol].
This property requires that the property package of the mixture found a solution to the given state variables.
It also depends on the molar volume of the mixture at its current conditions.
Bond(L=None)
property Bvirial
Second virial coefficient of the gas phase of the mixture at its current temperature, pressure, and composition
in units of [mol/m^3].
This property uses the object-oriented interface thermo.volume.VolumeGasMixture, converting its re-
sult with thermo.utils.B_from_Z.
Examples
Capillary(V=None)
property Cp
Mass heat capacity of the mixture at its current phase and temperature, in units of [J/kg/K].
Examples
property Cpg
Gas-phase heat capacity of the mixture at its current temperature , and composition in units of [J/kg/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacityGasMixture; each Mixture instance creates one to actually perform the calculations. Note
that that interface provides output in molar units.
Examples
property Cpgm
Gas-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacityGasMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property Cpgms
Gas-phase ideal gas heat capacity of the chemicals at its current temperature, in units of [J/mol/K].
Examples
property Cpgs
Gas-phase pure component heat capacity of the chemicals in the mixture at its current temperature, in units
of [J/kg/K].
Examples
property Cpl
Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacityLiquidMixture; each Mixture instance creates one to actually perform the calculations.
Note that that interface provides output in molar units.
Examples
property Cplm
Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacityLiquidMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property Cplms
Liquid-phase pure component heat capacity of the chemicals in the mixture at its current temperature, in
units of [J/mol/K].
Examples
property Cpls
Liquid-phase pure component heat capacity of the chemicals in the mixture at its current temperature, in
units of [J/kg/K].
Examples
property Cpm
Molar heat capacity of the mixture at its current phase and temperature, in units of [J/mol/K]. Available
only if single phase.
Examples
property Cps
Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacitySolidMixture; each Mixture instance creates one to actually perform the calculations.
Note that that interface provides output in molar units.
Examples
property Cpsm
Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K].
For calculation of this property at other temperatures or compositions, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.
HeatCapacitySolidMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property Cpsms
Solid-phase pure component heat capacity of the chemicals in the mixture at its current temperature, in
units of [J/mol/K].
Examples
property Cpss
Solid-phase pure component heat capacity of the chemicals in the mixture at its current temperature, in
units of [J/kg/K].
Examples
property Cvg
Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature, in units of
[J/kg/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an
equation of state.
Examples
property Cvgm
Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature and composition,
in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation
from an equation of state.
Examples
property Cvgms
Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in the mixture at its
current temperature, in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacities; does not include
pressure-compensation from an equation of state.
Examples
property Cvgs
Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in the mixture at its
current temperature, in units of [J/kg/K]. Subtracts R from the ideal-gas heat capacity; does not include
pressure-compensation from an equation of state.
Examples
Grashof(Tw=None, L=None)
H = None
property Hc
Standard higher heat of combustion of the mixture, in units of [J/kg].
This property depends on the bulk composition only.
property Hc_lower
Standard lower heat of combustion of the mixture, in units of [J/kg].
This property depends on the bulk composition only.
Hc_volumetric_g(T=288.7055555555555, P=101325.0)
Standard higher molar heat of combustion of the mixture, in units of [J/m^3] at the specified T and P in the
gas phase.
This property depends on the bulk composition only.
Parameters
T [float, optional] Reference temperature, [K]
P [float, optional] Reference pressure, [Pa]
Returns
Hc_volumetric_g [float, optional] Higher heat of combustion on a volumetric basis, [J/m^3]
Hc_volumetric_g_lower(T=288.7055555555555, P=101325.0)
Standard lower molar heat of combustion of the mixture, in units of [J/m^3] at the specified T and P in the
gas phase.
This property depends on the bulk composition only.
Parameters
T [float, optional] Reference temperature, [K]
P [float, optional] Reference pressure, [Pa]
Returns
Hc_volumetric_g [float, optional] Lower heat of combustion on a volumetric basis, [J/m^3]
property Hcm
Standard higher molar heat of combustion of the mixture, in units of [J/mol].
This property depends on the bulk composition only.
property Hcm_lower
Standard lower molar heat of combustion of the mixture, in units of [J/mol].
This property depends on the bulk composition only.
Hm = None
property Hvapms
Pure component enthalpies of vaporization of the chemicals in the mixture at its current temperature, in
units of [J/mol].
Examples
property Hvaps
Enthalpy of vaporization of the chemicals in the mixture at its current temperature, in units of [J/kg].
Examples
property IUPAC_names
IUPAC names for all chemicals in the mixture.
Examples
property InChI_Keys
InChI keys for all chemicals in the mixture.
Examples
property InChIs
InChI strings for all chemicals in the mixture.
Examples
property JT
Joule Thomson coefficient of the mixture at its current phase, temperature, and pressure in units of [K/Pa].
Available only if single phase.
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
property JTg
Joule Thomson coefficient of the gas phase of the mixture if one exists at its current temperature and pres-
sure, in units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
property JTgs
Pure component Joule Thomson coefficients of the chemicals in the mixture in the gas phase at its current
temperature and pressure, in units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
property JTl
Joule Thomson coefficient of the liquid phase of the mixture if one exists at its current temperature and
pressure, in units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
property JTls
Pure component Joule Thomson coefficients of the chemicals in the mixture in the liquid phase at its current
temperature and pressure, in units of [K/Pa].
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Examples
Jakob(Tw=None)
property PSRK_groups
List of dictionaries of PSRK subgroup: count groups for each chemical in the mixture. Uses the PSRK
subgroups, as determined by DDBST’s online service.
Examples
P_default = 101325.0
property Parachor
Parachor of the mixture at its current temperature and pressure, in units of [N^0.25*m^2.75/mol].
𝜎 0.25 𝑀 𝑊
𝑃 =
𝜌𝐿 − 𝜌𝑉
Calculated based on surface tension, density of the liquid and gas phase, and molecular weight. For uses
of this property, see thermo.utils.Parachor.
Examples
property Parachors
Pure component Parachor parameters of the chemicals in the mixture at its current temperature and pressure,
in units of [N^0.25*m^2.75/mol].
𝜎 0.25 𝑀 𝑊
𝑃 =
𝜌𝐿 − 𝜌𝑉
Calculated based on surface tension, density of the liquid and gas phase, and molecular weight. For uses
of this property, see thermo.utils.Parachor.
Examples
property Pbubble
Bubble point pressure of the mixture at its current temperature and composition, in units of [Pa].
This property requires that the property package of the mixture found a solution to the given state variables.
property Pdew
Dew point pressure of the mixture at its current temperature and composition, in units of [Pa].
This property requires that the property package of the mixture found a solution to the given state variables.
Peclet_heat(V=None, D=None)
property Pr
Prandtl number of the mixture at its current temperature, pressure, and phase; [dimensionless]. Available
only if single phase.
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
property Prg
Prandtl number of the gas phase of the mixture if one exists at its current temperature and pressure, [di-
mensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
property Prgs
Pure component Prandtl numbers of the gas phase of the chemicals in the mixture at its current temperature
and pressure, [dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
property Prl
Prandtl number of the liquid phase of the mixture if one exists at its current temperature and pressure,
[dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
property Prls
Pure component Prandtl numbers of the liquid phase of the chemicals in the mixture at its current temper-
ature and pressure, [dimensionless].
𝐶𝑝 𝜇
𝑃𝑟 =
𝑘
Examples
property Psats
Pure component vapor pressures of the chemicals in the mixture at its current temperature, in units of [Pa].
Examples
property PubChems
PubChem Component ID numbers for all chemicals in the mixture.
Examples
property R_specific
Specific gas constant of the mixture, in units of [J/kg/K].
Examples
Reynolds(V=None, D=None)
property SG
Specific gravity of the mixture, [dimensionless].
For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the mixture and the reference
fluid, air. For liquid and solid phase conditions, this is calculated based on a reference fluid of water at 4°C
at 1 atm, but the with the liquid or solid mixture’s density at the currently specified conditions.
Examples
>>> Mixture('MTBE').SG
0.7428160596603596
property SGg
Specific gravity of a hypothetical gas phase of the mixture, . [dimensionless]. The reference condition is air
at 15.6 °C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor
of the reference gas and the mixture both at the reference conditions, not the conditions of the mixture.
Examples
>>> Mixture('argon').SGg
1.3800407778218216
property SGl
Specific gravity of a hypothetical liquid phase of the mixture at the specified temperature and pressure,
[dimensionless]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). For liquids,
SG is defined that the reference chemical’s T and P are fixed, but the chemical itself varies with the specified
T and P.
Examples
property SGs
Specific gravity of a hypothetical solid phase of the mixture at the specified temperature and pressure,
[dimensionless]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). The SG
varries with temperature and pressure but only very slightly.
T_default = 298.15
property Tbubble
Bubble point temperature of the mixture at its current pressure and composition, in units of [K].
This property requires that the property package of the mixture found a solution to the given state variables.
property Tdew
Dew point temperature of the mixture at its current pressure and composition, in units of [K].
This property requires that the property package of the mixture found a solution to the given state variables.
property U
Internal energy of the mixture at its current state, in units of [J/kg].
This property requires that the property package of the mixture found a solution to the given state variables.
It also depends on the molar volume of the mixture at its current conditions.
property UNIFAC_Dortmund_groups
List of dictionaries of Dortmund UNIFAC subgroup: count groups for each chemcial in the mixture. Uses
the Dortmund UNIFAC subgroups, as determined by DDBST’s online service.
Examples
property UNIFAC_Qs
UNIFAC Q (normalized Van der Waals area) values, dimensionless. Used in the UNIFAC model.
Examples
property UNIFAC_Rs
UNIFAC R (normalized Van der Waals volume) values, dimensionless. Used in the UNIFAC model.
Examples
property UNIFAC_groups
List of dictionaries of UNIFAC subgroup: count groups for each chemical in the mixture. Uses the original
UNIFAC subgroups, as determined by DDBST’s online service.
Examples
property Um
Internal energy of the mixture at its current state, in units of [J/mol].
This property requires that the property package of the mixture found a solution to the given state variables.
It also depends on the molar volume of the mixture at its current conditions.
V_over_F = None
property Van_der_Waals_areas
List of unnormalized Van der Waals areas of all the chemicals in the mixture, in units of [m^2/mol].
Examples
property Van_der_Waals_volumes
List of unnormalized Van der Waals volumes of all the chemicals in the mixture, in units of [m^3/mol].
Examples
Vfgs(T=None, P=None)
Volume fractions of all species in a hypothetical pure-gas phase at the current or specified temperature and
pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the
mixture. Note this is a method, not a property. Volume fractions are calculated based on pure species
volumes only.
Examples
Vfls(T=None, P=None)
Volume fractions of all species in a hypothetical pure-liquid phase at the current or specified temperature
and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of
the mixture. Note this is a method, not a property. Volume fractions are calculated based on pure species
volumes only.
Examples
property Vm
Molar volume of the mixture at its current phase and temperature and pressure, in units of [m^3/mol].
Available only if single phase.
Examples
property Vmg
Gas-phase molar volume of the mixture at its current temperature, pressure, and composition in units of
[m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specify-
ing manually the method used to calculate it, and more - see the object oriented interface thermo.volume.
VolumeGasMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property Vmg_STP
Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units
of [m^3/mol].
Examples
property Vmgs
Pure component gas-phase molar volumes of the chemicals in the mixture at its current temperature and
pressure, in units of [m^3/mol].
Examples
property Vml
Liquid-phase molar volume of the mixture at its current temperature, pressure, and composition in units of
[m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specify-
ing manually the method used to calculate it, and more - see the object oriented interface thermo.volume.
VolumeLiquidMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property Vml_STP
Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in
units of [m^3/mol].
Examples
property Vmls
Pure component liquid-phase molar volumes of the chemicals in the mixture at its current temperature and
pressure, in units of [m^3/mol].
Examples
Vms = None
property Vmss
Pure component solid-phase molar volumes of the chemicals in the mixture at its current temperature, in
units of [m^3/mol].
Examples
Weber(V=None, D=None)
property Z
Compressibility factor of the mixture at its current phase and temperature and pressure, [dimensionless].
Available only if single phase.
Examples
property Zg
Compressibility factor of the mixture in the gas phase at the current temperature, pressure, and composition,
[dimensionless].
Utilizes the object oriented interface and thermo.volume.VolumeGasMixture to perform the actual cal-
culation of molar volume.
Examples
property Zg_STP
Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition,
[dimensionless].
Examples
property Zgs
Pure component compressibility factors of the chemicals in the mixture in the gas phase at the current
temperature and pressure, [dimensionless].
Examples
property Zl
Compressibility factor of the mixture in the liquid phase at the current temperature, pressure, and compo-
sition, [dimensionless].
Utilizes the object oriented interface and thermo.volume.VolumeLiquidMixture to perform the actual
calculation of molar volume.
Examples
property Zl_STP
Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composi-
tion, [dimensionless].
Examples
property Zls
Pure component compressibility factors of the chemicals in the liquid phase at the current temperature and
pressure, [dimensionless].
Examples
property Zss
Pure component compressibility factors of the chemicals in the mixture in the solid phase at the current
temperature and pressure, [dimensionless].
Examples
property alpha
Thermal diffusivity of the mixture at its current temperature, pressure, and phase in units of [m^2/s]. Avail-
able only if single phase.
𝑘
𝛼=
𝜌𝐶𝑝
Examples
property alphag
Thermal diffusivity of the gas phase of the mixture if one exists at its current temperature and pressure, in
units of [m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Examples
property alphags
Pure component thermal diffusivities of the chemicals in the mixture in the gas phase at the current tem-
perature and pressure, in units of [m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Examples
property alphal
Thermal diffusivity of the liquid phase of the mixture if one exists at its current temperature and pressure,
in units of [m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Examples
property alphals
Pure component thermal diffusivities of the chemicals in the mixture in the liquid phase at the current
temperature and pressure, in units of [m^2/s].
𝑘
𝛼=
𝜌𝐶𝑝
Examples
property atom_fractions
Dictionary of atomic fractions for each atom in the mixture.
Examples
property atom_fractionss
List of dictionaries of atomic fractions for all chemicals in the mixture.
Examples
property atoms
Mole-averaged dictionary of atom counts for all atoms of the chemicals in the mixture.
Examples
property atomss
List of dictionaries of atom counts for all chemicals in the mixture.
Examples
autoflash = True
property charge_balance
Charge imbalance of the mixture, in units of [faraday]. Mixtures meeting the electroneutrality condition
will have an imbalance of 0.
Examples
property charges
Charges for all chemicals in the mixture, [faraday].
Examples
compound_index(CAS)
conductivity = None
property constants
Returns a :obj:`thermo.chemical_package.ChemicalConstantsPackage instance with constants from the
mixture, [-].
draw_2d(Hs=False)
Interface for drawing a 2D image of all the molecules in the mixture. Requires an HTML5 browser, and
the libraries RDKit and IPython. An exception is raised if either of these libraries is absent.
Parameters
Hs [bool] Whether or not to show hydrogen
Examples
Mixture([‘natural gas’]).draw_2d()
property economic_statuses
List of dictionaries of the economic status for all chemicals in the mixture.
Examples
property eos
Equation of state object held by the mixture. See : obj:thermo.eos_mix for a full listing.
eos_in_a_box = []
eos_pures(eos=<class 'thermo.eos.PR'>, T=None, P=None)
flashed = True
property formulas
Chemical formulas for all chemicals in the mixture.
Examples
property isentropic_exponent
Gas-phase ideal-gas isentropic exponent of the mixture at its current temperature, [dimensionless]. Does
not include pressure-compensation from an equation of state.
Examples
property isentropic_exponents
Gas-phase pure component ideal-gas isentropic exponent of the chemicals in the mixture at its current
temperature, [dimensionless].
Does not include pressure-compensation from an equation of state.
Examples
property isobaric_expansion
Isobaric (constant-pressure) expansion of the mixture at its current phase, temperature, and pressure in units
of [1/K]. Available only if single phase.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property isobaric_expansion_g
Isobaric (constant-pressure) expansion of the gas phase of the mixture at its current temperature and pres-
sure, in units of [1/K]. Available only if single phase.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property isobaric_expansion_gs
Pure component isobaric (constant-pressure) expansions of the chemicals in the mixture in the gas phase
at its current temperature and pressure, in units of [1/K].
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property isobaric_expansion_l
Isobaric (constant-pressure) expansion of the liquid phase of the mixture at its current temperature and
pressure, in units of [1/K]. Available only if single phase.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property isobaric_expansion_ls
Pure component isobaric (constant-pressure) expansions of the chemicals in the mixture in the liquid phase
at its current temperature and pressure, in units of [1/K].
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Examples
property k
Thermal conductivity of the mixture at its current phase, temperature, and pressure in units of [W/m/K].
Available only if single phase.
Examples
property kg
Thermal conductivity of the mixture in the gas phase at its current temperature, pressure, and composition
in units of [Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.
ThermalConductivityGasMixture; each Mixture instance creates one to actually perform the calcu-
lations.
Examples
property kgs
Pure component thermal conductivies of the chemicals in the mixture in the gas phase at its current tem-
perature and pressure, in units of [W/m/K].
Examples
property kl
Thermal conductivity of the mixture in the liquid phase at its current temperature, pressure, and composition
in units of [Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the method
used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.
ThermalConductivityLiquidMixture; each Mixture instance creates one to actually perform the cal-
culations.
Examples
property kls
Pure component thermal conductivities of the chemicals in the mixture in the liquid phase at its current
temperature and pressure, in units of [W/m/K].
Examples
ks = None
property legal_statuses
List of dictionaries of the legal status for all chemicals in the mixture.
Examples
property mass_fractions
Dictionary of mass fractions for each atom in the mixture.
Examples
property mass_fractionss
List of dictionaries of mass fractions for all chemicals in the mixture.
Examples
property mu
Viscosity of the mixture at its current phase, temperature, and pressure in units of [Pa*s]. Available only if
single phase.
Examples
property mug
Viscosity of the mixture in the gas phase at its current temperature, pressure, and composition in units of
[Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the method used
to calculate it, and more - see the object oriented interface thermo.viscosity.ViscosityGasMixture;
each Mixture instance creates one to actually perform the calculations.
Examples
property mugs
Pure component viscosities of the chemicals in the mixture in the gas phase at its current temperature and
pressure, in units of [Pa*s].
Examples
property mul
Viscosity of the mixture in the liquid phase at its current temperature, pressure, and composition in units
of [Pa*s].
For calculation of this property at other temperatures and pressures, or specifying manually the
method used to calculate it, and more - see the object oriented interface thermo.viscosity.
ViscosityLiquidMixture; each Mixture instance creates one to actually perform the calculations.
Examples
property muls
Pure component viscosities of the chemicals in the mixture in the liquid phase at its current temperature
and pressure, in units of [Pa*s].
Examples
property nu
Kinematic viscosity of the the mixture at its current temperature, pressure, and phase in units of [m^2/s].
Available only if single phase.
𝜇
𝜈=
𝜌
Examples
property nug
Kinematic viscosity of the gas phase of the mixture if one exists at its current temperature and pressure, in
units of [m^2/s].
𝜇
𝜈=
𝜌
Examples
property nugs
Pure component kinematic viscosities of the gas phase of the chemicals in the mixture at its current tem-
perature and pressure, in units of [m^2/s].
𝜇
𝜈=
𝜌
Examples
property nul
Kinematic viscosity of the liquid phase of the mixture if one exists at its current temperature and pressure,
in units of [m^2/s].
𝜇
𝜈=
𝜌
Examples
property nuls
Pure component kinematic viscosities of the liquid phase of the chemicals in the mixture at its current
temperature and pressure, in units of [m^2/s].
𝜇
𝜈=
𝜌
Examples
property permittivites
Pure component relative permittivities of the chemicals in the mixture at its current temperature, [dimen-
sionless].
Examples
phase = None
properties(copy_pures=True, copy_mixtures=True)
property_package_constants = None
property rho
Mass density of the mixture at its current phase and temperature and pressure, in units of [kg/m^3]. Avail-
able only if single phase.
Examples
property rhog
Gas-phase mass density of the mixture at its current temperature, pressure, and composition in units of
[kg/m^3]. For calculation of this property at other temperatures, pressures, or compositions or specifying
manually the method used to calculate it, and more - see the object oriented interface thermo.volume.
VolumeGasMixture; each Mixture instance creates one to actually perform the calculations. Note that that
interface provides output in molar units.
Examples
property rhog_STP
Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units
of [kg/m^3].
Examples
property rhogm
Molar density of the mixture in the gas phase at the current temperature, pressure, and composition in units
of [mol/m^3].
Utilizes the object oriented interface and thermo.volume.VolumeGasMixture to perform the actual cal-
culation of molar volume.
Examples
property rhogm_STP
Molar density of the mixture in the gas phase at 298.15 K and 101.325 kPa, and the current composition,
in units of [mol/m^3].
Examples
property rhogms
Pure component molar densities of the chemicals in the gas phase at the current temperature and pressure,
in units of [mol/m^3].
Examples
property rhogs
Pure-component gas-phase mass densities of the chemicals in the mixture at its current temperature and
pressure, in units of [kg/m^3].
Examples
property rhol
Liquid-phase mass density of the mixture at its current temperature, pressure, and composition in units
of [kg/m^3]. For calculation of this property at other temperatures, pressures, compositions or specifying
manually the method used to calculate it, and more - see the object oriented interface thermo.volume.
VolumeLiquidMixture; each Mixture instance creates one to actually perform the calculations. Note that
that interface provides output in molar units.
Examples
property rhol_STP
Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in
units of [kg/m^3].
Examples
property rholm
Molar density of the mixture in the liquid phase at the current temperature, pressure, and composition in
units of [mol/m^3].
Utilizes the object oriented interface and thermo.volume.VolumeLiquidMixture to perform the actual
calculation of molar volume.
Examples
property rholm_STP
Molar density of the mixture in the liquid phase at 298.15 K and 101.325 kPa, and the current composition,
in units of [mol/m^3].
Examples
property rholms
Pure component molar densities of the chemicals in the mixture in the liquid phase at the current tempera-
ture and pressure, in units of [mol/m^3].
Examples
property rhols
Pure-component liquid-phase mass density of the chemicals in the mixture at its current temperature and
pressure, in units of [kg/m^3].
Examples
property rhom
Molar density of the mixture at its current phase and temperature and pressure, in units of [mol/m^3].
Available only if single phase.
Examples
rhos = None
property rhosms
Pure component molar densities of the chemicals in the solid phase at the current temperature and pressure,
in units of [mol/m^3].
Examples
property rhoss
Pure component solid-phase mass density of the chemicals in the mixture at its current temperature, in units
of [kg/m^3].
Examples
property ringss
List of ring counts for all chemicals in the mixture.
Examples
set_Chemical_property_objects()
set_TP_sources()
set_chemical_TP(T=None, P=None)
Basic method to change all chemical instances to be at the T and P specified. If they are not specified, the
the values of the mixture will be used. This is not necessary for using the Mixture instance unless values
specified to chemicals are required.
set_chemical_constants()
Basic method which retrieves and sets constants of chemicals to be accessible as lists from a Mixture object.
This gets called automatically on the instantiation of a new Mixture instance.
set_constant_sources()
set_constants()
set_property_package(pkg=None)
property sigma
Surface tension of the mixture at its current temperature and composition, in units of [N/m].
For calculation of this property at other temperatures, or specifying manually the method used to calculate
it, and more - see the object oriented interface thermo.interface.SurfaceTensionMixture; each
Mixture instance creates one to actually perform the calculations.
Examples
property sigmas
Pure component surface tensions of the chemicals in the mixture at its current temperature, in units of
[N/m].
Examples
property similarity_variables
Similarity variables for all chemicals in the mixture, see chemicals.elements.similarity_variable
for the definition, [mol/g]
Examples
property smiless
SMILES strings for all chemicals in the mixture.
Examples
property solubility_parameters
Pure component solubility parameters of the chemicals in the mixture at its current temperature and pres-
sure, in units of [Pa^0.5].
√︂
∆𝐻𝑣𝑎𝑝 − 𝑅𝑇
𝛿=
𝑉𝑚
Examples
property speed_of_sound
Bulk speed of sound of the mixture at its current temperature, [m/s].
Examples
property speed_of_sound_g
Gas-phase speed of sound of the mixture at its current temperature, [m/s].
Examples
property speed_of_sound_l
Liquid-phase speed of sound of the mixture at its current temperature, [m/s].
Examples
property synonymss
Lists of synonyms for all chemicals in the mixture.
Examples
xs = None
ys = None
This module contains implementations of TDependentProperty representing liquid permittivity. A variety of esti-
mation and data methods are available as included in the chemicals library.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Notes
𝜖𝑟 = 𝐴 + 𝐵𝑇 + 𝐶𝑇 2 + 𝐷𝑇 3
Not all chemicals use all terms; in fact, few do. Data is available for 759 liquids, from [1].
CRC_CONSTANT: Constant permittivity values at specified temperatures only. Data is from [1], and is avail-
able for 1303 liquids.
IAPWS: The IAPWS model for water permittivity as a liquid.
References
[1]
Attributes
Tmax Maximum temperature (K) at which the current method can calculate the property.
Tmin Minimum temperature (K) at which the current method can calculate the property.
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate permittivity of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate relative permittivity, [K]
method [str] Name of the method to use
Returns
epsilon [float] Relative permittivity of the liquid at T, [-]
name = 'liquid relative permittivity'
property_max = 1000.0
Maximum valid of permittivity; highest in the data available is ~240.
property_min = 1.0
Relative permittivity must always be larger than 1; nothing is better than a vacuum.
ranked_methods = ['IAPWS', 'CRC', 'CRC_CONSTANT']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
tabular data, extrapolation outside of the range is used if tabular_extrapolation_permitted is set; if
it is, the extrapolation is considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = '-'
thermo.permittivity.permittivity_methods = ['CRC', 'CRC_CONSTANT', 'IAPWS']
Holds all methods available for the PermittivityLiquid class, for use in iterating over them.
• Base Class
• Ideal Gas Equation of State
• Cubic Equations of State
– Gas Phases
– Liquid Phases
The phases subpackage exposes classes that represent the state of single phase mixture, including the composition,
temperature, pressure, enthalpy, and entropy. Phase objects are immutable and know nothing about bulk properties or
transport properties. The goal is for each phase to be able to compute all of its thermodynamic properties, including
volume-based ones. Use settings to handle different assumptions.
class thermo.phases.Phase
Bases: object
Phase is the base class for all phase objects in thermo. Each sub-class implements a number of core properties;
many other properties can be calculated from them.
Among those properties are H, S, Cp, dP_dT, dP_dV, d2P_dT2, d2P_dV2, and d2P_dTdV.
An additional set of properties that can be implemented and that enable more functionality are dH_dP,
dS_dT, dS_dP, d2H_dT2, d2H_dP2, d2S_dP2, dH_dT_V, dH_dP_V, dH_dV_T, dH_dV_P, dS_dT_V, dS_dP_V,
d2H_dTdP, d2H_dT2_V, d2P_dTdP, d2P_dVdP, d2P_dVdT_TP, d2P_dT2_PV.
Some models may re-implement properties which would normally be calculated by this Phase base class because
they have more explicit, faster ways of calculating the property.
When a phase object is the result of a Flash calculation, the resulting phase objects have a reference to a
ChemicalConstantsPackage object and all of its properties can be accessed from from the resulting phase
objects as well.
A ChemicalConstantsPackage object can also be manually set to the attribute constants to enable access to
those properties. This includes mass-based properties, which are not accessible from Phase objects without a
reference to the constants.
Attributes
CASs CAS registration numbers for each component, [-].
Carcinogens Status of each component in cancer causing registries, [-].
Ceilings Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
GWPs Global Warming Potentials for each component (impact/mass chemical)/(impact/mass
CO2), [-].
Gfgs Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
Gfgs_mass Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
H_calc
Hcs Higher standard molar heats of combustion for each component, [J/mol].
Hcs_lower Lower standard molar heats of combustion for each component, [J/mol].
Qgs_calc Method to return the volume flow rate of each component in this phase as an ideal
gas, using the configured temperature T_gas_ref and pressure P_gas_ref.
Ql Method to return the volume flow rate of this phase as an ideal liquid, using the configured
standard molar volumes Vml_STPs.
Ql_calc Method to return the volume flow rate of this phase as an ideal liquid, using the con-
figured standard molar volumes Vml_STPs.
Qls Method to return the volume flow rate of each component in this phase as an ideal liquid,
using the configured V_liquids_ref.
Qls_calc Method to return the volume flow rate of each component in this phase as an ideal
liquid, using the configured V_liquids_ref.
RI_Ts Temperatures at which the refractive indexes were reported for each component, [K].
RIs Refractive indexes for each component, [-].
S0gs Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
S0gs_mass Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
STELs Short term exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Sfgs Ideal gas standard molar entropies of formation for each component, [J/(mol*K)].
Sfgs_mass Ideal gas standard entropies of formation for each component, [J/(kg*K)].
Skins Whether each compound can be absorbed through the skin or not, [-].
StielPolars Stiel polar factors for each component, [-].
Stockmayers Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over
k) for each component, [K].
TWAs Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3),
[various].
T_calc
Tautoignitions Autoignition temperatures for each component, [K].
Tbs Boiling temperatures for each component, [K].
Tcs Critical temperatures for each component, [K].
Tflashs Flash point temperatures for each component, [K].
Tms Melting temperatures for each component, [K].
Tts Triple point temperatures for each component, [K].
UFLs Upper flammability limits for each component, [-].
UNIFAC_Dortmund_groups UNIFAC_Dortmund_group: count groups for each component, [-
].
UNIFAC_Qs UNIFAC Q parameters for each component, [-].
UNIFAC_Rs UNIFAC R parameters for each component, [-].
UNIFAC_groups UNIFAC_group: count groups for each component, [-].
VF Method to return the vapor fraction of the phase.
VF_calc
Van_der_Waals_areas Unnormalized Van der Waals areas for each component, [m^2/mol].
m_calc
molecular_diameters Lennard-Jones molecular diameters for each component, [angstrom].
ms Method to return the mass flow rates of each component in this phase.
ms_calc Method to return the mass flow rates of each component in this phase.
n Method to return the molar flow rate of this phase.
n_calc
names Names for each component, [-].
ns Method to return the molar flow rates of each component in this phase.
ns_calc Method to return the molar flow rates of each component in this phase.
omegas Acentric factors for each component, [-].
phase_STPs Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
result
rhocs Molar densities at the critical point for each component, [mol/m^3].
rhocs_mass Densities at the critical point for each component, [kg/m^3].
rhog_STPs Molar gas densities at STP for each component; metastable if normally another
state, [mol/m^3].
rhog_STPs_mass Gas densities at STP for each component; metastable if normally another
state, [kg/m^3].
rhol_60Fs Liquid molar densities for each component at 60 °F, [mol/m^3].
rhol_60Fs_mass Liquid mass densities for each component at 60 °F, [kg/m^3].
rhol_STPs Molar liquid densities at STP for each component, [mol/m^3].
rhol_STPs_mass Liquid densities at STP for each component, [kg/m^3].
rhos_Tms Solid molar densities for each component at their respective melting points,
[mol/m^3].
rhos_Tms_mass Solid mass densities for each component at their melting point, [kg/m^3].
sigma_STPs Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the satura-
tion pressure, [N/m].
sigma_Tbs Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
sigma_Tms Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
similarity_variables Similarity variables for each component, [mol/g].
smiless SMILES identifiers for each component, [-].
solubility_parameters Solubility parameters for each component at 298.15 K, [Pa^0.5].
ws_calc
zs_calc
Methods
as_EquilibriumState
as_EquilibriumStream
lnphis_lowest_Gibbs
molar_water_content
A()
Method to calculate and return the Helmholtz energy of the phase.
𝐴 = 𝑈 − 𝑇𝑆
Returns
A [float] Helmholtz energy, [J/mol]
API()
Method to calculate and return the API of the phase.
141.5
API gravity = − 131.5
SG
Returns
API [float] API of the fluid [-]
A_dep()
Method to calculate and return the departure Helmholtz energy of the phase.
Returns
A_dep [float] Departure Helmholtz energy, [J/mol]
A_dep_flow()
Method to return the flow rate of the difference between the ideal-gas Helmholtz energy of this phase and
the Helmholtz energy of the phase This method is only available when the phase is linked to an Equilibri-
umStream.
Returns
𝐴𝑖𝑔 𝑖𝑔 𝑖𝑔 𝑖𝑔
𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 𝑈𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 − 𝑇𝑟𝑒𝑓 𝑆𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛
Returns
A_formation_ideal_gas [float] Helmholtz energy of formation of the phase on a formation
basis as an ideal gas, [J/(mol)]
A_formation_ideal_gas_mass()
Method to calculate and return the ideal-gas formation mass Helmholtz energy of the phase.
Returns
A_formation_ideal_gas_mass [float] Formation mass Helmholtz energy, [J/kg]
A_ideal_gas()
Method to calculate and return the ideal-gas Helmholtz energy of the phase.
𝐴𝑖𝑔 = 𝑈 𝑖𝑔 − 𝑇 𝑆 𝑖𝑔
Returns
A_ideal_gas [float] Ideal gas Helmholtz free energy, [J/(mol)]
A_ideal_gas_mass()
Method to calculate and return the mass ideal-gas Helmholtz energy of the phase.
Returns
A_ideal_gas_mass [float] Ideal gas mass Helmholtz free energy, [J/(kg)]
A_mass()
Method to calculate and return mass Helmholtz energy of the phase.
1000𝐴𝑚𝑜𝑙𝑎𝑟
𝐴𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
A_mass [float] Mass Helmholtz energy, [J/(kg)]
A_reactive()
Method to calculate and return the Helmholtz free energy of the phase on a reactive basis.
Returns
A_reactive [float] Helmholtz free energy of the phase on a reactive basis, [J/(mol)]
A_reactive_mass()
Method to calculate and return mass Helmholtz energy on a reactive basis of the phase.
1000𝐴𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐴𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
A_reactive_mass [float] Mass Helmholtz energy on a reactive basis, [J/kg]
Actinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Actinium, [atoms/s]
Actinium_atom_flow()
Method to calculate and return the mole flow that is Actinium, [mol/s]
Actinium_atom_fraction()
Method to calculate and return the mole fraction that is Actinium element, [-]
Actinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Actinium element, [kg/s]
Actinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Actinium element, [-]
Aluminium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Aluminium, [atoms/s]
Aluminium_atom_flow()
Method to calculate and return the mole flow that is Aluminium, [mol/s]
Aluminium_atom_fraction()
Method to calculate and return the mole fraction that is Aluminium element, [-]
Aluminium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Aluminium element, [kg/s]
Aluminium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Aluminium element, [-]
Americium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Americium, [atoms/s]
Americium_atom_flow()
Method to calculate and return the mole flow that is Americium, [mol/s]
Americium_atom_fraction()
Method to calculate and return the mole fraction that is Americium element, [-]
Americium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Americium element, [kg/s]
Americium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Americium element, [-]
Antimony_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Antimony, [atoms/s]
Antimony_atom_flow()
Method to calculate and return the mole flow that is Antimony, [mol/s]
Antimony_atom_fraction()
Method to calculate and return the mole fraction that is Antimony element, [-]
Antimony_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Antimony element, [kg/s]
Antimony_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Antimony element, [-]
Argon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Argon, [atoms/s]
Argon_atom_flow()
Method to calculate and return the mole flow that is Argon, [mol/s]
Argon_atom_fraction()
Method to calculate and return the mole fraction that is Argon element, [-]
Argon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Argon element, [kg/s]
Argon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Argon element, [-]
Arsenic_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Arsenic, [atoms/s]
Arsenic_atom_flow()
Method to calculate and return the mole flow that is Arsenic, [mol/s]
Arsenic_atom_fraction()
Method to calculate and return the mole fraction that is Arsenic element, [-]
Arsenic_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Arsenic element, [kg/s]
Arsenic_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Arsenic element, [-]
Astatine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Astatine, [atoms/s]
Astatine_atom_flow()
Method to calculate and return the mole flow that is Astatine, [mol/s]
Astatine_atom_fraction()
Method to calculate and return the mole fraction that is Astatine element, [-]
Astatine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Astatine element, [kg/s]
Astatine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Astatine element, [-]
Barium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Barium, [atoms/s]
Barium_atom_flow()
Method to calculate and return the mole flow that is Barium, [mol/s]
Barium_atom_fraction()
Method to calculate and return the mole fraction that is Barium element, [-]
Barium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Barium element, [kg/s]
Barium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Barium element, [-]
Berkelium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Berkelium, [atoms/s]
Berkelium_atom_flow()
Method to calculate and return the mole flow that is Berkelium, [mol/s]
Berkelium_atom_fraction()
Method to calculate and return the mole fraction that is Berkelium element, [-]
Berkelium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Berkelium element, [kg/s]
Berkelium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Berkelium element, [-]
Beryllium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Beryllium, [atoms/s]
Beryllium_atom_flow()
Method to calculate and return the mole flow that is Beryllium, [mol/s]
Beryllium_atom_fraction()
Method to calculate and return the mole fraction that is Beryllium element, [-]
Beryllium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Beryllium element, [kg/s]
Beryllium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Beryllium element, [-]
Bismuth_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bismuth, [atoms/s]
Bismuth_atom_flow()
Method to calculate and return the mole flow that is Bismuth, [mol/s]
Bismuth_atom_fraction()
Method to calculate and return the mole fraction that is Bismuth element, [-]
Bismuth_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bismuth element, [kg/s]
Bismuth_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bismuth element, [-]
Bohrium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bohrium, [atoms/s]
Bohrium_atom_flow()
Method to calculate and return the mole flow that is Bohrium, [mol/s]
Bohrium_atom_fraction()
Method to calculate and return the mole fraction that is Bohrium element, [-]
Bohrium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bohrium element, [kg/s]
Bohrium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bohrium element, [-]
Boron_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Boron, [atoms/s]
Boron_atom_flow()
Method to calculate and return the mole flow that is Boron, [mol/s]
Boron_atom_fraction()
Method to calculate and return the mole fraction that is Boron element, [-]
Boron_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Boron element, [kg/s]
Boron_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Boron element, [-]
Bromine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Bromine, [atoms/s]
Bromine_atom_flow()
Method to calculate and return the mole flow that is Bromine, [mol/s]
Bromine_atom_fraction()
Method to calculate and return the mole fraction that is Bromine element, [-]
Bromine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Bromine element, [kg/s]
Bromine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Bromine element, [-]
Bvirial()
Method to calculate and return the B virial coefficient of the phase at its current conditions.
Returns
Bvirial [float] Virial coefficient, [m^3/mol]
property CASs
CAS registration numbers for each component, [-].
Returns
CASs [list[str]] CAS registration numbers for each component, [-].
Cadmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cadmium, [atoms/s]
Cadmium_atom_flow()
Method to calculate and return the mole flow that is Cadmium, [mol/s]
Cadmium_atom_fraction()
Method to calculate and return the mole fraction that is Cadmium element, [-]
Cadmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cadmium element, [kg/s]
Cadmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cadmium element, [-]
Caesium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Caesium, [atoms/s]
Caesium_atom_flow()
Method to calculate and return the mole flow that is Caesium, [mol/s]
Caesium_atom_fraction()
Method to calculate and return the mole fraction that is Caesium element, [-]
Caesium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Caesium element, [kg/s]
Caesium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Caesium element, [-]
Calcium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Calcium, [atoms/s]
Calcium_atom_flow()
Method to calculate and return the mole flow that is Calcium, [mol/s]
Calcium_atom_fraction()
Method to calculate and return the mole fraction that is Calcium element, [-]
Calcium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Calcium element, [kg/s]
Calcium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Calcium element, [-]
Californium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Californium, [atoms/s]
Californium_atom_flow()
Method to calculate and return the mole flow that is Californium, [mol/s]
Californium_atom_fraction()
Method to calculate and return the mole fraction that is Californium element, [-]
Californium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Californium element, [kg/s]
Californium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Californium element, [-]
Carbon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Carbon, [atoms/s]
Carbon_atom_flow()
Method to calculate and return the mole flow that is Carbon, [mol/s]
Carbon_atom_fraction()
Method to calculate and return the mole fraction that is Carbon element, [-]
Carbon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Carbon element, [kg/s]
Carbon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Carbon element, [-]
property Carcinogens
Status of each component in cancer causing registries, [-].
Returns
Carcinogens [list[dict]] Status of each component in cancer causing registries, [-].
property Ceilings
Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Returns
Ceilings [list[tuple[(float, str)]]] Ceiling exposure limits to chemicals (and their units; ppm
or mg/m^3), [various].
Cerium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cerium, [atoms/s]
Cerium_atom_flow()
Method to calculate and return the mole flow that is Cerium, [mol/s]
Cerium_atom_fraction()
Method to calculate and return the mole fraction that is Cerium element, [-]
Cerium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cerium element, [kg/s]
Cerium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cerium element, [-]
Chlorine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Chlorine, [atoms/s]
Chlorine_atom_flow()
Method to calculate and return the mole flow that is Chlorine, [mol/s]
Chlorine_atom_fraction()
Method to calculate and return the mole fraction that is Chlorine element, [-]
Chlorine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Chlorine element, [kg/s]
Chlorine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Chlorine element, [-]
Chromium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Chromium, [atoms/s]
Chromium_atom_flow()
Method to calculate and return the mole flow that is Chromium, [mol/s]
Chromium_atom_fraction()
Method to calculate and return the mole fraction that is Chromium element, [-]
Chromium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Chromium element, [kg/s]
Chromium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Chromium element, [-]
Cobalt_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Cobalt, [atoms/s]
Cobalt_atom_flow()
Method to calculate and return the mole flow that is Cobalt, [mol/s]
Cobalt_atom_fraction()
Method to calculate and return the mole fraction that is Cobalt element, [-]
Cobalt_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Cobalt element, [kg/s]
Cobalt_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Cobalt element, [-]
Copernicium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Copernicium, [atoms/s]
Copernicium_atom_flow()
Method to calculate and return the mole flow that is Copernicium, [mol/s]
Copernicium_atom_fraction()
Method to calculate and return the mole fraction that is Copernicium element, [-]
Copernicium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Copernicium element, [kg/s]
Copernicium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Copernicium element, [-]
Copper_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Copper, [atoms/s]
Copper_atom_flow()
Method to calculate and return the mole flow that is Copper, [mol/s]
Copper_atom_fraction()
Method to calculate and return the mole fraction that is Copper element, [-]
Copper_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Copper element, [kg/s]
Copper_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Copper element, [-]
Cp()
Method to calculate and return the constant-pressure heat capacity of the phase.
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
Cp_Cv_ratio()
Method to calculate and return the Cp/Cv ratio of the phase.
𝐶𝑝
𝐶𝑣
Returns
Cp_Cv_ratio [float] Cp/Cv ratio, [-]
Cp_Cv_ratio_ideal_gas()
Method to calculate and return the ratio of the ideal-gas heat capacity to its constant-volume heat capacity.
𝐶𝑝𝑖𝑔
𝐶𝑣𝑖𝑔
Returns
Cp_Cv_ratio_ideal_gas [float] Cp/Cv for the phase as an ideal gas, [-]
Cp_dep_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑝𝑑𝑒𝑝,𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑑𝑒𝑝,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_dep_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cp_ideal_gas()
Method to calculate and return the ideal-gas heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑝𝑖𝑔 = 𝑧𝑖 𝐶𝑝,𝑖
𝑖
Returns
Cp [float] Ideal gas heat capacity, [J/(mol*K)]
Cp_ideal_gas_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑝𝑖𝑑𝑒𝑎𝑙,𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑖𝑑𝑒𝑎𝑙,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_ideal_gas_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cp_mass()
Method to calculate and return mass constant pressure heat capacity of the phase.
1000𝐶𝑝𝑚𝑜𝑙𝑎𝑟
𝐶𝑝𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cp_mass [float] Mass heat capacity, [J/(kg*K)]
Cpgs()
Method to calculate and return the pure-component ideal gas heat capacities of each species from the
thermo.heat_capacity.HeatCapacityGas objects.
Returns
Cpgs [list[float]] Ideal gas pure component heat capacities, [J/(mol*K)]
Cpgs_poly_fit = False
Cpig_integrals_over_T_pure()
Method to calculate and return the integrals of the ideal-gas heat capacities divided by temperature of every
component in the phase from a temperature of Phase.T_REF_IG to the system temperature. This method
is powered by the HeatCapacityGases objects, except when all components have the same heat capacity
form and a fast implementation has been written for it (currently only polynomials).
𝐶𝑝𝑖𝑔
∫︁ 𝑇
∆𝑆 𝑖𝑔 = 𝑑𝑇
𝑇𝑟𝑒𝑓 𝑇
Returns
dS_ig [list[float]] Integrals of ideal gas heat capacity over temperature from the reference
temperature to the system temperature, [J/(mol)]
Cpig_integrals_pure()
Method to calculate and return the integrals of the ideal-gas heat capacities of every component in the
phase from a temperature of Phase.T_REF_IG to the system temperature. This method is powered by
the HeatCapacityGases objects, except when all components have the same heat capacity form and a fast
implementation has been written for it (currently only polynomials).
∫︁ 𝑇
∆𝐻 𝑖𝑔 = 𝐶𝑝𝑖𝑔 𝑑𝑇
𝑇𝑟𝑒𝑓
Returns
dH_ig [list[float]] Integrals of ideal gas heat capacity from the reference temperature to the
system temperature, [J/(mol)]
Cpigs_pure()
Method to calculate and return the ideal-gas heat capacities of every component in the phase. This method
is powered by the HeatCapacityGases objects, except when all components have the same heat capacity
form and a fast implementation has been written for it (currently only polynomials).
Returns
Cp_ig [list[float]] Molar ideal gas heat capacities, [J/(mol*K)]
Cpls()
Method to calculate and return the pure-component liquid temperature-dependent heat capacities of each
species from the thermo.heat_capacity.HeatCapacityLiquid objects.
Note that some correlation methods for liquid heat capacity are at low pressure, and others are along the
saturation line. There is a large difference in values.
Returns
Cpls [list[float]] Pure component liquid heat capacities, [J/(mol*K)]
Cpss()
Method to calculate and return the pure-component solid heat capacities of each species from the thermo.
heat_capacity.HeatCapacitySolid objects.
Returns
Cpss [list[float]] Pure component solid heat capacities, [J/(mol*K)]
Curium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Curium, [atoms/s]
Curium_atom_flow()
Method to calculate and return the mole flow that is Curium, [mol/s]
Curium_atom_fraction()
Method to calculate and return the mole fraction that is Curium element, [-]
Curium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Curium element, [kg/s]
Curium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Curium element, [-]
Cv()
Method to calculate and return the constant-volume heat capacity Cv of the phase.
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑣 = 𝑇 / + 𝐶𝑝
𝜕𝑇 𝑉 𝜕𝑉 𝑇
Returns
Cv [float] Constant volume molar heat capacity, [J/(mol*K)]
Cv_dep()
Method to calculate and return the difference between the actual Cv and the ideal-gas constant volume heat
capacity 𝐶𝑣𝑖𝑔 of the phase.
𝐶𝑣𝑑𝑒𝑝 = 𝐶𝑣 − 𝐶𝑣𝑖𝑔
Returns
Cv_dep [float] Departure ideal gas constant volume heat capacity, [J/(mol*K)]
Cv_dep_mass()
Method to calculate and return mass constant pressure departure heat capacity of the phase.
1000𝐶𝑣𝑑𝑒𝑝,𝑚𝑜𝑙𝑎𝑟
𝐶𝑣𝑑𝑒𝑝,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cv_dep_mass [float] Mass departure heat capacity, [J/(kg*K)]
Cv_ideal_gas()
Method to calculate and return the ideal-gas constant volume heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑣𝑖𝑔 = 𝑧𝑖 𝐶𝑝,𝑖 −𝑅
𝑖
Returns
Cv [float] Ideal gas constant volume heat capacity, [J/(mol*K)]
Cv_mass()
Method to calculate and return mass constant volume heat capacity of the phase.
1000𝐶𝑣𝑚𝑜𝑙𝑎𝑟
𝐶𝑣𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
Cv_mass [float] Mass constant volume heat capacity, [J/(kg*K)]
Darmstadtium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Darmstadtium, [atoms/s]
Darmstadtium_atom_flow()
Method to calculate and return the mole flow that is Darmstadtium, [mol/s]
Darmstadtium_atom_fraction()
Method to calculate and return the mole fraction that is Darmstadtium element, [-]
Darmstadtium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Darmstadtium element, [kg/s]
Darmstadtium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Darmstadtium element, [-]
Dubnium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Dubnium, [atoms/s]
Dubnium_atom_flow()
Method to calculate and return the mole flow that is Dubnium, [mol/s]
Dubnium_atom_fraction()
Method to calculate and return the mole fraction that is Dubnium element, [-]
Dubnium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Dubnium element, [kg/s]
Dubnium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Dubnium element, [-]
Dysprosium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Dysprosium, [atoms/s]
Dysprosium_atom_flow()
Method to calculate and return the mole flow that is Dysprosium, [mol/s]
Dysprosium_atom_fraction()
Method to calculate and return the mole fraction that is Dysprosium element, [-]
Dysprosium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Dysprosium element, [kg/s]
Dysprosium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Dysprosium element, [-]
Einsteinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Einsteinium, [atoms/s]
Einsteinium_atom_flow()
Method to calculate and return the mole flow that is Einsteinium, [mol/s]
Einsteinium_atom_fraction()
Method to calculate and return the mole fraction that is Einsteinium element, [-]
Einsteinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Einsteinium element, [kg/s]
Einsteinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Einsteinium element, [-]
Erbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Erbium, [atoms/s]
Erbium_atom_flow()
Method to calculate and return the mole flow that is Erbium, [mol/s]
Erbium_atom_fraction()
Method to calculate and return the mole fraction that is Erbium element, [-]
Erbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Erbium element, [kg/s]
Erbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Erbium element, [-]
Europium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Europium, [atoms/s]
Europium_atom_flow()
Method to calculate and return the mole flow that is Europium, [mol/s]
Europium_atom_fraction()
Method to calculate and return the mole fraction that is Europium element, [-]
Europium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Europium element, [kg/s]
Europium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Europium element, [-]
Fermium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Fermium, [atoms/s]
Fermium_atom_flow()
Method to calculate and return the mole flow that is Fermium, [mol/s]
Fermium_atom_fraction()
Method to calculate and return the mole fraction that is Fermium element, [-]
Fermium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Fermium element, [kg/s]
Fermium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Fermium element, [-]
Flerovium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Flerovium, [atoms/s]
Flerovium_atom_flow()
Method to calculate and return the mole flow that is Flerovium, [mol/s]
Flerovium_atom_fraction()
Method to calculate and return the mole fraction that is Flerovium element, [-]
Flerovium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Flerovium element, [kg/s]
Flerovium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Flerovium element, [-]
Fluorine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Fluorine, [atoms/s]
Fluorine_atom_flow()
Method to calculate and return the mole flow that is Fluorine, [mol/s]
Fluorine_atom_fraction()
Method to calculate and return the mole fraction that is Fluorine element, [-]
Fluorine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Fluorine element, [kg/s]
Fluorine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Fluorine element, [-]
Francium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Francium, [atoms/s]
Francium_atom_flow()
Method to calculate and return the mole flow that is Francium, [mol/s]
Francium_atom_fraction()
Method to calculate and return the mole fraction that is Francium element, [-]
Francium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Francium element, [kg/s]
Francium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Francium element, [-]
G()
Method to calculate and return the Gibbs free energy of the phase.
𝐺 = 𝐻 − 𝑇𝑆
Returns
G [float] Gibbs free energy, [J/mol]
property GWPs
Global Warming Potentials for each component (impact/mass chemical)/(impact/mass CO2), [-].
Returns
GWPs [list[float]] Global Warming Potentials for each component (impact/mass chemi-
cal)/(impact/mass CO2), [-].
G_dep()
Method to calculate and return the departure Gibbs free energy of the phase.
Returns
G_dep [float] Departure Gibbs free energy, [J/mol]
G_dep_flow()
Method to return the flow rate of the difference between the ideal-gas Gibbs free energy of this phase and
the actual Gibbs free energy of the phase This method is only available when the phase is linked to an
EquilibriumStream.
Returns
G_dep_flow [float] Flow rate of departure Gibbs energy, [J/s]
G_dep_mass()
Method to calculate and return the mass departure Gibbs free energy of the phase.
Returns
G_dep_mass [float] Departure mass Gibbs free energy, [J/kg]
G_dep_phi_consistency()
Method to calculate and return a consistency check between departure Gibbs free energy, and the fugacity
coefficients.
𝐺from phi
∑︁
𝑑𝑒𝑝 = 𝑅𝑇 𝑧𝑖 𝜑𝑖
𝑖
Returns
error [float] Relative consistency error |1 − 𝐺from
𝑑𝑒𝑝
phi
/𝐺implemented
𝑑𝑒𝑝 |, [-]
G_flow()
Method to return the flow rate of Gibbs free energy of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
G_flow [float] Flow rate of Gibbs energy, [J/s]
G_formation_ideal_gas()
Method to calculate and return the ideal-gas Gibbs free energy of formation of the phase (as if the phase
was an ideal gas).
𝐺𝑖𝑔 𝑖𝑔 𝑖𝑔 𝑖𝑔
𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 𝐻𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 − 𝑇𝑟𝑒𝑓 𝑆𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛
Returns
G_formation_ideal_gas [float] Gibbs free energy of formation of the phase on a formation
basis as an ideal gas, [J/(mol)]
G_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation Gibbs free energy of the phase.
Returns
G_formation_ideal_gas_mass [float] Formation mass Gibbs free energy, [J/kg]
G_ideal_gas()
Method to calculate and return the ideal-gas Gibbs free energy of the phase.
𝐺𝑖𝑔 = 𝐻 𝑖𝑔 − 𝑇 𝑆 𝑖𝑔
Returns
G_ideal_gas [float] Ideal gas free energy, [J/(mol)]
G_ideal_gas_mass()
Method to calculate and return the mass ideal-gas Gibbs free energy of the phase.
Returns
G_ideal_gas_mass [float] Ideal gas mass free energy, [J/(kg)]
G_mass()
Method to calculate and return mass Gibbs energy of the phase.
1000𝐺𝑚𝑜𝑙𝑎𝑟
𝐺𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
G_mass [float] Mass Gibbs energy, [J/(kg)]
G_min()
Method to calculate and return the Gibbs free energy of the phase.
𝐺 = 𝐻 − 𝑇𝑆
Returns
G [float] Gibbs free energy, [J/mol]
G_min_criteria()
Method to calculate and return the Gibbs energy criteria required for comparing phase stability. This cal-
culation can be faster than calculating the full Gibbs energy. For this comparison to work, all phases must
use the ideal gas basis.
𝐺criteria = 𝐺𝑑𝑒𝑝 + 𝑅𝑇
∑︁
𝑧𝑖 ln 𝑧𝑖
𝑖
Returns
G_crit [float] Gibbs free energy like criteria [J/mol]
G_reactive()
Method to calculate and return the Gibbs free energy of the phase on a reactive basis.
Returns
G_reactive [float] Gibbs free energy of the phase on a reactive basis, [J/(mol)]
G_reactive_mass()
Method to calculate and return mass Gibbs free energy on a reactive basis of the phase.
1000𝐺𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐺𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
G_reactive_mass [float] Gibbs free energy on a reactive basis, [J/kg]
Gadolinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gadolinium, [atoms/s]
Gadolinium_atom_flow()
Method to calculate and return the mole flow that is Gadolinium, [mol/s]
Gadolinium_atom_fraction()
Method to calculate and return the mole fraction that is Gadolinium element, [-]
Gadolinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gadolinium element, [kg/s]
Gadolinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gadolinium element, [-]
Gallium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gallium, [atoms/s]
Gallium_atom_flow()
Method to calculate and return the mole flow that is Gallium, [mol/s]
Gallium_atom_fraction()
Method to calculate and return the mole fraction that is Gallium element, [-]
Gallium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gallium element, [kg/s]
Gallium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gallium element, [-]
Germanium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Germanium, [atoms/s]
Germanium_atom_flow()
Method to calculate and return the mole flow that is Germanium, [mol/s]
Germanium_atom_fraction()
Method to calculate and return the mole fraction that is Germanium element, [-]
Germanium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Germanium element, [kg/s]
Germanium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Germanium element, [-]
property Gfgs
Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
Returns
Gfgs [list[float]] Ideal gas standard molar Gibbs free energy of formation for each compo-
nent, [J/mol].
property Gfgs_mass
Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
Returns
Gfgs_mass [list[float]] Ideal gas standard Gibbs free energy of formation for each compo-
nent, [J/kg].
Gold_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Gold, [atoms/s]
Gold_atom_flow()
Method to calculate and return the mole flow that is Gold, [mol/s]
Gold_atom_fraction()
Method to calculate and return the mole fraction that is Gold element, [-]
Gold_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Gold element, [kg/s]
Gold_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Gold element, [-]
H()
Method to calculate and return the enthalpy of the phase. The reference state for most subclasses is an
ideal-gas enthalpy of zero at 298.15 K and 101325 Pa.
Returns
H [float] Molar enthalpy, [J/(mol)]
H_C_ratio()
Method to calculate and return the atomic ratio of hydrogen atoms to carbon atoms, based on the current
composition of the phase.
Returns
H_C_ratio [float] H/C ratio on a molar basis, [-]
Notes
Notes
H_dep_mass()
Method to calculate and return the mass departure enthalpy of the phase.
Returns
H_dep_mass [float] Departure mass enthalpy free energy, [J/kg]
H_dep_phi_consistency()
Method to calculate and return a consistency check between departure enthalpy, and the fugacity coeffi-
cients’ temperature derivatives.
from phi
∑︁ 𝜕 ln 𝜑𝑖
𝐻𝑑𝑒𝑝 = −𝑅𝑇 2 𝑧𝑖
𝑖
𝜕𝑇
Returns
from phi implemented
error [float] Relative consistency error |1 − 𝐻𝑑𝑒𝑝 /𝐻𝑑𝑒𝑝 |, [-]
H_flow()
Method to return the flow rate of enthalpy of this phase. This method is only available when the phase is
linked to an EquilibriumStream.
Returns
H_flow [float] Flow rate of energy, [J/s]
H_formation_ideal_gas()
Method to calculate and return the ideal-gas enthalpy of formation of the phase (as if the phase was an ideal
gas).
∑︁
𝐻𝑓𝑖𝑔𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 𝑧𝑖 𝐻𝑓,𝑖
𝑖
Returns
H_formation_ideal_gas [float] Enthalpy of formation of the phase on a formation basis as
an ideal gas, [J/mol]
H_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation enthalpy of the phase.
Returns
H_formation_ideal_gas_mass [float] Formation mass enthalpy, [J/kg]
H_from_phi()
Method to calculate and return the enthalpy of the fluid as calculated from the ideal-gas enthalpy and the
the fugacity coefficients’ temperature derivatives.
𝜕 ln 𝜑𝑖
𝐻 from phi = 𝐻 𝑖𝑔 − 𝑅𝑇 2
∑︁
𝑧𝑖
𝑖
𝜕𝑇
Returns
H [float] Enthalpy as calculated from fugacity coefficient temperature derivatives [J/mol]
H_ideal_gas()
Method to calculate and return the ideal-gas enthalpy of the phase.
∑︁
𝐻 𝑖𝑔 = 𝑧𝑖 𝐻𝑖𝑖𝑔
𝑖
Returns
Returns
error [float] Relative consistency error |1 − 𝐻 from phi /𝐻 implemented |, [-]
H_reactive()
Method to calculate and return the enthalpy of the phase on a reactive basis, using the Hfs values of the
phase.
∑︁
𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝐻 + 𝑧𝑖 𝐻𝑓,𝑖
𝑖
Returns
H_reactive [float] Enthalpy of the phase on a reactive basis, [J/mol]
H_reactive_mass()
Method to calculate and return mass enthalpy on a reactive basis of the phase.
1000𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
H_reactive_mass [float] Mass enthalpy on a reactive basis, [J/kg]
Hafnium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hafnium, [atoms/s]
Hafnium_atom_flow()
Method to calculate and return the mole flow that is Hafnium, [mol/s]
Hafnium_atom_fraction()
Method to calculate and return the mole fraction that is Hafnium element, [-]
Hafnium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hafnium element, [kg/s]
Hafnium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hafnium element, [-]
Hassium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hassium, [atoms/s]
Hassium_atom_flow()
Method to calculate and return the mole flow that is Hassium, [mol/s]
Hassium_atom_fraction()
Method to calculate and return the mole fraction that is Hassium element, [-]
Hassium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hassium element, [kg/s]
Hassium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hassium element, [-]
Hc()
Method to calculate and return the molar ideal-gas higher heat of combustion of the object, [J/mol]
Returns
Hc [float] Molar higher heat of combustion, [J/(mol)]
Hc_lower()
Method to calculate and return the molar ideal-gas lower heat of combustion of the object, [J/mol]
Returns
Hc_lower [float] Molar lower heat of combustion, [J/(mol)]
Hc_lower_mass()
Method to calculate and return the mass ideal-gas lower heat of combustion of the object, [J/mol]
Returns
Hc_lower_mass [float] Mass lower heat of combustion, [J/(kg)]
Hc_lower_normal()
Method to calculate and return the volumetric ideal-gas lower heat of combustion of the object using the
normal gas volume, [J/m^3]
Returns
Hc_lower_normal [float] Volumetric (normal) lower heat of combustion, [J/(m^3)]
Hc_lower_standard()
Method to calculate and return the volumetric ideal-gas lower heat of combustion of the object using the
standard gas volume, [J/m^3]
Returns
Hc_lower_standard [float] Volumetric (standard) lower heat of combustion, [J/(m^3)]
Hc_mass()
Method to calculate and return the mass ideal-gas higher heat of combustion of the object, [J/mol]
Returns
Hc_mass [float] Mass higher heat of combustion, [J/(kg)]
Hc_normal()
Method to calculate and return the volumetric ideal-gas higher heat of combustion of the object using the
normal gas volume, [J/m^3]
Returns
Hc_normal [float] Volumetric (normal) higher heat of combustion, [J/(m^3)]
Hc_standard()
Method to calculate and return the volumetric ideal-gas higher heat of combustion of the object using the
standard gas volume, [J/m^3]
Returns
Hc_normal [float] Volumetric (standard) higher heat of combustion, [J/(m^3)]
property Hcs
Higher standard molar heats of combustion for each component, [J/mol].
Returns
Hcs [list[float]] Higher standard molar heats of combustion for each component, [J/mol].
property Hcs_lower
Lower standard molar heats of combustion for each component, [J/mol].
Returns
Hcs_lower [list[float]] Lower standard molar heats of combustion for each component,
[J/mol].
property Hcs_lower_mass
Lower standard heats of combustion for each component, [J/kg].
Returns
Hcs_lower_mass [list[float]] Lower standard heats of combustion for each component,
[J/kg].
property Hcs_mass
Higher standard heats of combustion for each component, [J/kg].
Returns
Hcs_mass [list[float]] Higher standard heats of combustion for each component, [J/kg].
Helium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Helium, [atoms/s]
Helium_atom_flow()
Method to calculate and return the mole flow that is Helium, [mol/s]
Helium_atom_fraction()
Method to calculate and return the mole fraction that is Helium element, [-]
Helium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Helium element, [kg/s]
Helium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Helium element, [-]
property Hf_STPs
Standard state molar enthalpies of formation for each component, [J/mol].
Returns
Hf_STPs [list[float]] Standard state molar enthalpies of formation for each component,
[J/mol].
property Hf_STPs_mass
Standard state mass enthalpies of formation for each component, [J/kg].
Returns
Hf_STPs_mass [list[float]] Standard state mass enthalpies of formation for each component,
[J/kg].
property Hfgs
Ideal gas standard molar enthalpies of formation for each component, [J/mol].
Returns
Hfgs [list[float]] Ideal gas standard molar enthalpies of formation for each component,
[J/mol].
property Hfgs_mass
Ideal gas standard enthalpies of formation for each component, [J/kg].
Returns
Hfgs_mass [list[float]] Ideal gas standard enthalpies of formation for each component, [J/kg].
property Hfus_Tms
Molar heats of fusion for each component at their respective melting points, [J/mol].
Returns
Hfus_Tms [list[float]] Molar heats of fusion for each component at their respective melting
points, [J/mol].
property Hfus_Tms_mass
Heats of fusion for each component at their respective melting points, [J/kg].
Returns
Hfus_Tms_mass [list[float]] Heats of fusion for each component at their respective melting
points, [J/kg].
Holmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Holmium, [atoms/s]
Holmium_atom_flow()
Method to calculate and return the mole flow that is Holmium, [mol/s]
Holmium_atom_fraction()
Method to calculate and return the mole fraction that is Holmium element, [-]
Holmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Holmium element, [kg/s]
Holmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Holmium element, [-]
property Hsub_Tts
Heats of sublimation for each component at their respective triple points, [J/mol].
Returns
Hsub_Tts [list[float]] Heats of sublimation for each component at their respective triple
points, [J/mol].
property Hsub_Tts_mass
Heats of sublimation for each component at their respective triple points, [J/kg].
Returns
Hsub_Tts_mass [list[float]] Heats of sublimation for each component at their respective
triple points, [J/kg].
Hsubs()
Method to calculate and return the pure-component enthalpy of sublimation of each species from the
thermo.phase_change.EnthalpySublimation objects.
Returns
Hsubs [list[float]] Sublimation enthalpies, [J/mol]
Notes
Warning: This is not necessarily consistent with the saturation enthalpy change calculated by a flash
algorithm.
property Hvap_298s
Molar heats of vaporization for each component at 298.15 K, [J/mol].
Returns
Hvap_298s [list[float]] Molar heats of vaporization for each component at 298.15 K, [J/mol].
property Hvap_298s_mass
Heats of vaporization for each component at 298.15 K, [J/kg].
Returns
Hvap_298s_mass [list[float]] Heats of vaporization for each component at 298.15 K, [J/kg].
property Hvap_Tbs
Molar heats of vaporization for each component at their respective normal boiling points, [J/mol].
Returns
Hvap_Tbs [list[float]] Molar heats of vaporization for each component at their respective
normal boiling points, [J/mol].
property Hvap_Tbs_mass
Heats of vaporization for each component at their respective normal boiling points, [J/kg].
Returns
Hvap_Tbs_mass [list[float]] Heats of vaporization for each component at their respective
normal boiling points, [J/kg].
Hvaps()
Method to calculate and return the pure-component enthalpy of vaporization of each species from the
thermo.phase_change.EnthalpyVaporization objects.
Returns
Hvaps [list[float]] Enthalpies of vaporization, [J/mol]
Notes
Warning: This is not necessarily consistent with the saturation enthalpy change calculated by a flash
algorithm.
Hydrogen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Hydrogen, [atoms/s]
Hydrogen_atom_flow()
Method to calculate and return the mole flow that is Hydrogen, [mol/s]
Hydrogen_atom_fraction()
Method to calculate and return the mole fraction that is Hydrogen element, [-]
Hydrogen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Hydrogen element, [kg/s]
Hydrogen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Hydrogen element, [-]
INCOMPRESSIBLE_CONST = 1e+30
property InChI_Keys
InChI Keys for each component, [-].
Returns
InChI_Keys [list[str]] InChI Keys for each component, [-].
property InChIs
InChI strings for each component, [-].
Returns
InChIs [list[str]] InChI strings for each component, [-].
Indium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Indium, [atoms/s]
Indium_atom_flow()
Method to calculate and return the mole flow that is Indium, [mol/s]
Indium_atom_fraction()
Method to calculate and return the mole fraction that is Indium element, [-]
Indium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Indium element, [kg/s]
Indium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Indium element, [-]
Iodine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iodine, [atoms/s]
Iodine_atom_flow()
Method to calculate and return the mole flow that is Iodine, [mol/s]
Iodine_atom_fraction()
Method to calculate and return the mole fraction that is Iodine element, [-]
Iodine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iodine element, [kg/s]
Iodine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iodine element, [-]
Iridium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iridium, [atoms/s]
Iridium_atom_flow()
Method to calculate and return the mole flow that is Iridium, [mol/s]
Iridium_atom_fraction()
Method to calculate and return the mole fraction that is Iridium element, [-]
Iridium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iridium element, [kg/s]
Iridium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iridium element, [-]
Iron_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Iron, [atoms/s]
Iron_atom_flow()
Method to calculate and return the mole flow that is Iron, [mol/s]
Iron_atom_fraction()
Method to calculate and return the mole fraction that is Iron element, [-]
Iron_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Iron element, [kg/s]
Iron_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Iron element, [-]
Joule_Thomson()
Method to calculate and return the Joule-Thomson coefficient of the phase.
(︂ )︂ [︂ (︂ )︂ ]︂
𝜕𝑇 1 𝜕𝑉 𝑉
𝜇𝐽𝑇 = = 𝑇 −𝑉 = (𝛽𝑇 − 1)
𝜕𝑃 𝐻 𝐶𝑝 𝜕𝑇 𝑃 𝐶𝑝
Returns
mu_JT [float] Joule-Thomson coefficient [K/Pa]
Krypton_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Krypton, [atoms/s]
Krypton_atom_flow()
Method to calculate and return the mole flow that is Krypton, [mol/s]
Krypton_atom_fraction()
Method to calculate and return the mole fraction that is Krypton element, [-]
Krypton_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Krypton element, [kg/s]
Krypton_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Krypton element, [-]
property LFLs
Lower flammability limits for each component, [-].
Returns
LFLs [list[float]] Lower flammability limits for each component, [-].
LOG_P_REF_IG = 11.52608845149651
Lanthanum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lanthanum, [atoms/s]
Lanthanum_atom_flow()
Method to calculate and return the mole flow that is Lanthanum, [mol/s]
Lanthanum_atom_fraction()
Method to calculate and return the mole fraction that is Lanthanum element, [-]
Lanthanum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lanthanum element, [kg/s]
Lanthanum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lanthanum element, [-]
Lawrencium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lawrencium, [atoms/s]
Lawrencium_atom_flow()
Method to calculate and return the mole flow that is Lawrencium, [mol/s]
Lawrencium_atom_fraction()
Method to calculate and return the mole fraction that is Lawrencium element, [-]
Lawrencium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lawrencium element, [kg/s]
Lawrencium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lawrencium element, [-]
Lead_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lead, [atoms/s]
Lead_atom_flow()
Method to calculate and return the mole flow that is Lead, [mol/s]
Lead_atom_fraction()
Method to calculate and return the mole fraction that is Lead element, [-]
Lead_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lead element, [kg/s]
Lead_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lead element, [-]
Lithium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lithium, [atoms/s]
Lithium_atom_flow()
Method to calculate and return the mole flow that is Lithium, [mol/s]
Lithium_atom_fraction()
Method to calculate and return the mole fraction that is Lithium element, [-]
Lithium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lithium element, [kg/s]
Lithium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lithium element, [-]
Livermorium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Livermorium, [atoms/s]
Livermorium_atom_flow()
Method to calculate and return the mole flow that is Livermorium, [mol/s]
Livermorium_atom_fraction()
Method to calculate and return the mole fraction that is Livermorium element, [-]
Livermorium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Livermorium element, [kg/s]
Livermorium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Livermorium element, [-]
Lutetium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Lutetium, [atoms/s]
Lutetium_atom_flow()
Method to calculate and return the mole flow that is Lutetium, [mol/s]
Lutetium_atom_fraction()
Method to calculate and return the mole fraction that is Lutetium element, [-]
Lutetium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Lutetium element, [kg/s]
Lutetium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Lutetium element, [-]
MW()
Method to calculate and return molecular weight of the phase.
∑︁
MW = 𝑧𝑖 MW𝑖
𝑖
Returns
MW [float] Molecular weight, [g/mol]
MW_inv()
Method to calculate and return inverse of molecular weight of the phase.
1 1
= ∑︀
MW 𝑖 𝑧𝑖 MW𝑖
Returns
MW_inv [float] Inverse of molecular weight, [mol/g]
property MWs
Similatiry variables for each component, [g/mol].
Returns
MWs [list[float]] Similatiry variables for each component, [g/mol].
Magnesium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Magnesium, [atoms/s]
Magnesium_atom_flow()
Method to calculate and return the mole flow that is Magnesium, [mol/s]
Magnesium_atom_fraction()
Method to calculate and return the mole fraction that is Magnesium element, [-]
Magnesium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Magnesium element, [kg/s]
Magnesium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Magnesium element, [-]
Manganese_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Manganese, [atoms/s]
Manganese_atom_flow()
Method to calculate and return the mole flow that is Manganese, [mol/s]
Manganese_atom_fraction()
Method to calculate and return the mole fraction that is Manganese element, [-]
Manganese_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Manganese element, [kg/s]
Manganese_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Manganese element, [-]
Meitnerium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Meitnerium, [atoms/s]
Meitnerium_atom_flow()
Method to calculate and return the mole flow that is Meitnerium, [mol/s]
Meitnerium_atom_fraction()
Method to calculate and return the mole fraction that is Meitnerium element, [-]
Meitnerium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Meitnerium element, [kg/s]
Meitnerium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Meitnerium element, [-]
Mendelevium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Mendelevium, [atoms/s]
Mendelevium_atom_flow()
Method to calculate and return the mole flow that is Mendelevium, [mol/s]
Mendelevium_atom_fraction()
Method to calculate and return the mole fraction that is Mendelevium element, [-]
Mendelevium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Mendelevium element, [kg/s]
Mendelevium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Mendelevium element, [-]
Mercury_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Mercury, [atoms/s]
Mercury_atom_flow()
Method to calculate and return the mole flow that is Mercury, [mol/s]
Mercury_atom_fraction()
Method to calculate and return the mole fraction that is Mercury element, [-]
Mercury_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Mercury element, [kg/s]
Mercury_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Mercury element, [-]
Molybdenum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Molybdenum, [atoms/s]
Molybdenum_atom_flow()
Method to calculate and return the mole flow that is Molybdenum, [mol/s]
Molybdenum_atom_fraction()
Method to calculate and return the mole fraction that is Molybdenum element, [-]
Molybdenum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Molybdenum element, [kg/s]
Molybdenum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Molybdenum element, [-]
Moscovium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Moscovium, [atoms/s]
Moscovium_atom_flow()
Method to calculate and return the mole flow that is Moscovium, [mol/s]
Moscovium_atom_fraction()
Method to calculate and return the mole fraction that is Moscovium element, [-]
Moscovium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Moscovium element, [kg/s]
Moscovium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Moscovium element, [-]
Neodymium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neodymium, [atoms/s]
Neodymium_atom_flow()
Method to calculate and return the mole flow that is Neodymium, [mol/s]
Neodymium_atom_fraction()
Method to calculate and return the mole fraction that is Neodymium element, [-]
Neodymium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neodymium element, [kg/s]
Neodymium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neodymium element, [-]
Neon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neon, [atoms/s]
Neon_atom_flow()
Method to calculate and return the mole flow that is Neon, [mol/s]
Neon_atom_fraction()
Method to calculate and return the mole fraction that is Neon element, [-]
Neon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neon element, [kg/s]
Neon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neon element, [-]
Neptunium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Neptunium, [atoms/s]
Neptunium_atom_flow()
Method to calculate and return the mole flow that is Neptunium, [mol/s]
Neptunium_atom_fraction()
Method to calculate and return the mole fraction that is Neptunium element, [-]
Neptunium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Neptunium element, [kg/s]
Neptunium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Neptunium element, [-]
Nickel_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nickel, [atoms/s]
Nickel_atom_flow()
Method to calculate and return the mole flow that is Nickel, [mol/s]
Nickel_atom_fraction()
Method to calculate and return the mole fraction that is Nickel element, [-]
Nickel_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nickel element, [kg/s]
Nickel_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nickel element, [-]
Nihonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nihonium, [atoms/s]
Nihonium_atom_flow()
Method to calculate and return the mole flow that is Nihonium, [mol/s]
Nihonium_atom_fraction()
Method to calculate and return the mole fraction that is Nihonium element, [-]
Nihonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nihonium element, [kg/s]
Nihonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nihonium element, [-]
Niobium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Niobium, [atoms/s]
Niobium_atom_flow()
Method to calculate and return the mole flow that is Niobium, [mol/s]
Niobium_atom_fraction()
Method to calculate and return the mole fraction that is Niobium element, [-]
Niobium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Niobium element, [kg/s]
Niobium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Niobium element, [-]
Nitrogen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nitrogen, [atoms/s]
Nitrogen_atom_flow()
Method to calculate and return the mole flow that is Nitrogen, [mol/s]
Nitrogen_atom_fraction()
Method to calculate and return the mole fraction that is Nitrogen element, [-]
Nitrogen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nitrogen element, [kg/s]
Nitrogen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nitrogen element, [-]
Nobelium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Nobelium, [atoms/s]
Nobelium_atom_flow()
Method to calculate and return the mole flow that is Nobelium, [mol/s]
Nobelium_atom_fraction()
Method to calculate and return the mole fraction that is Nobelium element, [-]
Nobelium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Nobelium element, [kg/s]
Nobelium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Nobelium element, [-]
property ODPs
Ozone Depletion Potentials for each component (impact/mass chemical)/(impact/mass CFC-11), [-].
Returns
ODPs [list[float]] Ozone Depletion Potentials for each component (impact/mass chemi-
cal)/(impact/mass CFC-11), [-].
Oganesson_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Oganesson, [atoms/s]
Oganesson_atom_flow()
Method to calculate and return the mole flow that is Oganesson, [mol/s]
Oganesson_atom_fraction()
Method to calculate and return the mole fraction that is Oganesson element, [-]
Oganesson_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Oganesson element, [kg/s]
Oganesson_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Oganesson element, [-]
Osmium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Osmium, [atoms/s]
Osmium_atom_flow()
Method to calculate and return the mole flow that is Osmium, [mol/s]
Osmium_atom_fraction()
Method to calculate and return the mole fraction that is Osmium element, [-]
Osmium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Osmium element, [kg/s]
Osmium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Osmium element, [-]
Oxygen_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Oxygen, [atoms/s]
Oxygen_atom_flow()
Method to calculate and return the mole flow that is Oxygen, [mol/s]
Oxygen_atom_fraction()
Method to calculate and return the mole fraction that is Oxygen element, [-]
Oxygen_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Oxygen element, [kg/s]
Oxygen_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Oxygen element, [-]
PIP()
Method to calculate and return the phase identification parameter of the phase.
[︃ 2 2
]︃
𝜕 𝑃 𝜕 𝑃
𝜕𝑉 𝜕𝑇 𝜕𝑉 2
Π=𝑉 𝜕𝑃
− 𝜕𝑃
𝜕𝑇 𝜕𝑉
Returns
PIP [float] Phase identification parameter, [-]
property PSRK_groups
PSRK subgroup: count groups for each component, [-].
Returns
PSRK_groups [list[dict]] PSRK subgroup: count groups for each component, [-].
P_MAX_FIXED = 1000000000.0
P_MIN_FIXED = 0.01
P_REF_IG = 101325.0
P_REF_IG_INV = 9.869232667160129e-06
property P_calc
P_max_at_V(V )
Dummy method. The idea behind this method, which is implemented by some subclasses, is to calculate
the maximum pressure the phase can create at a constant volume, if one exists; returns None otherwise.
This method, as a dummy method, always returns None.
Parameters
V [float] Constant molar volume, [m^3/mol]
Returns
P [float] Maximum possible isochoric pressure, [Pa]
P_transitions()
Dummy method. The idea behind this method is to calculate any pressures (at constant temperature) which
cause the phase properties to become discontinuous.
Returns
P_transitions [list[float]] Transition pressures, [Pa]
Palladium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Palladium, [atoms/s]
Palladium_atom_flow()
Method to calculate and return the mole flow that is Palladium, [mol/s]
Palladium_atom_fraction()
Method to calculate and return the mole fraction that is Palladium element, [-]
Palladium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Palladium element, [kg/s]
Palladium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Palladium element, [-]
property Parachors
Parachors for each component, [N^0.25*m^2.75/mol].
Returns
Parachors [list[float]] Parachors for each component, [N^0.25*m^2.75/mol].
property Pcs
Critical pressures for each component, [Pa].
Returns
Pcs [list[float]] Critical pressures for each component, [Pa].
Phosphorus_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Phosphorus, [atoms/s]
Phosphorus_atom_flow()
Method to calculate and return the mole flow that is Phosphorus, [mol/s]
Phosphorus_atom_fraction()
Method to calculate and return the mole fraction that is Phosphorus element, [-]
Phosphorus_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Phosphorus element, [kg/s]
Phosphorus_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Phosphorus element, [-]
Platinum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Platinum, [atoms/s]
Platinum_atom_flow()
Method to calculate and return the mole flow that is Platinum, [mol/s]
Platinum_atom_fraction()
Method to calculate and return the mole fraction that is Platinum element, [-]
Platinum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Platinum element, [kg/s]
Platinum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Platinum element, [-]
Plutonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Plutonium, [atoms/s]
Plutonium_atom_flow()
Method to calculate and return the mole flow that is Plutonium, [mol/s]
Plutonium_atom_fraction()
Method to calculate and return the mole fraction that is Plutonium element, [-]
Plutonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Plutonium element, [kg/s]
Plutonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Plutonium element, [-]
Pmc()
Method to calculate and return the mechanical critical pressure of the phase.
Returns
Pmc [float] Mechanical critical pressure, [Pa]
Polonium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Polonium, [atoms/s]
Polonium_atom_flow()
Method to calculate and return the mole flow that is Polonium, [mol/s]
Polonium_atom_fraction()
Method to calculate and return the mole fraction that is Polonium element, [-]
Polonium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Polonium element, [kg/s]
Polonium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Polonium element, [-]
Potassium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Potassium, [atoms/s]
Potassium_atom_flow()
Method to calculate and return the mole flow that is Potassium, [mol/s]
Potassium_atom_fraction()
Method to calculate and return the mole fraction that is Potassium element, [-]
Potassium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Potassium element, [kg/s]
Potassium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Potassium element, [-]
Prandtl()
Method to calculate and return the Prandtl number of the phase
𝐶𝑝 𝜇 𝜈 𝐶𝑝 𝜌𝜈
𝑃𝑟 = = =
𝑘 𝛼 𝑘
Returns
Pr [float] Prandtl number []
Praseodymium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Praseodymium, [atoms/s]
Praseodymium_atom_flow()
Method to calculate and return the mole flow that is Praseodymium, [mol/s]
Praseodymium_atom_fraction()
Method to calculate and return the mole fraction that is Praseodymium element, [-]
Praseodymium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Praseodymium element, [kg/s]
Praseodymium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Praseodymium element, [-]
Promethium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Promethium, [atoms/s]
Promethium_atom_flow()
Method to calculate and return the mole flow that is Promethium, [mol/s]
Promethium_atom_fraction()
Method to calculate and return the mole fraction that is Promethium element, [-]
Promethium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Promethium element, [kg/s]
Promethium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Promethium element, [-]
Protactinium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Protactinium, [atoms/s]
Protactinium_atom_flow()
Method to calculate and return the mole flow that is Protactinium, [mol/s]
Protactinium_atom_fraction()
Method to calculate and return the mole fraction that is Protactinium element, [-]
Protactinium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Protactinium element, [kg/s]
Protactinium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Protactinium element, [-]
property Psat_298s
Vapor pressures for each component at 298.15 K, [Pa].
Returns
Psat_298s [list[float]] Vapor pressures for each component at 298.15 K, [Pa].
Psats()
Method to calculate and return the pure-component vapor pressures of each species from the thermo.
vapor_pressure.VaporPressure objects.
Returns
Psats [list[float]] Vapor pressures, [Pa]
Notes
Warning: This is not necessarily consistent with the saturation pressure calculated by a flash algorithm.
Psats_poly_fit = False
Psubs()
Method to calculate and return the pure-component sublimation of each species from the thermo.
vapor_pressure.SublimationPressure objects.
Returns
Psubs [list[float]] Sublimation pressures, [Pa]
Notes
Warning: This is not necessarily consistent with the saturation pressure calculated by a flash algorithm.
property Pts
Triple point pressures for each component, [Pa].
Returns
Pts [list[float]] Triple point pressures for each component, [Pa].
property PubChems
Pubchem IDs for each component, [-].
Returns
PubChems [list[int]] Pubchem IDs for each component, [-].
property Q
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Q_calc
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Qg
Method to return the volume flow rate of this phase as an ideal gas, using the configured temperature
T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to an Equilibri-
umStream. This method totally ignores phase equilibrium.
Returns
Qg [float] Ideal gas flow rate of the phase, [m^3/s]
property Qg_calc
Method to return the volume flow rate of this phase as an ideal gas, using the configured temperature
T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to an Equilibri-
umStream. This method totally ignores phase equilibrium.
Returns
Qg [float] Ideal gas flow rate of the phase, [m^3/s]
property Qgs
Method to return the volume flow rate of each component in this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to
an EquilibriumStream. This method totally ignores phase equilibrium.
Returns
Qgs [float] Ideal gas flow rates of the components in the phase, [m^3/s]
property Qgs_calc
Method to return the volume flow rate of each component in this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to
an EquilibriumStream. This method totally ignores phase equilibrium.
Returns
Qgs [float] Ideal gas flow rates of the components in the phase, [m^3/s]
property Ql
Method to return the volume flow rate of this phase as an ideal liquid, using the configured standard molar
volumes Vml_STPs. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Ql [float] Ideal liquid flow rate of the phase, [m^3/s]
property Ql_calc
Method to return the volume flow rate of this phase as an ideal liquid, using the configured standard molar
volumes Vml_STPs. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Ql [float] Ideal liquid flow rate of the phase, [m^3/s]
property Qls
Method to return the volume flow rate of each component in this phase as an ideal liquid, using the config-
ured V_liquids_ref. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Qls [float] Ideal liquid flow rates of the components in the phase, [m^3/s]
property Qls_calc
Method to return the volume flow rate of each component in this phase as an ideal liquid, using the config-
ured V_liquids_ref. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Qls [float] Ideal liquid flow rates of the components in the phase, [m^3/s]
R = 8.31446261815324
R2 = 69.13028862866763
property RI_Ts
Temperatures at which the refractive indexes were reported for each component, [K].
Returns
RI_Ts [list[float]] Temperatures at which the refractive indexes were reported for each com-
ponent, [K].
property RIs
Refractive indexes for each component, [-].
Returns
RIs [list[float]] Refractive indexes for each component, [-].
R_inv = 0.12027235504272604
Radium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Radium, [atoms/s]
Radium_atom_flow()
Method to calculate and return the mole flow that is Radium, [mol/s]
Radium_atom_fraction()
Method to calculate and return the mole fraction that is Radium element, [-]
Radium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Radium element, [kg/s]
Radium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Radium element, [-]
Radon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Radon, [atoms/s]
Radon_atom_flow()
Method to calculate and return the mole flow that is Radon, [mol/s]
Radon_atom_fraction()
Method to calculate and return the mole fraction that is Radon element, [-]
Radon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Radon element, [kg/s]
Radon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Radon element, [-]
Rhenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rhenium, [atoms/s]
Rhenium_atom_flow()
Method to calculate and return the mole flow that is Rhenium, [mol/s]
Rhenium_atom_fraction()
Method to calculate and return the mole fraction that is Rhenium element, [-]
Rhenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rhenium element, [kg/s]
Rhenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rhenium element, [-]
Rhodium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rhodium, [atoms/s]
Rhodium_atom_flow()
Method to calculate and return the mole flow that is Rhodium, [mol/s]
Rhodium_atom_fraction()
Method to calculate and return the mole fraction that is Rhodium element, [-]
Rhodium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rhodium element, [kg/s]
Rhodium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rhodium element, [-]
Roentgenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Roentgenium, [atoms/s]
Roentgenium_atom_flow()
Method to calculate and return the mole flow that is Roentgenium, [mol/s]
Roentgenium_atom_fraction()
Method to calculate and return the mole fraction that is Roentgenium element, [-]
Roentgenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Roentgenium element, [kg/s]
Roentgenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Roentgenium element, [-]
Rubidium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rubidium, [atoms/s]
Rubidium_atom_flow()
Method to calculate and return the mole flow that is Rubidium, [mol/s]
Rubidium_atom_fraction()
Method to calculate and return the mole fraction that is Rubidium element, [-]
Rubidium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rubidium element, [kg/s]
Rubidium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rubidium element, [-]
Ruthenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Ruthenium, [atoms/s]
Ruthenium_atom_flow()
Method to calculate and return the mole flow that is Ruthenium, [mol/s]
Ruthenium_atom_fraction()
Method to calculate and return the mole fraction that is Ruthenium element, [-]
Ruthenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Ruthenium element, [kg/s]
Ruthenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Ruthenium element, [-]
Rutherfordium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Rutherfordium, [atoms/s]
Rutherfordium_atom_flow()
Method to calculate and return the mole flow that is Rutherfordium, [mol/s]
Rutherfordium_atom_fraction()
Method to calculate and return the mole fraction that is Rutherfordium element, [-]
Rutherfordium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Rutherfordium element, [kg/s]
Rutherfordium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Rutherfordium element, [-]
S()
Method to calculate and return the entropy of the phase. The reference state for most subclasses is an
ideal-gas entropy of zero at 298.15 K and 101325 Pa.
Returns
S [float] Molar entropy, [J/(mol*K)]
property S0gs
Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
Returns
S0gs [list[float]] Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component,
[J/(mol*K)].
property S0gs_mass
Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
Returns
S0gs_mass [list[float]] Ideal gas absolute entropies at 298.15 K at 1 atm for each component,
[J/(kg*K)].
SG()
Method to calculate and return the standard liquid specific gravity of the phase, using constant liquid pure
component densities not calculated by the phase object, at 60 °F.
Returns
SG [float] Specific gravity of the liquid, [-]
Notes
The reference density of water is from the IAPWS-95 standard - 999.0170824078306 kg/m^3.
SG_gas()
Method to calculate and return the specific gravity of the phase with respect to a gas reference density.
Returns
SG_gas [float] Specific gravity of the gas, [-]
Notes
S_dep_phi_consistency()
Method to calculate and return a consistency check between ideal gas entropy behavior, and the fugacity
coefficients and their temperature derivatives.
(︂ )︂
from phi
∑︁ 𝜕 ln 𝜑𝑖
𝑆𝑑𝑒𝑝 =− 𝑧𝑖 𝑅 ln 𝜑𝑖 + 𝑇
𝑖
𝜕𝑇
Returns
from phi implemented
error [float] Relative consistency error |1 − 𝑆𝑑𝑒𝑝 /𝑆𝑑𝑒𝑝 |, [-]
S_flow()
Method to return the flow rate of entropy of this phase. This method is only available when the phase is
linked to an EquilibriumStream.
Returns
S_flow [float] Flow rate of entropy, [J/(K*s)]
S_formation_ideal_gas()
Method to calculate and return the ideal-gas entropy of formation of the phase (as if the phase was an ideal
gas).
∑︁
𝑆𝑓𝑖𝑔𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 𝑧𝑖 𝑆𝑓,𝑖
𝑖
Returns
S_formation_ideal_gas [float] Entropy of formation of the phase on a formation basis as an
ideal gas, [J/(mol*K)]
S_formation_ideal_gas_mass()
Method to calculate and return the mass ideal-gas formation entropy of the phase.
Returns
S_formation_ideal_gas_mass [float] Formation mass entropy, [J/(kg*K)]
S_from_phi()
Method to calculate and return the entropy of the fluid as calculated from the ideal-gas entropy and the the
fugacity coefficients’ temperature derivatives.
(︂ )︂
∑︁ 𝜕 ln 𝜑𝑖
𝑆 = 𝑆 𝑖𝑔 − 𝑧𝑖 𝑅 ln 𝜑𝑖 + 𝑇
𝑖
𝜕𝑇
Returns
S [float] Entropy as calculated from fugacity coefficient temperature derivatives [J/(mol*K)]
S_ideal_gas()
Method to calculate and return the ideal-gas entropy of the phase.
(︂ )︂
𝑖𝑔
∑︁ 𝑖𝑔 𝑃 ∑︁
𝑆 = 𝑧𝑖 𝑆𝑖 − 𝑅 ln −𝑅 𝑧𝑖 ln(𝑧𝑖 )
𝑖
𝑃𝑟𝑒𝑓 𝑖
Returns
S [float] Ideal gas molar entropy, [J/(mol*K)]
S_ideal_gas_mass()
Method to calculate and return the mass ideal-gas entropy of the phase.
Returns
1000𝑆𝑚𝑜𝑙𝑎𝑟
𝑆𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
S_mass [float] Mass enthalpy, [J/(kg*K)]
S_phi_consistency()
Method to calculate and return a consistency check between ideal gas entropy behavior, and the fugacity
coefficients and their temperature derivatives.
(︂ )︂
∑︁ 𝜕 ln 𝜑𝑖
𝑆 = 𝑆 𝑖𝑔 − 𝑧𝑖 𝑅 ln 𝜑𝑖 + 𝑇
𝑖
𝜕𝑇
Returns
error [float] Relative consistency error |1 − 𝑆 from phi /𝑆 implemented |, [-]
S_reactive()
Method to calculate and return the entropy of the phase on a reactive basis, using the Sfs values of the phase.
∑︁
𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝑆 + 𝑧𝑖 𝑆𝑓,𝑖
𝑖
Returns
S_reactive [float] Entropy of the phase on a reactive basis, [J/(mol*K)]
S_reactive_mass()
Method to calculate and return mass entropy on a reactive basis of the phase.
1000𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝑆𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
S_reactive_mass [float] Mass entropy on a reactive basis, [J/(kg*K)]
Samarium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Samarium, [atoms/s]
Samarium_atom_flow()
Method to calculate and return the mole flow that is Samarium, [mol/s]
Samarium_atom_fraction()
Method to calculate and return the mole fraction that is Samarium element, [-]
Samarium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Samarium element, [kg/s]
Samarium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Samarium element, [-]
Scandium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Scandium, [atoms/s]
Scandium_atom_flow()
Method to calculate and return the mole flow that is Scandium, [mol/s]
Scandium_atom_fraction()
Method to calculate and return the mole fraction that is Scandium element, [-]
Scandium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Scandium element, [kg/s]
Scandium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Scandium element, [-]
Seaborgium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Seaborgium, [atoms/s]
Seaborgium_atom_flow()
Method to calculate and return the mole flow that is Seaborgium, [mol/s]
Seaborgium_atom_fraction()
Method to calculate and return the mole fraction that is Seaborgium element, [-]
Seaborgium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Seaborgium element, [kg/s]
Seaborgium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Seaborgium element, [-]
Selenium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Selenium, [atoms/s]
Selenium_atom_flow()
Method to calculate and return the mole flow that is Selenium, [mol/s]
Selenium_atom_fraction()
Method to calculate and return the mole fraction that is Selenium element, [-]
Selenium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Selenium element, [kg/s]
Selenium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Selenium element, [-]
property Sfgs
Ideal gas standard molar entropies of formation for each component, [J/(mol*K)].
Returns
Sfgs [list[float]] Ideal gas standard molar entropies of formation for each component,
[J/(mol*K)].
property Sfgs_mass
Ideal gas standard entropies of formation for each component, [J/(kg*K)].
Returns
Sfgs_mass [list[float]] Ideal gas standard entropies of formation for each component,
[J/(kg*K)].
Silicon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Silicon, [atoms/s]
Silicon_atom_flow()
Method to calculate and return the mole flow that is Silicon, [mol/s]
Silicon_atom_fraction()
Method to calculate and return the mole fraction that is Silicon element, [-]
Silicon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Silicon element, [kg/s]
Silicon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Silicon element, [-]
Silver_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Silver, [atoms/s]
Silver_atom_flow()
Method to calculate and return the mole flow that is Silver, [mol/s]
Silver_atom_fraction()
Method to calculate and return the mole fraction that is Silver element, [-]
Silver_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Silver element, [kg/s]
Silver_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Silver element, [-]
property Skins
Whether each compound can be absorbed through the skin or not, [-].
Returns
Skins [list[bool]] Whether each compound can be absorbed through the skin or not, [-].
Sodium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Sodium, [atoms/s]
Sodium_atom_flow()
Method to calculate and return the mole flow that is Sodium, [mol/s]
Sodium_atom_fraction()
Method to calculate and return the mole fraction that is Sodium element, [-]
Sodium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Sodium element, [kg/s]
Sodium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Sodium element, [-]
property StielPolars
Stiel polar factors for each component, [-].
Returns
StielPolars [list[float]] Stiel polar factors for each component, [-].
property Stockmayers
Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over k) for each component,
[K].
Returns
Stockmayers [list[float]] Lennard-Jones Stockmayer parameters (depth of potential-energy
minimum over k) for each component, [K].
Strontium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Strontium, [atoms/s]
Strontium_atom_flow()
Method to calculate and return the mole flow that is Strontium, [mol/s]
Strontium_atom_fraction()
Method to calculate and return the mole fraction that is Strontium element, [-]
Strontium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Strontium element, [kg/s]
Strontium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Strontium element, [-]
Sulfur_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Sulfur, [atoms/s]
Sulfur_atom_flow()
Method to calculate and return the mole flow that is Sulfur, [mol/s]
Sulfur_atom_fraction()
Method to calculate and return the mole fraction that is Sulfur element, [-]
Sulfur_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Sulfur element, [kg/s]
Sulfur_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Sulfur element, [-]
property TWAs
Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Returns
TWAs [list[tuple[(float, str)]]] Time-weighted average exposure limits to chemicals (and
their units; ppm or mg/m^3), [various].
T_MAX_FIXED = 10000.0
T_MAX_FLASH = 10000.0
T_MIN_FIXED = 0.001
T_MIN_FLASH = 1e-300
T_REF_IG = 298.15
T_REF_IG_INV = 0.0033540164346805303
The numerical inverse of T_REF_IG, stored to save a division.
property T_calc
T_max_at_V(V )
Method to calculate the maximum temperature the phase can create at a constant volume, if one exists;
returns None otherwise.
Parameters
V [float] Constant molar volume, [m^3/mol]
Pmax [float] Maximum possible isochoric pressure, if already known [Pa]
Returns
T [float] Maximum possible temperature, [K]
Tantalum_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tantalum, [atoms/s]
Tantalum_atom_flow()
Method to calculate and return the mole flow that is Tantalum, [mol/s]
Tantalum_atom_fraction()
Method to calculate and return the mole fraction that is Tantalum element, [-]
Tantalum_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tantalum element, [kg/s]
Tantalum_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tantalum element, [-]
property Tautoignitions
Autoignition temperatures for each component, [K].
Returns
Tautoignitions [list[float]] Autoignition temperatures for each component, [K].
property Tbs
Boiling temperatures for each component, [K].
Returns
Tbs [list[float]] Boiling temperatures for each component, [K].
property Tcs
Critical temperatures for each component, [K].
Returns
Tcs [list[float]] Critical temperatures for each component, [K].
Technetium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Technetium, [atoms/s]
Technetium_atom_flow()
Method to calculate and return the mole flow that is Technetium, [mol/s]
Technetium_atom_fraction()
Method to calculate and return the mole fraction that is Technetium element, [-]
Technetium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Technetium element, [kg/s]
Technetium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Technetium element, [-]
Tellurium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tellurium, [atoms/s]
Tellurium_atom_flow()
Method to calculate and return the mole flow that is Tellurium, [mol/s]
Tellurium_atom_fraction()
Method to calculate and return the mole fraction that is Tellurium element, [-]
Tellurium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tellurium element, [kg/s]
Tellurium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tellurium element, [-]
Tennessine_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tennessine, [atoms/s]
Tennessine_atom_flow()
Method to calculate and return the mole flow that is Tennessine, [mol/s]
Tennessine_atom_fraction()
Method to calculate and return the mole fraction that is Tennessine element, [-]
Tennessine_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tennessine element, [kg/s]
Tennessine_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tennessine element, [-]
Terbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Terbium, [atoms/s]
Terbium_atom_flow()
Method to calculate and return the mole flow that is Terbium, [mol/s]
Terbium_atom_fraction()
Method to calculate and return the mole fraction that is Terbium element, [-]
Terbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Terbium element, [kg/s]
Terbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Terbium element, [-]
property Tflashs
Flash point temperatures for each component, [K].
Returns
Tflashs [list[float]] Flash point temperatures for each component, [K].
Thallium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thallium, [atoms/s]
Thallium_atom_flow()
Method to calculate and return the mole flow that is Thallium, [mol/s]
Thallium_atom_fraction()
Method to calculate and return the mole fraction that is Thallium element, [-]
Thallium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thallium element, [kg/s]
Thallium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thallium element, [-]
Thorium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thorium, [atoms/s]
Thorium_atom_flow()
Method to calculate and return the mole flow that is Thorium, [mol/s]
Thorium_atom_fraction()
Method to calculate and return the mole fraction that is Thorium element, [-]
Thorium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thorium element, [kg/s]
Thorium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thorium element, [-]
Thulium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Thulium, [atoms/s]
Thulium_atom_flow()
Method to calculate and return the mole flow that is Thulium, [mol/s]
Thulium_atom_fraction()
Method to calculate and return the mole fraction that is Thulium element, [-]
Thulium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Thulium element, [kg/s]
Thulium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Thulium element, [-]
Tin_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tin, [atoms/s]
Tin_atom_flow()
Method to calculate and return the mole flow that is Tin, [mol/s]
Tin_atom_fraction()
Method to calculate and return the mole fraction that is Tin element, [-]
Tin_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tin element, [kg/s]
Tin_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tin element, [-]
Titanium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Titanium, [atoms/s]
Titanium_atom_flow()
Method to calculate and return the mole flow that is Titanium, [mol/s]
Titanium_atom_fraction()
Method to calculate and return the mole fraction that is Titanium element, [-]
Titanium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Titanium element, [kg/s]
Titanium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Titanium element, [-]
Tmc()
Method to calculate and return the mechanical critical temperature of the phase.
Returns
Tmc [float] Mechanical critical temperature, [K]
property Tms
Melting temperatures for each component, [K].
Returns
Tms [list[float]] Melting temperatures for each component, [K].
property Tts
Triple point temperatures for each component, [K].
Returns
Tts [list[float]] Triple point temperatures for each component, [K].
Tungsten_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Tungsten, [atoms/s]
Tungsten_atom_flow()
Method to calculate and return the mole flow that is Tungsten, [mol/s]
Tungsten_atom_fraction()
Method to calculate and return the mole fraction that is Tungsten element, [-]
Tungsten_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Tungsten element, [kg/s]
Tungsten_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Tungsten element, [-]
U()
Method to calculate and return the internal energy of the phase.
𝑈 = 𝐻 − 𝑃𝑉
Returns
U [float] Internal energy, [J/mol]
property UFLs
Upper flammability limits for each component, [-].
Returns
UFLs [list[float]] Upper flammability limits for each component, [-].
property UNIFAC_Dortmund_groups
UNIFAC_Dortmund_group: count groups for each component, [-].
Returns
UNIFAC_Dortmund_groups [list[dict]] UNIFAC_Dortmund_group: count groups for
each component, [-].
property UNIFAC_Qs
UNIFAC Q parameters for each component, [-].
Returns
UNIFAC_Qs [list[float]] UNIFAC Q parameters for each component, [-].
property UNIFAC_Rs
UNIFAC R parameters for each component, [-].
Returns
UNIFAC_Rs [list[float]] UNIFAC R parameters for each component, [-].
property UNIFAC_groups
UNIFAC_group: count groups for each component, [-].
Returns
UNIFAC_groups [list[dict]] UNIFAC_group: count groups for each component, [-].
U_dep()
Method to calculate and return the departure internal energy of the phase.
Returns
U_dep [float] Departure internal energy, [J/mol]
U_dep_flow()
Method to return the flow rate of the difference between the ideal-gas internal energy of this phase and the
actual internal energy of the phase This method is only available when the phase is linked to an Equilibri-
umStream.
Returns
U_dep_flow [float] Flow rate of departure internal energy, [J/s]
U_dep_mass()
Method to calculate and return the departure mass internal energy of the phase.
Returns
U_dep_mass [float] Departure mass internal energy, [J/kg]
U_flow()
Method to return the flow rate of internal energy of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
U_flow [float] Flow rate of internal energy, [J/s]
U_formation_ideal_gas()
Method to calculate and return the ideal-gas internal energy of formation of the phase (as if the phase was
an ideal gas).
Returns
U_formation_ideal_gas [float] Internal energy of formation of the phase on a formation
basis as an ideal gas, [J/(mol)]
U_formation_ideal_gas_mass()
Method to calculate and return the ideal-gas formation mass internal energy of the phase.
Returns
U_formation_ideal_gas_mass [float] Formation mass internal energy, [J/kg]
U_ideal_gas()
Method to calculate and return the ideal-gas internal energy of the phase.
𝑈 𝑖𝑔 = 𝐻 𝑖𝑔 − 𝑃 𝑉 𝑖𝑔
Returns
U_ideal_gas [float] Ideal gas internal energy, [J/(mol)]
U_ideal_gas_mass()
Method to calculate and return the mass ideal-gas internal energy of the phase.
Returns
U_ideal_gas_mass [float] Ideal gas mass internal energy, [J/(kg)]
U_mass()
Method to calculate and return mass internal energy of the phase.
1000𝑈𝑚𝑜𝑙𝑎𝑟
𝑈𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 = 𝐻𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 − 𝑃 𝑉
Returns
U_reactive [float] Internal energy of the phase on a reactive basis, [J/(mol)]
U_reactive_mass()
Method to calculate and return mass internal energy on a reactive basis of the phase.
1000𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑜𝑙𝑎𝑟
𝑈𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒,𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
U_reactive_mass [float] Mass internal energy on a reactive basis, [J/kg]
Uranium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Uranium, [atoms/s]
Uranium_atom_flow()
Method to calculate and return the mole flow that is Uranium, [mol/s]
Uranium_atom_fraction()
Method to calculate and return the mole fraction that is Uranium element, [-]
Uranium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Uranium element, [kg/s]
Uranium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Uranium element, [-]
V()
Method to return the molar volume of the phase.
Returns
V [float] Molar volume, [m^3/mol]
property VF
Method to return the vapor fraction of the phase. If no vapor/gas is present, 0 is always returned. This
method is only available when the phase is linked to an EquilibriumState.
Returns
VF [float] Vapor fraction, [-]
property VF_calc
V_MAX_FIXED = 1000000000.0
V_MIN_FIXED = 1e-09
V_dep()
Method to calculate and return the departure (from ideal gas behavior) molar volume of the phase.
𝑅𝑇
𝑉𝑑𝑒𝑝 = 𝑉 −
𝑃
Returns
V_dep [float] Departure molar volume, [m^3/mol]
V_from_phi()
Method to calculate and return the molar volume of the fluid as calculated from the pressure derivatives of
fugacity coefficients.
(︃(︃ )︃ )︃
∑︁ 𝜕 ln 𝜑𝑖
from phi P der
𝑉 = 𝑧𝑖 𝑃 + 1 𝑅𝑇 /𝑃
𝑖
𝜕𝑃
Returns
V [float] Molar volume, [m^3/mol]
V_gas()
Method to calculate and return the ideal-gas molar volume of the phase at the chosen reference temperature
and pressure, according to the temperature variable T_gas_ref and pressure variable P_gas_ref of the
thermo.bulk.BulkSettings.
𝑅𝑇𝑟𝑒𝑓
𝑉 𝑖𝑔 =
𝑃𝑟𝑒𝑓
Returns
V_gas [float] Ideal gas molar volume at the reference temperature and pressure, [m^3/mol]
V_gas_normal()
Method to calculate and return the ideal-gas molar volume of the phase at the normal temperature and
pressure, according to the temperature variable T_normal and pressure variable P_normal of the thermo.
bulk.BulkSettings.
𝑅𝑇𝑛𝑜𝑟𝑚
𝑉 𝑖𝑔 =
𝑃𝑛𝑜𝑟𝑚
Returns
V_gas_normal [float] Ideal gas molar volume at normal temperature and pressure,
[m^3/mol]
V_gas_standard()
Method to calculate and return the ideal-gas molar volume of the phase at the standard temperature and pres-
sure, according to the temperature variable T_standard and pressure variable P_standard of the thermo.
bulk.BulkSettings.
𝑅𝑇𝑠𝑡𝑑
𝑉 𝑖𝑔 =
𝑃𝑠𝑡𝑑
Returns
V_gas_standard [float] Ideal gas molar volume at standard temperature and pressure,
[m^3/mol]
V_ideal_gas()
Method to calculate and return the ideal-gas molar volume of the phase.
𝑅𝑇
𝑉 𝑖𝑔 =
𝑃
Returns
V [float] Ideal gas molar volume, [m^3/mol]
V_iter(force=False)
Method to calculate and return the volume of the phase in a way suitable for a TV resolution to converge
on the same pressure. This often means the return value of this method is an mpmath mpf. This dummy
method simply returns the implemented V method.
Returns
V [float or mpf] Molar volume, [m^3/mol]
V_liquid_ref()
Method to calculate and return the liquid reference molar volume according to the temperature variable
T_liquid_volume_ref of thermo.bulk.BulkSettings and the composition of the phase.
∑︁
𝑉 = 𝑧𝑖 𝑉𝑖
𝑖
Returns
V_liquid_ref [float] Liquid molar volume at the reference condition, [m^3/mol]
V_mass()
Method to calculate and return the specific volume of the phase.
1000 · 𝑉 𝑀
𝑉𝑚𝑎𝑠𝑠 =
𝑀𝑊
Returns
V_mass [float] Specific volume of the phase, [m^3/kg]
V_phi_consistency()
Method to calculate and return a consistency check between molar volume, and the fugacity coefficients’
pressures derivatives.
(︃(︃ )︃ )︃
∑︁ 𝜕 ln 𝜑𝑖
from phi P der
𝑉 = 𝑧𝑖 𝑃 + 1 𝑅𝑇 /𝑃
𝑖
𝜕𝑃
Returns
error [float] Relative consistency error |1 − 𝑉 from phi P der /𝑉 implemented |, [-]
property Van_der_Waals_areas
Unnormalized Van der Waals areas for each component, [m^2/mol].
Returns
Van_der_Waals_areas [list[float]] Unnormalized Van der Waals areas for each component,
[m^2/mol].
property Van_der_Waals_volumes
Unnormalized Van der Waals volumes for each component, [m^3/mol].
Returns
Van_der_Waals_volumes [list[float]] Unnormalized Van der Waals volumes for each com-
ponent, [m^3/mol].
Vanadium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Vanadium, [atoms/s]
Vanadium_atom_flow()
Method to calculate and return the mole flow that is Vanadium, [mol/s]
Vanadium_atom_fraction()
Method to calculate and return the mole fraction that is Vanadium element, [-]
Vanadium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Vanadium element, [kg/s]
Vanadium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Vanadium element, [-]
property Vcs
Critical molar volumes for each component, [m^3/mol].
Returns
Vcs [list[float]] Critical molar volumes for each component, [m^3/mol].
Vfgs()
Method to calculate and return the ideal-gas volume fractions of the components of the phase. This is the
same as the mole fractions.
Returns
Vfgs [list[float]] Ideal-gas volume fractions of the components of the phase, [-]
property Vfgs_calc
Vfls()
Method to calculate and return the ideal-liquid volume fractions of the components of the phase, us-
ing the standard liquid densities at the temperature variable T_liquid_volume_ref of thermo.bulk.
BulkSettings and the composition of the phase.
Returns
Vfls [list[float]] Ideal-liquid volume fractions of the components of the phase, [-]
property Vfls_calc
Vls()
Method to calculate and return the pure-component liquid temperature-dependent molar volume of each
species from the thermo.volume.VolumeLiquid objects.
These values are normally along the saturation line.
Returns
Vls [list[float]] Pure component temperature dependent liquid molar volume, [m^3/mol]
Vmc()
Method to calculate and return the mechanical critical volume of the phase.
Returns
Vmc [float] Mechanical critical volume, [m^3/mol]
property Vmg_STPs
Gas molar volumes for each component at STP; metastable if normally another state, [m^3/mol].
Returns
Vmg_STPs [list[float]] Gas molar volumes for each component at STP; metastable if nor-
mally another state, [m^3/mol].
property Vml_60Fs
Liquid molar volumes for each component at 60 °F, [m^3/mol].
Returns
Vml_60Fs [list[float]] Liquid molar volumes for each component at 60 °F, [m^3/mol].
property Vml_STPs
Liquid molar volumes for each component at STP, [m^3/mol].
Returns
Vml_STPs [list[float]] Liquid molar volumes for each component at STP, [m^3/mol].
property Vml_Tms
Liquid molar volumes for each component at their respective melting points, [m^3/mol].
Returns
Vml_Tms [list[float]] Liquid molar volumes for each component at their respective melting
points, [m^3/mol].
property Vms_Tms
Solid molar volumes for each component at their respective melting points, [m^3/mol].
Returns
Vms_Tms [list[float]] Solid molar volumes for each component at their respective melting
points, [m^3/mol].
Vss()
Method to calculate and return the pure-component solid temperature-dependent molar volume of each
species from the thermo.volume.VolumeSolid objects.
Returns
Vss [list[float]] Pure component temperature dependent solid molar volume, [m^3/mol]
Wobbe_index()
Method to calculate and return the molar Wobbe index of the object, [J/mol].
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index [float] Molar Wobbe index, [J/(mol)]
Wobbe_index_lower()
Method to calculate and return the molar lower Wobbe index of the object, [J/mol].
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower [float] Molar lower Wobbe index, [J/(mol)]
Wobbe_index_lower_mass()
Method to calculate and return the lower mass Wobbe index of the object, [J/kg].
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_mass [float] Mass lower Wobbe index, [J/(kg)]
Wobbe_index_lower_normal()
Method to calculate and return the volumetric normal lower Wobbe index of the object, [J/m^3]. The
normal gas volume is used in this calculation.
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_normal [float] Volumetric normal lower Wobbe index, [J/(m^3)]
Wobbe_index_lower_standard()
Method to calculate and return the volumetric standard lower Wobbe index of the object, [J/m^3]. The
standard gas volume is used in this calculation.
𝐻 𝑙𝑜𝑤𝑒𝑟
𝐼𝑊 = √𝑐𝑜𝑚𝑏
SG
Returns
Wobbe_index_lower_standard [float] Volumetric standard lower Wobbe index, [J/(m^3)]
Wobbe_index_mass()
Method to calculate and return the mass Wobbe index of the object, [J/kg].
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index_mass [float] Mass Wobbe index, [J/(kg)]
Wobbe_index_normal()
Method to calculate and return the volumetric normal Wobbe index of the object, [J/m^3]. The normal gas
volume is used in this calculation.
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index [float] Volumetric normal Wobbe index, [J/(m^3)]
Wobbe_index_standard()
Method to calculate and return the volumetric standard Wobbe index of the object, [J/m^3]. The standard
gas volume is used in this calculation.
ℎ𝑖𝑔ℎ𝑒𝑟
𝐻𝑐𝑜𝑚𝑏
𝐼𝑊 = √
SG
Returns
Wobbe_index_standard [float] Volumetric standard Wobbe index, [J/(m^3)]
Xenon_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Xenon, [atoms/s]
Xenon_atom_flow()
Method to calculate and return the mole flow that is Xenon, [mol/s]
Xenon_atom_fraction()
Method to calculate and return the mole fraction that is Xenon element, [-]
Xenon_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Xenon element, [kg/s]
Xenon_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Xenon element, [-]
Ytterbium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Ytterbium, [atoms/s]
Ytterbium_atom_flow()
Method to calculate and return the mole flow that is Ytterbium, [mol/s]
Ytterbium_atom_fraction()
Method to calculate and return the mole fraction that is Ytterbium element, [-]
Ytterbium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Ytterbium element, [kg/s]
Ytterbium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Ytterbium element, [-]
Yttrium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Yttrium, [atoms/s]
Yttrium_atom_flow()
Method to calculate and return the mole flow that is Yttrium, [mol/s]
Yttrium_atom_fraction()
Method to calculate and return the mole fraction that is Yttrium element, [-]
Yttrium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Yttrium element, [kg/s]
Yttrium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Yttrium element, [-]
Z()
Method to calculate and return the compressibility factor of the phase.
𝑃𝑉
𝑍=
𝑅𝑇
Returns
Z [float] Compressibility factor, [-]
property Zcs
Critical compressibilities for each component, [-].
Returns
Zcs [list[float]] Critical compressibilities for each component, [-].
Zinc_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Zinc, [atoms/s]
Zinc_atom_flow()
Method to calculate and return the mole flow that is Zinc, [mol/s]
Zinc_atom_fraction()
Method to calculate and return the mole fraction that is Zinc element, [-]
Zinc_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Zinc element, [kg/s]
Zinc_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Zinc element, [-]
Zirconium_atom_count_flow()
Method to calculate and return the number of atoms in the flow which are Zirconium, [atoms/s]
Zirconium_atom_flow()
Method to calculate and return the mole flow that is Zirconium, [mol/s]
Zirconium_atom_fraction()
Method to calculate and return the mole fraction that is Zirconium element, [-]
Zirconium_atom_mass_flow()
Method to calculate and return the mass flow of atoms that are Zirconium element, [kg/s]
Zirconium_atom_mass_fraction()
Method to calculate and return the mass fraction of the phase that is Zirconium element, [-]
Zmc()
Method to calculate and return the mechanical critical compressibility of the phase.
Returns
Zmc [float] Mechanical critical compressibility, [-]
__eq__(other)
Return self==value.
__hash__()
Method to calculate and return a hash representing the exact state of the object.
Returns
hash [int] Hash of the object, [-]
activities()
Method to calculate and return the activities of each component in the phase [-].
𝑓𝑖 (𝑇, 𝑃, 𝑥)
𝑎𝑖 (𝑇, 𝑃, 𝑥; 𝑓𝑖0 ) =
𝑓𝑖0 (𝑇, 𝑃𝑖0 )
Returns
activities [list[float]] Activities, [-]
property aliases
Aliases for each component, [-].
Returns
aliases [list[str]] Aliases for each component, [-].
alpha()
Method to calculate and return the thermal diffusivity of the phase.
𝑘
𝛼=
𝜌𝐶𝑝
Returns
alpha [float] Thermal diffusivity, [m^2/s]
ammonia_molar_weight()
Method to calculate and return the effective quantiy of ammonia in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the ammonia component.
ammonia_partial_pressure()
Method to calculate and return the ideal partial pressure of ammonia, [Pa]
argon_molar_weight()
Method to calculate and return the effective quantiy of argon in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the argon component.
argon_partial_pressure()
Method to calculate and return the ideal partial pressure of argon, [Pa]
as_EquilibriumState(flasher=None)
as_EquilibriumStream(flasher=None, n=None)
as_json()
Method to create a JSON-friendly serialization of the phase which can be stored, and reloaded later.
Returns
json_repr [dict] JSON-friendly representation, [-]
Examples
atom_content()
Method to calculate and return the number of moles of each atom in the phase per mole of the phase; returns
a dictionary of atom counts, containing only those elements who are present.
Returns
atom_content [dict[str: float]] Atom counts, [-]
atom_count_flows()
Method to calculate and return the atom count flow rates of the phase; returns a dictionary of atom count
flows, containing only those elements who are present.
Returns
atom_count_flows [dict[str: float]] Atom flows, [atoms/s]
atom_flows()
Method to calculate and return the atomic flow rates of the phase; returns a dictionary of atom flows,
containing only those elements who are present.
Returns
atom_flows [dict[str: float]] Atom flows, [mol/s]
atom_fractions()
Method to calculate and return the atomic composition of the phase; returns a dictionary of atom fraction
(by count), containing only those elements who are present.
Returns
atom_fractions [dict[str: float]] Atom fractions, [-]
atom_mass_flows()
Method to calculate and return the atomic mass flow rates of the phase; returns a dictionary of atom mass
flows, containing only those elements who are present.
Returns
𝜕𝐺
𝜕𝑛𝑖 𝑇,𝑃,𝑁𝑗̸=𝑖
Returns
chemical_potential [list[float]] Chemical potentials, [J/mol]
composition_independent = False
concentrations()
Method to return the molar concentrations of each component in the phase in units of mol/m^3. Molarity
is a term used in chemistry for a similar concept, usually given in units of mol/L.
Returns
concentrations [list[float]] Molar concentrations of all the components in the phase,
[mol/m^3]
concentrations_mass()
Method to return the mass concentrations of each component in the phase in units of kg/m^3.
Returns
concentrations_mass [list[float]] Mass concentrations of all the components in the phase,
[kg/m^3]
property conductivities
Electrical conductivities for each component, [S/m].
Returns
conductivities [list[float]] Electrical conductivities for each component, [S/m].
property conductivity_Ts
Temperatures at which the electrical conductivities for each component were measured, [K].
Returns
conductivity_Ts [list[float]] Temperatures at which the electrical conductivities for each
component were measured, [K].
constants
correlations
d2P_dT2()
Method to calculate and return the second temperature derivative of pressure of the phase.
Returns
d2P_dT2 [float] Second temperature derivative of pressure, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the phase.
Returns
d2P_dTdV [float] Second volume derivative of pressure, [mol*Pa^2/(J*K)]
d2P_dTdrho()
Method to calculate and return the temperature derivative and then molar density derivative of the pressure
of the phase.
𝜕2𝑃
(︂ 2 )︂
2 𝜕 𝑃
= −𝑉
𝜕𝑇 𝜕𝜌 𝜕𝑇 𝜕𝑉
Returns
d2P_dTdrho [float] Temperature derivative and then molar density derivative of the pres-
sure, [Pa*m^3/(K*mol)]
d2P_dV2()
Method to calculate and return the second volume derivative of pressure of the phase.
Returns
d2P_dV2 [float] Second volume derivative of pressure, [Pa*mol^2/m^6]
d2P_dVdT()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the phase. This is an alias of d2P_dTdV.
𝜕2𝑃
𝜕𝑉 𝜕𝑇
Returns
d2P_dVdT [float] Second volume derivative of pressure, [mol*Pa^2/(J*K)]
d2P_drho2()
Method to calculate and return the second molar density derivative of pressure of the phase.
𝜕2𝑃
(︂ (︂ 2 )︂ (︂ )︂ )︂
2 2 𝜕 𝑃 𝜕𝑃
= −𝑉 −𝑉 − 2𝑉
𝜕𝜌2 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
Returns
d2P_drho2 [float] Second molar density derivative of pressure, [Pa*m^6/mol^2]
d2T_dP2()
Method to calculate and return the constant-volume second pressure derivative of temperature of the phase.
)︂3
𝜕2𝑇 𝜕2𝑃
(︂ )︂ (︂ )︂ (︂
𝜕𝑇
=−
𝜕𝑃 2 𝑉 𝜕𝑇 2 𝑉 𝜕𝑃 𝑉
Returns
d2T_dP2 [float] Constant-volume second pressure derivative of temperature, [K/Pa^2]
d2T_dP2_V()
Method to calculate and return the constant-volume second pressure derivative of temperature of the phase.
)︂3
𝜕2𝑇 𝜕2𝑃
(︂ )︂ (︂ )︂ (︂
𝜕𝑇
=−
𝜕𝑃 2 𝑉 𝜕𝑇 2 𝑉 𝜕𝑃 𝑉
Returns
d2T_dP2 [float] Constant-volume second pressure derivative of temperature, [K/Pa^2]
d2T_dPdV()
Method to calculate and return the derivative of pressure and then the derivative of volume of temperature
of the phase.
)︂−3
𝜕2𝑇 𝜕2𝑃 𝜕2𝑃
(︂ )︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂ ]︂ (︂
𝜕𝑃 𝜕𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
Returns
d2T_dPdV [float] Derivative of pressure and then the derivative of volume of temperature,
[K*mol/(Pa*m^3)]
d2T_dPdrho()
Method to calculate and return the pressure derivative and then molar density derivative of the temperature
of the phase.
𝜕2𝑇
(︂ 2 )︂
2 𝜕 𝑇
= −𝑉
𝜕𝑃 𝜕𝜌 𝜕𝑃 𝜕𝑉
Returns
d2T_dPdrho [float] Pressure derivative and then molar density derivative of the temperature,
[K*m^3/(Pa*mol)]
d2T_dV2()
Method to calculate and return the constant-pressure second volume derivative of temperature of the phase.
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
= − − + −
𝜕𝑉 2 𝑃 𝜕𝑉 2 𝑇 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉
Returns
d2T_dV2 [float] Constant-pressure second volume derivative of temperature,
[K*mol^2/m^6]
d2T_dV2_P()
Method to calculate and return the constant-pressure second volume derivative of temperature of the phase.
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂]︂ (︂ )︂−2 [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃
2
= − 2
− + −
𝜕𝑉 𝑃 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉
Returns
d2T_dV2 [float] Constant-pressure second volume derivative of temperature,
[K*mol^2/m^6]
d2T_dVdP()
Method to calculate and return the derivative of pressure and then the derivative of volume of temperature
of the phase.
(︂ 2 )︂ [︂(︂ 2 )︂ (︂ )︂ (︂ )︂ (︂ 2 )︂ ]︂ (︂ )︂−3
𝜕 𝑇 𝜕 𝑃 𝜕𝑃 𝜕𝑃 𝜕 𝑃 𝜕𝑃
=− −
𝜕𝑃 𝜕𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑇 𝑉 𝜕𝑉 𝑇 𝜕𝑇 2 𝑉 𝜕𝑇 𝑉
Returns
d2T_dPdV [float] Derivative of pressure and then the derivative of volume of temperature,
[K*mol/(Pa*m^3)]
d2T_drho2()
Method to calculate and return the second molar density derivative of temperature of the phase.
𝜕2𝑇
(︂ (︂ 2 )︂ (︂ )︂ )︂
2 2 𝜕 𝑇 𝜕𝑇
= −𝑉 −𝑉 − 2𝑉
𝜕𝜌2 𝜕𝑉 2 𝑃 𝜕𝑉 𝑃
Returns
d2T_drho2 [float] Second molar density derivative of temperature, [K*m^6/mol^2]
d2V_dP2()
Method to calculate and return the constant-temperature pressure derivative of volume of the phase.
(︁ 2 )︁
(︂ 2 )︂ 𝜕 𝑃
𝜕 𝑉 𝜕𝑉 2
𝑇
= − (︀ 𝜕𝑃 )︀3
𝜕𝑃 2 𝑇
𝜕𝑉 𝑇
Returns
d2V_dP2 [float] Constant-temperature pressure derivative of volume, [m^3/(mol*Pa^2)]
d2V_dP2_T()
Method to calculate and return the constant-temperature pressure derivative of volume of the phase.
(︁ 2 )︁
(︂ 2 )︂ 𝜕 𝑃
𝜕 𝑉 𝜕𝑉 2
= − (︀ )︀3𝑇
𝜕𝑃 2 𝑇 𝜕𝑃
𝜕𝑉 𝑇
Returns
d2V_dP2 [float] Constant-temperature pressure derivative of volume, [m^3/(mol*Pa^2)]
d2V_dPdT()
Method to calculate and return the derivative of pressure and then the derivative of temperature of volume
of the phase.
)︂−3
𝜕2𝑉 𝜕2𝑃 𝜕2𝑃
(︂ )︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂ ]︂ (︂
𝜕𝑃 𝜕𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
Returns
d2V_dPdT [float] Derivative of pressure and then the derivative of temperature of volume,
[m^3/(mol*K*Pa)]
d2V_dT2()
Method to calculate and return the constant-pressure second temperature derivative of volume of the phase.
)︂−2
𝜕2𝑉 𝜕2𝑃 𝜕2𝑃 𝜕2𝑃 𝜕2𝑃
(︂ )︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂]︂ (︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂ ]︂
𝜕𝑃 𝜕𝑃 𝜕𝑃 𝜕𝑃 𝜕𝑃
=− − + −
𝜕𝑇 2 𝑃 𝜕𝑇 2 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇
Returns
d2V_dT2 [float] Constant-pressure second temperature derivative of volume,
[m^3/(mol*K^2)]
d2V_dT2_P()
Method to calculate and return the constant-pressure second temperature derivative of volume of the phase.
)︂−2
𝜕2𝑉 𝜕2𝑃 𝜕2𝑃 𝜕2𝑃 𝜕2𝑃
(︂ )︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂]︂ (︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂ ]︂
𝜕𝑃 𝜕𝑃 𝜕𝑃 𝜕𝑃 𝜕𝑃
=− − + −
𝜕𝑇 2 𝑃 𝜕𝑇 2 𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇
Returns
d2V_dT2 [float] Constant-pressure second temperature derivative of volume,
[m^3/(mol*K^2)]
d2V_dTdP()
Method to calculate and return the derivative of pressure and then the derivative of temperature of volume
of the phase.
)︂−3
𝜕2𝑉 𝜕2𝑃 𝜕2𝑃
(︂ )︂ [︂(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂ ]︂ (︂
𝜕𝑃 𝜕𝑃 𝜕𝑃
=− −
𝜕𝑇 𝜕𝑃 𝜕𝑇 𝜕𝑉 𝜕𝑉 𝑇 𝜕𝑇 𝑉 𝜕𝑉 2 𝑇 𝜕𝑉 𝑇
Returns
d2V_dPdT [float] Derivative of pressure and then the derivative of temperature of volume,
[m^3/(mol*K*Pa)]
d2rho_dP2()
Method to calculate and return the second pressure derivative of molar density of the phase.
)︂2
𝜕2𝜌 𝜕2𝑉
(︂ )︂ (︂
1 2 𝜕𝑉
=− 2 +
𝜕𝑃 2 𝑉 𝜕𝑃 2 𝑇 𝑉3 𝜕𝑃 𝑇
Returns
d2rho_dP2 [float] Second pressure derivative of molar density, [mol^2/(Pa*m^6)]
d2rho_dPdT()
Method to calculate and return the pressure derivative and then temperature derivative of the molar density
of the phase.
𝜕2𝜌
(︂ 2 )︂ (︂ )︂ (︂ )︂
1 𝜕 𝑉 2 𝜕𝑉 𝜕𝑉
=− 2 + 3
𝜕𝑃 𝜕𝑇 𝑉 𝜕𝑃 𝜕𝑇 𝑉 𝜕𝑇 𝑃 𝜕𝑃 𝑇
Returns
d2rho_dPdT [float] Pressure derivative and then temperature derivative of the molar density,
[mol/(m^3*K*Pa)]
d2rho_dT2()
Method to calculate and return the second temperature derivative of molar density of the phase.
)︂2
𝜕2𝜌 𝜕2𝑉
(︂ )︂ (︂
1 2 𝜕𝑉
=− 2 + 3
𝜕𝑇 2 𝑉 𝜕𝑇 2 𝑃 𝑉 𝜕𝑇 𝑇
Returns
d2rho_dT2 [float] Second temperature derivative of molar density, [mol^2/(K*m^6)]
dA_dP()
Method to calculate and return the constant-temperature pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dA_dP [float] Constant-temperature pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dP_T()
Method to calculate and return the constant-temperature pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dA_dP [float] Constant-temperature pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dP_V()
Method to calculate and return the constant-volume pressure derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐻 𝜕𝑇 𝜕𝑆
= −𝑉 −𝑆 −𝑇
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dA_dP_V [float] Constant-volume pressure derivative of Helmholtz energy, [J/(mol*Pa)]
dA_dT()
Method to calculate and return the constant-pressure temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dA_dT [float] Constant-pressure temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dT_P()
Method to calculate and return the constant-pressure temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝑆 𝜕𝑈
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dA_dT [float] Constant-pressure temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dT_V()
Method to calculate and return the constant-volume temperature derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐻 𝜕𝑃 𝜕𝑆
= −𝑉 −𝑇 −𝑆
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dA_dT_V [float] Constant-volume temperature derivative of Helmholtz energy, [J/(mol*K)]
dA_dV_P()
Method to calculate and return the constant-pressure volume derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐴 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dA_dV_P [float] Constant-pressure volume derivative of Helmholtz energy, [J/(m^3)]
dA_dV_T()
Method to calculate and return the constant-temperature volume derivative of Helmholtz energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐴 𝜕𝐴 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dA_dV_T [float] Constant-temperature volume derivative of Helmholtz energy, [J/(m^3)]
dA_mass_dP(prop='dA_dP')
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑇
Returns
dA_mass_dP [float] The pressure derivative of mass Helmholtz energy of the phase at con-
stant temperature, [J/mol/Pa]
dA_mass_dP_T(prop='dA_dP_T')
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑇
Returns
dA_mass_dP_T [float] The pressure derivative of mass Helmholtz energy of the phase at
constant temperature, [J/mol/Pa]
dA_mass_dP_V(prop='dA_dP_V')
Method to calculate and return the pressure derivative of mass Helmholtz energy of the phase at constant
volume.
(︂ )︂
𝜕𝐴mass
𝜕𝑃 𝑉
Returns
dA_mass_dP_V [float] The pressure derivative of mass Helmholtz energy of the phase at
constant volume, [J/mol/Pa]
dA_mass_dT(prop='dA_dT')
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑃
Returns
dA_mass_dT [float] The temperature derivative of mass Helmholtz energy of the phase at
constant pressure, [J/mol/K]
dA_mass_dT_P(prop='dA_dT_P')
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑃
Returns
dA_mass_dT_P [float] The temperature derivative of mass Helmholtz energy of the phase
at constant pressure, [J/mol/K]
dA_mass_dT_V(prop='dA_dT_V')
Method to calculate and return the temperature derivative of mass Helmholtz energy of the phase at constant
volume.
(︂ )︂
𝜕𝐴mass
𝜕𝑇 𝑉
Returns
dA_mass_dT_V [float] The temperature derivative of mass Helmholtz energy of the phase
at constant volume, [J/mol/K]
dA_mass_dV_P(prop='dA_dV_P')
Method to calculate and return the volume derivative of mass Helmholtz energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐴mass
𝜕𝑉 𝑃
Returns
dA_mass_dV_P [float] The volume derivative of mass Helmholtz energy of the phase at
constant pressure, [J/mol/m^3/mol]
dA_mass_dV_T(prop='dA_dV_T')
Method to calculate and return the volume derivative of mass Helmholtz energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐴mass
𝜕𝑉 𝑇
Returns
dA_mass_dV_T [float] The volume derivative of mass Helmholtz energy of the phase at
constant temperature, [J/mol/m^3/mol]
dCpigs_dT_pure()
Method to calculate and return the first temperature derivative of ideal-gas heat capacities of every compo-
nent in the phase. This method is powered by the HeatCapacityGases objects, except when all components
have the same heat capacity form and a fast implementation has been written for it (currently only polyno-
mials).
𝜕𝐶𝑝𝑖𝑔
𝜕𝑇
Returns
dCp_ig_dT [list[float]] First temperature derivatives of molar ideal gas heat capacities,
[J/(mol*K^2)]
dCv_dP_T()
Method to calculate the pressure derivative of Cv, constant volume heat capacity, at constant temperature.
(︂ )︂
𝜕𝐶𝑣 𝑑 𝑑 𝑑
= −𝑇 dPdTV (𝑃 ) dVdTP (𝑃 ) − 𝑇 dVdTP (𝑃 ) dPdTV (𝑃 ) + Cp (𝑃 )
𝜕𝑃 𝑇 𝑑𝑃 𝑑𝑃 𝑑𝑃
Returns
dCv_dP_T [float] Pressure derivative of constant volume heat capacity at constant temper-
ature, [J/mol/K/Pa]
Notes
𝑇 dPdTV 2 (𝑇 ) 𝑑𝑇
𝑑 𝑑
dPdTV (𝑇 ) dPdTV 2 (𝑇 )
(︂ )︂
𝜕𝐶𝑣 dPdVT (𝑇 ) 2𝑇 dPdTV (𝑇 ) 𝑑𝑇 𝑑
=− + + + Cp (𝑇 )
𝜕𝑇 𝑃 dPdVT 2 (𝑇 ) dPdVT (𝑇 ) dPdVT (𝑇 ) 𝑑𝑇
Returns
dCv_dT_P [float] Temperature derivative of constant volume heat capacity at constant pres-
sure, [J/mol/K^2]
Notes
(︂ )︂
𝜕𝐶𝑣mass
𝜕𝑃 𝑇
Returns
dCv_mass_dP_T [float] The pressure derivative of mass Constant-volume heat capacity of
the phase at constant temperature, [J/(mol*K)/Pa]
dCv_mass_dT_P(prop='dCv_dT_P')
Method to calculate and return the temperature derivative of mass Constant-volume heat capacity of the
phase at constant pressure.
(︂ )︂
𝜕𝐶𝑣mass
𝜕𝑇 𝑃
Returns
dCv_mass_dT_P [float] The temperature derivative of mass Constant-volume heat capacity
of the phase at constant pressure, [J/(mol*K)/K]
dG_dP()
Method to calculate and return the constant-temperature pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dG_dP [float] Constant-temperature pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dP_T()
Method to calculate and return the constant-temperature pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dG_dP [float] Constant-temperature pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dP_V()
Method to calculate and return the constant-volume pressure derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝑇 𝜕𝐻
= −𝑇 −𝑆 +
𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dG_dP_V [float] Constant-volume pressure derivative of Gibbs free energy, [J/(mol*Pa)]
dG_dT()
Method to calculate and return the constant-pressure temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dG_dT [float] Constant-pressure temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dT_P()
Method to calculate and return the constant-pressure temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dG_dT [float] Constant-pressure temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dT_V()
Method to calculate and return the constant-volume temperature derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝑆 𝜕𝐻
= −𝑇 −𝑆+
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dG_dT_V [float] Constant-volume temperature derivative of Gibbs free energy, [J/(mol*K)]
dG_dV_P()
Method to calculate and return the constant-pressure volume derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝐺 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dG_dV_P [float] Constant-pressure volume derivative of Gibbs free energy, [J/(m^3)]
dG_dV_T()
Method to calculate and return the constant-temperature volume derivative of Gibbs free energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝐺 𝜕𝐺 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dG_dV_T [float] Constant-temperature volume derivative of Gibbs free energy, [J/(m^3)]
dG_mass_dP(prop='dG_dP')
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑇
Returns
dG_mass_dP [float] The pressure derivative of mass Gibbs free energy of the phase at con-
stant temperature, [J/mol/Pa]
dG_mass_dP_T(prop='dG_dP_T')
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑇
Returns
dG_mass_dP_T [float] The pressure derivative of mass Gibbs free energy of the phase at
constant temperature, [J/mol/Pa]
dG_mass_dP_V(prop='dG_dP_V')
Method to calculate and return the pressure derivative of mass Gibbs free energy of the phase at constant
volume.
(︂ )︂
𝜕𝐺mass
𝜕𝑃 𝑉
Returns
dG_mass_dP_V [float] The pressure derivative of mass Gibbs free energy of the phase at
constant volume, [J/mol/Pa]
dG_mass_dT(prop='dG_dT')
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑃
Returns
dG_mass_dT [float] The temperature derivative of mass Gibbs free energy of the phase at
constant pressure, [J/mol/K]
dG_mass_dT_P(prop='dG_dT_P')
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑃
Returns
dG_mass_dT_P [float] The temperature derivative of mass Gibbs free energy of the phase
at constant pressure, [J/mol/K]
dG_mass_dT_V(prop='dG_dT_V')
Method to calculate and return the temperature derivative of mass Gibbs free energy of the phase at constant
volume.
(︂ )︂
𝜕𝐺mass
𝜕𝑇 𝑉
Returns
dG_mass_dT_V [float] The temperature derivative of mass Gibbs free energy of the phase
at constant volume, [J/mol/K]
dG_mass_dV_P(prop='dG_dV_P')
Method to calculate and return the volume derivative of mass Gibbs free energy of the phase at constant
pressure.
(︂ )︂
𝜕𝐺mass
𝜕𝑉 𝑃
Returns
dG_mass_dV_P [float] The volume derivative of mass Gibbs free energy of the phase at
constant pressure, [J/mol/m^3/mol]
dG_mass_dV_T(prop='dG_dV_T')
Method to calculate and return the volume derivative of mass Gibbs free energy of the phase at constant
temperature.
(︂ )︂
𝜕𝐺mass
𝜕𝑉 𝑇
Returns
dG_mass_dV_T [float] The volume derivative of mass Gibbs free energy of the phase at
constant temperature, [J/mol/m^3/mol]
dH_dP_T()
Method to calculate and return the pressure derivative of enthalpy of the phase at constant pressure.
Returns
𝜕𝐻
𝜕𝑛𝑖
Returns
dH_dns [list[float]] Mole number derivatives of the enthalpy of the phase, [J/mol^2]
dH_mass_dP(prop='dH_dP')
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑇
Returns
dH_mass_dP [float] The pressure derivative of mass enthalpy of the phase at constant tem-
perature, [J/mol/Pa]
dH_mass_dP_T(prop='dH_dP_T')
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑇
Returns
dH_mass_dP_T [float] The pressure derivative of mass enthalpy of the phase at constant
temperature, [J/mol/Pa]
dH_mass_dP_V(prop='dH_dP_V')
Method to calculate and return the pressure derivative of mass enthalpy of the phase at constant volume.
(︂ )︂
𝜕𝐻mass
𝜕𝑃 𝑉
Returns
dH_mass_dP_V [float] The pressure derivative of mass enthalpy of the phase at constant
volume, [J/mol/Pa]
dH_mass_dT(prop='dH_dT')
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑃
Returns
dH_mass_dT [float] The temperature derivative of mass enthalpy of the phase at constant
pressure, [J/mol/K]
dH_mass_dT_P(prop='dH_dT_P')
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑃
Returns
dH_mass_dT_P [float] The temperature derivative of mass enthalpy of the phase at constant
pressure, [J/mol/K]
dH_mass_dT_V(prop='dH_dT_V')
Method to calculate and return the temperature derivative of mass enthalpy of the phase at constant volume.
(︂ )︂
𝜕𝐻mass
𝜕𝑇 𝑉
Returns
dH_mass_dT_V [float] The temperature derivative of mass enthalpy of the phase at constant
volume, [J/mol/K]
dH_mass_dV_P(prop='dH_dV_P')
Method to calculate and return the volume derivative of mass enthalpy of the phase at constant pressure.
(︂ )︂
𝜕𝐻mass
𝜕𝑉 𝑃
Returns
dH_mass_dV_P [float] The volume derivative of mass enthalpy of the phase at constant
pressure, [J/mol/m^3/mol]
dH_mass_dV_T(prop='dH_dV_T')
Method to calculate and return the volume derivative of mass enthalpy of the phase at constant temperature.
(︂ )︂
𝜕𝐻mass
𝜕𝑉 𝑇
Returns
dH_mass_dV_T [float] The volume derivative of mass enthalpy of the phase at constant
temperature, [J/mol/m^3/mol]
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐴
Returns
dP_dP_A [float] The pressure derivative of pressure of the phase at constant Helmholtz en-
ergy, [Pa/Pa]
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐺
Returns
dP_dP_G [float] The pressure derivative of pressure of the phase at constant Gibbs energy,
[Pa/Pa]
(︂ )︂
𝜕𝑃
𝜕𝑃 𝐻
Returns
dP_dP_H [float] The pressure derivative of pressure of the phase at constant enthalpy,
[Pa/Pa]
(︂ )︂
𝜕𝑃
𝜕𝑃 𝑆
Returns
dP_dP_S [float] The pressure derivative of pressure of the phase at constant entropy, [Pa/Pa]
dP_dP_T()
Method to calculate and return the pressure derivative of pressure of the phase at constant temperature.
Returns
dP_dP_T [float] Pressure derivative of pressure of the phase at constant temperature, [-]
dP_dP_U(property='P', differentiate_by='P', at_constant='U')
Method to calculate and return the pressure derivative of pressure of the phase at constant internal energy.
(︂ )︂
𝜕𝑃
𝜕𝑃 𝑈
Returns
dP_dP_U [float] The pressure derivative of pressure of the phase at constant internal energy,
[Pa/Pa]
dP_dP_V()
Method to calculate and return the pressure derivative of pressure of the phase at constant volume.
Returns
dP_dP_V [float] Pressure derivative of pressure of the phase at constant volume, [-]
dP_dT()
Method to calculate and return the first temperature derivative of pressure of the phase.
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dT_A(property='P', differentiate_by='T', at_constant='A')
Method to calculate and return the temperature derivative of pressure of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐴
Returns
dP_dT_A [float] The temperature derivative of pressure of the phase at constant Helmholtz
energy, [Pa/K]
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐺
Returns
dP_dT_G [float] The temperature derivative of pressure of the phase at constant Gibbs en-
ergy, [Pa/K]
(︂ )︂
𝜕𝑃
𝜕𝑇 𝐻
Returns
dP_dT_H [float] The temperature derivative of pressure of the phase at constant enthalpy,
[Pa/K]
dP_dT_P()
Method to calculate and return the temperature derivative of temperature of the phase at constant pressure.
Returns
dP_dT_P [float] Temperature derivative of temperature, [-]
dP_dT_S(property='P', differentiate_by='T', at_constant='S')
Method to calculate and return the temperature derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝑇 𝑆
Returns
dP_dT_S [float] The temperature derivative of pressure of the phase at constant entropy,
[Pa/K]
(︂ )︂
𝜕𝑃
𝜕𝑇 𝑈
Returns
dP_dT_U [float] The temperature derivative of pressure of the phase at constant internal
energy, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the phase.
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dP_dV_A(property='P', differentiate_by='V', at_constant='A')
Method to calculate and return the volume derivative of pressure of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐴
Returns
dP_dV_A [float] The volume derivative of pressure of the phase at constant Helmholtz en-
ergy, [Pa/m^3/mol]
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐺
Returns
dP_dV_G [float] The volume derivative of pressure of the phase at constant Gibbs energy,
[Pa/m^3/mol]
(︂ )︂
𝜕𝑃
𝜕𝑉 𝐻
Returns
dP_dV_H [float] The volume derivative of pressure of the phase at constant enthalpy,
[Pa/m^3/mol]
dP_dV_P()
Method to calculate and return the volume derivative of pressure of the phase at constant pressure.
Returns
dP_dV_P [float] Volume derivative of pressure of the phase at constant pressure,
[Pa*mol/m^3]
dP_dV_S(property='P', differentiate_by='V', at_constant='S')
Method to calculate and return the volume derivative of pressure of the phase at constant entropy.
(︂ )︂
𝜕𝑃
𝜕𝑉 𝑆
Returns
dP_dV_S [float] The volume derivative of pressure of the phase at constant entropy,
[Pa/m^3/mol]
(︂ )︂
𝜕𝑃
𝜕𝑉 𝑈
Returns
dP_dV_U [float] The volume derivative of pressure of the phase at constant internal energy,
[Pa/m^3/mol]
dP_drho()
Method to calculate and return the molar density derivative of pressure of the phase.
(︂ )︂
𝜕𝑃 2 𝜕𝑃
= −𝑉
𝜕𝜌 𝜕𝑉 𝑇
Returns
dP_drho [float] Molar density derivative of pressure, [Pa*m^3/mol]
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐴
Returns
dP_drho_A [float] The density derivative of pressure of the phase at constant Helmholtz
energy, [Pa/mol/m^3]
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐺
Returns
dP_drho_G [float] The density derivative of pressure of the phase at constant Gibbs energy,
[Pa/mol/m^3]
(︂ )︂
𝜕𝑃
𝜕𝜌 𝐻
Returns
dP_drho_H [float] The density derivative of pressure of the phase at constant enthalpy,
[Pa/mol/m^3]
(︂ )︂
𝜕𝑃
𝜕𝜌 𝑆
Returns
dP_drho_S [float] The density derivative of pressure of the phase at constant entropy,
[Pa/mol/m^3]
(︂ )︂
𝜕𝑃
𝜕𝜌 𝑈
Returns
dP_drho_U [float] The density derivative of pressure of the phase at constant internal energy,
[Pa/mol/m^3]
dS_dP_T()
Method to calculate and return the pressure derivative of entropy of the phase at constant pressure.
Returns
dS_dP_T [float] Pressure derivative of entropy, [J/(mol*K*Pa)]
dS_dV_P()
Method to calculate and return the volume derivative of entropy of the phase at constant pressure.
Returns
dS_dV_P [float] Volume derivative of entropy, [J/(K*m^3)]
dS_dV_T()
Method to calculate and return the volume derivative of entropy of the phase at constant temperature.
Returns
dS_dV_T [float] Volume derivative of entropy, [J/(K*m^3)]
dS_dns()
Method to calculate and return the mole number derivative of the entropy of the phase.
𝜕𝑆
𝜕𝑛𝑖
Returns
dS_dns [list[float]] Mole number derivatives of the entropy of the phase, [J/(mol^2*K)]
dS_mass_dP(prop='dS_dP')
Method to calculate and return the pressure derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑇
Returns
dS_mass_dP [float] The pressure derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/Pa]
dS_mass_dP_T(prop='dS_dP_T')
Method to calculate and return the pressure derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑇
Returns
dS_mass_dP_T [float] The pressure derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/Pa]
dS_mass_dP_V(prop='dS_dP_V')
Method to calculate and return the pressure derivative of mass entropy of the phase at constant volume.
(︂ )︂
𝜕𝑆mass
𝜕𝑃 𝑉
Returns
dS_mass_dP_V [float] The pressure derivative of mass entropy of the phase at constant vol-
ume, [J/(mol*K)/Pa]
dS_mass_dT(prop='dS_dT')
Method to calculate and return the temperature derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑃
Returns
dS_mass_dT [float] The temperature derivative of mass entropy of the phase at constant
pressure, [J/(mol*K)/K]
dS_mass_dT_P(prop='dS_dT_P')
Method to calculate and return the temperature derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑃
Returns
dS_mass_dT_P [float] The temperature derivative of mass entropy of the phase at constant
pressure, [J/(mol*K)/K]
dS_mass_dT_V(prop='dS_dT_V')
Method to calculate and return the temperature derivative of mass entropy of the phase at constant volume.
(︂ )︂
𝜕𝑆mass
𝜕𝑇 𝑉
Returns
dS_mass_dT_V [float] The temperature derivative of mass entropy of the phase at constant
volume, [J/(mol*K)/K]
dS_mass_dV_P(prop='dS_dV_P')
Method to calculate and return the volume derivative of mass entropy of the phase at constant pressure.
(︂ )︂
𝜕𝑆mass
𝜕𝑉 𝑃
Returns
dS_mass_dV_P [float] The volume derivative of mass entropy of the phase at constant pres-
sure, [J/(mol*K)/m^3/mol]
dS_mass_dV_T(prop='dS_dV_T')
Method to calculate and return the volume derivative of mass entropy of the phase at constant temperature.
(︂ )︂
𝜕𝑆mass
𝜕𝑉 𝑇
Returns
dS_mass_dV_T [float] The volume derivative of mass entropy of the phase at constant tem-
perature, [J/(mol*K)/m^3/mol]
dT_dP()
Method to calculate and return the constant-volume pressure derivative of temperature of the phase.
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑃 )︀
𝜕𝑃 𝑉 𝜕𝑇 𝑉
Returns
dT_dP [float] Constant-volume pressure derivative of temperature, [K/Pa]
dT_dP_A(property='T', differentiate_by='P', at_constant='A')
Method to calculate and return the pressure derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐴
Returns
dT_dP_A [float] The pressure derivative of temperature of the phase at constant Helmholtz
energy, [K/Pa]
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐺
Returns
dT_dP_G [float] The pressure derivative of temperature of the phase at constant Gibbs en-
ergy, [K/Pa]
(︂ )︂
𝜕𝑇
𝜕𝑃 𝐻
Returns
dT_dP_H [float] The pressure derivative of temperature of the phase at constant enthalpy,
[K/Pa]
(︂ )︂
𝜕𝑇
𝜕𝑃 𝑆
Returns
dT_dP_S [float] The pressure derivative of temperature of the phase at constant entropy,
[K/Pa]
dT_dP_T()
Method to calculate and return the pressure derivative of temperature of the phase at constant temperature.
Returns
dT_dP_T [float] Pressure derivative of temperature of the phase at constant temperature,
[K/Pa]
dT_dP_U(property='T', differentiate_by='P', at_constant='U')
Method to calculate and return the pressure derivative of temperature of the phase at constant internal
energy.
(︂ )︂
𝜕𝑇
𝜕𝑃 𝑈
Returns
dT_dP_U [float] The pressure derivative of temperature of the phase at constant internal
energy, [K/Pa]
dT_dP_V()
Method to calculate and return the constant-volume pressure derivative of temperature of the phase.
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑃 )︀
𝜕𝑃 𝑉 𝜕𝑇 𝑉
Returns
dT_dP [float] Constant-volume pressure derivative of temperature, [K/Pa]
dT_dT_A(property='T', differentiate_by='T', at_constant='A')
Method to calculate and return the temperature derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐴
Returns
dT_dT_A [float] The temperature derivative of temperature of the phase at constant
Helmholtz energy, [K/K]
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐺
Returns
dT_dT_G [float] The temperature derivative of temperature of the phase at constant Gibbs
energy, [K/K]
(︂ )︂
𝜕𝑇
𝜕𝑇 𝐻
Returns
dT_dT_H [float] The temperature derivative of temperature of the phase at constant en-
thalpy, [K/K]
dT_dT_P()
Method to calculate and return the temperature derivative of temperature of the phase at constant pressure.
Returns
dT_dT_P [float] Temperature derivative of temperature of the phase at constant pressure, [-]
dT_dT_S(property='T', differentiate_by='T', at_constant='S')
Method to calculate and return the temperature derivative of temperature of the phase at constant entropy.
(︂ )︂
𝜕𝑇
𝜕𝑇 𝑆
Returns
dT_dT_S [float] The temperature derivative of temperature of the phase at constant entropy,
[K/K]
(︂ )︂
𝜕𝑇
𝜕𝑇 𝑈
Returns
dT_dT_U [float] The temperature derivative of temperature of the phase at constant internal
energy, [K/K]
dT_dT_V()
Method to calculate and return the temperature derivative of temperature of the phase at constant volume.
Returns
dT_dT_V [float] Temperature derivative of temperature of the phase at constant volume, [-]
dT_dV()
Method to calculate and return the constant-pressure volume derivative of temperature of the phase.
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑉 )︀
𝜕𝑉 𝑃 𝜕𝑇 𝑃
Returns
dT_dV [float] Constant-pressure volume derivative of temperature, [K*m^3/(m^3)]
dT_dV_A(property='T', differentiate_by='V', at_constant='A')
Method to calculate and return the volume derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐴
Returns
dT_dV_A [float] The volume derivative of temperature of the phase at constant Helmholtz
energy, [K/m^3/mol]
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐺
Returns
dT_dV_G [float] The volume derivative of temperature of the phase at constant Gibbs en-
ergy, [K/m^3/mol]
(︂ )︂
𝜕𝑇
𝜕𝑉 𝐻
Returns
dT_dV_H [float] The volume derivative of temperature of the phase at constant enthalpy,
[K/m^3/mol]
dT_dV_P()
Method to calculate and return the constant-pressure volume derivative of temperature of the phase.
(︂ )︂
𝜕𝑇 1
= (︀ 𝜕𝑉 )︀
𝜕𝑉 𝑃 𝜕𝑇 𝑃
Returns
dT_dV [float] Constant-pressure volume derivative of temperature, [K*m^3/(m^3)]
(︂ )︂
𝜕𝑇
𝜕𝑉 𝑆
Returns
dT_dV_S [float] The volume derivative of temperature of the phase at constant entropy,
[K/m^3/mol]
dT_dV_T()
Method to calculate and return the volume derivative of temperature of the phase at constant temperature.
Returns
dT_dV_T [float] Pressure derivative of temperature of the phase at constant temperature,
[K*mol/m^3]
dT_dV_U(property='T', differentiate_by='V', at_constant='U')
Method to calculate and return the volume derivative of temperature of the phase at constant internal energy.
(︂ )︂
𝜕𝑇
𝜕𝑉 𝑈
Returns
dT_dV_U [float] The volume derivative of temperature of the phase at constant internal
energy, [K/m^3/mol]
dT_drho()
Method to calculate and return the molar density derivative of temperature of the phase.
(︂ )︂
𝜕𝑇 2 𝜕𝑇
= −𝑉
𝜕𝜌 𝜕𝑉 𝑃
Returns
dT_drho [float] Molar density derivative of temperature, [K*m^3/mol]
dT_drho_A(property='T', differentiate_by='rho', at_constant='A')
Method to calculate and return the density derivative of temperature of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐴
Returns
dT_drho_A [float] The density derivative of temperature of the phase at constant Helmholtz
energy, [K/mol/m^3]
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐺
Returns
dT_drho_G [float] The density derivative of temperature of the phase at constant Gibbs
energy, [K/mol/m^3]
(︂ )︂
𝜕𝑇
𝜕𝜌 𝐻
Returns
dT_drho_H [float] The density derivative of temperature of the phase at constant enthalpy,
[K/mol/m^3]
(︂ )︂
𝜕𝑇
𝜕𝜌 𝑆
Returns
dT_drho_S [float] The density derivative of temperature of the phase at constant entropy,
[K/mol/m^3]
(︂ )︂
𝜕𝑇
𝜕𝜌 𝑈
Returns
dT_drho_U [float] The density derivative of temperature of the phase at constant internal
energy, [K/mol/m^3]
dU_dP()
Method to calculate and return the constant-temperature pressure derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 −𝑉 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dU_dP [float] Constant-temperature pressure derivative of internal energy, [J/(mol*Pa)]
dU_dP_T()
Method to calculate and return the constant-temperature pressure derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 −𝑉 +
𝜕𝑃 𝑇 𝜕𝑃 𝑇 𝜕𝑃 𝑇
Returns
dU_dP [float] Constant-temperature pressure derivative of internal energy, [J/(mol*Pa)]
dU_dP_V()
Method to calculate and return the constant-volume pressure derivative of internal energy.
(︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝐻
= −𝑉
𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dU_dP_V [float] Constant-volume pressure derivative of internal energy, [J/(mol*Pa)]
dU_dT()
Method to calculate and return the constant-pressure temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 +
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dU_dT [float] Constant-pressure temperature derivative of internal energy, [J/(mol*K)]
dU_dT_P()
Method to calculate and return the constant-pressure temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑉 𝜕𝐻
= −𝑃 +
𝜕𝑇 𝑃 𝜕𝑇 𝑃 𝜕𝑇 𝑃
Returns
dU_dT [float] Constant-pressure temperature derivative of internal energy, [J/(mol*K)]
dU_dT_V()
Method to calculate and return the constant-volume temperature derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝐻 𝜕𝑃
= −𝑉
𝜕𝑇 𝑉 𝜕𝑇 𝑉 𝜕𝑇 𝑉
Returns
dU_dT_V [float] Constant-volume temperature derivative of internal energy, [J/(mol*K)]
dU_dV_P()
Method to calculate and return the constant-pressure volume derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑈 𝜕𝑇
=
𝜕𝑉 𝑃 𝜕𝑇 𝑃 𝜕𝑉 𝑃
Returns
dU_dV_P [float] Constant-pressure volume derivative of internal energy, [J/(m^3)]
dU_dV_T()
Method to calculate and return the constant-temperature volume derivative of internal energy.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑈 𝜕𝑈 𝜕𝑃
=
𝜕𝑉 𝑇 𝜕𝑃 𝑇 𝜕𝑉 𝑇
Returns
dU_dV_T [float] Constant-temperature volume derivative of internal energy, [J/(m^3)]
dU_mass_dP(prop='dU_dP')
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑇
Returns
dU_mass_dP [float] The pressure derivative of mass internal energy of the phase at constant
temperature, [J/mol/Pa]
dU_mass_dP_T(prop='dU_dP_T')
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑇
Returns
dU_mass_dP_T [float] The pressure derivative of mass internal energy of the phase at con-
stant temperature, [J/mol/Pa]
dU_mass_dP_V(prop='dU_dP_V')
Method to calculate and return the pressure derivative of mass internal energy of the phase at constant
volume.
(︂ )︂
𝜕𝑈mass
𝜕𝑃 𝑉
Returns
dU_mass_dP_V [float] The pressure derivative of mass internal energy of the phase at con-
stant volume, [J/mol/Pa]
dU_mass_dT(prop='dU_dT')
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑃
Returns
dU_mass_dT [float] The temperature derivative of mass internal energy of the phase at con-
stant pressure, [J/mol/K]
dU_mass_dT_P(prop='dU_dT_P')
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑃
Returns
dU_mass_dT_P [float] The temperature derivative of mass internal energy of the phase at
constant pressure, [J/mol/K]
dU_mass_dT_V(prop='dU_dT_V')
Method to calculate and return the temperature derivative of mass internal energy of the phase at constant
volume.
(︂ )︂
𝜕𝑈mass
𝜕𝑇 𝑉
Returns
dU_mass_dT_V [float] The temperature derivative of mass internal energy of the phase at
constant volume, [J/mol/K]
dU_mass_dV_P(prop='dU_dV_P')
Method to calculate and return the volume derivative of mass internal energy of the phase at constant
pressure.
(︂ )︂
𝜕𝑈mass
𝜕𝑉 𝑃
Returns
dU_mass_dV_P [float] The volume derivative of mass internal energy of the phase at con-
stant pressure, [J/mol/m^3/mol]
dU_mass_dV_T(prop='dU_dV_T')
Method to calculate and return the volume derivative of mass internal energy of the phase at constant
temperature.
(︂ )︂
𝜕𝑈mass
𝜕𝑉 𝑇
Returns
dU_mass_dV_T [float] The volume derivative of mass internal energy of the phase at con-
stant temperature, [J/mol/m^3/mol]
dV_dP()
Method to calculate and return the constant-temperature pressure derivative of volume of the phase.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑉 𝜕𝑉 𝜕𝑇
=−
𝜕𝑃 𝑇 𝜕𝑇 𝑃 𝜕𝑃 𝑉
Returns
dV_dP [float] Constant-temperature pressure derivative of volume, [m^3/(mol*Pa)]
dV_dP_A(property='V', differentiate_by='P', at_constant='A')
Method to calculate and return the pressure derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐴
Returns
dV_dP_A [float] The pressure derivative of volume of the phase at constant Helmholtz en-
ergy, [m^3/mol/Pa]
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐺
Returns
dV_dP_G [float] The pressure derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/Pa]
(︂ )︂
𝜕𝑉
𝜕𝑃 𝐻
Returns
dV_dP_H [float] The pressure derivative of volume of the phase at constant enthalpy,
[m^3/mol/Pa]
(︂ )︂
𝜕𝑉
𝜕𝑃 𝑆
Returns
dV_dP_S [float] The pressure derivative of volume of the phase at constant entropy,
[m^3/mol/Pa]
dV_dP_T()
Method to calculate and return the constant-temperature pressure derivative of volume of the phase.
(︂ )︂ (︂ )︂ (︂ )︂
𝜕𝑉 𝜕𝑉 𝜕𝑇
=−
𝜕𝑃 𝑇 𝜕𝑇 𝑃 𝜕𝑃 𝑉
Returns
dV_dP [float] Constant-temperature pressure derivative of volume, [m^3/(mol*Pa)]
dV_dP_U(property='V', differentiate_by='P', at_constant='U')
Method to calculate and return the pressure derivative of volume of the phase at constant internal energy.
(︂ )︂
𝜕𝑉
𝜕𝑃 𝑈
Returns
dV_dP_U [float] The pressure derivative of volume of the phase at constant internal energy,
[m^3/mol/Pa]
dV_dP_V()
Method to calculate and return the volume derivative of pressure of the phase at constant volume.
Returns
dV_dP_V [float] Pressure derivative of volume of the phase at constant pressure,
[m^3/(mol*Pa)]
dV_dT()
Method to calculate and return the constant-pressure temperature derivative of volume of the phase.
− 𝜕𝑃
(︂ )︂ (︀ )︀
𝜕𝑉 𝜕𝑇 𝑉
= 𝜕𝑃(︀ )︀
𝜕𝑇 𝑃 𝜕𝑉 𝑇
Returns
dV_dT [float] Constant-pressure temperature derivative of volume, [m^3/(mol*K)]
dV_dT_A(property='V', differentiate_by='T', at_constant='A')
Method to calculate and return the temperature derivative of volume of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐴
Returns
dV_dT_A [float] The temperature derivative of volume of the phase at constant Helmholtz
energy, [m^3/mol/K]
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐺
Returns
dV_dT_G [float] The temperature derivative of volume of the phase at constant Gibbs en-
ergy, [m^3/mol/K]
(︂ )︂
𝜕𝑉
𝜕𝑇 𝐻
Returns
dV_dT_H [float] The temperature derivative of volume of the phase at constant enthalpy,
[m^3/mol/K]
dV_dT_P()
Method to calculate and return the constant-pressure temperature derivative of volume of the phase.
− 𝜕𝑃
(︂ )︂ (︀ )︀
𝜕𝑉 𝜕𝑇 𝑉
= (︀ 𝜕𝑃 )︀
𝜕𝑇 𝑃 𝜕𝑉 𝑇
Returns
dV_dT [float] Constant-pressure temperature derivative of volume, [m^3/(mol*K)]
dV_dT_S(property='V', differentiate_by='T', at_constant='S')
Method to calculate and return the temperature derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝑇 𝑆
Returns
dV_dT_S [float] The temperature derivative of volume of the phase at constant entropy,
[m^3/mol/K]
(︂ )︂
𝜕𝑉
𝜕𝑇 𝑈
Returns
dV_dT_U [float] The temperature derivative of volume of the phase at constant internal
energy, [m^3/mol/K]
dV_dT_V()
Method to calculate and return the temperature derivative of volume of the phase at constant volume.
Returns
dV_dT_V [float] Temperature derivative of volume of the phase at constant volume,
[m^3/(mol*K)]
dV_dV_A(property='V', differentiate_by='V', at_constant='A')
Method to calculate and return the volume derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐴
Returns
dV_dV_A [float] The volume derivative of volume of the phase at constant Helmholtz en-
ergy, [m^3/mol/m^3/mol]
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐺
Returns
dV_dV_G [float] The volume derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/m^3/mol]
(︂ )︂
𝜕𝑉
𝜕𝑉 𝐻
Returns
dV_dV_H [float] The volume derivative of volume of the phase at constant enthalpy,
[m^3/mol/m^3/mol]
dV_dV_P()
Method to calculate and return the volume derivative of volume of the phase at constant pressure.
Returns
dV_dV_P [float] Volume derivative of volume of the phase at constant pressure, [-]
dV_dV_S(property='V', differentiate_by='V', at_constant='S')
Method to calculate and return the volume derivative of volume of the phase at constant entropy.
(︂ )︂
𝜕𝑉
𝜕𝑉 𝑆
Returns
dV_dV_S [float] The volume derivative of volume of the phase at constant entropy,
[m^3/mol/m^3/mol]
dV_dV_T()
Method to calculate and return the volume derivative of volume of the phase at constant temperature.
Returns
dV_dV_T [float] Volume derivative of volume of the phase at constant temperature, [-]
(︂ )︂
𝜕𝑉
𝜕𝑉 𝑈
Returns
dV_dV_U [float] The volume derivative of volume of the phase at constant internal energy,
[m^3/mol/m^3/mol]
dV_dns()
Method to calculate and return the mole number derivatives of the molar volume V of the phase.
𝜕𝑉
𝜕𝑛𝑖
Returns
dV_dns [list[float]] Mole number derivatives of the molar volume of the phase, [m^3/mol^2]
dV_drho_A(property='V', differentiate_by='rho', at_constant='A')
Method to calculate and return the density derivative of volume of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐴
Returns
dV_drho_A [float] The density derivative of volume of the phase at constant Helmholtz
energy, [m^3/mol/mol/m^3]
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐺
Returns
dV_drho_G [float] The density derivative of volume of the phase at constant Gibbs energy,
[m^3/mol/mol/m^3]
(︂ )︂
𝜕𝑉
𝜕𝜌 𝐻
Returns
dV_drho_H [float] The density derivative of volume of the phase at constant enthalpy,
[m^3/mol/mol/m^3]
(︂ )︂
𝜕𝑉
𝜕𝜌 𝑆
Returns
dV_drho_S [float] The density derivative of volume of the phase at constant entropy,
[m^3/mol/mol/m^3]
(︂ )︂
𝜕𝑉
𝜕𝜌 𝑈
Returns
dV_drho_U [float] The density derivative of volume of the phase at constant internal energy,
[m^3/mol/mol/m^3]
dV_dzs()
Method to calculate and return the mole fraction derivatives of the molar volume V of the phase.
𝜕𝑉
𝜕𝑧𝑖
Returns
dV_dzs [list[float]] Mole fraction derivatives of the molar volume of the phase, [m^3/mol]
dZ_dP()
Method to calculate and return the pressure derivative of compressibility of the phase.
𝑉 + 𝑃 𝜕𝑉
(︀ )︀
𝜕𝑍 𝜕𝑃 𝑇
=
𝜕𝑃 𝑅𝑇
Returns
dZ_dP [float] Pressure derivative of compressibility, [1/Pa]
dZ_dT()
Method to calculate and return the temperature derivative of compressibility of the phase.
− −𝑉
(︀ 𝜕𝑉 )︀
𝜕𝑍
= 𝑃 𝜕𝑇 𝑃 𝑇
𝜕𝑃 𝑅𝑇
Returns
dZ_dT [float] Temperature derivative of compressibility, [1/K]
dZ_dV()
Method to calculate and return the volume derivative of compressibility of the phase.
(︁ )︁
𝜕𝑃
𝜕𝑍 𝑃 − 𝜌 𝜕𝜌
𝑇
=
𝜕𝑉 𝑅𝑇
Returns
dZ_dV [float] Volume derivative of compressibility, [mol/(m^3)]
dZ_dns()
Method to calculate and return the mole number derivatives of the compressibility factor Z of the phase.
𝜕𝑍
𝜕𝑛𝑖
Returns
dZ_dns [list[float]] Mole number derivatives of the compressibility factor of the phase,
[1/mol]
dZ_dzs()
Method to calculate and return the mole fraction derivatives of the compressibility factor Z of the phase.
𝜕𝑍
𝜕𝑧𝑖
Returns
dZ_dzs [list[float]] Mole fraction derivatives of the compressibility factor of the phase, [-]
dfugacities_dP()
Method to calculate and return the pressure derivative of the fugacities of the components in the phase.
(︂ )︂
𝜕𝑓𝑖 𝜕𝜑𝑖
= 𝑧𝑖 𝑃 + 𝜑𝑖
𝜕𝑃 𝜕𝑃
Returns
dfugacities_dP [list[float]] Pressure derivative of fugacities of all components in the phase,
[-]
Notes
For models without pressure dependence of fugacity, the returned result may not be exactly zero due to
inaccuracy in floating point results; results are likely on the order of 1e-14 or lower in that case.
dfugacities_dT()
Method to calculate and return the temperature derivative of fugacities of the phase.
𝜕𝑓𝑖 𝜕 ln 𝜑𝑖
= 𝑃 𝑧𝑖
𝜕𝑇 𝜕𝑇
Returns
dfugacities_dT [list[float]] Temperature derivative of fugacities of all components in the
phase, [Pa/K]
dfugacities_dns()
Method to calculate and return the mole number derivative of the fugacities of the components in the phase.
if i != j:
(︂ )︂
𝜕𝑓𝑖 𝜕 ln 𝜑𝑖
= 𝑃 𝜑𝑖 𝑧𝑖 −1
𝜕𝑛𝑗 𝜕𝑛𝑗
if i == j:
(︂ )︂
𝜕𝑓𝑖 𝜕 ln 𝜑𝑖
= 𝑃 𝜑𝑖 𝑧𝑖 − 1 + 𝑃 𝜑𝑖
𝜕𝑛𝑗 𝜕𝑛𝑗
Returns
dfugacities_dns [list[list[float]]] Mole number derivatives of the fugacities of all compo-
nents in the phase, [Pa/mol]
dfugacity_dP()
Method to calculate and return the pressure derivative of fugacity of the phase; provided the phase is 1
component.
Returns
dfugacity_dP [list[float]] Fugacity first pressure derivative, [-]
dfugacity_dT()
Method to calculate and return the temperature derivative of fugacity of the phase; provided the phase is 1
component.
Returns
dfugacity_dT [list[float]] Fugacity first temperature derivative, [Pa/K]
property dipoles
Dipole moments for each component, [debye].
Returns
dipoles [list[float]] Dipole moments for each component, [debye].
disobaric_expansion_dP()
Method to calculate and return the pressure derivative of isobatic expansion coefficient of the phase.
(︃(︂ )︂ (︀ 𝜕𝑉 )︀ (︀ 𝜕𝑉 )︀ )︃
𝜕𝛽 1 𝜕2𝑉
= − 𝜕𝑇 𝑃 𝜕𝑃 𝑇
𝜕𝑃 𝑉 𝜕𝑇 𝜕𝑃 𝑉
Returns
dbeta_dP [float] Pressure derivative of isobaric coefficient of a thermal expansion,
[1/(K*Pa)]
disobaric_expansion_dT()
Method to calculate and return the temperature derivative of isobatic expansion coefficient of the phase.
(︃(︂ )︂2 )︃
𝜕2𝑉
)︂ (︂
𝜕𝛽 1 𝜕𝑉
= − /𝑉
𝜕𝑇 𝑉 𝜕𝑇 2 𝑃 𝜕𝑇 𝑃
Returns
dbeta_dT [float] Temperature derivative of isobaric coefficient of a thermal expansion,
[1/K^2]
disothermal_compressibility_dT()
Method to calculate and return the temperature derivative of isothermal compressibility of the phase.
(︁ 2 )︁
𝜕 𝑉 (︀ 𝜕𝑉 )︀ (︀ 𝜕𝑉 )︀
𝜕𝜅 𝜕𝑃 𝜕𝑇
=− + 𝜕𝑃 𝑇 2 𝜕𝑇 𝑃
𝜕𝑇 𝑉 𝑉
Returns
dkappa_dT [float] First temperature derivative of isothermal coefficient of compressibility,
[1/(Pa*K)]
dkappa_dT()
Method to calculate and return the temperature derivative of isothermal compressibility of the phase.
(︁ 2 )︁
𝜕 𝑉 (︀ 𝜕𝑉 )︀ (︀ 𝜕𝑉 )︀
𝜕𝜅 𝜕𝑃 𝜕𝑇
=− + 𝜕𝑃 𝑇 2 𝜕𝑇 𝑃
𝜕𝑇 𝑉 𝑉
Returns
dkappa_dT [float] First temperature derivative of isothermal coefficient of compressibility,
[1/(Pa*K)]
dlnfugacities_dns()
Method to calculate and return the mole number derivative of the log of fugacities of the components in
the phase.
𝜕 ln 𝑓𝑖 1 𝜕𝑓𝑖
=
𝜕𝑛𝑗 𝑓𝑖 𝜕𝑛𝑗
Returns
dlnfugacities_dns [list[list[float]]] Mole number derivatives of the log of fugacities of all
components in the phase, [log(Pa)/mol]
dlnfugacities_dzs()
Method to calculate and return the mole fraction derivative of the log of fugacities of the components in
the phase.
𝜕 ln 𝑓𝑖 1 𝜕𝑓𝑖
=
𝜕𝑧𝑗 𝑓𝑖 𝜕𝑧𝑗
Returns
dlnfugacities_dzs [list[list[float]]] Mole fraction derivatives of the log of fugacities of all
components in the phase, [log(Pa)]
dlnphis_dP()
Method to calculate and return the pressure derivative of the log of fugacity coefficients of each component
in the phase.
Returns
dlnphis_dP [list[float]] First pressure derivative of log fugacity coefficients, [1/Pa]
dlnphis_dT()
Method to calculate and return the temperature derivative of the log of fugacity coefficients of each com-
ponent in the phase.
Returns
dlnphis_dT [list[float]] First temperature derivative of log fugacity coefficients, [1/K]
dnV_dns()
Method to calculate and return the partial mole number derivatives of the molar volume V of the phase.
𝜕𝑛𝑉
𝜕𝑛𝑖
Returns
dnV_dns [list[float]] Partial mole number derivatives of the molar volume of the phase,
[m^3/mol]
dphis_dP()
Method to calculate and return the pressure derivative of fugacity coefficients of the phase.
𝜕𝜑𝑖 𝜕 ln 𝜑𝑖
= 𝜑𝑖
𝜕𝑃 𝜕𝑃
Returns
dphis_dP [list[float]] Pressure derivative of fugacity coefficients of all components in the
phase, [1/Pa]
dphis_dT()
Method to calculate and return the temperature derivative of fugacity coefficients of the phase.
𝜕𝜑𝑖 𝜕 ln 𝜑𝑖
= 𝜑𝑖
𝜕𝑇 𝜕𝑇
Returns
dphis_dT [list[float]] Temperature derivative of fugacity coefficients of all components in
the phase, [1/K]
dphis_dzs()
Method to calculate and return the molar composition derivative of fugacity coefficients of the phase.
𝜕𝜑𝑖 𝜕 ln 𝜑𝑖
= 𝜑𝑖
𝜕𝑧𝑗 𝜕𝑧𝑗
Returns
dphis_dzs [list[list[float]]] Molar derivative of fugacity coefficients of all components in the
phase, [-]
drho_dP()
Method to calculate and return the pressure derivative of molar density of the phase.
(︂ )︂
𝜕𝜌 1 𝜕𝑉
=− 2
𝜕𝑃 𝑉 𝜕𝑃 𝑇
Returns
drho_dP [float] Pressure derivative of Molar density, [mol/(Pa*m^3)]
drho_dP_A(property='rho', differentiate_by='P', at_constant='A')
Method to calculate and return the pressure derivative of density of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐴
Returns
drho_dP_A [float] The pressure derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/Pa]
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐺
Returns
drho_dP_G [float] The pressure derivative of density of the phase at constant Gibbs energy,
[mol/m^3/Pa]
(︂ )︂
𝜕𝜌
𝜕𝑃 𝐻
Returns
drho_dP_H [float] The pressure derivative of density of the phase at constant enthalpy,
[mol/m^3/Pa]
(︂ )︂
𝜕𝜌
𝜕𝑃 𝑆
Returns
drho_dP_S [float] The pressure derivative of density of the phase at constant entropy,
[mol/m^3/Pa]
(︂ )︂
𝜕𝜌
𝜕𝑃 𝑈
Returns
drho_dP_U [float] The pressure derivative of density of the phase at constant internal energy,
[mol/m^3/Pa]
drho_dT()
Method to calculate and return the temperature derivative of molar density of the phase.
(︂ )︂
𝜕𝜌 1 𝜕𝑉
=− 2
𝜕𝑇 𝑉 𝜕𝑇 𝑃
Returns
drho_dT [float] Temperature derivative of molar density, [mol/(K*m^3)]
drho_dT_A(property='rho', differentiate_by='T', at_constant='A')
Method to calculate and return the temperature derivative of density of the phase at constant Helmholtz
energy.
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐴
Returns
drho_dT_A [float] The temperature derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/K]
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐺
Returns
drho_dT_G [float] The temperature derivative of density of the phase at constant Gibbs
energy, [mol/m^3/K]
(︂ )︂
𝜕𝜌
𝜕𝑇 𝐻
Returns
drho_dT_H [float] The temperature derivative of density of the phase at constant enthalpy,
[mol/m^3/K]
(︂ )︂
𝜕𝜌
𝜕𝑇 𝑆
Returns
drho_dT_S [float] The temperature derivative of density of the phase at constant entropy,
[mol/m^3/K]
(︂ )︂
𝜕𝜌
𝜕𝑇 𝑈
Returns
drho_dT_U [float] The temperature derivative of density of the phase at constant internal
energy, [mol/m^3/K]
drho_dT_V()
Method to calculate and return the temperature derivative of molar density of the phase at constant volume.
(︂ )︂
𝜕𝜌
=0
𝜕𝑇 𝑉
Returns
drho_dT_V [float] Temperature derivative of molar density of the phase at constant volume,
[mol/(m^3*K)]
drho_dV_A(property='rho', differentiate_by='V', at_constant='A')
Method to calculate and return the volume derivative of density of the phase at constant Helmholtz energy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐴
Returns
drho_dV_A [float] The volume derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/m^3/mol]
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐺
Returns
drho_dV_G [float] The volume derivative of density of the phase at constant Gibbs energy,
[mol/m^3/m^3/mol]
(︂ )︂
𝜕𝜌
𝜕𝑉 𝐻
Returns
drho_dV_H [float] The volume derivative of density of the phase at constant enthalpy,
[mol/m^3/m^3/mol]
(︂ )︂
𝜕𝜌
𝜕𝑉 𝑆
Returns
drho_dV_S [float] The volume derivative of density of the phase at constant entropy,
[mol/m^3/m^3/mol]
drho_dV_T()
Method to calculate and return the volume derivative of molar density of the phase.
𝜕𝜌 1
=− 2
𝜕𝑉 𝑉
Returns
drho_dV_T [float] Molar density derivative of volume, [mol^2/m^6]
drho_dV_U(property='rho', differentiate_by='V', at_constant='U')
Method to calculate and return the volume derivative of density of the phase at constant internal energy.
(︂ )︂
𝜕𝜌
𝜕𝑉 𝑈
Returns
drho_dV_U [float] The volume derivative of density of the phase at constant internal energy,
[mol/m^3/m^3/mol]
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐴
Returns
drho_drho_A [float] The density derivative of density of the phase at constant Helmholtz
energy, [mol/m^3/mol/m^3]
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐺
Returns
drho_drho_G [float] The density derivative of density of the phase at constant Gibbs energy,
[mol/m^3/mol/m^3]
(︂ )︂
𝜕𝜌
𝜕𝜌 𝐻
Returns
drho_drho_H [float] The density derivative of density of the phase at constant enthalpy,
[mol/m^3/mol/m^3]
(︂ )︂
𝜕𝜌
𝜕𝜌 𝑆
Returns
drho_drho_S [float] The density derivative of density of the phase at constant entropy,
[mol/m^3/mol/m^3]
(︂ )︂
𝜕𝜌
𝜕𝜌 𝑈
Returns
drho_drho_U [float] The density derivative of density of the phase at constant internal en-
ergy, [mol/m^3/mol/m^3]
drho_mass_dP()
Method to calculate the mass density derivative with respect to pressure, at constant temperature.
−MW 𝜕𝑉
(︂ )︂ 𝑚
𝜕𝜌 𝜕𝑃
=
𝜕𝑃 𝑇 1000𝑉𝑚2
Returns
drho_mass_dP [float] Pressure derivative of mass density at constant temperature,
[kg/m^3/Pa]
Notes
−MW 𝜕𝑉
(︂ )︂ 𝑚
𝜕𝜌 𝜕𝑇
=
𝜕𝑇 𝑃 1000𝑉𝑚2
Returns
drho_mass_dT [float] Temperature derivative of mass density at constant pressure,
[kg/m^3/K]
Notes
Returns
dspeed_of_sound_dP_T [float] Pressure derivative of speed of sound at constant tempera-
ture, [m*kg^0.5/s/mol^0.5/Pa]
dspeed_of_sound_dT_P()
Method to calculate the temperature derivative of speed of sound at constant pressure in molar units.
Cp (𝑇 )𝑉 2 (𝑇 ) 𝑑𝑇 Cp (𝑇 )𝑉 2 (𝑇 ) dPdVT (
√︁ (︁ 𝑑 𝑑
2 (𝑇 ) dPdV (𝑇 ) dPdVT (𝑇 ) Cp (𝑇 )𝑉 (𝑇 ) dPdVT (𝑇 ) 𝑑𝑇 𝑉 (𝑇 )
(︂
𝜕𝑐
)︂ − Cp (𝑇 )𝑉 Cv (𝑇 )
T
− 2 Cv (𝑇 ) − Cv (𝑇 ) + 2 Cv2 (𝑇 )
=− 2
𝜕𝑇 𝑃 Cp (𝑇 )𝑉 (𝑇 ) dPdVT (𝑇 )
Returns
dspeed_of_sound_dT_P [float] Temperature derivative of speed of sound at constant pres-
sure, [m*kg^0.5/s/mol^0.5/K]
Notes
Requires the temperature derivative of Cp and Cv both at constant pressure, as wel as the volume and
temperature derivative of pressure, calculated at constant temperature and then pressure respectively. These
can be tricky to obtain.
property economic_statuses
Status of each component in in relation to import and export from various regions, [-].
Returns
economic_statuses [list[dict]] Status of each component in in relation to import and export
from various regions, [-].
property energy
Method to return the energy (enthalpy times flow rate) of this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
energy [float] Enthalpy flow rate, [W]
property energy_calc
Method to return the energy (enthalpy times flow rate) of this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
energy [float] Enthalpy flow rate, [W]
property energy_reactive
Method to return the reactive energy (reactive enthalpy times flow rate) of this phase. This method is only
available when the phase is linked to an EquilibriumStream.
Returns
energy_reactive [float] Reactive enthalpy flow rate, [W]
property energy_reactive_calc
Method to return the reactive energy (reactive enthalpy times flow rate) of this phase. This method is only
available when the phase is linked to an EquilibriumStream.
Returns
energy_reactive [float] Reactive enthalpy flow rate, [W]
force_phase = None
Attribute which can be set to a global Phase object to force the phases identification routines to label it a
certain phase. Accepts values of (‘g’, ‘l’, ‘s’).
property formulas
Formulas of each component, [-].
Returns
formulas [list[str]] Formulas of each component, [-].
classmethod from_json(json_repr)
Method to create a phase from a JSON serialization of another phase.
Parameters
json_repr [dict] JSON-friendly representation, [-]
Returns
phase [Phase] Newly created phase object from the json serialization, [-]
Notes
It is important that the input string be in the same format as that created by Phase.as_json.
fugacities()
Method to calculate and return the fugacities of the phase.
𝑓𝑖 = 𝑃 𝑧𝑖 exp(ln 𝜑𝑖 )
Returns
fugacities [list[float]] Fugacities, [Pa]
fugacities_at_zs(zs, most_stable=False)
Method to directly calculate the figacities at a different composition than the current phase. This is imple-
mented to allow for the possibility of more direct calls to obtain fugacities than is possible with the phase
interface. This base method simply creates a new phase, gets its log fugacity coefficients, exponentiates
them, and multiplies them by P and compositions.
Returns
fugacities [list[float]] Fugacities, [Pa]
fugacities_lowest_Gibbs()
Method to calculate and return the fugacities of the phase.
𝑓𝑖 = 𝑃 𝑧𝑖 exp(ln 𝜑𝑖 )
Returns
fugacities [list[float]] Fugacities, [Pa]
fugacity()
Method to calculate and return the fugacity of the phase; provided the phase is 1 component.
Returns
fugacity [list[float]] Fugacity, [Pa]
gammas()
Method to calculate and return the activity coefficients of the phase, [-].
Activity coefficients are defined as the ratio of the actual fugacity coefficients times the pressure to the
reference pure fugacity coefficients times the reference pressure. The reference pressure can be set to the
actual pressure (the Lewis Randall standard state) which makes the pressures cancel.
𝜑𝑖 (𝑇, 𝑃, 𝑥)𝑃
𝛾𝑖 (𝑇, 𝑃, 𝑥; 𝑓𝑖0 (𝑇, 𝑃𝑖0 )) =
𝜑0𝑖 (𝑇, 𝑃𝑖0 )𝑃𝑖0
Returns
gammas [list[float]] Activity coefficients, [-]
gammas_infinite_dilution()
Calculate and return the infinite dilution activity coefficients of each component.
Returns
gammas_infinite [list[float]] Infinite dilution activity coefficients, [-]
Notes
The algorithm is as follows. For each component, set its composition to zero. Normalize the remaining
compositions to 1. Create a new object with that composition, and calculate the activity coefficient of the
component whose concentration was set to zero.
helium_molar_weight()
Method to calculate and return the effective quantiy of helium in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the helium component.
helium_partial_pressure()
Method to calculate and return the ideal partial pressure of helium, [Pa]
humidity_ratio()
Method to calculate and return the humidity ratio of the phase; normally defined as the kg water/kg dry air,
the definition here is kg water/(kg rest of the phase) [-]
𝑤𝐻2𝑂
humidity ratio = HR =
1 − 𝑤𝐻2𝑂
Returns
humidity_ratio [float] Humidity ratio, [-]
hydrogen_molar_weight()
Method to calculate and return the effective quantiy of hydrogen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the hydrogen component.
hydrogen_partial_pressure()
Method to calculate and return the ideal partial pressure of hydrogen, [Pa]
hydrogen_sulfide_molar_weight()
Method to calculate and return the effective quantiy of hydrogen_sulfide in the phase as a molar weight,
[g/mol].
This is the molecular weight of the phase times the mass fraction of the hydrogen_sulfide component.
hydrogen_sulfide_partial_pressure()
Method to calculate and return the ideal partial pressure of hydrogen_sulfide, [Pa]
ideal_gas_basis = False
is_solid = False
isentropic_exponent()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 𝑉 𝑘 = const.
(︂ )︂
𝑉 𝐶𝑝 𝜕𝑃
𝑘=−
𝑃 𝐶𝑣 𝜕𝑉 𝑇
Returns
k_PV [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_PT()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 (1−𝑘) 𝑇 𝑘 = const.
1
𝑘= 𝑃
(︀ 𝜕𝑉 )︀
1− 𝐶𝑝 𝜕𝑇 𝑃
Returns
k_PT [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_PV()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑃 𝑉 𝑘 = const.
(︂ )︂
𝑉 𝐶𝑝 𝜕𝑃
𝑘=−
𝑃 𝐶𝑣 𝜕𝑉 𝑇
Returns
k_PV [float] Isentropic exponent of a real fluid, [-]
isentropic_exponent_TV()
Method to calculate and return the real gas isentropic exponent of the phase, which satisfies the relationship
𝑇 𝑉 𝑘−1 = const.
(︂ )︂
𝑉 𝜕𝑃
𝑘 =1+
𝐶𝑣 𝜕𝑇 𝑉
Returns
k_TV [float] Isentropic exponent of a real fluid, [-]
isobaric_expansion()
Method to calculate and return the isobatic expansion coefficient of the phase.
(︂ )︂
1 𝜕𝑉
𝛽=
𝑉 𝜕𝑇 𝑃
Returns
beta [float] Isobaric coefficient of a thermal expansion, [1/K]
isothermal_bulk_modulus()
Method to calculate and return the isothermal bulk modulus of the phase.
(︂ )︂
𝜕𝑃
𝐾𝑇 = −𝑉
𝜕𝑉 𝑇
Returns
isothermal_bulk_modulus [float] Isothermal bulk modulus, [Pa]
isothermal_compressibility()
Method to calculate and return the isothermal compressibility of the phase.
(︂ )︂
1 𝜕𝑉
𝜅=−
𝑉 𝜕𝑃 𝑇
Returns
kappa [float] Isothermal coefficient of compressibility, [1/Pa]
kappa()
Method to calculate and return the isothermal compressibility of the phase.
(︂ )︂
1 𝜕𝑉
𝜅=−
𝑉 𝜕𝑃 𝑇
Returns
kappa [float] Isothermal coefficient of compressibility, [1/Pa]
kgs()
Method to calculate and return the pure-component gas temperature-dependent thermal conductivity of
each species from the thermo.thermal_conductivity.ThermalConductivityGas objects.
These values are normally at low pressure, not along the saturation line.
Returns
kgs [list[float]] Pure component temperature dependent gas thermal conductivities,
[W/(m*K)]
kinematic_viscosity()
Method to calculate and return the kinematic viscosity of the phase, [m^2/s]
Returns
nu [float] Kinematic viscosity, [m^2/s]
kls()
Method to calculate and return the pure-component liquid temperature-dependent thermal conductivity of
each species from the thermo.thermal_conductivity.ThermalConductivityLiquid objects.
These values are normally at low pressure, not along the saturation line.
Returns
kls [list[float]] Pure component temperature dependent liquid thermal conductivities,
[W/(m*K)]
property legal_statuses
Status of each component in in relation to import and export rules from various regions, [-].
Returns
legal_statuses [list[dict]] Status of each component in in relation to import and export rules
from various regions, [-].
lnfugacities()
Method to calculate and return the log of fugacities of the phase.
Returns
lnfugacities [list[float]] Log fugacities, [log(Pa)]
lnphi()
Method to calculate and return the log of fugacity coefficient of the phase; provided the phase is 1 compo-
nent.
Returns
lnphi [list[float]] Log fugacity coefficient, [-]
lnphis()
Method to calculate and return the log of fugacity coefficients of each component in the phase.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
lnphis_G_min()
Method to calculate and return the log fugacity coefficients of the phase. If the phase can have multiple
solutions at its T and P, this method should return those with the lowest Gibbs energy. This needs to be
implemented on phases with that criteria like cubic EOSs.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
lnphis_at_zs(zs, most_stable=False)
Method to directly calculate the log fugacity coefficients at a different composition than the current phase.
This is implemented to allow for the possibility of more direct calls to obtain fugacities than is possible
with the phase interface. This base method simply creates a new phase, gets its log fugacity coefficients,
and returns them.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
lnphis_lowest_Gibbs()
property logPs
Octanol-water partition coefficients for each component, [-].
Returns
logPs [list[float]] Octanol-water partition coefficients for each component, [-].
log_zs()
Method to calculate and return the log of mole fractions specified. These are used in calculating entropy
and in many other formulas.
ln 𝑧𝑖
Returns
log_zs [list[float]] Log of mole fractions, [-]
property m
Method to return the mass flow rate of this phase. This method is only available when the phase is linked
to an EquilibriumStream.
Returns
m [float] Mass flow of the phase, [kg/s]
property m_calc
methane_molar_weight()
Method to calculate and return the effective quantiy of methane in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the methane component.
methane_partial_pressure()
Method to calculate and return the ideal partial pressure of methane, [Pa]
model_hash(ignore_phase=False)
Method to compute a hash of a phase.
Parameters
ignore_phase [bool] Whether or not to include the specifc class of the model in the hash
Returns
hash [int] Hash representing the settings of the phase; phases with all identical model pa-
rameters should have the same hash.
molar_water_content()
property molecular_diameters
Lennard-Jones molecular diameters for each component, [angstrom].
Returns
molecular_diameters [list[float]] Lennard-Jones molecular diameters for each component,
[angstrom].
property ms
Method to return the mass flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ms [float] Mass flow of the components in the phase, [kg/s]
property ms_calc
Method to return the mass flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ms [float] Mass flow of the components in the phase, [kg/s]
mu()
mugs()
Method to calculate and return the pure-component gas temperature-dependent viscosity of each species
from the thermo.viscosity.ViscosityGas objects.
These values are normally at low pressure, not along the saturation line.
Returns
mugs [list[float]] Pure component temperature dependent gas viscosities, [Pa*s]
muls()
Method to calculate and return the pure-component liquid temperature-dependent viscosity of each species
from the thermo.viscosity.ViscosityLiquid objects.
These values are normally at low pressure, not along the saturation line.
Returns
muls [list[float]] Pure component temperature dependent liquid viscosities, [Pa*s]
property n
Method to return the molar flow rate of this phase. This method is only available when the phase is linked
to an EquilibriumStream.
Returns
n [float] Molar flow of the phase, [mol/s]
property n_calc
property names
Names for each component, [-].
Returns
names [list[str]] Names for each component, [-].
nitrogen_molar_weight()
Method to calculate and return the effective quantiy of nitrogen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the nitrogen component.
nitrogen_partial_pressure()
Method to calculate and return the ideal partial pressure of nitrogen, [Pa]
property ns
Method to return the molar flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ns [float] Molar flow of the components in the phase, [mol/s]
property ns_calc
Method to return the molar flow rates of each component in this phase. This method is only available when
the phase is linked to an EquilibriumStream.
Returns
ns [float] Molar flow of the components in the phase, [mol/s]
nu()
Method to calculate and return the kinematic viscosity of the phase, [m^2/s]
Returns
nu [float] Kinematic viscosity, [m^2/s]
obj_references = ()
Tuple of object instances which should be stored as json using their own as_json method.
property omegas
Acentric factors for each component, [-].
Returns
omegas [list[float]] Acentric factors for each component, [-].
oxygen_molar_weight()
Method to calculate and return the effective quantiy of oxygen in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the oxygen component.
oxygen_partial_pressure()
Method to calculate and return the ideal partial pressure of oxygen, [Pa]
partial_pressures()
Method to return the partial pressures of each component in the phase. Note that this is the conventional
definition assumed in almost every source; there is also a non-ideal definition.
𝑃𝑖 = 𝑧 𝑖 𝑃
Returns
partial_pressures [list[float]] Partial pressures of all the components in the phase, [Pa]
property phase_STPs
Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
Returns
phase_STPs [list[str]] Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
phi()
Method to calculate and return the fugacity coefficient of the phase; provided the phase is 1 component.
Returns
phi [list[float]] Fugacity coefficient, [-]
phis()
Method to calculate and return the fugacity coefficients of the phase.
𝜑𝑖 = exp(ln 𝜑𝑖 )
Returns
phis [list[float]] Fugacity coefficients, [-]
pointer_reference_dicts = ()
Tuple of dictionaries for string -> object
pointer_references = ()
Tuple of attributes which should be stored by converting them to a string, and then they will be looked up
in their corresponding pointer_reference_dicts entry.
pseudo_Pc()
Method to calculate and return the pseudocritical pressure calculated using Kay’s rule (linear mole frac-
tions):
∑︁
𝑃𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑃𝑐,𝑖
𝑖
Returns
pseudo_Pc [float] Pseudocritical pressure of the phase, [Pa]
pseudo_Tc()
Method to calculate and return the pseudocritical temperature calculated using Kay’s rule (linear mole
fractions):
∑︁
𝑇𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑇𝑐,𝑖
𝑖
Returns
pseudo_Tc [float] Pseudocritical temperature of the phase, [K]
pseudo_Vc()
Method to calculate and return the pseudocritical volume calculated using Kay’s rule (linear mole frac-
tions):
∑︁
𝑉𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑉𝑐,𝑖
𝑖
Returns
pseudo_Vc [float] Pseudocritical volume of the phase, [m^3/mol]
pseudo_Zc()
Method to calculate and return the pseudocritical compressibility calculated using Kay’s rule (linear mole
fractions):
∑︁
𝑍𝑐,𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝑍𝑐,𝑖
𝑖
Returns
pseudo_Zc [float] Pseudocritical compressibility of the phase, [-]
pseudo_omega()
Method to calculate and return the pseudocritical acentric factor calculated using Kay’s rule (linear mole
fractions):
∑︁
𝜔𝑝𝑠𝑒𝑢𝑑𝑜 = 𝑧𝑖 𝜔𝑖
𝑖
Returns
pseudo_omega [float] Pseudo acentric factor of the phase, [-]
pure_reference_types = ()
Tuple of types of thermo.utils.TDependentProperty or thermo.utils.TPDependentProperty
corresponding to pure_references.
pure_references = ()
Tuple of attribute names which hold lists of thermo.utils.TDependentProperty or thermo.utils.
TPDependentProperty instances.
reference_pointer_dicts = ()
Tuple of dictionaries for object -> string
result
rho()
Method to calculate and return the molar density of the phase.
𝜌 = 𝑓 𝑟𝑎𝑐1𝑉
Returns
rho [float] Molar density, [mol/m^3]
rho_mass()
Method to calculate and return mass density of the phase.
𝑀𝑊
𝜌=
1000 · 𝑉 𝑀
Returns
rho_mass [float] Mass density, [kg/m^3]
rho_mass_liquid_ref()
Method to calculate and return the liquid reference mass density according to the temperature variable
T_liquid_volume_ref of thermo.bulk.BulkSettings and the composition of the phase.
Returns
rho_mass_liquid_ref [float] Liquid mass density at the reference condition, [kg/m^3]
property rhocs
Molar densities at the critical point for each component, [mol/m^3].
Returns
rhocs [list[float]] Molar densities at the critical point for each component, [mol/m^3].
property rhocs_mass
Densities at the critical point for each component, [kg/m^3].
Returns
rhocs_mass [list[float]] Densities at the critical point for each component, [kg/m^3].
property rhog_STPs
Molar gas densities at STP for each component; metastable if normally another state, [mol/m^3].
Returns
rhog_STPs [list[float]] Molar gas densities at STP for each component; metastable if nor-
mally another state, [mol/m^3].
property rhog_STPs_mass
Gas densities at STP for each component; metastable if normally another state, [kg/m^3].
Returns
rhog_STPs_mass [list[float]] Gas densities at STP for each component; metastable if nor-
mally another state, [kg/m^3].
property rhol_60Fs
Liquid molar densities for each component at 60 °F, [mol/m^3].
Returns
rhol_60Fs [list[float]] Liquid molar densities for each component at 60 °F, [mol/m^3].
property rhol_60Fs_mass
Liquid mass densities for each component at 60 °F, [kg/m^3].
Returns
rhol_60Fs_mass [list[float]] Liquid mass densities for each component at 60 °F, [kg/m^3].
property rhol_STPs
Molar liquid densities at STP for each component, [mol/m^3].
Returns
rhol_STPs [list[float]] Molar liquid densities at STP for each component, [mol/m^3].
property rhol_STPs_mass
Liquid densities at STP for each component, [kg/m^3].
Returns
rhol_STPs_mass [list[float]] Liquid densities at STP for each component, [kg/m^3].
property rhos_Tms
Solid molar densities for each component at their respective melting points, [mol/m^3].
Returns
rhos_Tms [list[float]] Solid molar densities for each component at their respective melting
points, [mol/m^3].
property rhos_Tms_mass
Solid mass densities for each component at their melting point, [kg/m^3].
Returns
rhos_Tms_mass [list[float]] Solid mass densities for each component at their melting point,
[kg/m^3].
scalar = True
sigma()
Calculate and return the surface tension of the phase. For details of the implementation, see
SurfaceTensionMixture.
This property is strictly the ideal-gas to liquid surface tension, not a true inter-phase property.
Returns
sigma [float] Surface tension, [N/m]
property sigma_STPs
Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the saturation pressure, [N/m].
Returns
sigma_STPs [list[float]] Liquid-air surface tensions at 298.15 K and the higher of 101325
Pa or the saturation pressure, [N/m].
property sigma_Tbs
Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
Returns
sigma_Tbs [list[float]] Liquid-air surface tensions at the normal boiling point and 101325
Pa, [N/m].
property sigma_Tms
Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
Returns
sigma_Tms [list[float]] Liquid-air surface tensions at the melting point and 101325 Pa,
[N/m].
sigmas()
Method to calculate and return the pure-component surface tensions of each species from the thermo.
interface.SurfaceTension objects.
Returns
sigmas [list[float]] Surface tensions, [N/m]
property similarity_variables
Similarity variables for each component, [mol/g].
Returns
similarity_variables [list[float]] Similarity variables for each component, [mol/g].
property smiless
SMILES identifiers for each component, [-].
Returns
smiless [list[str]] SMILES identifiers for each component, [-].
property solubility_parameters
Solubility parameters for each component at 298.15 K, [Pa^0.5].
Returns
solubility_parameters [list[float]] Solubility parameters for each component at 298.15 K,
[Pa^0.5].
speed_of_sound()
Method to calculate and return the molar speed of sound of the phase.
[︂ (︂ )︂ ]︂1/2
𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝜕𝑉 𝑇 𝐶𝑣
Returns
w [float] Speed of sound for a real gas, [m*kg^0.5/(s*mol^0.5)]
speed_of_sound_ideal_gas()
Method to calculate and return the molar speed of sound of an ideal gas phase at the current conditions.
[︂ (︂ )︂ ]︂1/2
𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝜕𝑉 𝑇 𝐶𝑣
−𝑃 2
(︂ )︂
𝜕𝑃
=
𝜕𝑉 𝑇 𝑅𝑇
Returns
w [float] Speed of sound for a real gas, [m*kg^0.5/(s*mol^0.5)]
speed_of_sound_ideal_gas_mass()
Method to calculate and return the mass speed of sound of an ideal gas phase at the current conditions.
√︀
𝑐= 𝑘𝑅𝑠𝑝𝑒𝑐𝑖𝑓 𝑖𝑐,𝑖𝑑𝑒𝑎𝑙𝑔𝑎𝑠 𝑇
Returns
w [float] Speed of sound for an ideal gas, [m/s]
speed_of_sound_mass()
Method to calculate and return the speed of sound of the phase.
[︂ (︂ )︂ ]︂1/2
1000 𝜕𝑃 𝐶𝑝
𝑤 = −𝑉 2
𝑀 𝑊 𝜕𝑉 𝑇 𝐶𝑣
Returns
w [float] Speed of sound for a real gas, [m/s]
state_hash()
Basic method to calculate a hash of the state of the phase and its model parameters.
Note that the hashes should only be compared on the same system running in the same process!
Returns
state_hash [int] Hash of the object’s model parameters and state, [-]
supports_lnphis_args = False
thermal_diffusivity()
Method to calculate and return the thermal diffusivity of the phase.
𝑘
𝛼=
𝜌𝐶𝑝
Returns
alpha [float] Thermal diffusivity, [m^2/s]
to(zs, T=None, P=None, V=None)
Method to create a new Phase object with the same constants as the existing Phase but at different conditions.
Mole fractions zs are always required and any two of T, P, and V are required.
Parameters
zs [list[float]] Molar composition of the new phase, [-]
T [float, optional] Temperature of the new phase, [K]
P [float, optional] Pressure of the new phase, [Pa]
V [float, optional] Molar volume of the new phase, [m^3/mol]
Returns
new_phase [Phase] New phase at the specified conditions, [-]
Examples
These sample cases illustrate the three combinations of inputs. Note that some thermodynamic models may
have multiple solutions for some inputs!
to_TP_zs(T, P, zs)
Method to create a new Phase object with the same constants as the existing Phase but at a different T and
P.
Parameters
zs [list[float]] Molar composition of the new phase, [-]
T [float] Temperature of the new phase, [K]
Notes
This method is marginally faster than Phase.to as it does not need to check what the inputs are.
Examples
value(name)
Method to retrieve a property from a string. This more or less wraps getattr.
name could be a python property like ‘Tms’ or a callable method like ‘H’.
Parameters
name [str] String representing the property, [-]
Returns
value [various] Value specified, [various]
water_molar_weight()
Method to calculate and return the effective quantiy of water in the phase as a molar weight, [g/mol].
This is the molecular weight of the phase times the mass fraction of the water component.
water_partial_pressure()
Method to calculate and return the ideal partial pressure of water, [Pa]
ws()
Method to calculate and return the mass fractions of the phase, [-]
Returns
ws [list[float]] Mass fractions, [-]
property ws_calc
ws_no_water()
Method to calculate and return the mass fractions of all species in the phase, normalized to a water-free
basis (the mass fraction of water returned is zero).
Returns
ws_no_water [list[float]] Mass fractions on a water free basis, [-]
property zs_calc
zs_no_water()
Method to calculate and return the mole fractions of all species in the phase, normalized to a water-free
basis (the mole fraction of water returned is zero).
Returns
𝑅𝑇
𝑃 =
𝑉
Parameters
HeatCapacityGases [list[HeatCapacityGas]] Objects proiding pure-component heat capacity
correlations, [-]
Hfs [list[float]] Molar ideal-gas standard heats of formation at 298.15 K and 1 atm, [J/mol]
Gfs [list[float]] Molar ideal-gas standard Gibbs energies of formation at 298.15 K and 1 atm,
[J/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
zs [list[float], optional] Mole fractions of each component, [-]
Examples
T-P initialization for oxygen and nitrogen, using Poling’s polynomial heat capacities:
>>> phase.Cp()
29.1733530
Methods
Cp()
Method to calculate and return the molar heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑝 = 𝑧𝑖 𝐶𝑝,𝑖
𝑖
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
H()
Method to calculate and return the enthalpy of the phase.
∑︁
𝐻= 𝑧𝑖 𝐻𝑖𝑖𝑔
𝑖
Returns
H [float] Molar enthalpy, [J/(mol)]
S()
Method to calculate and return the entropy of the phase.
(︂ )︂
∑︁ 𝑃 ∑︁
𝑆= 𝑧𝑖 𝑆𝑖𝑖𝑔 − 𝑅 ln −𝑅 𝑧𝑖 ln(𝑧𝑖 )
𝑖
𝑃𝑟𝑒𝑓 𝑖
Returns
S [float] Molar entropy, [J/(mol*K)]
__repr__()
Method to create a string representation of the phase object, with the goal of making it easy to obtain
standalone code which reproduces the current state of the phase. This is extremely helpful in creating new
test cases.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
Examples
>>> phase
IdealGas(HeatCapacityGases=[HeatCapacityGas(extrapolation="linear", method=
˓→"POLY_FIT", poly_fit=(50.0, 1000.0, [-8.231317991971707e-12, 1.
d2H_dP2()
Method to calculate and return the second pressure derivative of molar enthalpy of the phase.
𝜕2𝐻
=0
𝜕𝑃 2
Returns
d2H_dP2 [float] Second pressure derivative of molar enthalpy, [J/(mol*Pa^2)]
d2H_dT2()
Method to calculate and return the first temperature derivative of molar heat capacity of the phase.
∑︁ 𝜕𝐶𝑝,𝑖 𝑖𝑔
𝜕𝐶𝑝
= 𝑧𝑖
𝜕𝑇 𝑖
𝜕𝑇
Returns
d2H_dT2 [float] Second temperature derivative of enthalpy, [J/(mol*K^2)]
d2P_dT2()
Method to calculate and return the second temperature derivative of pressure of the phase.
𝜕2𝑃
=0
𝜕𝑇 2
Returns
d2P_dT2 [float] Second temperature derivative of pressure, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the phase.
𝜕2𝑃 −𝑃 2
=
𝜕𝑉 𝜕𝑇 𝑅𝑇 2
Returns
d2P_dTdV [float] Second volume derivative of pressure, [mol*Pa^2/(J*K)]
d2P_dV2()
Method to calculate and return the second volume derivative of pressure of the phase.
𝜕2𝑃 2𝑃 3
2
= 2 2
𝜕𝑉 𝑅 𝑇
Returns
d2P_dV2 [float] Second volume derivative of pressure, [Pa*mol^2/m^6]
d2S_dP2()
Method to calculate and return the second pressure derivative of molar entropy of the phase.
𝜕2𝑆 𝑅
= 2
𝜕𝑃 2 𝑃
Returns
d2S_dP2 [float] Second pressure derivative of molar entropy, [J/(mol*K*Pa^2)]
dH_dP()
Method to calculate and return the first pressure derivative of molar enthalpy of the phase.
𝜕𝐻
=0
𝜕𝑃
Returns
dH_dP [float] First pressure derivative of molar enthalpy, [J/(mol*Pa)]
dH_dP_V()
Method to calculate and return the pressure derivative of molar enthalpy at constant volume of the phase.
(︂ )︂ (︂ )︂
𝜕𝐻 𝜕𝑇
= 𝐶𝑝
𝜕𝑃 𝑉 𝜕𝑃 𝑉
Returns
dH_dP_V [float] First pressure derivative of molar enthalpy at constant volume, [J/(mol*Pa)]
dH_dT_V()
Method to calculate and return the molar heat capacity of the phase.
∑︁ 𝑖𝑔
𝐶𝑝 = 𝑧𝑖 𝐶𝑝,𝑖
𝑖
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
dH_dV_P()
Method to calculate and return the volume derivative of molar enthalpy at constant pressure of the phase.
(︂ )︂ (︂ )︂
𝜕𝐻 𝜕𝑇
= 𝐶𝑝
𝜕𝑉 𝑃 𝜕𝑉 𝑃
Returns
dH_dV_T [float] First pressure derivative of molar enthalpy at constant volume, [J/(m^3)]
dH_dV_T()
Method to calculate and return the volume derivative of molar enthalpy at constant temperature of the phase.
(︂ )︂
𝜕𝐻
=0
𝜕𝑉 𝑇
Returns
dH_dV_T [float] First pressure derivative of molar enthalpy at constant volume, [J/(m^3)]
dP_dT()
Method to calculate and return the first temperature derivative of pressure of the phase.
𝜕𝑃 𝑃
=
𝜕𝑇 𝑇
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the phase.
𝜕𝑃 −𝑃 2
=
𝜕𝑉 𝑅𝑇
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dS_dP()
Method to calculate and return the first pressure derivative of molar entropy of the phase.
𝜕𝑆 𝑅
=−
𝜕𝑃 𝑃
Returns
dS_dP [float] First pressure derivative of molar entropy, [J/(mol*K*Pa)]
dS_dP_V()
Method to calculate and return the first pressure derivative of molar entropy at constant volume of the phase.
(︂ )︂
𝜕𝑆 −𝑅 𝐶𝑝 𝜕𝑇
= +
𝜕𝑃 𝑉 𝑃 𝑇 𝜕𝑃
Returns
dS_dP_V [float] First pressure derivative of molar entropy at constant volume,
[J/(mol*K*Pa)]
dS_dT()
Method to calculate and return the first temperature derivative of molar entropy of the phase.
𝜕𝑆 𝐶𝑝
=
𝜕𝑇 𝑇
Returns
dS_dT [float] First temperature derivative of molar entropy, [J/(mol*K^2)]
dS_dT_V()
Method to calculate and return the first temperature derivative of molar entropy at constant volume of the
phase.
(︂ )︂
𝜕𝑆 𝐶𝑝 𝑅 𝜕𝑃
= −
𝜕𝑇 𝑉 𝑇 𝑃 𝜕𝑇
Returns
dS_dT_V [float] First temperature derivative of molar entropy at constant volume,
[J/(mol*K^2)]
dlnphis_dP()
Method to calculate and return the pressure derivative of the log of fugacity coefficients of each component
in the phase.
𝜕 ln 𝜑𝑖
=0
𝜕𝑃
Returns
dlnphis_dP [list[float]] Log fugacity coefficients, [1/Pa]
dlnphis_dT()
Method to calculate and return the temperature derivative of the log of fugacity coefficients of each com-
ponent in the phase.
𝜕 ln 𝜑𝑖
=0
𝜕𝑇
Returns
dlnphis_dT [list[float]] Log fugacity coefficients, [1/K]
dphis_dP()
Method to calculate and return the pressure derivative of fugacity coefficients of each component in the
phase.
𝜕𝜑𝑖
=0
𝜕𝑃
Returns
dphis_dP [list[float]] Pressure derivative of fugacity fugacity coefficients, [1/Pa]
dphis_dT()
Method to calculate and return the temperature derivative of fugacity coefficients of each component in the
phase.
𝜕𝜑𝑖
=0
𝜕𝑇
Returns
dphis_dT [list[float]] Temperature derivative of fugacity fugacity coefficients, [1/K]
fugacities()
Method to calculate and return the fugacities of each component in the phase.
fugacitiy𝑖 = 𝑧𝑖 𝑃
Returns
fugacities [list[float]] Fugacities, [Pa]
Examples
>>> phase.fugacities()
[79000.0, 21000.0]
lnphis()
Method to calculate and return the log of fugacity coefficients of each component in the phase.
ln 𝜑𝑖 = 0.0
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
phis()
Method to calculate and return the fugacity coefficients of each component in the phase.
𝜑𝑖 = 1
Returns
phis [list[float]] Fugacity fugacity coefficients, [-]
Gas Phases
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = − 2
𝑉 − 𝑏 𝑉 + 𝛿𝑉 + 𝜖
Parameters
eos_class [thermo.eos_mix.GCEOSMIX] EOS class, [-]
eos_kwargs [dict] Parameters to be passed to the created EOS, [-]
HeatCapacityGases [list[HeatCapacityGas]] Objects proiding pure-component heat capacity
correlations, [-]
Hfs [list[float]] Molar ideal-gas standard heats of formation at 298.15 K and 1 atm, [J/mol]
Gfs [list[float]] Molar ideal-gas standard Gibbs energies of formation at 298.15 K and 1 atm,
[J/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
zs [list[float], optional] Mole fractions of each component, [-]
Examples
T-P initialization for oxygen and nitrogen with the PR EOS, using Poling’s polynomial heat capacities:
>>> phase.Cp()
29.2285050
Methods
Cp()
Method to calculate and return the constant-pressure heat capacity of the phase.
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
Cv()
Method to calculate and return the constant-volume heat capacity Cv of the phase.
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑣 = 𝑇 / + 𝐶𝑝
𝜕𝑇 𝑉 𝜕𝑉 𝑇
Returns
Cv [float] Constant volume molar heat capacity, [J/(mol*K)]
H()
Method to calculate and return the enthalpy of the phase. The reference state for most subclasses is an
ideal-gas enthalpy of zero at 298.15 K and 101325 Pa.
Returns
H [float] Molar enthalpy, [J/(mol)]
S()
Method to calculate and return the entropy of the phase. The reference state for most subclasses is an
ideal-gas entropy of zero at 298.15 K and 101325 Pa.
Returns
S [float] Molar entropy, [J/(mol*K)]
V_iter(force=False)
Method to calculate and return the volume of the phase in a way suitable for a TV resolution to converge
on the same pressure. This often means the return value of this method is an mpmath mpf. This dummy
method simply returns the implemented V method.
Returns
V [float or mpf] Molar volume, [m^3/mol]
__repr__()
Method to create a string representation of the phase object, with the goal of making it easy to obtain
standalone code which reproduces the current state of the phase. This is extremely helpful in creating new
test cases.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
d2P_dT2()
Method to calculate and return the second temperature derivative of pressure of the phase.
2
𝜕2𝑃 𝑎 𝑑 𝛼(𝑇 )
(︂ )︂
2
= − 2 𝑑𝑇
𝜕𝑇 2 𝑉 𝑉 +𝑉𝛿+𝜖
Returns
d2P_dT2 [float] Second temperature derivative of pressure, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the phase.
Returns
𝑎 𝑑𝛼(𝑇 )
(︂ )︂
𝜕𝑃 𝑅
= − 2 𝑑𝑇
𝜕𝑇 𝑉 𝑉 −𝑏 𝑉 +𝑉𝛿+𝜖
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the phase.
(︂ )︂
𝜕𝑃 𝑅𝑇 𝑎 (−2𝑉 − 𝛿) 𝛼(𝑇 )
=− 2 − 2
𝜕𝑉 𝑇 (𝑉 − 𝑏) (𝑉 2 + 𝑉 𝛿 + 𝜖)
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dS_dT_V()
Method to calculate and return the first temperature derivative of molar entropy at constant volume of the
phase.
𝐶𝑝𝑖𝑔
(︂ )︂ (︂ )︂
𝜕𝑆 𝑅 𝜕𝑃 𝜕𝑆𝑑𝑒𝑝
= − +
𝜕𝑇 𝑉 𝑇 𝑃 𝜕𝑇 𝜕𝑇 𝑉
Returns
dS_dT_V [float] First temperature derivative of molar entropy at constant volume,
[J/(mol*K^2)]
dlnphis_dP()
Method to calculate and return the first pressure derivative of the log of fugacity coefficients of each com-
ponent in the phase. The calculation is performed by thermo.eos_mix.GCEOSMIX.dlnphis_dP or a
simpler formula in the case of most specific models.
Returns
dlnphis_dP [list[float]] First pressure derivative of log fugacity coefficients, [1/Pa]
dlnphis_dT()
Method to calculate and return the first temperature derivative of the log of fugacity coefficients of each
component in the phase. The calculation is performed by thermo.eos_mix.GCEOSMIX.dlnphis_dT or
a simpler formula in the case of most specific models.
Returns
dlnphis_dT [list[float]] First temperature derivative of log fugacity coefficients, [1/K]
lnphis()
Method to calculate and return the log of fugacity coefficients of each component in the phase. The calcu-
lation is performed by thermo.eos_mix.GCEOSMIX.fugacity_coefficients or a simpler formula in
the case of most specific models.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
Notes
This method is marginally faster than Phase.to as it does not need to check what the inputs are.
Examples
>>> new_liq
CEOSLiquid(eos_class=PRMIX, eos_kwargs={"Tcs": [305.32, 369.83], "Pcs":␣
˓→[4872000.0, 4248000.0], "omegas": [0.098, 0.152]}, HeatCapacityGases=[],␣
Liquid Phases
𝑅𝑇 𝑎𝛼(𝑇 )
𝑃 = −
𝑉 − 𝑏 𝑉 2 + 𝛿𝑉 + 𝜖
Parameters
eos_class [thermo.eos_mix.GCEOSMIX] EOS class, [-]
eos_kwargs [dict] Parameters to be passed to the created EOS, [-]
HeatCapacityGases [list[HeatCapacityGas]] Objects proiding pure-component heat capacity
correlations, [-]
Hfs [list[float]] Molar ideal-gas standard heats of formation at 298.15 K and 1 atm, [J/mol]
Gfs [list[float]] Molar ideal-gas standard Gibbs energies of formation at 298.15 K and 1 atm,
[J/mol]
T [float, optional] Temperature, [K]
P [float, optional] Pressure, [Pa]
zs [list[float], optional] Mole fractions of each component, [-]
Examples
T-P initialization for oxygen and nitrogen with the PR EOS, using Poling’s polynomial heat capacities:
>>> phase.Cp()
29.2285050
1/3
• ‘Orentlicher-Prausnitz’: 𝐶 = 𝑖 𝑗 𝑘 𝑦𝑖 𝑦𝑗 𝑦𝑘 𝐶𝑖𝑗𝑘 (𝑇 ) where 𝐶𝑖𝑗𝑘 = (𝐶𝑖𝑗 𝐶𝑗𝑘 𝐶𝑖𝑘 )
∑︀ ∑︀ ∑︀
Examples
T-P initialization for nitrogen, oxygen, and argon, using Poling’s polynomial heat capacities:
>>> Tcs=[126.2, 154.58, 150.8]
>>> Pcs=[3394387.5, 5042945.25, 4873732.5]
>>> Vcs=[8.95e-05, 7.34e-05, 7.49e-05]
>>> omegas=[0.04, 0.021, -0.004]
>>> model = VirialCSP(Tcs=Tcs, Pcs=Pcs, Vcs=Vcs, omegas=omegas, B_model='VIRIAL_B_
˓→PITZER_CURL', cross_B_model='Tarakad-Danner', C_model='VIRIAL_C_ORBEY_VERA')
˓→'Orentlicher-Prausnitz')
Methods
B()
Method to calculate and return the B second virial coefficient.
Returns
B [float] Second molar virial coefficient [m^3/mol]
C()
Method to calculate and return the C third virial coefficient.
Returns
C [float] Third molar virial coefficient [m^6/mol^2]
H_dep()
Method to calculate and return the molar departure enthalpy.
𝑑 𝑑
(︀ )︀
𝑅𝑇 2 2𝑉 𝑑𝑇 𝑉 2 + 𝑉 𝐵(𝑇 ) + 𝐶(𝑇 )
(︂ )︂
𝐵(𝑇 ) + 𝑑𝑇 𝐶(𝑇 )
𝐻𝑑𝑒𝑝 = − 𝑅𝑇 −1 +
2𝑉 2 𝑉2
Returns
H_dep [float] Departure enthalpy [J/mol]
S_dep()
Method to calculate and return the molar departure entropy.
(︁ (︁ 2 )︁ )︁
𝑑
𝐶(𝑇 ) + 2𝑉 2 ln 𝑉 +𝑉 𝐵(𝑇 )+𝐶(𝑇 ) (︀ 𝑑 )︀
𝑅 −𝑇 𝑑𝑇 𝑉 2 − 2𝑉 𝑇 𝑑𝑇 𝐵(𝑇 ) + 𝐵(𝑇 ) − 𝐶(𝑇 )
𝑆𝑑𝑒𝑝 =
2𝑉 2
Returns
S_dep [float] Departure enthalpy [J/(mol*K)]
V()
Method to calculate and return the molar volume.
Returns
V [float] Molar volume [m^3/mol]
__repr__()
Method to create a string representation of the phase object, with the goal of making it easy to obtain
standalone code which reproduces the current state of the phase. This is extremely helpful in creating new
test cases.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
d2B_dT2()
Method to calculate and return the second temperature derivative of the B second virial coefficient.
Returns
d2B_dT2 [float] Second temperature derivative of second molar virial coefficient
[m^3/(mol*K^2)]
d2B_dTdzs()
Method to calculate and return the temperature derivative of the first mole fraction derivatives of the B
second virial coefficient.
Returns
d2B_dTdzs [list[float]] First temperature derivative of first mole fraction derivatives of sec-
ond molar virial coefficient [m^3/(mol*K)]
d2B_dzizjs()
Method to calculate and return the second mole fraction derivatives of the B second virial coefficient.
Returns
d2B_dzizjs [list[list[float]]] Second mole fraction derivatives of second molar virial coeffi-
cient [m^3/(mol)]
d2C_dT2()
Method to calculate and return the second temperature derivative of the C third virial coefficient.
Returns
d2C_dT2 [float] Second temperature derivative of third molar virial coefficient
[m^6/(mol^2*K^2)]
d2C_dTdzs()
Method to calculate and return the first temperature derivative of the first mole fraction derivatives of the
C third virial coefficient.
Returns
d2C_dTdzs [list[float]] First temperature derivative of the first mole fraction derivatives of
third molar virial coefficient [m^6/(mol^2*K)]
d2C_dzizjs()
Method to calculate and return the second mole fraction derivatives of the C third virial coefficient.
Returns
d2C_dzizjs [list[list[float]]] Second mole fraction derivatives of third molar virial coefficient
[m^6/(mol^2)]
d2P_dT2()
Method to calculate and return the second derivative of pressure with respect to temperature.
(︁ (︁ )︁ )︁
𝑑2 𝑑2 𝑑 𝑑
(︂ 2 )︂
𝜕 𝑃 𝑅 𝑇 𝑉 𝑑𝑇 2 𝐵(𝑇 ) + 𝑑𝑇 2 𝐶(𝑇 ) + 2𝑉 𝑑𝑇 𝐵(𝑇 ) + 2 𝑑𝑇 𝐶(𝑇 )
=
𝜕𝑇 2 𝑉 𝑉3
Returns
d2P_dT2 [float] Second derivative of pressure with respect to temperature at constant vol-
ume [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to volume and temperature.
𝑑 𝑑
(︀ )︀
𝐶(𝑇 ) + 𝑉 2 + 2𝑉 𝐵(𝑇 ) + 3𝐶(𝑇 )
(︂ 2 )︂
𝜕 𝑃 𝑅 2𝑇 𝑉 𝑑𝑇 𝐵(𝑇 ) + 3𝑇 𝑑𝑇
=−
𝜕𝑉 𝜕𝑇 𝑇 𝑉4
Returns
d2P_dTdV [float] Second derivative of pressure with respect to volume at and temperature
[Pa*mol/(m^3*K)]
d2P_dV2()
Method to calculate and return the second derivative of pressure with respect to volume.
(︀ )︀
2𝑅𝑇 𝑉 2 + 3𝑉 𝐵(𝑇 ) + 6𝐶(𝑇 )
(︂ 2 )︂
𝜕 𝑃
=
𝜕𝑉 2 𝑇 𝑉5
Returns
d2P_dV2 [float] Second derivative of pressure with respect to volume at constant tempera-
ture [Pa*mol^2/(m^6)]
d2V_dzizjs()
Method to calculate and return the second mole fraction derivatives of the molar volume. See chemicals.
virial.d2V_dzizjs_virial for further details.
Returns
d2V_dzizjs [list[float]] Second mole fraction derivatives of molar volume [m^3/mol]
d3B_dT3()
Method to calculate and return the third temperature derivative of the B second virial coefficient.
Returns
d3B_dT3 [float] Third temperature derivative of second molar virial coefficient
[m^3/(mol*K^3)]
d3C_dT3()
Method to calculate and return the third temperature derivative of the C third virial coefficient.
Returns
d3C_dT3 [float] Second temperature derivative of third molar virial coefficient
[m^6/(mol^2*K^3)]
dB_dT()
Method to calculate and return the first temperature derivative of the B second virial coefficient.
Returns
dB_dT [float] First temperature derivative of second molar virial coefficient [m^3/(mol*K)]
dB_dzs()
Method to calculate and return the first mole fraction derivatives of the B second virial coefficient.
Returns
dB_dzs [list[float]] First mole fraction derivatives of second molar virial coefficient
[m^3/(mol)]
dC_dT()
Method to calculate and return the first temperature derivative of the C third virial coefficient.
Returns
dC_dT [float] First temperature derivative of third molar virial coefficient [m^6/(mol^2*K)]
dC_dzs()
Method to calculate and return the first mole fraction derivatives of the C third virial coefficient.
Returns
dC_dzs [list[float]] First mole fraction derivatives of third molar virial coefficient
[m^6/(mol^2)]
dG_dep_dzs()
Method to calculate and return the first mole fraction derivatives of the departure Gibbs energy.
Returns
dG_dep_dzs [list[float]] First mole fraction derivatives of departure Gibbs energy [J/mol]
dH_dep_dT()
Method to calculate and return the first temperature derivative of molar departure enthalpy.
(︁ )︁
𝑑2 2 𝑑2 𝑑
𝜕𝐻𝑑𝑒𝑝 𝑅 2𝑇 2 𝑉 𝑑𝑇 2 𝐵(𝑇 ) + 𝑇 𝑑𝑇 2 𝐶(𝑇 ) + 2𝑇 𝑉 𝑑𝑇 𝐵(𝑇 ) − 2𝑉 𝐵(𝑇 ) − 2𝐶(𝑇 )
=
𝜕𝑇 2𝑉 2
Returns
dH_dep_dT [float] First temperature derivative of departure enthalpy [J/(mol*K)]
dP_dT()
Method to calculate and return the first derivative of pressure with respect to temperature.
(︀ (︀ 𝑑 𝑑
)︀ )︀
𝐶(𝑇 ) + 𝑉 2 + 𝑉 𝐵(𝑇 ) + 𝐶(𝑇 )
(︂ )︂
𝜕𝑃 𝑅 𝑇 𝑉 𝑑𝑇 𝐵(𝑇 ) + 𝑑𝑇
=
𝜕𝑇 𝑉 𝑉3
Returns
dP_dT [float] First derivative of pressure with respect to temperature at constant volume
[Pa/K]
dP_dV()
Method to calculate and return the first derivative of pressure with respect to volume.
(︀ )︀
𝑅𝑇 𝑉 2 + 2𝑉 𝐵(𝑇 ) + 3𝐶(𝑇 )
(︂ )︂
𝜕𝑃
=−
𝜕𝑉 𝑇 𝑉4
Returns
dP_dV [float] First derivative of pressure with respect to volume at constant temperature
[Pa*mol/(m^3)]
dS_dep_dT()
Method to calculate and return the first temperature derivative of molar departure entropy.
(︁ )︀ (︁ 𝑑2 (︁ )︁
𝑑2
2
(︀ 𝑑 𝑑
)︀ (︀ 2 𝑑
𝜕𝑆𝑑𝑒𝑝 𝑅 2𝑉 𝑉 𝑑𝑇 𝐵(𝑇 ) + 𝑑𝑇 𝐶(𝑇 ) − 𝑉 + 𝑉 𝐵(𝑇 ) + 𝐶(𝑇 ) 𝑇 𝑑𝑇 2 𝐶(𝑇 ) + 2𝑉 𝑇 𝑑𝑇 2 𝐵(𝑇 ) + 2 𝑑𝑇 𝐵(𝑇 ) +2
= 2 2
𝜕𝑇 2𝑉 (𝑉 + 𝑉 𝐵(𝑇 ) + 𝐶(𝑇 ))
Returns
dS_dep_dT [float] First temperature derivative of departure enthalpy [J/(mol*K^2)]
dV_dzs()
Method to calculate and return the first mole fraction derivatives of the molar volume. See chemicals.
virial.dV_dzs_virial for further details.
Returns
dV_dzs [list[float]] First mole fraction derivatives of molar volume [m^3/mol]
lnphis()
Method to calculate and return the log fugacity coefficients of the phase.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
chemicals.virial.Tarakad_Danner_virial_CSP_Pcijs, chemicals.
virial.Lee_Kesler_virial_CSP_Vcijs and chemicals.virial.
Tarakad_Danner_virial_CSP_omegaijs; note that this mixing rule has an interaction
parameter for the interaction critical temperature, which defaults to zero and can be
provided. chemicals.virial.Meng_Duan_2005_virial_CSP_kijs or chemicals.
virial.Tarakad_Danner_virial_CSP_kijs are two sample models for estimating
these parameters; additional models are available in the literature and also the value can
be regressed from experimental values.
cross_B_model_kijs [list[list[float]], optional] Cross parameters kijs for
VIRIAL_CROSS_B_TARAKAD_DANNER cross rule; specified or set to zero [-]
C_model [str, optional] The model used to calculate the C pure component and interaction virial
coefficients, [-]
• VIRIAL_C_ZERO: The C virial coefficient is always zero
• VIRIAL_C_ORBEY_VERA The model of [9], chemicals.virial.
CVirial_Orbey_Vera
• VIRIAL_C_XIANG The model of [10], chemicals.virial.CVirial_Liu_Xiang
B_model_Meng_as [list[list[float]], optional] Meng a parameters; this is essentially a cor-
rection for polar behavior, and must be provided for all components as well as their in-
teractions; see chemicals.virial.Meng_virial_a. This is used only for the model
VIRIAL_B_MENG [-]
B_model_Tsonopoulos_extended_as [list[list[float]], optional] Tsonopoulos extended a
parameters; this is essentially a correction for polar behavior, and must be provided
for all components as well as their interactions; see thermo.functional_groups.
BVirial_Tsonopoulos_extended_ab. This is used only for the model
VIRIAL_B_TSONOPOULOS_EXTENDED [-]
B_model_Tsonopoulos_extended_bs [list[list[float]], optional] Meng a parameters;
this is essentially a correction for polar behavior, and must be provided for all
components as well as their interactions; see thermo.functional_groups.
BVirial_Tsonopoulos_extended_ab. This is used only for the model
VIRIAL_B_TSONOPOULOS_EXTENDED [-]
T [float, optional] The specified temperature for the model; the calculations are cached based
only on temperature, use VirialCSP.to to obtain a new object at a different temperature,
[K]
References
[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]
Methods
B_interactions()
Method to calculate and return the matrix of interaction component virial coefficients at the specified tem-
perature.
Returns
B_interactions [list[list[float]]] Second B virial coefficients interaction matrix, [m^3/mol]
B_pures()
Method to calculate and return the pure component virial coefficients at the specified temperature.
Returns
B_pures [list[float]] Second B virial coefficients, [m^3/mol]
C_interactions()
Method to calculate and return the matrix of interaction third virial coefficients at the specified temperature.
Returns
C_interactions [list[list[float]]] Interaction third C virial coefficients, [m^6/mol^2]
C_pures()
Method to calculate and return the pure component third virial coefficients at the specified temperature.
Returns
C_pures [list[float]] Third C virial coefficients, [m^6/mol^2]
__repr__()
Method to create a string representation of the VirialCSP object, with the goal of making it easy to obtain
standalone code which reproduces the current state of the phase. This is extremely helpful in creating new
test cases.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
Examples
˓→'VIRIAL_C_ORBEY_VERA')
>>> model
VirialCSP(Tcs=[126.2, 154.58, 150.8], Pcs=[3394387.5, 5042945.25, 4873732.5],␣
˓→Vcs=[8.95e-05, 7.34e-05, 7.49e-05], omegas=[0.04, 0.021, -0.004], B_model=
˓→ORBEY_VERA')
d2B_dT2_interactions()
Method to calculate and return the second temperature derivative of the B virial interaction coefficients at
the specified temperature.
Returns
d2B_dT2_interactions [list[list[float]]] Second temperature derivative of second B virial
interaction coefficients, [m^3/(mol*K^2)]
d2B_dT2_pures()
Method to calculate and return the second temperature derivative of pure component virial coefficients at
the specified temperature.
Returns
d2B_dT2_pures [list[float]] Second temperature derivative of second B virial coefficients,
[m^3/(mol*K^2)]
d2C_dT2_interactions()
Method to calculate and return the matrix of second temperature derivatives of interaction third virial co-
efficients at the specified temperature.
Returns
d2C_dT2_interactions [list[list[float]]] Interaction second temperature derivatives of third
C virial coefficients, [m^6/(mol^2*K^2)]
d2C_dT2_pures()
Method to calculate and return the second temperature derivative of pure component third virial coefficients
at the specified temperature.
Returns
d2C_dT2_pures [list[float]] Second temperature derivative of third C virial coefficients,
[m^6/(mol^2*K^2)]
d3B_dT3_interactions()
Method to calculate and return the third temperature derivative of the B virial interaction coefficients at the
specified temperature.
Returns
d3B_dT3_interactions [list[list[float]]] Third temperature derivative of second B virial in-
teraction coefficients, [m^3/(mol*K^3)]
d3B_dT3_pures()
Method to calculate and return the third temperature derivative of pure component virial coefficients at the
specified temperature.
Returns
d3B_dT3_pures [list[float]] Third temperature derivative of second B virial coefficients,
[m^3/(mol*K^3)]
d3C_dT3_interactions()
Method to calculate and return the matrix of third temperature derivatives of interaction third virial coeffi-
cients at the specified temperature.
Returns
d3C_dT3_interactions [list[list[float]]] Interaction third temperature derivatives of third C
virial coefficients, [m^6/(mol^2*K^2)]
d3C_dT3_pures()
Method to calculate and return the third temperature derivative of pure component third virial coefficients
at the specified temperature.
Returns
d3C_dT3_pures [list[float]] Third temperature derivative of third C virial coefficients,
[m^6/(mol^2*K^3)]
dB_dT_interactions()
Method to calculate and return the first temperature derivative of the B virial interaction coefficients at the
specified temperature.
Returns
dB_dT_interactions [list[list[float]]] Second temperature derivative of second B virial in-
teraction coefficients, [m^3/(mol*K)]
dB_dT_pures()
Method to calculate and return the first temperature derivative of pure component virial coefficients at the
specified temperature.
Returns
dB_dT_pures [list[float]] Second temperature derivative of second B virial coefficients,
[m^3/(mol*K)]
dC_dT_interactions()
Method to calculate and return the matrix of first temperature derivatives of interaction third virial coeffi-
cients at the specified temperature.
Returns
dC_dT_interactions [list[list[float]]] Interaction first temperature derivatives of third C
virial coefficients, [m^6/(mol^2*K)]
dC_dT_pures()
Method to calculate and return the first temperature derivative of pure component third virial coefficients
at the specified temperature.
Returns
dC_dT_pures [list[float]] First temperature derivative of third C virial coefficients,
[m^6/(mol^2*K)]
to(T=None)
Method to construct a new object at a new temperature.
Parameters
T [float] Temperature, [K]
Returns
obj [VirialCSP] Object at new temperature, [-]
In all cases, the activity coefficient is derived from the GibbsExcess model specified as input; use the
IdealSolution class as an input to set the activity coefficients to one.
The enthalpy H and entropy S (and other caloric properties U, G, A) equation options are similar to the equilib-
rium ones. If the same option is selected for equilibrium_basis and caloric_basis, the phase will be thermody-
namically consistent. This is recommended for many reasons. The full ‘Poynting&PhiSat’ equations for H and
S are as follows; see GibbsExcessLiquid.H and GibbsExcessLiquid.S for all of the other equations:
Poynting
[︃ (︃ 𝜕𝜑 𝜕𝑃sat,𝑖
)︃ ∫︁ ]︃
∑︁ sat,𝑖 𝑇
𝐻 = 𝐻excess + 𝑧𝑖 −𝑅𝑇 2 𝜕𝑇
+ 𝜕𝑇 + 𝜕𝑇
+ 𝐶𝑝,𝑖𝑔 𝑑𝑇
𝑖
𝜑 sat,𝑖 𝑃 sat,𝑖 Poynting 𝑇,𝑟𝑒𝑓
Poynting
[︃ (︃ 𝜕𝜑sat,𝑖 𝜕𝑃sat,𝑖
Poynting · 𝜑sat,𝑖
(︂ )︂ (︂ )︂
∑︁ 𝑃 ∑︁
𝜕𝑇 𝜕𝑇 𝜕𝑇
𝑆 = 𝑆excess − 𝑅 𝑧𝑖 ln 𝑧𝑖 − 𝑅 ln − 𝑧𝑖 𝑅 𝑇 +𝑇 +𝑇 + ln(𝑃sat,𝑖 ) + ln
𝑖
𝑃𝑟𝑒𝑓 𝑖
𝜑sat,𝑖 𝑃sat,𝑖 Poynting 𝑃
An additional caloric mode is Hvap, which uses enthalpy of vaporization; this mode can never be thermodynam-
ically consistent, but is still widely used.
[︃ ∫︁ 𝑇 ]︃
∑︁
𝐻 = 𝐻excess + 𝑧𝑖 −𝐻𝑣𝑎𝑝,𝑖 + 𝐶𝑝,𝑖𝑔 𝑑𝑇
𝑖 𝑇,𝑟𝑒𝑓
(︂ )︂ [︃ (︂ (︂ )︂)︂ ∫︁ 𝑇 ]︃
∑︁ 𝑃 ∑︁ 1 𝐻𝑣𝑎𝑝,𝑖 𝐶𝑝,𝑖𝑔,𝑖
𝑆 = 𝑆excess − 𝑅 𝑧𝑖 ln 𝑧𝑖 − 𝑅 ln − 𝑧𝑖 𝑅 ln 𝑃sat,𝑖 + ln + − 𝑑𝑇
𝑖
𝑃𝑟𝑒𝑓 𝑖
𝑃 𝑇 𝑇,𝑟𝑒𝑓 𝑇
Warning: Note that above the critical point, there is no definition for what vapor pressure is. The vapor
pressure also tends to reach zero at temperatures in the 4-20 K range. These aspects mean extrapolation in the
supercritical and very low temperature region is critical to ensure
(︀ the equations will still(︀ converge. Extrapo-)︀
lation can be performed using either the equation 𝑃 sat = exp 𝐴 − 𝐵 or sat
= exp 𝐴 + 𝐵
)︀
𝑇 𝑃 𝑇 + 𝐶 · ln 𝑇
by setting Psat_extrpolation to either ‘AB’ or ‘ABC’ respectively. The extremely low temperature region’s
issue is solved by calculating the logarithm of vapor pressures instead of the actual value. While floating
point values in Python (doubles) can reach a minimum value of around 1e-308, if only the logarithm of that
number is computed no issues arise. Both of these features only work when the vapor pressure correlations
are polynomials.
Warning: When using ‘PhiSat’ as an option, note that the factor cannot be calculated when a compound is
supercritical, as there is no longer any vapor-liquid pure-component equilibrium (by definition).
Parameters
VaporPressures [list[thermo.vapor_pressure.VaporPressure]] Objects holding vapor
pressure data and methods, [-]
VolumeLiquids [list[thermo.volume.VolumeLiquid], optional] Objects holding liquid vol-
ume data and methods; required for Poynting factors and volumetric properties, [-]
HeatCapacityGases [list[thermo.heat_capacity.HeatCapacityGas], optional] Objects
proiding pure-component heat capacity correlations; required for caloric properties, [-]
use_Hvap_caloric [bool, optional] If True, enthalpy and entropy will be calculated using ideal-
gas heat capacity and the heat of vaporization of the fluid only. This forces enthalpy to be
pressure-independent. This supersedes other options which would otherwise impact these
properties. The molar volume of the fluid has no impact on enthalpy or entropy if this option
is True. This option is not thermodynamically consistent, but is still often an assumption that
is made.
Methods
Cp()
Method to calculate and return the constant-pressure heat capacity of the phase.
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
H()
Method to calculate the enthalpy of the GibbsExcessLiquid phase. Depending on the settings of the
phase, this can include the effects of activity coefficients gammas, pressure correction terms Poyntings,
and pure component saturation fugacities phis_sat as well as the pure component vapor pressures.
When caloric_basis is ‘Poynting&PhiSat’:
Poynting
[︃ (︃ 𝜕𝜑 𝜕𝑃sat,𝑖
)︃ ∫︁ ]︃
∑︁ sat,𝑖 𝑇
2 𝜕𝑇 𝜕𝑇 𝜕𝑇
𝐻 = 𝐻excess + 𝑧𝑖 −𝑅𝑇 + + + 𝐶𝑝,𝑖𝑔 𝑑𝑇
𝑖
𝜑sat,𝑖 𝑃sat,𝑖 Poynting 𝑇,𝑟𝑒𝑓
Returns
H [float] Enthalpy of the phase, [J/(mol)]
Poyntings()
Method to calculate and return the Poynting pressure correction factors of the phase, [-].
(︂ )︂
𝑉𝑚,𝑖 (𝑃 − 𝑃𝑠𝑎𝑡 )
Poynting𝑖 = exp
𝑅𝑇
Returns
Poyntings [list[float]] Poynting pressure correction factors, [-]
Notes
The above formula is correct for pressure-independent molar volumes. When the volume does depend on
pressure, the full expression is:
⎡ ∫︀ 𝑃 ⎤
𝑙
𝑃 𝑠𝑎𝑡 𝑉𝑖 𝑑𝑃
Poynting = exp ⎣ 𝑖 ⎦
𝑅𝑇
When a specified model e.g. the Tait equation is used, an analytical integral of this term is normally
available.
S()
Method to calculate the entropy of the GibbsExcessLiquid phase. Depending on the settings of the
phase, this can include the effects of activity coefficients gammas, pressure correction terms Poyntings,
and pure component saturation fugacities phis_sat as well as the pure component vapor pressures.
When caloric_basis is ‘Poynting&PhiSat’:
Poynting
[︃ (︃ 𝜕𝜑sat,𝑖 𝜕𝑃sat,𝑖
Poynting ·
(︂ )︂ (︂
∑︁ 𝑃 ∑︁
𝜕𝑇 𝜕𝑇 𝜕𝑇
𝑆 = 𝑆excess − 𝑅 𝑧𝑖 ln 𝑧𝑖 − 𝑅 ln − 𝑧𝑖 𝑅 𝑇 +𝑇 +𝑇 + ln(𝑃sat,𝑖 ) + ln
𝑖
𝑃𝑟𝑒𝑓 𝑖
𝜑sat,𝑖 𝑃sat,𝑖 Poynting 𝑃
Returns
S [float] Entropy of the phase, [J/(mol*K)]
d2lnHenry_matrix_dT2()
Method to calculate and return the second temperature derivative of the matrix of log Henry’s law constants
as required by the traditional mixing rule, [-].
Returns
d2lnHenry_matrix_dT2 [list[list[float]]] Second temperature derivative of Henry’s law in-
teraction parameters, [log(Pa)/K]
dlnHenry_matrix_dT()
Method to calculate and return the first temperature derivative of the matrix of log Henry’s law constants
as required by the traditional mixing rule, [-].
Returns
dlnHenry_matrix_dT [list[list[float]]] First temperature derivative of Henry’s law interac-
tion parameters, [log(Pa)/K]
gammas()
Method to calculate and return the activity coefficients of the phase, [-]. This is a direct call to
GibbsExcess.gammas.
Returns
gammas [list[float]] Activity coefficients, [-]
lnHenry_matrix()
Method to calculate and return the matrix of log Henry’s law constants as required by the traditional mixing
rule, [-].
𝐵𝑖𝑗 𝐸𝑖𝑗
ln H𝑖,𝑗 = 𝐴𝑖𝑗 + + 𝐶𝑖𝑗 ln 𝑇 + 𝐷𝑖𝑗 𝑇 + 2 + 𝐹𝑖𝑗 𝑇 2
𝑇 𝑇
Returns
lnHenry_matrix [list[list[float]]] Henry’s law interaction parameters, [log(Pa)]
Notes
Notes
Warning: This factor cannot be calculated when a compound is supercritical, as there is no longer any
vapor-liquid pure-component equilibrium (by definition).
HelmholtzEOS is the base class for all Helmholtz energy fundamental equations of state.
class thermo.phases.HelmholtzEOS
Bases: thermo.phases.phase.Phase
Methods
Cp()
Method to calculate and return the constant-pressure heat capacity of the phase.
Returns
Cp [float] Molar heat capacity, [J/(mol*K)]
Cv()
Method to calculate and return the constant-volume heat capacity Cv of the phase.
(︂ )︂2 (︂ )︂
𝜕𝑃 𝜕𝑃
𝐶𝑣 = 𝑇 / + 𝐶𝑝
𝜕𝑇 𝑉 𝜕𝑉 𝑇
Returns
Cv [float] Constant volume molar heat capacity, [J/(mol*K)]
H()
Method to calculate and return the enthalpy of the phase. The reference state for most subclasses is an
ideal-gas enthalpy of zero at 298.15 K and 101325 Pa.
Returns
H [float] Molar enthalpy, [J/(mol)]
S()
Method to calculate and return the entropy of the phase. The reference state for most subclasses is an
ideal-gas entropy of zero at 298.15 K and 101325 Pa.
Returns
S [float] Molar entropy, [J/(mol*K)]
V_iter(force=False)
Method to calculate and return the volume of the phase in a way suitable for a TV resolution to converge
on the same pressure. This often means the return value of this method is an mpmath mpf. This dummy
method simply returns the implemented V method.
Returns
V [float or mpf] Molar volume, [m^3/mol]
__repr__()
Method to create a string representation of the phase object, with the goal of making it easy to obtain
standalone code which reproduces the current state of the phase. This is extremely helpful in creating new
test cases.
Returns
recreation [str] String which is valid Python and recreates the current state of the object if
ran, [-]
Examples
d2P_dT2()
Method to calculate and return the second temperature derivative of pressure of the phase.
Returns
d2P_dT2 [float] Second temperature derivative of pressure, [Pa/K^2]
d2P_dTdV()
Method to calculate and return the second derivative of pressure with respect to temperature and volume
of the phase.
Returns
d2P_dTdV [float] Second volume derivative of pressure, [mol*Pa^2/(J*K)]
d2P_dV2()
Method to calculate and return the second volume derivative of pressure of the phase.
Returns
d2P_dV2 [float] Second volume derivative of pressure, [Pa*mol^2/m^6]
dH_dP()
Method to calculate and return the pressure derivative of enthalpy of the phase at constant pressure.
Returns
dH_dP_T [float] Pressure derivative of enthalpy, [J/(mol*Pa)]
dP_dT()
Method to calculate and return the first temperature derivative of pressure of the phase.
Returns
dP_dT [float] First temperature derivative of pressure, [Pa/K]
dP_dV()
Method to calculate and return the first volume derivative of pressure of the phase.
Returns
dP_dV [float] First volume derivative of pressure, [Pa*mol/m^3]
dS_dP()
Method to calculate and return the pressure derivative of entropy of the phase at constant pressure.
Returns
dS_dP_T [float] Pressure derivative of entropy, [J/(mol*K*Pa)]
lnphis()
Method to calculate and return the log of fugacity coefficients of each component in the phase.
Returns
lnphis [list[float]] Log fugacity coefficients, [-]
to_TP_zs(T, P, zs)
Method to create a new Phase object with the same constants as the existing Phase but at a different T and
P.
Parameters
zs [list[float]] Molar composition of the new phase, [-]
T [float] Temperature of the new phase, [K]
P [float] Pressure of the new phase, [Pa]
Returns
new_phase [Phase] New phase at the specified conditions, [-]
Notes
This method is marginally faster than Phase.to as it does not need to check what the inputs are.
Examples
IAPWS95 is the base class for the IAPWS-95 formulation for water; IAPWS95Gas and IAPWS95Liquid are the gas and
liquid sub-phases respectively.
class thermo.phases.IAPWS95(T=None, P=None, zs=None)
Bases: thermo.phases.helmholtz_eos.HelmholtzEOS
Methods
k()
Calculate and return the thermal conductivity of water according to the IAPWS. For details, see
chemicals.thermal_conductivity.k_IAPWS.
Returns
k [float] Thermal conductivity of water, [W/m/K]
mu()
Calculate and return the viscosity of water according to the IAPWS. For details, see chemicals.
viscosity.mu_IAPWS.
Returns
mu [float] Viscosity of water, [Pa*s]
Methods
k()
Calculate and return the thermal conductivity of air according to Lemmon and Jacobsen (2004) For details,
see chemicals.thermal_conductivity.k_air_lemmon.
Returns
k [float] Thermal conductivity of air, [W/m/K]
mu()
Calculate and return the viscosity of air according to the Lemmon and Jacobsen (2003) . For details, see
chemicals.viscosity.mu_air_lemmon.
Returns
mu [float] Viscosity of air, [Pa*s]
• Enthalpy of Vaporization
• Enthalpy of Sublimation
chemicals.phase_change.MK
chemicals.phase_change.SMK
chemicals.phase_change.Velasco
chemicals.phase_change.Clapeyron
chemicals.phase_change.Riedel
chemicals.phase_change.Chen
chemicals.phase_change.Vetere
chemicals.phase_change.Liu
chemicals.phase_change.Watson
Notes
References
Methods
Watson_exponent = 0.38
Exponent used in the Watson equation
calculate(T, method)
Method to calculate heat of vaporization of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate heat of vaporization, [K]
method [str] Name of the method to use
Returns
Hvap [float] Heat of vaporization of the liquid at T, [J/mol]
interpolation_T = None
No interpolation transformation by default.
interpolation_property = None
No interpolation transformation by default.
interpolation_property_inv = None
No interpolation transformation by default.
name = 'Enthalpy of vaporization'
property_max = 1000000.0
Maximum valid of heat of vaporization. Set to twice the value in the available data.
property_min = 0
Mimimum valid value of heat of vaporization. This occurs at the critical point exactly.
ranked_methods = ['COOLPROP', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'MORGAN_KOBAYASHI',
'SIVARAMAN_MAGEE_KOBAYASHI', 'VELASCO', 'PITZER', 'VDI_TABULAR', 'ALIBAKHSHI',
'CRC_HVAP_TB', 'CRC_HVAP_298', 'GHARAGHEIZI_HVAP_298', 'CLAPEYRON', 'RIEDEL',
'CHEN', 'VETERE', 'LIU']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. For CSP methods, the models are considered valid
from 0 K to the critical point. For tabular data, extrapolation outside of the range is used if
tabular_extrapolation_permitted is set; if it is, the extrapolation is considered valid for all tem-
peratures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
The constant methods CRC_HVAP_TB, CRC_HVAP_298, and GHARAGHEIZI_HVAP are adjusted
for temperature dependence according to the Watson equation, with a temperature exponent as set in
Watson_exponent, usually regarded as 0.38. However, if Tc is not set, then the adjustment cannot be
made. In that case the methods are considered valid for within 5 K of their boiling point or 298.15 K as
appropriate.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'J/mol'
thermo.phase_change.enthalpy_vaporization_methods = ['DIPPR_PERRY_8E', 'VDI_PPDS',
'COOLPROP', 'VDI_TABULAR', 'MORGAN_KOBAYASHI', 'SIVARAMAN_MAGEE_KOBAYASHI', 'VELASCO',
'PITZER', 'ALIBAKHSHI', 'CRC_HVAP_TB', 'CRC_HVAP_298', 'GHARAGHEIZI_HVAP_298',
'CLAPEYRON', 'RIEDEL', 'CHEN', 'VETERE', 'LIU']
Holds all methods available for the EnthalpyVaporization class, for use in iterating over them.
method [str or None, optional] If specified, use this method by default and do not use the ranked
sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
Notes
References
Methods
calculate(T, method)
Method to calculate heat of sublimation of a solid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate heat of sublimation, [K]
method [str] Name of the method to use
Returns
Hsub [float] Heat of sublimation of the solid at T, [J/mol]
interpolation_T = None
No interpolation transformation by default.
interpolation_property = None
No interpolation transformation by default.
interpolation_property_inv = None
No interpolation transformation by default.
Warning: These classes were a first attempt at rigorous multiphase equilibrium. They may be useful in some
special cases but they are not complete and further development will not happen. They were never documented as
well.
It is recommended to switch over to the thermo.flash interface which seeks to be more modular, easier to maintain
and extend, higher-performance, and easier to modify.
This module contains functions for identifying phases as liquid, solid, and gas.
Solid identification is easy using the phase identification parameter. There is never more than one gas by
definition. For pure species, the phase identification parameter is a clear vapor-liquid differentiator in the subcritical
region and it provides line starting at the critical point for the supercritical region.
However for mixtures, there is no clear calcuation that can be performed to identify the phase of a mixture. Many
different criteria that have been proposed are included here. The phase identification parameter or PIP. is
recommended in general and is the default.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Phase Identification
– Main Interface
– Secondary Interfaces
– Scoring Functions
• Sorting Phases
Main Interface
Notes
This step is very important as although phase objects are designed to represent a single phase, cubic equations of
state can be switched back and forth by the flash algorithms. Thermodynamics doesn’t care about gases, liquids,
or solids; it just cares about minimizing Gibbs energy!
Examples
A butanol-water-ethanol flash yields three phases. For brevity we skip the flash and initialize our gas, liq0, and
liq1 object with the correct phase composition. Then we identify the phases into liquid, gas, and solid.
˓→'])
˓→614560475001724])),
˓→32731489750759])),
˓→037826650765965])),], )
Secondary Interfaces
Scoring Functions
Examples
˓→356180511425385, 175.67091124888998]))])
Returns
scores [list[float]] Scores for the phases in the order provided, [-]
thermo.phase_identification.vapor_score_traces(zs, CASs, Tcs, trace_CASs=['74-82-8', '7727-37-9'],
min_trace=0.0)
Compute a vapor score representing how vapor-like a phase is (higher, above zero = more vapor like) using
the concept of which phase has the most of the lightest compound. This nicely sidesteps issues in many other
methods, at the expense that it cannot be applied when there is only one phase and it is not smart enough to
handle liquid-liquid cases.
If no trace components are present, the component with the lowest critical temperature’s concentration is returned.
Because of the way this is implemented, the score is always larger than 1.0.
Parameters
zs [list[float]] Mole fractions of the phase being identified, [-]
CASs [list[str]] CAS numbers of all components, [-]
Tcs [list[float]] Critical temperatures of all species, [K]
trace_CASs [list[str]] Trace components to use for identification; if more than one component
is given, the first component present in both CASs and trace_CASs is the one used, [-]
min_trace [float] Minimum concentration to make a phase appear vapor-like; subtracted from
the concentration which would otherwise be returned, [-]
Returns
score [float] Vapor like score, [-]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
0.218
Vapor-like phase:
0.975
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of all species, [K]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
-163.18879226903942
Vapor-like phase:
-9.239540865294941
In this result, the vapor phase is not identified as a gas at all! It has a mass density of ~ 20 kg/m^3, which would
usually be called a gas by most people.
thermo.phase_identification.vapor_score_Vpc(V, Vcs, zs)
Compute a vapor score representing how vapor-like a phase is (higher, above zero = more vapor like) using the
following criteria
∑︁
𝑉 − 𝑧𝑖 𝑉𝑐,𝑖
𝑖
Parameters
V [float] Molar volume, [m^3/mol]
Vcs [list[float]] Critical molar volumes of all species, [m^3/mol]
zs [list[float]] Mole fractions of the phase being identified, [-]
Returns
score [float] Vapor like score, [-]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
-0.000195010604079
Vapor-like phase:
0.002239868570
𝑇 − 𝑇𝑝𝑐
∑︀
𝑗 𝑥𝑗 𝑉𝑐,𝑗 𝑇𝑐,𝑗
𝑇𝑝,𝑐 = 𝑟1 ∑︀
𝑗 𝑥𝑗 𝑉𝑐,𝑗
Parameters
T [float] Temperature, [K]
Tcs [list[float]] Critical temperatures of all species, [K]
Vcs [list[float]] Critical molar volumes of all species, [m^3/mol]
zs [list[float]] Mole fractions of the phase being identified, [-]
r1 [float] Tuning factor, [-]
Returns
score [float] Vapor like score, [-]
References
[1]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
-194.0535694431
Vapor-like phase:
-22.60037521107
𝑉 𝑇 2 − 𝑉𝑝𝑐 𝑇𝑝𝑐
2
Parameters
T [float] Temperature, [K]
V [float] Molar volume, [m^3/mol]
Tcs [list[float]] Critical temperatures of all species, [K]
Vcs [list[float]] Critical molar volumes of all species, [m^3/mol]
zs [list[float]] Mole fractions of the phase being identified, [-]
Returns
score [float] Vapor like score, [-]
References
[1]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
-55.932094761
Vapor-like phase:
201.020821992
Parameters
T [float] Temperature, [K]
P [float] Pressure, [Pa]
zs [list[float]] Mole fractions of the phase being identified, [-]
Tcs [list[float]] Critical temperatures of all species, [K]
Pcs [list[float]] Critical pressures of all species, [Pa]
omegas [list[float]] Acentric factors of all species, [-]
Returns
References
[1]
Examples
A flash of equimolar CO2/n-hexane at 300 K and 1 MPa is computed, and there is a two phase solution. The
phase must be identified for each result:
Liquid-like phase:
-1.16644793
Vapor-like phase:
1.397678492
This method works well in many conditions, like the Wilson equation itself, but fundamentally it cannot do a
great job because it is not tied to the phase model itself.
A dew point flash at P = 100 Pa for the same mixture shows both phases being identified as vapor-like:
1.074361930956633
>>> vapor_score_Wilson(T=T_dew, P=P, zs=[0.00014597910182360052, 0.
˓→9998540208981763], Tcs=[304.2, 507.6], Pcs=[7376460.0, 3025000.0], omegas=[0.2252,
˓→ 0.2975])
0.15021784286075726
thermo.phase_identification.vapor_score_Poling(kappa)
Compute a vapor score representing how vapor-like a phase is (higher, above zero = more vapor like) using the
isothermal compressibility kappa concept by Poling [1].
score = (𝜅 − 0.005atm−1 )
Parameters
kappa [float] Isothermal coefficient of compressibility, [1/Pa]
Returns
score [float] Vapor like score, [-]
Notes
A second criteria which is not implemented as it does not fit with the scoring concept is for liquids:
0.9 3
<𝛽<
𝑃 𝑃
References
[1]
Examples
>>> vapor_score_Poling(1.0054239121594122e-05)
1.013745778995
>>> vapor_score_Poling(2.121777078782957e-09)
-0.00478501093
score = −(Π − 1)
𝜕2𝑃 𝜕2𝑃
[︃ ]︃
𝜕𝑉 𝜕𝑇 𝜕𝑉 2
Π=𝑉 𝜕𝑃
− 𝜕𝑃
𝜕𝑇 𝜕𝑉
Parameters
V [float] Molar volume at T and P, [m^3/mol]
dP_dT [float] Derivative of P with respect to T, [Pa/K]
dP_dV [float] Derivative of P with respect to V, [Pa*mol/m^3]
d2P_dV2 [float] Second derivative of P with respect to V, [Pa*mol^2/m^6]
d2P_dVdT [float] Second derivative of P with respect to both V and T, [Pa*mol/m^3/K]
Returns
score [float] Vapor like score, [-]
References
[1]
Examples
0.016373735005
-10.288635225
thermo.phase_identification.vapor_score_Bennett_Schmidt(dbeta_dT )
Compute a vapor score representing how vapor-like a phase is (higher, above zero = more vapor like) using the
Bennet-Schmidt temperature derivative of isobaric expansion suggestion.
(︂ )︂
𝜕𝛽
score = −
𝜕𝑇
Parameters
dbeta_dT [float] Temperature derivative of isobaric coefficient of a thermal expansion, [1/K^2]
Returns
score [float] Vapor like score, [-]
References
[1]
Examples
>>> vapor_score_Bennett_Schmidt(-1.1776172267959163e-05)
1.1776172267959163e-05
>>> vapor_score_Bennett_Schmidt(7.558572848883679e-06)
-7.558572848883679e-06
Notes
The settings object uses the preferences liquid_sort_method, liquid_sort_prop, liquid_sort_cmps, liq-
uid_sort_cmps_neg, and phase_sort_higher_first.
This module contains a class RegularSolution for performing activity coefficient calculations with the regular so-
lution model.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Notes
In addition to the methods presented here, the methods of its base class thermo.activity.GibbsExcess are
available as well.
Additional equations of note are as follows.
𝐺𝐸 = 𝐻 𝐸
𝑆𝐸 = 0
√︂
∆𝐻𝑣𝑎𝑝 − 𝑅𝑇
𝛿=
𝑉𝑚
References
Examples
Example 1
From [2], calculate the activity coefficients at infinite dilution for the system benzene-cyclohexane at 253.15 K
using the regular solution model (example 5.20, with unit conversion in-line):
>>> GE.gammas_infinite_dilution()
[1.1352128394, 1.16803058378]
>>> GE.gammas()
[1.1329295, 1.00001039]
Example 3
Another common model is the Flory-Huggins model. This isn’t implemented as a separate model, but it is
possible to modify the activity coefficient results of RegularSolution to obtain the activity coefficients from
the Flory-Huggins model anyway. ChemSep [4] implements the Flory-Huggins model and calls it the regular
solution model, so results can’t be compared with ChemSep except when making the following manual solution.
The example below uses parameters from ChemSep for ethanol and water.
>>> gammas_flory_huggins
[1.672945693, 5.9663471]
Methods
GE()
Calculate and return the excess Gibbs energy of a liquid phase using the regular solution model.
∑︀ ∑︀
𝐸 (𝑥𝑚 𝑥𝑛 𝑉𝑚 𝑉𝑛 𝐴𝑚𝑛 )
𝐺 = 𝑚 𝑛∑︀
𝑚 𝑥𝑚 𝑉𝑚
𝜕 2 𝑔𝐸
=0
𝜕𝑇 2
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy, [J/(mol*K^2)]
d2GE_dTdxs()
Calculate and return the temperature derivative of mole fraction derivatives of excess Gibbs energy.
𝜕 2 𝑔𝐸
=0
𝜕𝑥𝑖 𝜕𝑇
Returns
d2GE_dTdxs [list[float]] Temperature derivative of mole fraction derivatives of excess
Gibbs energy, [J/(mol*K)]
d2GE_dxixjs()
Calculate and return the second mole fraction derivatives of excess Gibbs energy of a liquid phase using
the regular solution model.
𝐸
𝜕 2 𝐺𝐸 𝑉𝑗 (𝑉𝑖 𝐺𝐸 − 𝐻𝑖𝑗 ) 𝑉𝑖 𝜕𝐺
𝜕𝑥𝑗 𝑉𝑖 𝑉𝑗 [𝛿𝑖 𝛿𝑗 (𝑘𝑗𝑖 + 𝑘𝑖𝑗 ) + (𝛿𝑖 − 𝛿𝑗 )2 ]
= ∑︀ − ∑︀ + ∑︀
𝜕𝑥𝑖 𝜕𝑥𝑗 ( 𝑚 𝑉 𝑚 𝑥𝑚 ) 2 𝑚 𝑉 𝑚 𝑥𝑚 𝑚 𝑉 𝑚 𝑥𝑚
Returns
d2GE_dxixjs [list[list[float]]] Second mole fraction derivatives of excess Gibbs energy,
[J/mol]
d3GE_dT3()
Calculate and return the third temperature derivative of excess Gibbs energy of a liquid phase.
𝜕 3 𝑔𝐸
=0
𝜕𝑇 3
Returns
d3GE_dT3 [float] Third temperature derivative of excess Gibbs energy, [J/(mol*K^3)]
d3GE_dxixjxks()
Calculate and return the third mole fraction derivatives of excess Gibbs energy.
(︁ )︁
𝜕𝐺𝐸 𝜕𝐺𝐸 𝜕 2 𝐺𝐸
3 𝐸
𝜕 𝐺 𝐸
−2𝑉𝑖 𝑉𝑗 𝑉𝑘 𝐺 + 2𝑉𝑗 𝑉𝑘 𝐻𝑖𝑗 𝑉 𝑖 𝑉𝑗 𝜕𝑥𝑘 + 𝑉 𝑘 𝜕𝑥𝑗 𝑉𝑖 𝜕𝑥 𝜕𝑥 𝑉𝑖 𝑉𝑗 𝑉𝑘 [𝛿𝑖 (𝛿𝑗 (𝑘𝑖𝑗 + 𝑘𝑗𝑖 ) + 𝛿𝑘 (𝑘𝑖𝑘
= ∑︀ + ∑︀ − ∑︀ 𝑗 𝑘 − ∑︀
𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘 ( 𝑚 𝑉𝑚 𝑥𝑚 )3 ( 𝑚 𝑉 𝑚 𝑥𝑚 ) 2 𝑉
𝑚 𝑚 𝑚 𝑥 ( 𝑚𝑉
Returns
𝜕𝑔 𝐸
=0
𝜕𝑇
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy, [J/(mol*K)]
dGE_dxs()
Calculate and return the mole fraction derivatives of excess Gibbs energy of a liquid phase using the regular
solution model.
𝜕𝐺𝐸 −𝑉𝑖 𝐺𝐸 + 𝑚 𝑉𝑖 𝑉𝑚 𝑥𝑚 [𝛿𝑖 𝛿𝑚 (𝑘𝑚𝑖 + 𝑘𝑖𝑚 ) + (𝛿𝑖 − 𝛿𝑚 )2 ]
∑︀
= ∑︀
𝜕𝑥𝑖 𝑚 𝑉 𝑚 𝑥𝑚
Returns
dGE_dxs [list[float]] Mole fraction derivatives of excess Gibbs energy, [J/mol]
to_T_xs(T, xs)
Method to construct a new RegularSolution instance at temperature T, and mole fractions xs with the
same parameters as the existing object.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions of each component, [-]
Returns
obj [RegularSolution] New RegularSolution object at the specified conditions [-]
𝑉1 𝜑22 [︀
(SP1 − SP2 )2 + 𝜆12 SP1 SP2 + 𝜆21 SP1 SP2
]︀
ln 𝛾1 =
𝑅𝑇
𝑉2 𝜑21 [︀
(SP1 − SP2 )2 + 𝜆12 SP1 SP2 + 𝜆21 SP1 SP2
]︀
ln 𝛾2 =
𝑅𝑇
𝑥1 𝑉 1
𝜑1 =
𝑥1 𝑉1 + 𝑥2 𝑉2
𝑥2 𝑉 2
𝜑2 =
𝑥1 𝑉1 + 𝑥2 𝑉2
Parameters
xs [list[float]] Liquid mole fractions of each species in the format x0_0, x1_0, (component 1
point1, component 2 point 1), x0_1, x1_1, (component 1 point2, component 2 point 2), . . .
size pts*2 [-]
Examples
˓→lambda21=0.7991)
Methods
copy
Hm = None
Q = None
copy()
property energy
property energy_calc
medium = None
class thermo.stream.EquilibriumStream(flasher, *, zs=None, ws=None, Vfls=None, Vfgs=None, ns=None,
ms=None, Qls=None, Qgs=None, n=None, m=None, Q=None,
Ql=None, Qg=None, T=None, P=None, V=None, rho=None,
rho_mass=None, VF=None, H=None, H_mass=None, S=None,
S_mass=None, U=None, U_mass=None, G=None, G_mass=None,
A=None, A_mass=None, energy=None, energy_reactive=None,
H_reactive=None, Vf_TP=None, Q_TP=None, hot_start=None,
existing_flash=None, spec_fun=None)
Bases: thermo.equilibrium.EquilibriumState
Attributes
CASs CAS registration numbers for each component, [-].
Carcinogens Status of each component in cancer causing registries, [-].
Ceilings Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
EnthalpySublimations Wrapper to obtain the list of EnthalpySublimations objects of the as-
sociated PropertyCorrelationsPackage.
EnthalpyVaporizations Wrapper to obtain the list of EnthalpyVaporizations objects of the
associated PropertyCorrelationsPackage.
GWPs Global Warming Potentials for each component (impact/mass chemical)/(impact/mass
CO2), [-].
Gfgs Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
Gfgs_mass Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
H_calc
Hcs Higher standard molar heats of combustion for each component, [J/mol].
Hcs_lower Lower standard molar heats of combustion for each component, [J/mol].
Hcs_lower_mass Lower standard heats of combustion for each component, [J/kg].
Hcs_mass Higher standard heats of combustion for each component, [J/kg].
HeatCapacityGasMixture Wrapper to obtain the list of HeatCapacityGasMixture objects of
the associated PropertyCorrelationsPackage.
HeatCapacityGases Wrapper to obtain the list of HeatCapacityGases objects of the associated
PropertyCorrelationsPackage.
HeatCapacityLiquidMixture Wrapper to obtain the list of HeatCapacityLiquidMixture ob-
jects of the associated PropertyCorrelationsPackage.
HeatCapacityLiquids Wrapper to obtain the list of HeatCapacityLiquids objects of the asso-
ciated PropertyCorrelationsPackage.
HeatCapacitySolidMixture Wrapper to obtain the list of HeatCapacitySolidMixture objects
of the associated PropertyCorrelationsPackage.
HeatCapacitySolids Wrapper to obtain the list of HeatCapacitySolids objects of the associ-
ated PropertyCorrelationsPackage.
Hf_STPs Standard state molar enthalpies of formation for each component, [J/mol].
Hf_STPs_mass Standard state mass enthalpies of formation for each component, [J/kg].
Hfgs Ideal gas standard molar enthalpies of formation for each component, [J/mol].
Hfgs_mass Ideal gas standard enthalpies of formation for each component, [J/kg].
Hfus_Tms Molar heats of fusion for each component at their respective melting points, [J/mol].
Hfus_Tms_mass Heats of fusion for each component at their respective melting points, [J/kg].
Hsub_Tts Heats of sublimation for each component at their respective triple points, [J/mol].
Hsub_Tts_mass Heats of sublimation for each component at their respective triple points,
[J/kg].
Hvap_298s Molar heats of vaporization for each component at 298.15 K, [J/mol].
Hvap_298s_mass Heats of vaporization for each component at 298.15 K, [J/kg].
Hvap_Tbs Molar heats of vaporization for each component at their respective normal boiling
points, [J/mol].
Hvap_Tbs_mass Heats of vaporization for each component at their respective normal boiling
points, [J/kg].
IDs Alias of CASs.
InChI_Keys InChI Keys for each component, [-].
InChIs InChI strings for each component, [-].
LF Method to return the liquid fraction of the equilibrium state.
LFLs Lower flammability limits for each component, [-].
MWs Similatiry variables for each component, [g/mol].
N
ODPs Ozone Depletion Potentials for each component (impact/mass chemical)/(impact/mass
CFC-11), [-].
P
PSRK_groups PSRK subgroup: count groups for each component, [-].
P_calc
Parachors Parachors for each component, [N^0.25*m^2.75/mol].
Pcs Critical pressures for each component, [Pa].
PermittivityLiquids Wrapper to obtain the list of PermittivityLiquids objects of the associ-
ated PropertyCorrelationsPackage.
Psat_298s Vapor pressures for each component at 298.15 K, [Pa].
Pts Triple point pressures for each component, [Pa].
PubChems Pubchem IDs for each component, [-].
Q Method to return the actual volumetric flow rate of this phase.
Q_calc Method to return the actual volumetric flow rate of this phase.
Q_liquid_ref
Qg Method to return the volume flow rate of this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref.
Qg_calc Method to return the volume flow rate of this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref.
Qgs Method to return the volume flow rate of each component in this phase as an ideal gas, using
the configured temperature T_gas_ref and pressure P_gas_ref.
Qgs_calc Method to return the volume flow rate of each component in this phase as an ideal
gas, using the configured temperature T_gas_ref and pressure P_gas_ref.
Ql Method to return the volume flow rate of this phase as an ideal liquid, using the configured
standard molar volumes Vml_STPs.
Ql_calc Method to return the volume flow rate of this phase as an ideal liquid, using the con-
figured standard molar volumes Vml_STPs.
Qls Method to return the volume flow rate of each component in this phase as an ideal liquid,
using the configured V_liquids_ref.
Qls_calc Method to return the volume flow rate of each component in this phase as an ideal
liquid, using the configured V_liquids_ref.
RI_Ts Temperatures at which the refractive indexes were reported for each component, [K].
RIs Refractive indexes for each component, [-].
S0gs Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
S0gs_mass Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
STELs Short term exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
Sfgs Ideal gas standard molar entropies of formation for each component, [J/(mol*K)].
Sfgs_mass Ideal gas standard entropies of formation for each component, [J/(kg*K)].
Skins Whether each compound can be absorbed through the skin or not, [-].
StielPolars Stiel polar factors for each component, [-].
Stockmayers Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over
k) for each component, [K].
SublimationPressures Wrapper to obtain the list of SublimationPressures objects of the as-
sociated PropertyCorrelationsPackage.
SurfaceTensionMixture Wrapper to obtain the list of SurfaceTensionMixture objects of the
associated PropertyCorrelationsPackage.
SurfaceTensions Wrapper to obtain the list of SurfaceTensions objects of the associated
PropertyCorrelationsPackage.
T
TWAs Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3),
[various].
T_calc
Tautoignitions Autoignition temperatures for each component, [K].
Tbs Boiling temperatures for each component, [K].
Tcs Critical temperatures for each component, [K].
Tflashs Flash point temperatures for each component, [K].
ThermalConductivityGasMixture Wrapper to obtain the list of ThermalConductivityGas-
Mixture objects of the associated PropertyCorrelationsPackage.
economic_statuses Status of each component in in relation to import and export from various
regions, [-].
energy Method to return the energy (enthalpy times flow rate) of this phase.
energy_calc Method to return the energy (enthalpy times flow rate) of this phase.
energy_reactive Method to return the reactive energy (reactive enthalpy times flow rate) of
this phase.
energy_reactive_calc Method to return the reactive energy (reactive enthalpy times flow
rate) of this phase.
flash_convergence
flash_specs
flasher
flow_specified Always needs a flow specified
formulas Formulas of each component, [-].
gas
gas_beta
gas_count
heaviest_liquid The liquid-like phase with the highest mass density, [-]
legal_statuses Status of each component in in relation to import and export rules from var-
ious regions, [-].
lightest_liquid The liquid-like phase with the lowest mass density, [-]
liquid0
liquid1
liquid2
liquid_bulk
liquid_count
liquid_zs
liquids
liquids_betas
logPs Octanol-water partition coefficients for each component, [-].
m_calc
molecular_diameters Lennard-Jones molecular diameters for each component, [angstrom].
ms_calc Method to return the mass flow rates of each component in this phase.
n_calc
names Names for each component, [-].
non_pressure_spec_specified Cannot have a stream without an energy-type spec.
ns_calc Method to return the molar flow rates of each component in this phase.
omegas Acentric factors for each component, [-].
phase Method to calculate and return a string representing the phase of the mixture.
phase_STPs Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
phase_count
phases
quality Method to return the mass vapor fraction of the equilibrium state.
rhocs Molar densities at the critical point for each component, [mol/m^3].
rhocs_mass Densities at the critical point for each component, [kg/m^3].
rhog_STPs Molar gas densities at STP for each component; metastable if normally another state,
[mol/m^3].
rhog_STPs_mass Gas densities at STP for each component; metastable if normally another
state, [kg/m^3].
rhol_60Fs Liquid molar densities for each component at 60 °F, [mol/m^3].
rhol_60Fs_mass Liquid mass densities for each component at 60 °F, [kg/m^3].
rhol_STPs Molar liquid densities at STP for each component, [mol/m^3].
rhol_STPs_mass Liquid densities at STP for each component, [kg/m^3].
rhos_Tms Solid molar densities for each component at their respective melting points,
[mol/m^3].
rhos_Tms_mass Solid mass densities for each component at their melting point, [kg/m^3].
settings
sigma_STPs Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the satura-
tion pressure, [N/m].
sigma_Tbs Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
sigma_Tms Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
similarity_variables Similarity variables for each component, [mol/g].
smiless SMILES identifiers for each component, [-].
solid_bulk
solid_count
solids
solids_betas
solubility_parameters Solubility parameters for each component at 298.15 K, [Pa^0.5].
specified_composition_vars number of composition variables
specified_flow_vars Always needs only one flow specified
specified_state_vars Always needs two states
state_specified Always needs a state
state_specs Returns a list of tuples of (state_variable, state_value) representing the thermo-
dynamic state of the system.
water_index The index of the component water in the components.
water_phase The liquid-like phase with the highest water mole fraction, [-]
water_phase_index The liquid-like phase with the highest mole fraction of water, [-]
ws_calc
zs
zs_calc
Methods
B_from_Z
activities
dH_dP_V
dH_dT_V
dH_dV_P
dH_dV_T
dS_dP_V
dS_dT
dS_dT_P
dS_dT_V
dfugacities_dP
dfugacities_dT
dlnphis_dP
dlnphis_dT
dlnphis_dns
dphis_dP
dphis_dT
dphis_dzs
fugacities
lnphis
phis
N
P
property Q
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Q_calc
Method to return the actual volumetric flow rate of this phase. This method is only available when the
phase is linked to an EquilibriumStream.
Returns
Q [float] Volume flow of the phase, [m^3/s]
property Q_liquid_ref
property Qgs
Method to return the volume flow rate of each component in this phase as an ideal gas, using the configured
temperature T_gas_ref and pressure P_gas_ref. This method is only available when the phase is linked to
an EquilibriumStream. This method totally ignores phase equilibrium.
Returns
Qgs [float] Ideal gas flow rates of the components in the phase, [m^3/s]
property Ql
Method to return the volume flow rate of this phase as an ideal liquid, using the configured standard molar
volumes Vml_STPs. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Ql [float] Ideal liquid flow rate of the phase, [m^3/s]
property Ql_calc
Method to return the volume flow rate of this phase as an ideal liquid, using the configured standard molar
volumes Vml_STPs. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Ql [float] Ideal liquid flow rate of the phase, [m^3/s]
property Qls
Method to return the volume flow rate of each component in this phase as an ideal liquid, using the config-
ured V_liquids_ref. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Qls [float] Ideal liquid flow rates of the components in the phase, [m^3/s]
property Qls_calc
Method to return the volume flow rate of each component in this phase as an ideal liquid, using the config-
ured V_liquids_ref. This method is only available when the phase is linked to an EquilibriumStream. This
method totally ignores phase equilibrium.
Returns
Qls [float] Ideal liquid flow rates of the components in the phase, [m^3/s]
StreamArgs()
Goal to create a StreamArgs instance, with the user specified variables always being here.
The state variables are currently correctly tracked. The flow rate and composition variable needs to be
tracked as a function of what was specified as the input variables.
The flow rate needs to be changed wen the stream flow rate is changed. Note this stores unnormalized specs,
but that this is OK.
T
betas
bulk
property composition_specified
Always needs a composition
constants
correlations
flash_convergence
flash_specs
flashed = True
flasher
property flow_specified
Always needs a flow specified
gas
gas_beta
gas_count
liquid0
liquid1
liquid2
liquid_count
liquid_zs
liquids
liquids_betas
property non_pressure_spec_specified
Cannot have a stream without an energy-type spec.
phase_count
phases
settings
solid_count
solids
solids_betas
property specified_composition_vars
number of composition variables
property specified_flow_vars
Always needs only one flow specified
property specified_state_vars
Always needs two states
property state_specified
Always needs a state
property state_specs
Returns a list of tuples of (state_variable, state_value) representing the thermodynamic state of the system.
zs
class thermo.stream.Stream(IDs=None, zs=None, ws=None, Vfls=None, Vfgs=None, ns=None, ms=None,
Qls=None, Qgs=None, n=None, m=None, Q=None, T=None, P=None,
VF=None, H=None, Hm=None, S=None, Sm=None, energy=None, pkg=None,
Vf_TP=(None, None), Q_TP=(None, None, ''))
Bases: thermo.mixture.Mixture
Creates a Stream object which is useful for modeling mass and energy balances.
Streams have five variables. The flow rate, composition, and components are mandatory; and two of the variables
temperature, pressure, vapor fraction, enthalpy, or entropy are required. Entropy and enthalpy may also be
provided in a molar basis; energy can also be provided, which when combined with either a flow rate or enthalpy
will calculate the other variable.
The composition and flow rate may be specified together or separately. The options for specifying them are:
• Mole fractions zs
• Mass fractions ws
• Liquid standard volume fractions Vfls
• Gas standard volume fractions Vfgs
• Mole flow rates ns
• Mass flow rates ms
• Liquid flow rates Qls (based on pure component volumes at the T and P specified by Q_TP)
• Gas flow rates Qgs (based on pure component volumes at the T and P specified by Q_TP)
If only the composition is specified by providing any of zs, ws, Vfls or Vfgs, the flow rate must be specified by
providing one of these:
• Mole flow rate n
• Mass flow rate m
• Volumetric flow rate Q at the provided T and P or if specified, Q_TP
• Energy energy
The state variables must be two of the following. Not all combinations result in a supported flash.
• Tempetarure T
• Pressure P
• Vapor fraction VF
• Enthalpy H
• Molar enthalpy Hm
• Entropy S
• Molar entropy Sm
• Energy energy
Parameters
IDs [list, optional] List of chemical identifiers - names, CAS numbers, SMILES or InChi strings
can all be recognized and may be mixed [-]
zs [list or dict, optional] Mole fractions of all components in the stream [-]
ws [list or dict, optional] Mass fractions of all components in the stream [-]
Vfls [list or dict, optional] Volume fractions of all components as a hypothetical liquid phase
based on pure component densities [-]
Vfgs [list or dict, optional] Volume fractions of all components as a hypothetical gas phase based
on pure component densities [-]
ns [list or dict, optional] Mole flow rates of each component [mol/s]
ms [list or dict, optional] Mass flow rates of each component [kg/s]
Qls [list or dict, optional] Liquid flow rates of all components as a hypothetical liquid phase
based on pure component densities [m^3/s]
Qgs [list or dict, optional] Gas flow rates of all components as a hypothetical gas phase based
on pure component densities [m^3/s]
n [float, optional] Total mole flow rate of all components in the stream [mol/s]
m [float, optional] Total mass flow rate of all components in the stream [kg/s]
Q [float, optional] Total volumetric flow rate of all components in the stream based on the tem-
perature and pressure specified by T and P [m^3/s]
T [float, optional] Temperature of the stream (default 298.15 K), [K]
P [float, optional] Pressure of the stream (default 101325 Pa) [Pa]
VF [float, optional] Vapor fraction (mole basis) of the stream, [-]
H [float, optional] Mass enthalpy of the stream, [J]
Hm [float, optional] Molar enthalpy of the stream, [J/mol]
S [float, optional] Mass entropy of the stream, [J/kg/K]
Sm [float, optional] Molar entropy of the stream, [J/mol/K]
energy [float, optional] Flowing energy of the stream (H`*`m), [W]
pkg [object] The thermodynamic property package to use for flash calculations; one of the
caloric packages in thermo.property_package; defaults to the ideal model [-]
Vf_TP [tuple(2, float), optional] The (T, P) at which the volume fractions are specified to be at,
[K] and [Pa]
Q_TP [tuple(3, float, float, str), optional] The (T, P, phase) at which the volumetric flow rate is
specified to be at, [K] and [Pa]
Notes
Warning: The Stream class is not designed for high-performance or the ability to use different thermody-
namic models. It is especially limited in its multiphase support and the ability to solve with specifications
other than temperature and pressure. It is impossible to change constant properties such as a compound’s
critical temperature in this interface.
It is recommended to switch over to the thermo.flash and EquilibriumStream interfaces which solves
those problems and are better positioned to grow. That interface also requires users to be responsible for
their chemical constants and pure component correlations; while default values can easily be loaded for most
compounds, the user is ultimately responsible for them.
Examples
Instead of specifying the composition and flow rate separately, they can be specified as a list of flow rates in the
appropriate units.
80 kg/s of furfuryl alcohol/water solution:
>>> Stream(['furfuryl alcohol', 'water'], ms=[50, 30])
<Stream, components=['furfuryl alcohol', 'water'], mole fractions=[0.2343, 0.7657],␣
˓→mole flow=2174.93735951 mol/s, T=298.15 K, P=101325 Pa>
˓→0.0, 0.0004, 0.0279, 0.0], mole flow=7375.2503227 mol/s, T=365.20 K, P=70900 Pa>
For streams with large numbers of components, it may be confusing to enter the composition separate from the
names of the chemicals. For that case, the syntax using dictionaries as follows is supported with any composition
specification:
Attributes
A Helmholtz energy of the mixture at its current state, in units of [J/kg].
API API gravity of the hypothetical liquid phase of the mixture, [degrees].
Am Helmholtz energy of the mixture at its current state, in units of [J/mol].
Bvirial Second virial coefficient of the gas phase of the mixture at its current temperature,
pressure, and composition in units of [mol/m^3].
Cp Mass heat capacity of the mixture at its current phase and temperature, in units of [J/kg/K].
Cpg Gas-phase heat capacity of the mixture at its current temperature , and composition in units
of [J/kg/K].
Cpgm Gas-phase heat capacity of the mixture at its current temperature and composition, in units
of [J/mol/K].
Cpgms Gas-phase ideal gas heat capacity of the chemicals at its current temperature, in units of
[J/mol/K].
Cpgs Gas-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cpl Liquid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/kg/K].
Cplm Liquid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/mol/K].
Cplms Liquid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/mol/K].
Cpls Liquid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cpm Molar heat capacity of the mixture at its current phase and temperature, in units of [J/mol/K].
Cps Solid-phase heat capacity of the mixture at its current temperature and composition, in units
of [J/kg/K].
Cpsm Solid-phase heat capacity of the mixture at its current temperature and composition, in
units of [J/mol/K].
Cpsms Solid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/mol/K].
Cpss Solid-phase pure component heat capacity of the chemicals in the mixture at its current
temperature, in units of [J/kg/K].
Cvg Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature,
in units of [J/kg/K].
Cvgm Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature
and composition, in units of [J/mol/K].
Cvgms Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in
the mixture at its current temperature, in units of [J/mol/K].
Cvgs Gas-phase pure component ideal-gas contant-volume heat capacities of the chemicals in
the mixture at its current temperature, in units of [J/kg/K].
H
Hc Standard higher heat of combustion of the mixture, in units of [J/kg].
Hc_lower Standard lower heat of combustion of the mixture, in units of [J/kg].
Hcm Standard higher molar heat of combustion of the mixture, in units of [J/mol].
Hcm_lower Standard lower molar heat of combustion of the mixture, in units of [J/mol].
Hm
Hvapms Pure component enthalpies of vaporization of the chemicals in the mixture at its current
temperature, in units of [J/mol].
Hvaps Enthalpy of vaporization of the chemicals in the mixture at its current temperature, in
units of [J/kg].
IUPAC_names IUPAC names for all chemicals in the mixture.
InChI_Keys InChI keys for all chemicals in the mixture.
InChIs InChI strings for all chemicals in the mixture.
JT Joule Thomson coefficient of the mixture at its current phase, temperature, and pressure in
units of [K/Pa].
JTg Joule Thomson coefficient of the gas phase of the mixture if one exists at its current tem-
perature and pressure, in units of [K/Pa].
JTgs Pure component Joule Thomson coefficients of the chemicals in the mixture in the gas
phase at its current temperature and pressure, in units of [K/Pa].
JTl Joule Thomson coefficient of the liquid phase of the mixture if one exists at its current
temperature and pressure, in units of [K/Pa].
JTls Pure component Joule Thomson coefficients of the chemicals in the mixture in the liquid
phase at its current temperature and pressure, in units of [K/Pa].
PSRK_groups List of dictionaries of PSRK subgroup: count groups for each chemical in the
mixture.
Parachor Parachor of the mixture at its current temperature and pressure, in units of
[N^0.25*m^2.75/mol].
Parachors Pure component Parachor parameters of the chemicals in the mixture at its current
temperature and pressure, in units of [N^0.25*m^2.75/mol].
Pbubble Bubble point pressure of the mixture at its current temperature and composition, in
units of [Pa].
Pdew Dew point pressure of the mixture at its current temperature and composition, in units of
[Pa].
Pr Prandtl number of the mixture at its current temperature, pressure, and phase; [dimension-
less].
Prg Prandtl number of the gas phase of the mixture if one exists at its current temperature and
pressure, [dimensionless].
Prgs Pure component Prandtl numbers of the gas phase of the chemicals in the mixture at its
current temperature and pressure, [dimensionless].
Prl Prandtl number of the liquid phase of the mixture if one exists at its current temperature and
pressure, [dimensionless].
Prls Pure component Prandtl numbers of the liquid phase of the chemicals in the mixture at its
current temperature and pressure, [dimensionless].
Psats Pure component vapor pressures of the chemicals in the mixture at its current tempera-
ture, in units of [Pa].
PubChems PubChem Component ID numbers for all chemicals in the mixture.
R_specific Specific gas constant of the mixture, in units of [J/kg/K].
SG Specific gravity of the mixture, [dimensionless].
SGg Specific gravity of a hypothetical gas phase of the mixture, .
SGl Specific gravity of a hypothetical liquid phase of the mixture at the specified temperature
and pressure, [dimensionless].
SGs Specific gravity of a hypothetical solid phase of the mixture at the specified temperature and
pressure, [dimensionless].
Tbubble Bubble point temperature of the mixture at its current pressure and composition, in
units of [K].
Tdew Dew point temperature of the mixture at its current pressure and composition, in units of
[K].
U Internal energy of the mixture at its current state, in units of [J/kg].
UNIFAC_Dortmund_groups List of dictionaries of Dortmund UNIFAC subgroup: count groups
for each chemcial in the mixture.
UNIFAC_Qs UNIFAC Q (normalized Van der Waals area) values, dimensionless.
UNIFAC_Rs UNIFAC R (normalized Van der Waals volume) values, dimensionless.
UNIFAC_groups List of dictionaries of UNIFAC subgroup: count groups for each chemical in
the mixture.
Um Internal energy of the mixture at its current state, in units of [J/mol].
V_over_F
Van_der_Waals_areas List of unnormalized Van der Waals areas of all the chemicals in the
mixture, in units of [m^2/mol].
Van_der_Waals_volumes List of unnormalized Van der Waals volumes of all the chemicals in
the mixture, in units of [m^3/mol].
Vm Molar volume of the mixture at its current phase and temperature and pressure, in units of
[m^3/mol].
Vmg Gas-phase molar volume of the mixture at its current temperature, pressure, and composi-
tion in units of [m^3/mol].
Vmg_STP Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current
composition in units of [m^3/mol].
Vmgs Pure component gas-phase molar volumes of the chemicals in the mixture at its current
temperature and pressure, in units of [m^3/mol].
Vml Liquid-phase molar volume of the mixture at its current temperature, pressure, and compo-
sition in units of [m^3/mol].
Vml_STP Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the cur-
rent composition in units of [m^3/mol].
Vmls Pure component liquid-phase molar volumes of the chemicals in the mixture at its current
temperature and pressure, in units of [m^3/mol].
Vms
Vmss Pure component solid-phase molar volumes of the chemicals in the mixture at its current
temperature, in units of [m^3/mol].
Z Compressibility factor of the mixture at its current phase and temperature and pressure, [di-
mensionless].
Zg Compressibility factor of the mixture in the gas phase at the current temperature, pressure,
and composition, [dimensionless].
Zg_STP Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the
current composition, [dimensionless].
Zgs Pure component compressibility factors of the chemicals in the mixture in the gas phase at
the current temperature and pressure, [dimensionless].
Zl Compressibility factor of the mixture in the liquid phase at the current temperature, pressure,
and composition, [dimensionless].
Zl_STP Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and
the current composition, [dimensionless].
Zls Pure component compressibility factors of the chemicals in the liquid phase at the current
temperature and pressure, [dimensionless].
Zss Pure component compressibility factors of the chemicals in the mixture in the solid phase
at the current temperature and pressure, [dimensionless].
alpha Thermal diffusivity of the mixture at its current temperature, pressure, and phase in units
of [m^2/s].
alphag Thermal diffusivity of the gas phase of the mixture if one exists at its current temperature
and pressure, in units of [m^2/s].
alphags Pure component thermal diffusivities of the chemicals in the mixture in the gas phase
at the current temperature and pressure, in units of [m^2/s].
alphal Thermal diffusivity of the liquid phase of the mixture if one exists at its current temper-
ature and pressure, in units of [m^2/s].
alphals Pure component thermal diffusivities of the chemicals in the mixture in the liquid phase
at the current temperature and pressure, in units of [m^2/s].
atom_fractions Dictionary of atomic fractions for each atom in the mixture.
atom_fractionss List of dictionaries of atomic fractions for all chemicals in the mixture.
atoms Mole-averaged dictionary of atom counts for all atoms of the chemicals in the mixture.
atomss List of dictionaries of atom counts for all chemicals in the mixture.
charge_balance Charge imbalance of the mixture, in units of [faraday].
charges Charges for all chemicals in the mixture, [faraday].
composition_specified Always needs a composition
conductivity
constants Returns a :obj:`thermo.chemical_package.ChemicalConstantsPackage instance
with constants from the mixture, [-].
economic_statuses List of dictionaries of the economic status for all chemicals in the mixture.
eos Equation of state object held by the mixture.
flow_specified Always needs a flow specified
formulas Chemical formulas for all chemicals in the mixture.
isentropic_exponent Gas-phase ideal-gas isentropic exponent of the mixture at its current
temperature, [dimensionless].
isentropic_exponents Gas-phase pure component ideal-gas isentropic exponent of the
chemicals in the mixture at its current temperature, [dimensionless].
isobaric_expansion Isobaric (constant-pressure) expansion of the mixture at its current
phase, temperature, and pressure in units of [1/K].
isobaric_expansion_g Isobaric (constant-pressure) expansion of the gas phase of the mix-
ture at its current temperature and pressure, in units of [1/K].
isobaric_expansion_gs Pure component isobaric (constant-pressure) expansions of the
chemicals in the mixture in the gas phase at its current temperature and pressure, in units
of [1/K].
property_package_constants
rho Mass density of the mixture at its current phase and temperature and pressure, in units of
[kg/m^3].
rhog Gas-phase mass density of the mixture at its current temperature, pressure, and composi-
tion in units of [kg/m^3].
rhog_STP Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current
composition in units of [kg/m^3].
rhogm Molar density of the mixture in the gas phase at the current temperature, pressure, and
composition in units of [mol/m^3].
rhogm_STP Molar density of the mixture in the gas phase at 298.15 K and 101.325 kPa, and the
current composition, in units of [mol/m^3].
rhogms Pure component molar densities of the chemicals in the gas phase at the current tem-
perature and pressure, in units of [mol/m^3].
rhogs Pure-component gas-phase mass densities of the chemicals in the mixture at its current
temperature and pressure, in units of [kg/m^3].
rhol Liquid-phase mass density of the mixture at its current temperature, pressure, and compo-
sition in units of [kg/m^3].
rhol_STP Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the
current composition in units of [kg/m^3].
rholm Molar density of the mixture in the liquid phase at the current temperature, pressure, and
composition in units of [mol/m^3].
rholm_STP Molar density of the mixture in the liquid phase at 298.15 K and 101.325 kPa, and
the current composition, in units of [mol/m^3].
rholms Pure component molar densities of the chemicals in the mixture in the liquid phase at
the current temperature and pressure, in units of [mol/m^3].
rhols Pure-component liquid-phase mass density of the chemicals in the mixture at its current
temperature and pressure, in units of [kg/m^3].
rhom Molar density of the mixture at its current phase and temperature and pressure, in units of
[mol/m^3].
rhos
rhosms Pure component molar densities of the chemicals in the solid phase at the current tem-
perature and pressure, in units of [mol/m^3].
rhoss Pure component solid-phase mass density of the chemicals in the mixture at its current
temperature, in units of [kg/m^3].
ringss List of ring counts for all chemicals in the mixture.
sigma Surface tension of the mixture at its current temperature and composition, in units of
[N/m].
sigmas Pure component surface tensions of the chemicals in the mixture at its current temper-
ature, in units of [N/m].
similarity_variables Similarity variables for all chemicals in the mixture, see
smiless SMILES strings for all chemicals in the mixture.
Methods
Bond
Capillary
Grashof
Jakob
Peclet_heat
Reynolds
Weber
calculate
compound_index
eos_pures
flash
flash_caloric
properties
set_Chemical_property_objects
set_TP_sources
set_constant_sources
set_constants
set_eos
set_extensive_flow
set_extensive_properties
set_property_package
calculate(T=None, P=None)
property composition_specified
Always needs a composition
flash(T=None, P=None, VF=None, H=None, Hm=None, S=None, Sm=None, energy=None)
flashed = True
property flow_specified
Always needs a flow specified
property non_pressure_spec_specified
Cannot have a stream without an energy-type spec.
set_extensive_flow(n=None)
set_extensive_properties()
property specified_composition_vars
number of composition variables
property specified_flow_vars
Always needs only one flow specified
property specified_state_vars
Always needs two states
property state_specified
Always needs a state
property state_specs
Returns a list of tuples of (state_variable, state_value) representing the thermodynamic state of the system.
class thermo.stream.StreamArgs(*, zs=None, ws=None, Vfls=None, Vfgs=None, T=None, P=None,
VF=None, H=None, H_mass=None, S=None, S_mass=None, U=None,
U_mass=None, G=None, G_mass=None, A=None, A_mass=None, V=None,
rho=None, rho_mass=None, ns=None, ms=None, Qls=None, Qgs=None,
m=None, n=None, Q=None, Ql=None, Qg=None, energy=None,
energy_reactive=None, H_reactive=None, Vf_TP=(None, None),
Q_TP=(None, None, ''), flasher=None, single_composition_basis=True)
Bases: object
Attributes
A
A_mass
G
G_mass
H
H_calc
H_mass
H_mass_calc
H_reactive
H_reactive_calc
MW
P
P_calc
Q
Qg
Qg_calc
Qgs
Qgs_calc
Ql
Ql_calc
Qls
Qls_calc
S
S_mass
T
T_calc
U
U_mass
V
VF
VF_calc
Vfgs
Vfls
Vfls_calc
clean If no variables have been specified, return True, otherwise return False.
composition_spec
composition_specified
energy
energy_calc
energy_reactive
energy_reactive_calc
flow_spec
flow_specified
m
m_calc
ms
ms_calc
n
n_calc
non_pressure_spec_specified
ns
ns_calc
rho
rho_mass
specified_flow_vars
specified_state_vars
state_specified
state_specs
stream
ws
ws_calc
zs
zs_calc
Methods
copy
flash
flash_state
reconcile_flows
update
value
property A
property A_mass
property G
property G_mass
property H
property H_calc
property H_mass
property H_mass_calc
property H_reactive
property H_reactive_calc
property MW
property P
property P_calc
property Q
property Qg
property Qg_calc
property Qgs
property Qgs_calc
property Ql
property Ql_calc
property Qls
property Qls_calc
property S
property S_mass
property T
property T_calc
property U
property U_mass
property V
property VF
property VF_calc
property Vfgs
property Vfls
property Vfls_calc
property clean
If no variables have been specified, return True, otherwise return False.
property composition_spec
property composition_specified
copy()
property energy
property energy_calc
property energy_reactive
property energy_reactive_calc
flash(hot_start=None, existing_flash=None)
flash_state(hot_start=None)
flashed = False
property flow_spec
property flow_specified
property m
property m_calc
property ms
property ms_calc
property n
property n_calc
property non_pressure_spec_specified
property ns
property ns_calc
reconcile_flows(n_tol=2e-15, m_tol=2e-15)
property rho
property rho_mass
property specified_flow_vars
property specified_state_vars
property state_specified
property state_specs
property stream
update(**kwargs)
value(name)
property ws
property ws_calc
property zs
property zs_calc
thermo.stream.energy_balance(inlets, outlets, reactive=False)
This module contains implementations of TPDependentProperty representing liquid and vapor thermal conductivity.
A variety of estimation and data methods are available as included in the chemicals library. Additionally liquid and
vapor mixture thermal conductivity predictor objects are implemented subclassing MixtureProperty.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Parameters
CAS [str, optional] The CAS number of the compound, [-]
MW [float, optional] Molecular weight, [g/mol]
Tm [float, optional] Melting point, [K]
Tb [float, optional] Boiling point, [K]
Tc [float, optional] Critical temperature, [K]
Pc [float, optional] Critical pressure, [Pa]
omega [float, optional] Acentric factor, [-]
Hfus [float, optional] Heat of fusion, [J/mol]
load_data [bool, optional] If False, do not load property coefficients from data sources in files
[-]
extrapolation [str or None] None to not extrapolate; see TDependentProperty for a full list
of all options, [-]
method [str or None, optional] If specified, use this method by default and do not use the ranked
sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
See also:
chemicals.thermal_conductivity.Sheffy_Johnson
chemicals.thermal_conductivity.Sato_Riedel
chemicals.thermal_conductivity.Lakshmi_Prasad
chemicals.thermal_conductivity.Gharagheizi_liquid
chemicals.thermal_conductivity.Nicola_original
chemicals.thermal_conductivity.Nicola
chemicals.thermal_conductivity.Bahadori_liquid
chemicals.thermal_conductivity.DIPPR9G
chemicals.thermal_conductivity.Missenard
Notes
To iterate over all methods, use the lists stored in thermal_conductivity_liquid_methods and
thermal_conductivity_liquid_methods_P for low and high pressure methods respectively.
Low pressure methods:
GHARAGHEIZI_L: CSP method, described in Gharagheizi_liquid.
SATO_RIEDEL: CSP method, described in Sato_Riedel.
NICOLA: CSP method, described in Nicola.
NICOLA_ORIGINAL: CSP method, described in Nicola_original.
SHEFFY_JOHNSON: CSP method, described in Sheffy_Johnson.
BAHADORI_L: CSP method, described in Bahadori_liquid.
LAKSHMI_PRASAD: CSP method, described in Lakshmi_Prasad.
DIPPR_PERRY_8E: A collection of 340 coefficient sets from the DIPPR database published openly in [3].
Provides temperature limits for all its fluids. EQ100 is used for its fluids.
VDI_PPDS: Coefficients for a equation form developed by the PPDS, published openly in [2]. Covers a large
temperature range, but does not extrapolate well at very high or very low temperatures. 271 compounds.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow.
VDI_TABULAR: Tabular data in [2] along the saturation curve; interpolation is as set by the user or the default.
High pressure methods:
DIPPR_9G: CSP method, described in DIPPR9G. Calculates a low-pressure thermal conductivity first from the
low-pressure method.
MISSENARD: CSP method, described in Missenard. Calculates a low-pressure thermal conductivity first
from the low-pressure method.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow, but unparalled in accuracy for pressure dependence.
References
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate low-pressure liquid thermal conductivity at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature of the liquid, [K]
and 0.8Tc, and below 200Pc. The CSP method DIPPR_9G is considered valid for all temperatures and
pressures.
For tabular data, extrapolation outside of the range is used if tabular_extrapolation_permitted is
set; if it is, the extrapolation is considered valid for all temperatures and pressures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
P [float] Pressure at which to test the method, [Pa]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'W/m/K'
The following variables are available to specify which method to use.
thermo.thermal_conductivity.COOLPROP
thermo.thermal_conductivity.DIPPR_PERRY_8E
thermo.thermal_conductivity.VDI_PPDS
thermo.thermal_conductivity.VDI_TABULAR
thermo.thermal_conductivity.GHARAGHEIZI_L
thermo.thermal_conductivity.SHEFFY_JOHNSON
thermo.thermal_conductivity.SATO_RIEDEL
thermo.thermal_conductivity.LAKSHMI_PRASAD
thermo.thermal_conductivity.BAHADORI_L
thermo.thermal_conductivity.NICOLA
thermo.thermal_conductivity.NICOLA_ORIGINAL
The following variables contain lists of available methods.
thermo.thermal_conductivity.thermal_conductivity_liquid_methods = ['COOLPROP',
'DIPPR_PERRY_8E', 'VDI_PPDS', 'VDI_TABULAR', 'GHARAGHEIZI_L', 'SHEFFY_JOHNSON',
'SATO_RIEDEL', 'LAKSHMI_PRASAD', 'BAHADORI_L', 'NICOLA', 'NICOLA_ORIGINAL']
Holds all low-pressure methods available for the ThermalConductivityLiquid class, for use in iterating over
them.
thermo.thermal_conductivity.thermal_conductivity_liquid_methods_P = ['COOLPROP',
'DIPPR_9G', 'MISSENARD']
Holds all high-pressure methods available for the ThermalConductivityLiquid class, for use in iterating over
them.
chemicals.thermal_conductivity.Bahadori_gas
chemicals.thermal_conductivity.Gharagheizi_gas
chemicals.thermal_conductivity.Eli_Hanley
chemicals.thermal_conductivity.Chung
chemicals.thermal_conductivity.DIPPR9B
chemicals.thermal_conductivity.Eucken_modified
chemicals.thermal_conductivity.Eucken
chemicals.thermal_conductivity.Stiel_Thodos_dense
chemicals.thermal_conductivity.Eli_Hanley_dense
chemicals.thermal_conductivity.Chung_dense
Notes
To iterate over all methods, use the lists stored in thermal_conductivity_gas_methods and
thermal_conductivity_gas_methods_P for low and high pressure methods respectively.
Low pressure methods:
GHARAGHEIZI_G: CSP method, described in Gharagheizi_gas.
DIPPR_9B: CSP method, described in DIPPR9B.
CHUNG: CSP method, described in Chung.
ELI_HANLEY: CSP method, described in Eli_Hanley.
EUCKEN_MOD: CSP method, described in Eucken_modified.
EUCKEN: CSP method, described in Eucken.
BAHADORI_G: CSP method, described in Bahadori_gas.
DIPPR_PERRY_8E: A collection of 345 coefficient sets from the DIPPR database published openly in [3].
Provides temperature limits for all its fluids. chemicals.dippr.EQ102 is used for its fluids.
VDI_PPDS: Coefficients for a equation form developed by the PPDS, published openly in [2]. Covers a large
temperature range, but does not extrapolate well at very high or very low temperatures. 275 compounds.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow.
VDI_TABULAR: Tabular data in [2] along the saturation curve; interpolation is as set by the user or the default.
High pressure methods:
STIEL_THODOS_DENSE: CSP method, described in Stiel_Thodos_dense. Calculates a low-pressure
thermal conductivity first.
ELI_HANLEY_DENSE: CSP method, described in Eli_Hanley_dense. Calculates a low-pressure thermal
conductivity first.
CHUNG_DENSE: CSP method, described in Chung_dense. Calculates a low-pressure thermal conductivity
first.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow, but unparalled in accuracy for pressure dependence.
References
Methods
calculate(T, method)
Method to calculate low-pressure gas thermal conductivity at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature of the gas, [K]
method [str] Name of the method to use
Returns
kg [float] Thermal conductivity of the gas at T and a low pressure, [W/m/K]
calculate_P(T, P, method)
Method to calculate pressure-dependent gas thermal conductivity at temperature T and pressure P with a
given method.
This method has no exception handling; see TP_dependent_property for that.
Parameters
T [float] Temperature at which to calculate gas thermal conductivity, [K]
P [float] Pressure at which to calculate gas thermal conductivity, [K]
method [str] Name of the method to use
Returns
kg [float] Thermal conductivity of the gas at T and P, [W/m/K]
name = 'gas thermal conductivity'
property_max = 10
Maximum valid value of gas thermal conductivity. Generous limit.
property_min = 0
Mimimum valid value of gas thermal conductivity.
ranked_methods = ['COOLPROP', 'VDI_PPDS', 'DIPPR_PERRY_8E', 'VDI_TABULAR',
'GHARAGHEIZI_G', 'DIPPR_9B', 'CHUNG', 'ELI_HANLEY', 'EUCKEN_MOD', 'EUCKEN',
'BAHADORI_G']
Default rankings of the low-pressure methods.
chemicals.thermal_conductivity.DIPPR9H
chemicals.thermal_conductivity.Filippov
chemicals.thermal_conductivity.thermal_conductivity_Magomedov
Notes
References
[1]
Methods
thermo.thermal_conductivity.thermal_conductivity_liquid_mixture_methods = ['MAGOMEDOV',
'DIPPR_9H', 'FILIPPOV', 'LINEAR']
Holds all mixing rules available for the ThermalConductivityLiquidMixture class, for use in iterating over
them.
chemicals.thermal_conductivity.Lindsay_Bromley
Notes
References
[1]
Methods
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate thermal conductivity of a gas mixture at temperature T, pressure P, mole fractions zs
and weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
kg [float] Thermal conductivity of gas mixture, [W/m/K]
name = 'gas thermal conductivity'
property_max = 10.0
Maximum valid value of gas thermal conductivity. Generous limit.
property_min = 0.0
Mimimum valid value of gas thermal conductivity.
ranked_methods = ['LINDSAY_BROMLEY', 'LINEAR']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
This module contains functions and classes related to the UNIFAC and its many variants. The bulk of the code relates
to calculating derivativies, or is tables of data.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker or contact
the author at [email protected].
class thermo.unifac.UNIFAC(T, xs, rs, qs, Qs, vs, psi_coeffs=None, psi_abc=None, version=0)
Class for representing an a liquid with excess gibbs energy represented by the UNIFAC equation. This model is
capable of representing VL and LL behavior, provided the correct interaction parameters are used. [1] and [2]
are good references on this model.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
∑︀𝑛
rs [list[float]] r parameters 𝑟𝑖 = 𝑘=1 𝜈𝑘 𝑅𝑘 , [-]
∑︀𝑛
qs [list[float]] q parameters 𝑞𝑖 = 𝑘=1 𝜈𝑘 𝑄𝑘 , [-]
Qs [list[float]] Q parameter for each subgroup; subgroups are not required to but are suggested
to be sorted from lowest number to highest number, [-]
vs [list[list[float]]] Indexed by [subgroup][count], this variable is the count of each subgroups in
each compound, [-]
psi_abc [tuple(list[list[float]], 3), optional] psi interaction parameters between each subgroup;
indexed [subgroup][subgroup], not symmetrical; first arg is the matrix for a, then b, and then
c. Only one of psi_abc or psi_coeffs is required, [-]
psi_coeffs [list[list[tuple(float, 3)]], optional] psi interaction parameters between each subgroup;
indexed [subgroup][subgroup][letter], not symmetrical. Only one of psi_abc or psi_coeffs is
required, [-]
version [int, optional] Which version of the model to use [-]
• 0 - original UNIFAC, OR UNIFAC LLE
• 1 - Dortmund UNIFAC (adds T dept, 3/4 power)
• 2 - PSRK (original with T dept function)
• 3 - VTPR (drops combinatorial term, Dortmund UNIFAC otherwise)
• 4 - Lyngby/Larsen has different combinatorial, 2/3 power
• 5 - UNIFAC KT (2 params for psi, Lyngby/Larsen formulation; otherwise same as origi-
nal)
Notes
In addition to the methods presented here, the methods of its base class thermo.activity.GibbsExcess are
available as well.
References
[1], [2]
Examples
The DDBST has published numerous sample problems using UNIFAC; a simple binary system from example
P05.22a in [2] with n-hexane and butanone-2 is shown below:
>>> GE.gammas()
[1.4276025835, 1.3646545010]
>>> GE.GE(), GE.dGE_dT(), GE.d2GE_dT2()
(923.641197, 0.206721488, -0.00380070204)
>>> GE.HE(), GE.SE(), GE.dHE_dT(), GE.dSE_dT()
(854.77193363, -0.2067214889, 1.266203886, 0.0038007020460)
The solution given by the DDBST has the same values [1.428, 1.365], and can be found here: http://
chemthermo.ddbst.com/Problems_Solutions/Mathcad_Files/05.22a%20VLE%20of%20Hexane-Butanone-2%
20Via%20UNIFAC%20-%20Step%20by%20Step.xps
Attributes
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
Methods
gammas_from_args
Fis()
Calculate the 𝐹𝑖 terms used in calculating the combinatorial part. A function of mole fractions and the
parameters q only.
𝑞𝑖
𝐹𝑖 = ∑︀
𝑗 𝑞𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
Fis [list[float]] F terms size number of components, [-]
GE()
Calculate the excess Gibbs energy with the UNIFAC model.
∑︁
𝐺𝐸 = 𝑅𝑇 𝑥𝑖 (ln 𝛾𝑖𝑐 + ln 𝛾𝑖𝑟 )
𝑖
𝑄𝑚 𝑋𝑚
Θ𝑚 = ∑︀
𝑛 𝑄𝑛 𝑋𝑛
Returns
Thetas [list[float]] Θ𝑚 terms, size number of subgroups, [-]
Thetas_pure()
Calculate the Θ𝑚 parameters for each chemical in the mixture as a pure species, used in calculating the
residual part. A function of group counts only.
𝑄𝑚 𝑋𝑚
Θ𝑚 = ∑︀
𝑛 𝑄𝑛 𝑋𝑛
Returns
Thetas_pure [list[list[float]]] Θ𝑚 terms, size number of components by number of sub-
groups and indexed in that order, [-]
Vis()
Calculate the 𝑉𝑖 terms used in calculating the combinatorial part. A function of mole fractions and the
parameters r only.
𝑟𝑖
𝑉𝑖 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
Vis [list[float]] V terms size number of components, [-]
Vis_modified()
Calculate the 𝑉𝑖′ terms used in calculating the combinatorial part. A function of mole fractions and the
parameters r only.
𝑟𝑖𝑛
𝑉𝑖′ = ∑︀ 𝑛
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC Dortmund and UNIFAC-NIST model with n=0.75, and the Lyngby model with
n=2/3.
Returns
Vis_modified [list[float]] Modified V terms size number of components, [-]
Xs()
Calculate the 𝑋𝑚 parameters used in calculating the residual part. A function of mole fractions and group
counts only.
∑︀ 𝑗
𝑗 𝜈𝑚 𝑥𝑗
𝑋𝑚 = ∑︀ ∑︀ 𝑗
𝑗 𝑛 𝜈𝑛 𝑥𝑗
Returns
Xs [list[float]] 𝑋𝑚 terms, size number of subgroups, [-]
Xs_pure()
Calculate the 𝑋𝑚 parameters for each chemical in the mixture as a pure species, used in calculating the
residual part. A function of group counts only, not even mole fractions or temperature.
𝜈𝑚
𝑋𝑚 = ∑︀𝑔𝑟
𝑛 𝜈𝑛
Returns
Xs_pure [list[list[float]]] 𝑋𝑚 terms, size number of subgroups by number of components
and indexed in that order, [-]
d2Fis_dxixjs()
Calculate the second mole fraction derivative of the 𝐹𝑖 terms used in calculating the combinatorial part. A
function of mole fractions and the parameters q only.
𝜕𝐹𝑖
= 2𝑞𝑖 𝑞𝑗 𝑞𝑘 𝐺3𝑠𝑢𝑚
𝜕𝑥𝑗 𝜕𝑥𝑘
1
𝐺𝑠𝑢𝑚 = ∑︀
𝑗 𝑞 𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
d2Fis_dxixjs [list[list[list[float]]]] F terms size number of components by number of com-
ponents by number of components, [-]
d2GE_dT2()
Calculate the second temperature derivative of excess Gibbs energy with the UNIFAC model.
𝜕 2 𝐺𝐸 ∑︁ 𝜕 2 ln 𝛾 𝑟
𝑖
∑︁ 𝜕 ln 𝛾 𝑟
𝑖
= 𝑅𝑇 𝑥 𝑖 + 2𝑅 𝑥𝑖
𝜕𝑇 2 𝑖
𝜕𝑇 2
𝑖
𝜕𝑇
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy, [J/mol/K^2]
d2GE_dTdxs()
Calculate the first composition derivative and temperature derivative of excess Gibbs energy with the UNI-
FAC model.
⎛ ⎞ ⎡ ⎤
2 𝐸 𝑟 𝑟 𝑐 𝑟 𝑐 𝑟 )︂
𝜕 ln 𝛾 𝜕 ln 𝛾 𝜕 ln 𝛾
(︂
𝜕 𝐺 𝜕 ln 𝛾𝑖 ∑︁ 𝑗 ⎠ 𝜕 ln 𝛾𝑖 𝜕 ln 𝛾𝑖 ∑︁ 𝑗 𝑗 ⎦
= 𝑅𝑇 ⎝ + 𝑥𝑗 +𝑅⎣ + + 𝑥𝑗 +
𝜕𝑇 𝜕𝑥𝑖 𝜕𝑇 𝑗
𝜕𝑥 𝑖 𝜕𝑥 𝑖 𝜕𝑥 𝑖 𝑗
𝜕𝑥 𝑖 𝜕𝑥 𝑖
Returns
dGE_dxs [list[float]] First composition derivative and first temperature derivative of excess
Gibbs energy, [J/mol/K]
d2GE_dxixjs()
Calculate the second composition derivative of excess Gibbs energy with the UNIFAC model.
[︃ ]︃
𝜕 2 𝐺𝐸 ∑︁ (︂ 𝜕 ln 𝛾 𝑐 𝜕 ln 𝛾𝑖𝑟 𝜕 ln 𝛾𝑗𝑐 𝜕 ln 𝛾𝑗𝑟 𝜕 ln 𝛾𝑘𝑐 𝜕 ln 𝛾𝑘𝑟
)︂
𝑖
= 𝑅𝑇 + + + + +
𝜕𝑥𝑗 𝜕𝑥𝑘 𝑖
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑘 𝜕𝑥𝑘 𝜕𝑥𝑗 𝜕𝑥𝑗
Returns
d2GE_dxixjs [list[list[float]]] Second composition derivative of excess Gibbs energy,
[J/mol]
d2Thetas_dxixjs()
Calculate the mole fraction derivatives of the Θ𝑚 parameters. A function of mole fractions and group
counts only.
[︃
𝜕 2 Θ𝑖
∑︀
𝑄𝑖 𝐹 (𝜈𝑥)𝑠𝑢𝑚,𝑖 [ 𝑛 (
= ∑︀ −𝐹 (𝜈)𝑠𝑢𝑚,𝑗 𝜈𝑖,𝑘 − 𝐹 (𝜈)𝑠𝑢𝑚,𝑘 𝜈𝑖,𝑗 + 2𝐹 2 (𝜈)𝑠𝑢𝑚,𝑗 (𝜈)𝑠𝑢𝑚,𝑘 (𝜈𝑥)𝑠𝑢𝑚,𝑖 +
𝜕𝑥𝑗 𝜕𝑥𝑘 𝑛 𝑄𝑛 (𝜈𝑥)𝑠𝑢𝑚,𝑛
1
𝐺 = ∑︀
𝑗 𝑗 𝑋𝑗
𝑄
1
𝐹 = ∑︀ ∑︀
𝑗 𝑛𝜈𝑛𝑗 𝑥𝑗
∑︁
(𝜈)𝑠𝑢𝑚,𝑖 = 𝜈𝑗,𝑖
𝑗
∑︁
(𝜈𝑥)𝑠𝑢𝑚,𝑖 = 𝜈𝑖,𝑗 𝑥𝑗
𝑗
Returns
d2Thetas_dxixjs [list[list[list[float]]]] Θ𝑚 terms, size number of subgroups by mole frac-
tions and indexed in that order, [-]
d2Vis_dxixjs()
Calculate the second mole fraction derivative of the 𝑉𝑖 terms used in calculating the combinatorial part. A
function of mole fractions and the parameters r only.
𝜕𝑉𝑖 3
= 2𝑟𝑖 𝑟𝑗 𝑟𝑘 𝑉𝑠𝑢𝑚
𝜕𝑥𝑗 𝜕𝑥𝑘
1
𝑉𝑠𝑢𝑚 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
d2Vis_dxixjs [list[list[list[float]]]] V terms size number of components by number of com-
ponents by number of components, [-]
d2Vis_modified_dxixjs()
Calculate the second mole fraction derivative of the 𝑉𝑖′ terms used in calculating the combinatorial part. A
function of mole fractions and the parameters r only.
𝜕𝑉𝑖′
= 2𝑟𝑖𝑛 𝑟𝑗𝑛 𝑟𝑘𝑛 𝑉𝑠𝑢𝑚
3
𝜕𝑥𝑗 𝜕𝑥𝑘
1
𝑉𝑠𝑢𝑚 = ∑︀ 𝑛
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC Dortmund and UNIFAC-NIST model with n=0.75, and the Lyngby model with
n=2/3.
Returns
d2Vis_modified_dxixjs [list[list[list[float]]]] V’ terms size number of components by num-
ber of components by number of components, [-]
d2lnGammas_subgroups_dT2()
Calculate the second temperature derivative of the ln Γ𝑘 parameters for the phase; depends on the phases’s
composition and temperature.
⎡
2 ∑︁ (︂ 𝜕 2 𝜓𝑖,𝑗
(︂ )︂
𝜕 ln Γ𝑖 2 2 2 𝜕𝜓𝑖,𝑗
= −𝑄 𝑖
⎣𝑍(𝑖)𝐺(𝑖) − 𝐹 (𝑖) 𝑍(𝑖) + 𝜃 𝑗 𝑍(𝑗) − 𝑍(𝑗) 𝐺(𝑗)𝜃 𝜓
𝑗 𝑖,𝑗 + 2𝐹 𝜃
𝑗 𝑗 + 2𝑍(𝑗)3 𝐹 (𝑗)2 𝜃
𝜕𝑇 2 𝑗
𝜕𝑇 𝜕𝑇
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
𝑔𝑟
∑︁ 𝜕 2 𝜓𝑚,𝑘
𝐺(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 2
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚,𝑘
Θ
Returns
d2lnGammas_subgroups_dT2 [list[float]] Second temperature derivative of ln Gamma pa-
rameters for each subgroup, size number of subgroups, [1/K^2]
d2lnGammas_subgroups_dTdxs()
Calculate the temperature and mole fraction derivatives of the ln Γ𝑘 parameters for the phase; depends on
the phases’s composition and temperature.
𝑔𝑟 𝑔𝑟 𝑔𝑟
(︃
𝜕 2 ln Γ𝑘 2
∑︁ 𝜕𝜃𝑚 𝜕𝜓𝑘,𝑚 ∑︁
2 𝜕𝜃𝑚 ∑︁
= −𝑄𝑘 𝐷(𝑘, 𝑖)𝑍(𝑘) − 𝐵(𝑘)𝑊 (𝑘, 𝑖)𝑍(𝑘) + (𝑍(𝑚) )− (𝐵(𝑚)𝑍(𝑚) 𝜓𝑘,𝑚 )− (𝐷
𝜕𝑥𝑖 𝜕𝑇 𝑚
𝜕𝑥𝑖 𝜕𝑇 𝑚
𝜕𝑥𝑖 𝑚
The following groups are used as follows to simplfy the number of evaluations:
𝑔𝑟
∑︁ 𝜕𝜃𝑚
𝑊 (𝑘, 𝑖) = 𝜓𝑚,𝑘
𝑚
𝜕𝑥𝑖
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚𝑘
Θ
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
In the below expression, k` refers to a group, and i refers to a component.
𝑔𝑟
∑︁ 𝜕𝜃𝑚 𝜕𝜓𝑚,𝑘
𝐷(𝑘, 𝑖) =
𝑚
𝜕𝑥𝑖 𝜕𝑇
Returns
d2lnGammas_subgroups_dTdxs [list[list[float]]] Temperature and mole fraction deriva-
tives of Gamma parameters for each subgroup, size number of subgroups by number of
components and indexed in that order, [1/K]
d2lnGammas_subgroups_dxixjs()
Calculate the second mole fraction derivatives of the ln Γ𝑘 parameters for the phase; depends on the phases’s
composition and temperature.
𝑔𝑟 𝑔𝑟
(︃
𝜕 2 ln Γ𝑘 ∑︁ ∑︁ 𝜕 2 𝜃𝑚 ∑︁
= −𝑄𝑘 −𝑍(𝑘)𝐾(𝑘, 𝑖, 𝑗) − 𝑍(𝑚)2 𝐾(𝑚, 𝑖, 𝑗)𝜃𝑚 𝜓𝑘,𝑚 − 𝑊 (𝑘, 𝑖)𝑊 (𝑘, 𝑗)𝑍(𝑘)2 + 𝑍𝑚 𝜓𝑘,𝑚 −
𝜕𝑥𝑖 𝜕𝑥𝑗 𝑚 𝑚
𝜕𝑥𝑖 𝜕𝑥𝑗
The following groups are used as follows to simplfy the number of evaluations:
𝑔𝑟
∑︁ 𝜕𝜃𝑚
𝑊 (𝑘, 𝑖) = 𝜓𝑚,𝑘
𝑚
𝜕𝑥𝑖
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚𝑘
Θ
𝑔𝑟
∑︁ 𝜕 2 𝜃𝑚
𝐾(𝑘, 𝑖, 𝑗) = 𝜓𝑚,𝑘
𝑚
𝜕𝑥𝑖 𝜕𝑥𝑗
Returns
d2lnGammas_subgroups_dxixjs [list[list[list[float]]]] Second mole fraction derivatives of
Gamma parameters for each subgroup, size number of components by number of compo-
nents by number of subgroups and indexed in that order, [-]
d2lnGammas_subgroups_pure_dT2()
Calculate the second temperature derivative of ln Γ𝑘 pure component parameters for the phase; depends on
the phases’s temperature only.
⎡
𝜕 2 ln Γ𝑖 ∑︁ (︂ 𝜕 2 𝜓𝑖,𝑗
(︂ )︂
2 2 2 𝜕𝜓𝑖,𝑗
= −𝑄𝑖 𝑍(𝑖)𝐺(𝑖) − 𝐹 (𝑖) 𝑍(𝑖) +
⎣ 𝜃𝑗 𝑍(𝑗) − 𝑍(𝑗) 𝐺(𝑗)𝜃𝑗 𝜓𝑖,𝑗 + 2𝐹𝑗 𝜃𝑗 + 2𝑍(𝑗)3 𝐹 (𝑗)2 𝜃
𝜕𝑇 2 𝑗
𝜕𝑇 𝜕𝑇
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
𝑔𝑟
∑︁ 𝜕 2 𝜓𝑚,𝑘
𝐺(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 2
1
𝑍(𝑘) = ∑︀
𝑚 Θ𝑚 Ψ𝑚,𝑘
In this model, the Θ values come from the UNIFAC.Thetas_pure method, where each compound is as-
sumed to be pure.
Returns
d2lnGammas_subgroups_pure_dT2 [list[list[float]]] Second temperature derivative of ln
Gamma parameters for each subgroup, size number of subgroups by number of components
and indexed in that order, [1/K^2]
d2lngammas_c_dT2()
Second temperature derivatives of the combinatorial part of the UNIFAC model. Zero in all variations.
𝜕 2 ln 𝛾𝑖𝑐
=0
𝜕𝑇 2
Returns
d2lngammas_c_dT2 [list[float]] Combinatorial lngammas term second temperature deriva-
tives, size number of components, [-]
d2lngammas_c_dTdx()
Second temperature derivative and first mole fraction derivative of the combinatorial part of the UNIFAC
model. Zero in all variations.
𝜕 3 ln 𝛾𝑖𝑐
=0
𝜕𝑇 2 𝜕𝑥𝑗
Returns
d2lngammas_c_dTdx [list[list[float]]] Combinatorial lngammas term second temperature
derivatives, size number of components by number of components, [-]
d2lngammas_c_dxixjs()
Second composition derivative of the combinatorial part of the UNIFAC model. For the modified UNIFAC
model, the equation is as follows; for the original UNIFAC and UNIFAC LLE, replace 𝑉𝑖′ with 𝑉𝑖 .
⎛ (︂ 𝑑
)︂
2
𝑉𝑖 𝑑𝑥 𝑑 𝑑𝑥 𝐹𝑖 𝑑
𝐹𝑖 𝑑𝑥𝑑 𝑉𝑖 𝑑 𝑑
𝐹𝑖 𝑑𝑥 𝑉𝑖 𝑑
2𝑉𝑖 𝑑𝑥 𝐹𝑖 𝑑𝑥𝑑 𝐹𝑖 𝑉𝑖 𝑑𝑥 𝐹𝑖
𝑑 𝑗 𝑑
𝑑𝑥𝑗 𝑉𝑖 −
2
𝑑𝑥𝑘 𝑉𝑖
𝑑 𝑗 𝑑𝑥 𝑑𝑥
𝜕 ln 𝛾𝑖𝑐 ⎜ − 𝑑𝑥𝑘 𝑑𝑥𝑗 𝑉𝑖 +
𝑘
𝐹𝑖 + 𝑗 𝐹𝑖 𝑘 + 𝑘 𝐹𝑖 𝑗 − 𝑗
𝐹𝑖2
𝑘
𝐹𝑖
= 5𝑞𝑖 ⎜ + +
𝜕𝑥𝑗 𝜕𝑥𝑘 ⎝ 𝑉𝑖 𝑉𝑖2
Returns
d2lngammas_c_dxixjs [list[list[list[float]]]] Combinatorial lngammas term second compo-
sition derivative, size number of components by number of components by number of com-
ponents, [-]
d2lngammas_dT2()
Calculates the second temperature derivative of the residual part of the UNIFAC model.
𝑔𝑟
[︃ (𝑖)
]︃
𝜕 2 ln 𝛾𝑖𝑟 ∑︁ 2
(𝑖) 𝜕 ln Γ𝑘 𝜕 2 ln Γ𝑘
= 𝜈𝑘 −
𝜕𝑇 2 𝜕𝑇 2 𝜕𝑇 2
𝑘
Returns
d2lngammas_r_dTdxs [list[list[float]]] First mole fraction derivative and temperature
derivative of residual lngammas terms, size number of components by number of com-
ponents [-]
d2lngammas_r_dxixjs()
Calculates the second mole fraction derivative of the residual part of the UNIFAC model.
𝑔𝑟
𝜕 2 ln 𝛾𝑖𝑟 ∑︁ 2
(𝑖) 𝜕 ln Γ𝑚
2 = 𝜈𝑚
𝜕𝑥𝑗 𝑚
𝜕𝑥2𝑗
Returns
d2lngammas_r_dxixjs [list[list[list[float]]]] Second mole fraction derivative of the residual
lngammas terms, size number of components by number of components by number of
components [-]
d2psis_dT2()
Calculate the Ψ term second temperature derivative matrix for all groups interacting with all other groups.
𝜕 2 Ψ𝑚𝑛
=
𝜕𝑇 2 𝑇
Only the first, a coefficient, is used in the original UNIFAC model as well as the UNIFAC-LLE model, so
the expression simplifies to:
)︀ − 𝑎𝑚𝑛
𝑎𝑚𝑛 −2 + 𝑎𝑚𝑛
(︀
𝜕 2 Ψ𝑚𝑛 𝑇 𝑒 𝑇
2
= 3
𝜕𝑇 𝑇
For the Lyngby model, the second temperature derivative is:
(︃
(︀ )︀ 𝑎1 +𝑎2 (𝑇 −𝑇0 )+𝑎3 (𝑇 ln ( 𝑇𝑇0 )+𝑇 −𝑇0 ) 2 2(𝑎1 +𝑎2 (𝑇 −𝑇0 )+𝑎3 (𝑇 ln
(︂ )︂
2𝑎2 + 2𝑎3 ln 𝑇𝑇0 + 𝑎3 + 𝑎2 + 𝑎3 ln 𝑇𝑇0 −
(︀ )︀
𝑇 − 𝑇
𝜕 2 Ψ𝑚𝑘
=
𝜕𝑇 2 𝑇2
with 𝑇0 = 298.15 K and the a coefficients are specific to each pair of main groups, and they are asymmetric,
so 𝑎0,𝑚𝑘 ̸= 𝑎0,𝑘𝑚 .
Returns
d2psis_dT2 [list[list[float]]] Second temperature derivative of`psi` terms, size subgroups x
subgroups [-]
d3Fis_dxixjxks()
Calculate the third mole fraction derivative of the 𝐹𝑖 terms used in calculating the combinatorial part. A
function of mole fractions and the parameters q only.
𝜕𝐹𝑖
= −6𝑞𝑖 𝑞𝑗 𝑞𝑘 𝑞𝑚 𝐺4𝑠𝑢𝑚
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚
1
𝐺𝑠𝑢𝑚 = ∑︀
𝑗 𝑞 𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
d3Fis_dxixjxks [list[list[list[list[float]]]]] F terms size number of components by number of
components by number of components by number of components, [-]
d3GE_dT3()
Calculate the third temperature derivative of excess Gibbs energy with the UNIFAC model.
𝜕 3 𝐺𝐸 ∑︁ 𝜕 3 ln 𝛾 𝑟
𝑖
∑︁ 𝜕 2 ln 𝛾 𝑟
𝑖
3
= 𝑅𝑇 𝑥𝑖 3
+ 3𝑅 𝑥𝑖 2
𝜕𝑇 𝑖
𝜕𝑇 𝑖
𝜕𝑇
Returns
d3GE_dT3 [float] Third temperature derivative of excess Gibbs energy, [J/mol/K^3]
d3Vis_dxixjxks()
Calculate the third mole fraction derivative of the 𝑉𝑖 terms used in calculating the combinatorial part. A
function of mole fractions and the parameters r only.
𝜕𝑉𝑖 4
= −6𝑟𝑖 𝑟𝑗 𝑟𝑘 𝑟𝑚 𝑉𝑠𝑢𝑚
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚
1
𝑉𝑠𝑢𝑚 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
d3Vis_dxixjxks [list[list[list[list[float]]]]] V terms size number of components by number
of components by number of components by number of components, [-]
d3Vis_modified_dxixjxks()
Calculate the third mole fraction derivative of the 𝑉𝑖′ terms used in calculating the combinatorial part. A
function of mole fractions and the parameters r only.
𝜕𝑉𝑖′
= −6𝑟𝑖𝑛 𝑟𝑗𝑛 𝑟𝑘𝑛 𝑟𝑚
𝑛 4
𝑉𝑠𝑢𝑚
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚
1
𝑉𝑠𝑢𝑚 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC Dortmund and UNIFAC-NIST model with n=0.75, and the Lyngby model with
n=2/3.
Returns
d3Vis_modified_dxixjxks [list[list[list[list[float]]]]] V’ terms size number of components
by number of components by number of components by number of components, [-]
d3lnGammas_subgroups_dT3()
Calculate the third temperature derivative of the ln Γ𝑘 parameters for the phase; depends on the phases’s
composition and temperature.
𝜕 3 ln Γ𝑖 𝜕3𝜓
[︂ (︂
3 3 2
= 𝑄 𝑖 −𝐻(𝑖)𝑍(𝑖) − 2𝐹 (𝑖) 𝑍(𝑖) + 3𝐹 (𝑖)𝐺(𝑖)𝑍(𝑖) + −𝜃 𝑗 𝑍(𝑗) + 𝐻(𝑗)𝑍(𝑗)2 𝜃(𝑗)𝜓𝑖,𝑗 − 6𝐹 (𝑗)2 𝑍(𝑗)3 𝜃𝑗
𝜕𝑇 3 𝜕𝑇 3
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
𝑔𝑟
∑︁ 𝜕 2 𝜓𝑚,𝑘
𝐺(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 2
𝑔𝑟
∑︁ 𝜕 3 𝜓𝑚,𝑘
𝐻(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 3
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚,𝑘
Θ
Returns
d3lnGammas_subgroups_dT3 [list[float]] Third temperature derivative of ln Gamma pa-
rameters for each subgroup, size number of subgroups, [1/K^3]
d3lnGammas_subgroups_pure_dT3()
Calculate the third temperature derivative of ln Γ𝑘 pure component parameters for the phase; depends on
the phases’s temperature only.
𝜕 3 ln Γ𝑖 𝜕3𝜓
[︂ (︂
3 3 2
3
= 𝑄 𝑖 −𝐻(𝑖)𝑍(𝑖) − 2𝐹 (𝑖) 𝑍(𝑖) + 3𝐹 (𝑖)𝐺(𝑖)𝑍(𝑖) + −𝜃𝑗 𝑍(𝑗) 3 + 𝐻(𝑗)𝑍(𝑗)2 𝜃(𝑗)𝜓𝑖,𝑗 − 6𝐹 (𝑗)2 𝑍(𝑗)3 𝜃𝑗
𝜕𝑇 𝜕𝑇
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
𝑔𝑟
∑︁ 𝜕 2 𝜓𝑚,𝑘
𝐺(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 2
𝑔𝑟
∑︁ 𝜕 3 𝜓𝑚,𝑘
𝐻(𝑘) = 𝜃𝑚
𝑚
𝜕𝑇 3
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚,𝑘
Θ
In this model, the Θ values come from the UNIFAC.Thetas_pure method, where each compound is as-
sumed to be pure.
Returns
d3lnGammas_subgroups_pure_dT3 [list[list[float]]] Third temperature derivative of ln
Gamma parameters for each subgroup, size number of subgroups by number of compo-
nents and indexed in that order, [1/K^3]
d3lngammas_c_dT3()
Third temperature derivatives of the combinatorial part of the UNIFAC model. Zero in all variations.
𝜕 3 ln 𝛾𝑖𝑐
=0
𝜕𝑇 3
Returns
d3lngammas_c_dT3 [list[float]] Combinatorial lngammas term second temperature deriva-
tives, size number of components, [-]
d3lngammas_c_dxixjxks()
Third composition derivative of the combinatorial part of the UNIFAC model. For the modified UNIFAC
model, the equation is as follows; for the original UNIFAC and UNIFAC LLE, replace 𝑉𝑖′ with 𝑉𝑖 .
𝑑3 ′ 𝑑 ′ 𝑑2 ′ 𝑑 ′ 𝑑2 ′ 𝑑 ′ 𝑑2 ′
𝜕 ln 𝛾𝑖𝑐 𝑑3 𝑑𝑥𝑚 𝑑𝑥𝑘 𝑑𝑥𝑗 𝑉 𝑖 𝑑𝑥𝑗 𝑉 𝑖 𝑑𝑥𝑚 𝑑𝑥𝑘 𝑉 𝑖 𝑑𝑥𝑘 𝑉 𝑖 𝑑𝑥𝑚 𝑑𝑥𝑗 𝑉 𝑖 𝑑𝑥𝑚 𝑉 𝑖 𝑑𝑥𝑘 𝑑𝑥𝑗 𝑉 𝑖 2
=− 𝑉 𝑖′ + − − − +
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚 𝑑𝑥𝑚 𝑑𝑥𝑘 𝑑𝑥𝑗 𝑉 𝑖′ 𝑉 𝑖′2 𝑉 𝑖′2 𝑉 𝑖′2
For the Lyngby model, the following equations are used:
𝜕 3 ln 𝛾𝑖𝑐 𝜕 3 𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 2 𝜕𝑉𝑖′ 𝜕𝑉𝑖′ 𝜕
(︂ )︂ (︂ )︂
1 1
= − 1 − + + +
𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚 𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚 𝑉𝑖′ (𝑉𝑖′ )2 𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕𝑥𝑚 𝜕𝑥𝑘 𝜕𝑥𝑗 𝜕𝑥𝑚 𝜕𝑥𝑚 𝜕𝑥𝑗 𝜕𝑥𝑘 (𝑉𝑖′ )3 𝜕𝑥𝑗 𝜕𝑥𝑘 𝜕
Returns
d3lngammas_c_dxixjxks [list[list[list[list[float]]]]] Combinatorial lngammas term third
composition derivative, size number of components by number of components by num-
ber of components by number of components, [-]
d3lngammas_dT3()
Calculates the third temperature derivative of the residual part of the UNIFAC model.
𝑔𝑟
[︃ (𝑖)
]︃
𝜕 3 ln 𝛾𝑖𝑟 ∑︁ 2
(𝑖) 𝜕 3 ln Γ𝑘 𝜕 3 ln Γ𝑘
= 𝜈𝑘 −
𝜕𝑇 3 𝜕𝑇 3 𝜕𝑇 3
𝑘
Returns
d3lngammas_r_dT3 [list[float]] Residual lngammas terms third temperature derivative,
size number of components [1/K^3]
d3psis_dT3()
Calculate the Ψ term third temperature derivative matrix for all groups interacting with all other groups.
The main model calculates the derivative as a function of three coefficients;
(︃
(︁ 2
)︁ (︁ )︁
𝑇 2 𝑐𝑚𝑛 +𝑇 𝑏𝑚𝑛 +𝑎𝑚𝑛 6(2𝑇 𝑐𝑚𝑛 +𝑏𝑚𝑛
6𝑐𝑚𝑛 + 6 𝑐𝑚𝑛 − 2𝑇 𝑐𝑚𝑛𝑇+𝑏𝑚𝑛 + 𝑇 𝑐𝑚𝑛 +𝑇𝑇𝑏2𝑚𝑛 +𝑎𝑚𝑛 2𝑇 𝑐𝑚𝑛 + 𝑏𝑚𝑛 − 𝑇 − 𝑇
𝜕 3 Ψ𝑚𝑛
=
𝜕𝑇 3 𝑇2
Only the first, a coefficient, is used in the original UNIFAC model as well as the UNIFAC-LLE model, so
the expression simplifies to:
𝑎2𝑚𝑛
(︁ )︁ 𝑎
6𝑎𝑚𝑛 𝑚𝑛
3
𝜕 Ψ𝑚𝑛 𝑎 𝑚𝑛 6 − 𝑇 + 𝑇2 𝑒− 𝑇
=
𝜕𝑇 3 𝑇4
For the Lyngby model, the third temperature derivative is:
(︃ (︂ )︂3 (︂
𝑇0
𝑎1 +𝑎2 (𝑇 −𝑇0 )+𝑎3 (𝑇 ln ( )+𝑇 −𝑇0 )
6𝑎2 + 6𝑎3 ln 𝑇 + 4𝑎3 + 𝑎2 + 𝑎3 ln 𝑇𝑇0 −
(︀ 𝑇 )︀ (︀ )︀ 𝑇
(︀ 𝑇 )︀
0
𝑇 + 3 𝑎2 + 𝑎3 ln 𝑇
0
3
𝜕 Ψ𝑚𝑘
=−
𝜕𝑇 3
with 𝑇0 = 298.15 K and the a coefficients are specific to each pair of main groups, and they are asymmetric,
so 𝑎0,𝑚𝑘 ̸= 𝑎0,𝑘𝑚 .
Returns
d3psis_dT3 [list[list[float]]] Third temperature derivative of`psi` terms, size subgroups x
subgroups [-]
dFis_dxs()
Calculate the mole fraction derivative of the 𝐹𝑖 terms used in calculating the combinatorial part. A function
of mole fractions and the parameters q only.
𝜕𝐹𝑖
= −𝑞𝑖 𝑞𝑗 𝐺2𝑠𝑢𝑚
𝜕𝑥𝑗
1
𝐺𝑠𝑢𝑚 = ∑︀
𝑗 𝑞 𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
dFis_dxs [list[list[float]]] F terms size number of components by number of components, [-]
dGE_dT()
Calculate the first temperature derivative of excess Gibbs energy with the UNIFAC model.
𝜕𝐺𝐸 ∑︁ 𝜕 ln 𝛾 𝑟
𝑖 𝐺𝐸
= 𝑅𝑇 𝑥𝑖 +
𝜕𝑇 𝑖
𝜕𝑇 𝑇
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy, [J/mol/K]
dGE_dxs()
Calculate the first composition derivative of excess Gibbs energy with the UNIFAC model.
𝜕𝐺𝐸 ∑︁ (︂ 𝜕 ln 𝛾𝑗𝑐 𝜕 ln 𝛾𝑗𝑟
)︂
= 𝑅𝑇 (ln 𝛾𝑖𝑐 + ln 𝛾𝑖𝑟 ) + 𝑅𝑇 𝑥𝑗 +
𝜕𝑥𝑖 𝑗
𝜕𝑥𝑖 𝜕𝑥𝑖
Returns
dGE_dxs [list[float]] First composition derivative of excess Gibbs energy, [J/mol]
dThetas_dxs()
Calculate the mole fraction derivatives of the Θ𝑚 parameters. A function of mole fractions and group
counts only.
[︃ (︃ 𝑔𝑟 𝑔𝑟
)︃ ]︃
𝜕Θ𝑖 ∑︁ ∑︁
= 𝐹 𝐺𝑄𝑖 𝐹 𝐺(𝜈𝑥)𝑠𝑢𝑚,𝑖 𝐹 𝑄𝑘 (𝜈)𝑠𝑢𝑚,𝑗 (𝜈𝑥)𝑠𝑢𝑚,𝑘 − 𝑄𝑘 𝜈𝑘,𝑗 − 𝐹 (𝜈)𝑠𝑢𝑚,𝑗 (𝜈𝑥)𝑠𝑢𝑚,𝑖 + 𝜈𝑖𝑗
𝜕𝑥𝑗
𝑘 𝑘
1
𝐺 = ∑︀
𝑗 𝑗 𝑋𝑗
𝑄
1
𝐹 = ∑︀ ∑︀
𝑗 𝑛𝜈𝑛𝑗 𝑥𝑗
∑︁
(𝜈)𝑠𝑢𝑚,𝑖 = 𝜈𝑗,𝑖
𝑗
∑︁
(𝜈𝑥)𝑠𝑢𝑚,𝑖 = 𝜈𝑖,𝑗 𝑥𝑗
𝑗
Returns
dThetas_dxs [list[list[float]]] Mole fraction derivatives of Θ𝑚 terms, size number of sub-
groups by mole fractions and indexed in that order, [-]
dVis_dxs()
Calculate the mole fraction derivative of the 𝑉𝑖 terms used in calculating the combinatorial part. A function
of mole fractions and the parameters r only.
𝜕𝑉𝑖 2
= −𝑟𝑖 𝑟𝑗 𝑉𝑠𝑢𝑚
𝜕𝑥𝑗
1
𝑉𝑠𝑢𝑚 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC, UNIFAC-LLE, UNIFAC Dortmund, UNIFAC-NIST, and PSRK models.
Returns
dVis_dxs [list[list[float]]] V terms size number of components by number of components,
[-]
dVis_modified_dxs()
Calculate the mole fraction derivative of the 𝑉𝑖′ terms used in calculating the combinatorial part. A function
of mole fractions and the parameters r only.
𝜕𝑉𝑖′
= −𝑟𝑖𝑛 𝑟𝑗𝑛 𝑉𝑠𝑢𝑚
2
𝜕𝑥𝑗
1
𝑉𝑠𝑢𝑚 = ∑︀ 𝑛
𝑗 𝑟𝑗 𝑥𝑗
This is used in the UNIFAC Dortmund and UNIFAC-NIST model with n=0.75, and the Lyngby model with
n=2/3.
Returns
dVis_modified_dxs [list[list[float]]] V’ terms size number of components by number of
components, [-]
dgammas_dT()
Calculates the first temperature derivative of activity coefficients with the UNIFAC model.
𝜕𝛾𝑖 𝜕 ln 𝛾𝑖𝑟
= 𝛾𝑖
𝜕𝑇 𝜕𝑇
Returns
dgammas_dT [list[float]] First temperature derivative of activity coefficients, size number
of components [1/K]
dgammas_dns()
Calculate and return the mole number derivative of activity coefficients of a liquid phase using an activity
coefficient model.
⎛ 2 𝐸 ⎞
𝜕 𝐺
𝜕𝛾𝑖 𝜕𝑥 𝜕𝑥
= 𝛾𝑖 ⎝ 𝑖 𝑗 ⎠
𝜕𝑛𝑖 𝑅𝑇
Returns
dgammas_dns [list[list[float]]] Mole number derivatives of activity coefficients, [1/mol]
dgammas_dxs()
Calculates the first mole fraction derivative of activity coefficients with the UNIFAC model.
𝜕 ln 𝛾𝑖𝑟 𝜕 ln 𝛾𝑖𝑐
(︂ )︂
𝜕𝛾𝑖
= 𝛾𝑖 +
𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑗
𝜕 ln 𝛾𝑖𝑟
(︂ )︂
𝜕𝛾𝑖
= 𝛾𝑖
𝜕𝑥𝑗 𝜕𝑥𝑗
Returns
dgammas_dxs [list[list[float]]] First mole fraction derivative of activity coefficients, size
number of components by number of components [-]
dlnGammas_subgroups_dT()
Calculate the first temperature derivative of the ln Γ𝑘 parameters for the phase; depends on the phases’s
composition and temperature.
⎛ ⎞
𝑔𝑟 [︂ ]︂
𝜕 ln Γ𝑖 ∑︁ 𝜕𝜓 𝑖,𝑗
= 𝑄𝑖 ⎝ 𝑍(𝑗) 𝜃𝑗 + 𝜃𝑗 𝜓𝑖,𝑗 𝐹 (𝑗)𝑍(𝑗) − 𝐹 (𝑖)𝑍(𝑖)⎠
𝜕𝑇 𝑗
𝜕𝑇
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚,𝑘
Θ
Returns
dlnGammas_subgroups_dT [list[float]] First temperature derivative of ln Gamma param-
eters for each subgroup, size number of subgroups, [1/K]
dlnGammas_subgroups_dxs()
Calculate the mole fraction derivatives of the ln Γ𝑘 parameters for the phase; depends on the phases’s
composition and temperature.
(︃ ∑︀𝑔𝑟 𝜕𝜃𝑚 𝑔𝑟 𝑔𝑟 ∑︀𝑔𝑟
)︃
𝜕 ln Γ𝑘 𝑚 𝜓𝑚,𝑘 𝜕𝑥𝑖
∑︁ 𝜓𝑘,𝑚 𝜕𝜃
𝜕𝑥𝑖
𝑚 ∑︁ ( 𝑛 𝜓𝑛,𝑚 𝜕𝜃𝜕𝑥𝑖 )𝜃𝑚 𝜓𝑘,𝑚
𝑛
𝑔𝑟
∑︁ 𝜕𝜓𝑚,𝑘
𝐹 (𝑘) = 𝜃𝑚
𝑚
𝜕𝑇
1
𝑍(𝑘) = ∑︀
𝑚 𝑚 Ψ𝑚,𝑘
Θ
In this model, the Θ values come from the UNIFAC.Thetas_pure method, where each compound is as-
sumed to be pure.
Returns
dlnGammas_subgroups_pure_dT [list[list[float]]] First temperature derivative of ln
Gamma parameters for each subgroup, size number of subgroups by number of compo-
nents and indexed in that order, [1/K]
dlngammas_c_dT()
Temperature derivatives of the combinatorial part of the UNIFAC model. Zero in all variations.
𝜕 ln 𝛾𝑖𝑐
=0
𝜕𝑇
Returns
dlngammas_c_dT [list[float]] Combinatorial lngammas term temperature derivatives, size
number of components, [-]
dlngammas_c_dxs()
First composition derivative of the combinatorial part of the UNIFAC model. For the modified UNIFAC
model, the equation is as follows; for the original UNIFAC and UNIFAC LLE, replace 𝑉𝑖′ with 𝑉𝑖 .
[︃(︃ 𝜕𝑉𝑖 𝜕𝐹𝑖
)︃ 𝜕𝑉𝑖 𝜕𝐹𝑖
]︃ 𝜕𝑉𝑖′
𝜕 ln 𝛾𝑖𝑐 𝜕𝑥𝑗 𝑉𝑖 𝜕𝑥 𝐹 𝑖 𝜕𝑥 𝑉𝑖 𝜕𝑥 𝜕𝑉 ′
𝜕𝑥
𝑗 𝑖
= −5𝑞𝑖 − − 𝑗 + 𝑗
− + ′𝑗
𝜕𝑥𝑗 𝐹𝑖 𝐹𝑖2 𝑉𝑖 𝐹𝑖 𝐹𝑖2 𝜕𝑥𝑗 𝑉𝑖
For the Lyngby model, the following equations are used:
𝜕 ln 𝛾𝑖𝑐 −𝜕𝑉𝑖′ 1 𝜕𝑉 ′
= + ′ 𝑖
𝜕𝑥𝑗 𝜕𝑥𝑗 𝑉𝑖 𝜕𝑥𝑗
Returns
dlngammas_c_dxs [list[list[float]]] Combinatorial lngammas term first composition deriva-
tive, size number of components by number of components, [-]
dlngammas_dT()
Calculates the first temperature derivative of the residual part of the UNIFAC model.
𝑔𝑟
[︃ (𝑖)
]︃
𝜕 ln 𝛾𝑖𝑟 ∑︁ (𝑖) 𝜕 ln Γ𝑘 𝜕 ln Γ𝑘
= 𝜈𝑘 −
𝜕𝑇 𝜕𝑇 𝜕𝑇
𝑘
Returns
dlngammas_r_dxs [list[list[float]]] First mole fraction derivative of residual lngammas
terms, size number of components by number of components [-]
dpsis_dT()
Calculate the Ψ term first temperature derivative matrix for all groups interacting with all other groups.
The main model calculates the derivative as a function of three coefficients;
−𝑇 2 𝑐𝑚𝑛 − 𝑇 𝑏𝑚𝑛 − 𝑎𝑚𝑛
(︂ )︂
𝜕Ψ𝑚𝑛 −2𝑇 𝑐𝑚𝑛 − 𝑏𝑚𝑛 −𝑇 2 𝑐𝑚𝑛 −𝑇 𝑏𝑚𝑛 −𝑎𝑚𝑛
= − 2
𝑒 𝑇
𝜕𝑇 𝑇 𝑇
Only the first, a coefficient, is used in the original UNIFAC model as well as the UNIFAC-LLE model, so
the expression simplifies to:
𝑎𝑚𝑛
𝜕Ψ𝑚𝑛 𝑎𝑚𝑛 𝑒− 𝑇
=
𝜕𝑇 𝑇2
For the Lyngby model, the first temperature derivative is:
(︃ )︀ )︃ 𝑇
−𝑎2 − 𝑎3 ln 𝑇𝑇0 −𝑎1 − 𝑎2 (𝑇 − 𝑇0 ) − 𝑎3 𝑇 ln 𝑇𝑇0 + 𝑇 − 𝑇0
(︀ )︀ (︀ (︀ )︀
−𝑎1 −𝑎2 (𝑇 −𝑇0 )−𝑎3 (𝑇 ln ( 0 )+𝑇 −𝑇0 )
𝜕Ψ𝑚𝑘 𝑇
= − 𝑒 𝑇
𝜕𝑇 𝑇 𝑇2
with 𝑇0 = 298.15 K and the a coefficients are specific to each pair of main groups, and they are asymmetric,
so 𝑎0,𝑚𝑘 ̸= 𝑎0,𝑘𝑚 .
Returns
dpsis_dT [list[list[float]]] First temperature derivative of`psi` terms, size subgroups x sub-
groups [-]
static from_subgroups(T, xs, chemgroups, subgroups=None, interaction_data=None, version=0)
Method to construct a UNIFAC object from a dictionary of interaction parameters parameters and a list
of dictionaries of UNIFAC keys. As the actual implementation is matrix based not dictionary based, this
method can be quite convenient.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
chemgroups [list[dict]] List of dictionaries of subgroup IDs and their counts for all species
in the mixture, [-]
subgroups [dict[int: UNIFAC_subgroup], optional] UNIFAC subgroup data; available dic-
tionaries in this module include UFSG (original), DOUFSG (Dortmund), or NISTUFSG.
The default depends on the given version, [-]
interaction_data [dict[int: dict[int: tuple(a_mn, b_mn, c_mn)]], optional] UNIFAC in-
teraction parameter data; available dictionaries in this module include UFIP (original),
DOUFIP2006 (Dortmund parameters published in 2006), DOUFIP2016 (Dortmund pa-
rameters published in 2016), and NISTUFIP. The default depends on the given version,
[-]
version [int, optional] Which version of the model to use. Defaults to 0, [-]
• 0 - original UNIFAC, OR UNIFAC LLE
• 1 - Dortmund UNIFAC (adds T dept, 3/4 power)
• 2 - PSRK (original with T dept function)
• 3 - VTPR (drops combinatorial term, Dortmund UNIFAC otherwise)
• 4 - Lyngby/Larsen has different combinatorial, 2/3 power
• 5 - UNIFAC KT (2 params for psi, Lyngby/Larsen formulation; otherwise same as orig-
inal)
Returns
UNIFAC [UNIFAC] Object for performing calculations with the UNIFAC activity coefficient
model, [-]
Notes
Warning: For version 0, the interaction data and subgroups default to the original UNIFAC model
(not LLE).
For version 1, the interaction data defaults to the Dortmund parameters publshed in 2016 (not 2006).
Examples
Mixture of [‘benzene’, ‘cyclohexane’, ‘acetone’, ‘ethanol’] according to the Dortmund UNIFAC model:
>>> GE
UNIFAC(T=373.15, xs=[0.2, 0.3, 0.1, 0.4], rs=[2.2578, 4.2816, 2.3373, 2.
˓→4951999999999996], qs=[2.5926, 5.181, 2.7308, 2.6616], Qs=[1.0608, 0.7081, 0.
˓→4321, 0.8927, 1.67, 0.8635], vs=[[0, 0, 1, 1], [0, 0, 0, 1], [6, 0, 0, 0], [0,
˓→433.6, -117.1], [0.0, 0.0, 114.2, 2777.0, 433.6, -117.1], [16.07, 16.07, 0.0,␣
˓→3972.0, 146.2, 134.6], [1606.0, 1606.0, 3049.0, 0.0, -250.0, 3121.0], [199.0,␣
˓→199.0, -57.53, 653.3, 0.0, 168.2], [170.9, 170.9, -2.619, 2601.0, 464.5, 0.
˓→0]], [[0.0, 0.0, 0.0933, -4.674, 0.1473, 0.5481], [0.0, 0.0, 0.0933, -4.674,␣
˓→0.1473, 0.5481], [-0.2998, -0.2998, 0.0, -13.16, -1.237, -1.231], [-4.746, -4.
˓→746, -12.77, 0.0, 2.857, -13.69], [-0.8709, -0.8709, 1.212, -1.412, 0.0, -0.
˓→8197], [-0.8062, -0.8062, 1.094, -1.25, 0.1542, 0.0]], [[0.0, 0.0, 0.0, 0.
˓→001551, 0.0, -0.00098], [0.0, 0.0, 0.0, 0.001551, 0.0, -0.00098], [0.0, 0.0,␣
gammas()
Calculates the activity coefficients with the UNIFAC model.
𝛾𝑖 = exp(ln 𝛾𝑖𝑟 )
Returns
gammas [list[float]] Activity coefficients, size number of components [-]
gammas_args(T=None)
Return a tuple of arguments at the specified tempearture that can be used to efficiently compute gammas at
the specified temperature but with varying compositions. This is useful in the context of a TP flash.
lnGammas_subgroups()
Calculate the ln Γ𝑘 parameters for the phase; depends on the phases’s composition and temperature.
[︃ ]︃
∑︁ ∑︁ Θ𝑚 Ψ𝑘𝑚
ln Γ𝑘 = 𝑄𝑘 1 − ln Θ𝑚 Ψ𝑚𝑘 − ∑︀
𝑚 𝑚 𝑛 Θ𝑛 Ψ𝑛𝑚
Returns
lnGammas_subgroups [list[float]] Gamma parameters for each subgroup, size number of
subgroups, [-]
lnGammas_subgroups_pure()
Calculate the ln Γ𝑘 pure component parameters for the phase; depends on the phases’s temperature only.
[︃ ]︃
∑︁ ∑︁ Θ𝑚 Ψ𝑘𝑚
ln Γ𝑘 = 𝑄𝑘 1 − ln Θ𝑚 Ψ𝑚𝑘 − ∑︀
𝑚 𝑚 𝑛 Θ𝑛 Ψ𝑛𝑚
In this model, the Θ values come from the UNIFAC.Thetas_pure method, where each compound is as-
sumed to be pure.
Returns
lnGammas_subgroups_pure [list[list[float]]] Gamma parameters for each subgroup, size
number of subgroups by number of components and indexed in that order, [-]
lngammas_c()
Calculates the combinatorial part of the UNIFAC model. For the modified UNIFAC model, the equation is
as follows; for the original UNIFAC and UNIFAC LLE, replace 𝑉𝑖′ with 𝑉𝑖 .
(︂ (︂ )︂)︂
𝑉𝑖 𝑉𝑖
ln 𝛾𝑖𝑐 = 1 − 𝑉 ′ 𝑖 + ln(𝑉 ′ 𝑖 ) − 5𝑞𝑖 1 − + ln
𝐹𝑖 𝐹𝑖
For the Lyngby model:
Returns
lngammas_c [list[float]] Combinatorial lngammas terms, size number of components [-]
lngammas_r()
Calculates the residual part of the UNIFAC model.
𝑔𝑟 [︁ ]︁
(𝑖) (𝑖)
∑︁
ln 𝛾𝑖𝑟 = 𝜈𝑘 ln Γ𝑘 − ln Γ𝑘
𝑘
with 𝑇0 = 298.15 K and the a coefficients are specific to each pair of main groups, and they are asymmetric,
so 𝑎0,𝑚𝑘 ̸= 𝑎0,𝑘𝑚 .
Returns
psis [list[list[float]]] psi terms, size subgroups x subgroups [-]
to_T_xs(T, xs)
Method to construct a new UNIFAC instance at temperature T, and mole fractions xs with the same param-
eters as the existing object.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions of each component, [-]
Returns
obj [UNIFAC] New UNIFAC object at the specified conditions [-]
Notes
If the new temperature is the same temperature as the existing temperature, if the psi terms or their deriva-
tives have been calculated, they will be set to the new object as well. If the mole fractions are the same,
various subgroup terms are also kept.
Notes
The actual implementation of UNIFAC is formulated slightly different than the formulas above for computational
efficiency. DDBST switched to using the more efficient forms in their publication, but the numerical results are
identical.
The model is as follows:
ln 𝛾𝑖 = ln 𝛾𝑖𝑐 + ln 𝛾𝑖𝑟
Combinatorial component
𝑛
𝜑𝑖 𝑧 𝜃𝑖 𝜑𝑖 ∑︁
ln 𝛾𝑖𝑐 = ln + 𝑞𝑖 ln + 𝐿𝑖 − 𝑥𝑗 𝐿𝑗
𝑥𝑖 2 𝜑𝑖 𝑥𝑖 𝑗=1
𝑥𝑖 𝑞 𝑖
𝜃𝑖 = ∑︀𝑛
𝑗=1 𝑥𝑗 𝑞𝑗
𝑥𝑖 𝑟𝑖
𝜑𝑖 = ∑︀𝑛
𝑗=1 𝑥𝑗 𝑟𝑗
𝐿𝑖 = 5(𝑟𝑖 − 𝑞𝑖 ) − (𝑟𝑖 − 1)
Residual component
𝑛 [︁ ]︁
(𝑖) (𝑖)
∑︁
ln 𝛾𝑖𝑟 = 𝜈𝑘 ln Γ𝑘 − ln Γ𝑘
𝑘
[︃ ]︃
Θ Ψ
∑︀ 𝑚 𝑘𝑚
∑︁ ∑︁
ln Γ𝑘 = 𝑄𝑘 1 − ln Θ𝑚 Ψ𝑚𝑘 −
𝑚 𝑚 𝑛 Θ𝑛 Ψ𝑛𝑚
𝑄𝑚 𝑋𝑚
Θ𝑚 = ∑︀
𝑛 𝑄𝑛 𝑋𝑛
∑︀ 𝑗
𝑗 𝜈𝑚 𝑥𝑗
𝑋𝑚 = ∑︀ ∑︀ 𝑗
𝑗 𝑛 𝜈𝑛 𝑥𝑗
R and Q
𝑛
∑︁
𝑟𝑖 = 𝜈𝑘 𝑅𝑘
𝑘=1
𝑛
∑︁
𝑞𝑖 = 𝜈𝑘 𝑄𝑘
𝑘=1
The newer forms of UNIFAC (Dortmund, NIST) calculate the combinatorial part slightly differently:
(︂ (︂ )︂)︂
𝑐 ′ ′ 𝑉𝑖 𝑉𝑖
ln 𝛾𝑖 = 1 − 𝑉 𝑖 + ln(𝑉 𝑖 ) − 5𝑞𝑖 1 − + ln
𝐹𝑖 𝐹𝑖
3/4
𝑟𝑖
𝑉𝑖′ = ∑︀ 3/4
𝑗 𝑟𝑗 𝑥𝑗
𝑟𝑖
𝑉𝑖 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
𝑞𝑖
𝐹𝑖 = ∑︀
𝑗 𝑞 𝑗 𝑥𝑗
Although this form looks substantially different than the original, it infact reverts to the original form if only 𝑉𝑖′
is replaced by 𝑉𝑖 . This is more clear when looking at the full rearranged form as in [3].
In some publications such as [5], the nomenclature is such that 𝜃𝑖 and 𝜑 do not contain the top 𝑥𝑖 , making
𝜃𝑖 = 𝐹𝑖 and 𝜑𝑖 = 𝑉𝑖 . [5] is also notable for having supporting information containing very nice sets of analytical
derivatives.
UNIFAC LLE uses the original formulation of UNIFAC, and otherwise only different interaction parameters.
References
Examples
[1.427602583562, 1.364654501010]
Notes
UNIFAC interaction parameters are asymmetric. No warning is raised if an interaction parameter is missing.
References
[1], [2]
Examples
thermo.unifac.UNIFAC_RQ(groups, subgroup_data=None)
Calculates UNIFAC parameters R and Q for a chemical, given a dictionary of its groups, as shown in [1]. Most
UNIFAC methods use the same subgroup values; however, a dictionary of UNIFAC_subgroup instances may be
specified as an optional second parameter.
𝑛
∑︁
𝑟𝑖 = 𝜈𝑘 𝑅𝑘
𝑘=1
𝑛
∑︁
𝑞𝑖 = 𝜈𝑘 𝑄𝑘
𝑘=1
Parameters
groups [dict[count]] Dictionary of numeric subgroup IDs : their counts
subgroup_data [None or dict[UNIFAC_subgroup]] Optional replacement for standard sub-
groups; leave as None to use the original UNIFAC subgroup r and q values.
Returns
R [float] R UNIFAC parameter (normalized Van der Waals Volume) [-]
Q [float] Q UNIFAC parameter (normalized Van der Waals Area) [-]
Notes
These parameters have some predictive value for other chemical properties.
References
[1]
Examples
Hexane
thermo.unifac.Van_der_Waals_volume(R)
Calculates a species Van der Waals molar volume with the UNIFAC method, given a species’s R parameter.
𝑉𝑤𝑘 = 15.17𝑅𝑘
Parameters
R [float] R UNIFAC parameter (normalized Van der Waals Volume) [-]
Returns
V_vdw [float] Unnormalized Van der Waals volume, [m^3/mol]
Notes
References
[1]
Examples
>>> Van_der_Waals_volume(4.4998)
6.826196599999999e-05
thermo.unifac.Van_der_Waals_area(Q)
Calculates a species Van der Waals molar surface area with the UNIFAC method, given a species’s Q parameter.
Parameters
Q [float] Q UNIFAC parameter (normalized Van der Waals Area) [-]
Returns
A_vdw [float] Unnormalized Van der Waals surface area, [m^2/mol]
Notes
References
[1]
Examples
>>> Van_der_Waals_area(3.856)
964000.0
thermo.unifac.chemgroups_to_matrix(chemgroups)
Index by [group index][compound index]
>>> chemgroups_to_matrix([{9: 6}, {2: 6}, {1: 1, 18: 1}, {1: 1, 2: 1, 14: 1}])
[[0, 0, 1, 1], [0, 6, 0, 1], [6, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]
thermo.unifac.UNIFAC_group_assignment_DDBST(CAS, model)
Lookup the group assignment of a compound in either the ‘UNIFAC’ the ‘MODIFIED_UNIFAC’, or the ‘PSRK’
model. These values are read from a sqlite database on demand.
Parameters
CAS [str] CAS number, [-]
model [str] One of ‘UNIFAC’, ‘MODIFIED_UNIFAC’, or ‘PSRK’, [-]
Returns
asssignments [dict] The group assignments and their counts; note that an empty dictionary in-
dicates the fragmentation is not available, [-]
Examples
Basic module which wraps some of thermo functions and classes to be compatible with the pint unit handling library.
All other object - dicts, lists, etc - are not wrapped.
>>> thermo.units.PRMIX(**kwargs)
PRMIX(Tcs=array([126.1, 190.6]), Pcs=array([3394000., 4604000.]), omegas=array([0.04 , 0.
˓→011]), kijs=array([[0. , 0.0289],
[0.0289, 0. ]]), zs=array([0.5, 0.5]), T=673.15, P=206842.7187950509)
Note that values which can normally be numpy arrays or python lists, are required to always be numpy arrays in this
interface.
This is interface is powerful but not complex enough to handle many of the objects in Thermo. A list of the types of
classes which are not supported is as follows:
• TDependentProperty, TPDependentProperty, MixtureProperty
• Phase objects
• Flash object
• ChemicalConstantsPackage
• PropertyCorrelationsPackage
For further information on this interface, please see the documentation of fluids.units which is built in the same way.
This module contains base classes for temperature T, pressure P, and composition zs dependent properties. These
power the various interfaces for each property.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Temperature Dependent
• Temperature and Pressure Dependent
• Temperature, Pressure, and Composition Dependent
It is not assumed that a specified method will succeed; for example many expressions are not mathematically valid
past the critical point, and in some cases there is no easy way to determine the temperature where a property stops
being reasonable.
Accordingly, all properties calculated are checked by a sanity function test_property_validity, which has
basic sanity checks. If the property is not reasonable, None is returned.
This framework also supports tabular data, which is interpolated from if specified. Interpolation is cubic-spline
based if 5 or more points are given, and linearly interpolated with if few points are given. A transform may
be applied so that a property such as vapor pressure can be interpolated non-linearly. These are functions
or lambda expressions which are set for the variables interpolation_T, interpolation_property, and
interpolation_property_inv.
In order to calculate properties outside of the range of their correlations, a number of extrapolation method are
available. Extrapolation is used by default on some properties but not all. The extrapolation methods available
are as follows:
• ‘constant’ - returns the model values as calculated at the temperature limits
• ‘linear’ - fits the model at its temperature limits to a linear model
• ‘nolimit’ - attempt to evaluate the model outside of its limits; this will error in most cases and return None
• ‘interp1d’ - SciPy’s interp1d is used to extrapolate
• ‘AntoineAB’ - fits the model to Antoine’s equation at the temperature limits using only the A and B
coefficient
• ‘DIPPR101_ABC’ - fits the model at its temperature limits to the EQ101 equation
• ‘Watson’ - fits the model to the Heat of Vaporization model Watson
• ‘EXP_POLY_LN_TAU2’ - uses the models’s critical temperature and derivative to fit the model linearly
in the equation prop = exp(𝑎 + 𝑏 · ln 𝜏 ), so that it is always zero at the critical point; suitable for surface
tension.
• ‘DIPPR106_AB’ - uses the models’s critical temperature and derivative to fit the model linearly in the
equation EQ106’s equation at the temperature limits using only the A and B coefficient
• ‘DIPPR106_ABC’ - uses the models’s critical temperature and first two derivatives to fit the model quadrat-
ically in the equation EQ106’s equation at the temperature limits using only the A, B, and C coefficient.
It is possible to use different extrapolation methods for the low-temperature and the high-temperature region.
Specify the extrapolation parameter with the ‘|’ symbols between the two methods; the first method is used for
low-temperature, and the second for the high-temperature.
Attributes
name [str] The name of the property being calculated, [-]
units [str] The units of the property, [-]
method [str] Method used to set a specific property method or to obtain the name of the method
in use.
interpolation_T [callable or None] A function or lambda expression to transform the tempera-
tures of tabular data for interpolation; e.g. ‘lambda self, T: 1./T’
interpolation_T_inv [callable or None] A function or lambda expression to invert the transform
of temperatures of tabular data for interpolation; e.g. ‘lambda self, x: self.Tc*(1 - x)’
interpolation_property [callable or None] A function or lambda expression to transform tabu-
lar property values prior to interpolation; e.g. ‘lambda self, P: log(P)’
Methods
T_dependent_property(T )
Method to calculate the property with sanity checking and using the selected method.
In the unlikely event the calculation of the property fails, None is returned.
The calculated result is checked with test_property_validity and None is returned if the calculated
value is nonsensical.
Parameters
T [float] Temperature at which to calculate the property, [K]
Returns
prop [float] Calculated property, [units]
T_dependent_property_derivative(T, order=1)
Method to obtain a derivative of a property with respect to temperature, of a given order.
Calls calculate_derivative internally to perform the actual calculation.
𝑑(property)
derivative =
𝑑𝑇
Parameters
T [float] Temperature at which to calculate the derivative, [K]
order [int] Order of the derivative, >= 1
Returns
derivative [float] Calculated derivative property, [units/K^order]
T_dependent_property_integral(T1, T2)
Method to calculate the integral of a property with respect to temperature, using the selected method.
Calls calculate_integral internally to perform the actual calculation.
∫︁ 𝑇2
integral = property 𝑑𝑇
𝑇1
Parameters
T1 [float] Lower limit of integration, [K]
T2 [float] Upper limit of integration, [K]
Returns
integral [float] Calculated integral of the property over the given range, [units*K]
T_dependent_property_integral_over_T(T1, T2)
Method to calculate the integral of a property over temperature with respect to temperature, using the
selected method.
Calls calculate_integral_over_T internally to perform the actual calculation.
property
∫︁ 𝑇2
integral = 𝑑𝑇
𝑇1 𝑇
Parameters
T1 [float] Lower limit of integration, [K]
T2 [float] Upper limit of integration, [K]
Returns
integral [float] Calculated integral of the property over the given range, [units]
T_limits = {}
Dictionary containing method: (Tmin, Tmax) pairs for all methods applicable to the chemical
__call__(T )
Convenience method to calculate the property; calls T_dependent_property. Caches previously
calculated value, which is an overhead when calculating many different values of a property. See
T_dependent_property for more details as to the calculation procedure.
Parameters
T [float] Temperature at which to calculate the property, [K]
Returns
prop [float] Calculated property, [units]
__repr__()
Create and return a string representation of the object. The design of the return string is such that it can be
eval’d into itself. This is very convinient for creating tests. Note that several methods are not compatible
with the eval’ing principle.
Returns
repr [str] String representation, [-]
add_correlation(name, model, Tmin, Tmax, **kwargs)
Method to add a new set of emperical fit equation coefficients to the object and select it for future property
calculations.
A number of hardcoded model names are implemented; other models are not supported.
Parameters
name [str] The name of the coefficient set; user specified, [-]
model [str] A string representing the supported models, [-]
Tmin [float] Minimum temperature to use the method at, [K]
Tmax [float] Maximum temperature to use the method at, [K]
kwargs [dict] Various keyword arguments accepted by the model, [-]
Notes
The correlation models and links to their functions, describing their parameters, are as follows:
• “Antoine”: Antoine, required parameters (‘A’, ‘B’, ‘C’), optional parameters (‘base’,).
• “TRC_Antoine_extended”: TRC_Antoine_extended, required parameters (‘Tc’, ‘to’, ‘A’, ‘B’, ‘C’,
‘n’, ‘E’, ‘F’).
• “Wagner_original”: Wagner_original, required parameters (‘Tc’, ‘Pc’, ‘a’, ‘b’, ‘c’, ‘d’).
• “Wagner”: Wagner, required parameters (‘Tc’, ‘Pc’, ‘a’, ‘b’, ‘c’, ‘d’).
• “Yaws_Psat”: Yaws_Psat, required parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “TDE_PVExpansion”: TDE_PVExpansion, required parameters (‘a1’, ‘a2’, ‘a3’), optional parameters
(‘a4’, ‘a5’, ‘a6’, ‘a7’, ‘a8’).
• “Alibakhshi”: Alibakhshi, required parameters (‘Tc’, ‘C’).
• “PPDS12”: PPDS12, required parameters (‘Tc’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “Watson”: Watson, required parameters (‘Hvap_ref’, ‘T_ref’, ‘Tc’), optional parameters (‘exponent’,).
• “Viswanath_Natarajan_2”: Viswanath_Natarajan_2, required parameters (‘A’, ‘B’).
• “Viswanath_Natarajan_2_exponential”: Viswanath_Natarajan_2_exponential, required param-
eters (‘C’, ‘D’).
• “Viswanath_Natarajan_3”: Viswanath_Natarajan_3, required parameters (‘A’, ‘B’, ‘C’).
• “PPDS5”: PPDS5, required parameters (‘Tc’, ‘a0’, ‘a1’, ‘a2’).
• “mu_TDE”: mu_TDE, required parameters (‘A’, ‘B’, ‘C’, ‘D’).
• “PPDS9”: PPDS9, required parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “mu_Yaws”: mu_Yaws, required parameters (‘A’, ‘B’), optional parameters (‘C’, ‘D’).
• “Poling”: Poling, required parameters (‘a’, ‘b’, ‘c’, ‘d’, ‘e’).
• “TRCCp”: TRCCp, required parameters (‘a0’, ‘a1’, ‘a2’, ‘a3’, ‘a4’, ‘a5’, ‘a6’, ‘a7’).
• “Zabransky_quasi_polynomial”: Zabransky_quasi_polynomial, required parameters (‘Tc’, ‘a1’,
‘a2’, ‘a3’, ‘a4’, ‘a5’, ‘a6’).
• “Zabransky_cubic”: Zabransky_cubic, required parameters (‘a1’, ‘a2’, ‘a3’, ‘a4’).
• “REFPROP_sigma”: REFPROP_sigma, required parameters (‘Tc’, ‘sigma0’, ‘n0’), optional parame-
ters (‘sigma1’, ‘n1’, ‘sigma2’, ‘n2’).
• “Somayajulu”: Somayajulu, required parameters (‘Tc’, ‘A’, ‘B’, ‘C’).
• “Jasper”: Jasper, required parameters (‘a’, ‘b’).
• “PPDS14”: PPDS14, required parameters (‘Tc’, ‘a0’, ‘a1’, ‘a2’).
• “Watson_sigma”: Watson_sigma, required parameters (‘Tc’, ‘a1’, ‘a2’, ‘a3’, ‘a4’, ‘a5’).
• “ISTExpansion”: ISTExpansion, required parameters (‘Tc’, ‘a1’, ‘a2’, ‘a3’, ‘a4’, ‘a5’).
• “Chemsep_16”: Chemsep_16, required parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “PPDS8”: PPDS8, required parameters (‘Tc’, ‘a0’, ‘a1’, ‘a2’, ‘a3’).
• “PPDS3”: PPDS3, required parameters (‘Tc’, ‘a1’, ‘a2’, ‘a3’).
• “TDE_VDNS_rho”: TDE_VDNS_rho, required parameters (‘Tc’, ‘rhoc’, ‘a1’, ‘a2’, ‘a3’, ‘a4’, ‘MW’).
• “PPDS17”: PPDS17, required parameters (‘Tc’, ‘a0’, ‘a1’, ‘a2’, ‘MW’).
• “volume_VDI_PPDS”: volume_VDI_PPDS, required parameters (‘Tc’, ‘rhoc’, ‘a’, ‘b’, ‘c’, ‘d’, ‘MW’).
• “Rackett_fit”: Rackett_fit, required parameters (‘Tc’, ‘rhoc’, ‘b’, ‘n’, ‘MW’).
• “DIPPR100”: EQ100, required parameters (), optional parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’).
• “constant”: EQ100, required parameters (), optional parameters (‘A’,).
• “linear”: EQ100, required parameters (), optional parameters (‘A’, ‘B’).
• “quadratic”: EQ100, required parameters (), optional parameters (‘A’, ‘B’, ‘C’).
• “cubic”: EQ100, required parameters (), optional parameters (‘A’, ‘B’, ‘C’, ‘D’).
• “quintic”: EQ100, required parameters (), optional parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “polynomial”: horner_backwards, required parameters (‘coeffs’,).
• “exp_polynomial”: exp_horner_backwards, required parameters (‘coeffs’,).
• “polynomial_ln_tau”: horner_backwards_ln_tau, required parameters (‘Tc’, ‘coeffs’).
• “exp_polynomial_ln_tau”: exp_horner_backwards_ln_tau, required parameters (‘Tc’, ‘coeffs’).
• “DIPPR101”: EQ101, required parameters (‘A’, ‘B’), optional parameters (‘C’, ‘D’, ‘E’).
• “DIPPR102”: EQ102, required parameters (‘A’, ‘B’, ‘C’, ‘D’).
• “DIPPR104”: EQ104, required parameters (‘A’, ‘B’), optional parameters (‘C’, ‘D’, ‘E’).
• “DIPPR105”: EQ105, required parameters (‘A’, ‘B’, ‘C’, ‘D’).
• “DIPPR106”: EQ106, required parameters (‘Tc’, ‘A’, ‘B’), optional parameters (‘C’, ‘D’, ‘E’).
• “YawsSigma”: EQ106, required parameters (‘Tc’, ‘A’, ‘B’), optional parameters (‘C’, ‘D’, ‘E’).
• “DIPPR107”: EQ107, required parameters (), optional parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “DIPPR114”: EQ114, required parameters (‘Tc’, ‘A’, ‘B’, ‘C’, ‘D’).
• “DIPPR115”: EQ115, required parameters (‘A’, ‘B’), optional parameters (‘C’, ‘D’, ‘E’).
• “DIPPR116”: EQ116, required parameters (‘Tc’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’).
• “DIPPR127”: EQ127, required parameters (‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’).
• “Twu91_alpha_pure”: Twu91_alpha_pure, required parameters (‘Tc’, ‘c0’, ‘c1’, ‘c2’).
• “Heyen_alpha_pure”: Heyen_alpha_pure, required parameters (‘Tc’, ‘c1’, ‘c2’).
• “Harmens_Knapp_alpha_pure”: Harmens_Knapp_alpha_pure, required parameters (‘Tc’, ‘c1’,
‘c2’).
• “Mathias_Copeman_untruncated_alpha_pure”: Mathias_Copeman_untruncated_alpha_pure,
required parameters (‘Tc’, ‘c1’, ‘c2’, ‘c3’).
• “Mathias_1983_alpha_pure”: Mathias_1983_alpha_pure, required parameters (‘Tc’, ‘c1’, ‘c2’).
f_int_over_T [callable, optional] If specified, should take T1 and T2 and return the integral
of the property over T from T1 to T2, [-]
name [str, optional] Name of method.
Notes
Once a custom method has been added to an object, that object can no longer be serialized to json and the
TDependentProperty.__repr__ method can no longer be used to reconstruct the object completely.
add_tabular_data(Ts, properties, name=None, check_properties=True)
Method to set tabular data to be used for interpolation. Ts must be in increasing order. If no name is given,
data will be assigned the name ‘Tabular data series #x’, where x is the number of previously added tabular
data series.
After adding the data, this method becomes the selected method.
Parameters
Ts [array-like] Increasing array of temperatures at which properties are specified, [K]
properties [array-like] List of properties at Ts, [units]
name [str, optional] Name assigned to the data
check_properties [bool] If True, the properties will be checked for validity with
test_property_validity and raise an exception if any are not valid
as_json(references=1)
Method to create a JSON serialization of the property model which can be stored, and reloaded later.
Parameters
references [int] How to handle references to other objects; internal parameter, [-]
Returns
json_repr [dict] JSON-friendly representation, [-]
calculate(T, method)
Method to calculate a property with a specified method, with no validity checking or error handling. Demo
function for testing only; must be implemented according to the methods available for each individual
method. Include the interpolation call here.
Parameters
T [float] Temperature at which to calculate the property, [K]
method [str] Method name to use
Returns
prop [float] Calculated property, [units]
calculate_derivative(T, method, order=1)
Method to calculate a derivative of a property with respect to temperature, of a given order using a specified
method. Uses SciPy’s derivative function, with a delta of 1E-6 K and a number of points equal to 2*order
+ 1.
This method can be overwritten by subclasses who may perfer to add analytical methods for some or all
methods as this is much faster.
If the calculation does not succeed, returns the actual error encountered.
Parameters
Returns
prop [float] Calculated property, [units]
property extrapolation
The string setting of the current extrapolation settings. This can be set to a new value to change which
extrapolation setting is used.
fit_add_model(name, model, Ts, data, **kwargs)
Method to add a new emperical fit equation to the object by fitting its coefficients to specified data. Once
added, the new method is set as the default.
A number of hardcoded model names are implemented; other models are not supported.
This is a wrapper around TDependentProperty.fit_data_to_model and TDependentProperty.
add_correlation.
The data is also stored in the object as a tabular method with the name name`+’_data’, through
:obj:`TDependentProperty.add_tabular_data.
Parameters
name [str] The name of the coefficient set; user specified, [-]
model [str] A string representing the supported models, [-]
Ts [list[float]] Temperatures of the data points, [K]
data [list[float]] Data points, [units]
kwargs [dict] Various keyword arguments accepted by fit_data_to_model, [-]
classmethod fit_data_to_model(Ts, data, model, model_kwargs=None, fit_method='lm', sigma=None,
use_numba=False, do_statistics=False, guesses=None,
solver_kwargs=None, objective='MeanSquareErr',
multiple_tries=False, multiple_tries_max_err=1e-05,
multiple_tries_max_objective='MeanRelErr')
Method to fit T-dependent property data to one of the available model correlations.
Parameters
Ts [list[float]] Temperatures of the data points, [K]
data [list[float]] Data points, [units]
model [str] A string representing the supported models, [-]
model_kwargs [dict, optional] Various keyword arguments accepted by the model; not nec-
essary for most models. Parameters which are normally fit, can be specified here as well
with a constant value and then that fixed value will be used instead of fitting the parameter.
[-]
fit_method [str, optional] The fit method to use; one of {lm, trf, dogbox, differen-
tial_evolution}, [-]
sigma [None or list[float]] Uncertainty parameters used by curve_fit, [-]
use_numba [bool, optional] Whether or not to try to use numba to speed up the computation,
[-]
do_statistics [bool, optional] Whether or not to compute statistical measures on the outputs,
[-]
guesses [dict[str: float], optional] Parameter guesses, by name; any number of parameters
can be specified, [-]
Notes
It is important that the input string be in the same format as that created by TDependentProperty.
as_json.
interpolate(T, name)
Method to perform interpolation on a given tabular data set previously added via add_tabular_data.
This method will create the interpolators the first time it is used on a property set, and store them for quick
future use.
Interpolation is cubic-spline based if 5 or more points are available, and linearly interpolated if not.
Extrapolation is always performed linearly. This function uses the transforms interpolation_T,
interpolation_property, and interpolation_property_inv if set. If any of these are changed
after the interpolators were first created, new interpolators are created with the new transforms. All inter-
polation is performed via the interp1d function.
Parameters
classmethod test_property_validity(prop)
Method to test the validity of a calculated property. Normally, this method is used by a given property class,
and has maximum and minimum limits controlled by the variables property_min and property_max.
Parameters
prop [float] property to be tested, [units]
Returns
validity [bool] Whether or not a specifid method is valid
units = 'Property units'
valid_methods(T=None)
Method to obtain a sorted list of methods that have data available to be used. The methods are ranked in
the following order:
• The currently selected method is first (if one is selected)
• Other available methods are ranked by the attribute ranked_methods
If T is provided, the methods will be checked against the temperature limits of the correlations as well.
Parameters
T [float or None] Temperature at which to test methods, [K]
Returns
sorted_valid_methods [list] Sorted lists of methods valid at T according to
test_method_validity, [-]
Methods
TP_dependent_property(T, P)
Method to calculate the property given a temperature and pressure according to the selected method_P and
method. The pressure-dependent method is always used and required to succeed. The result is checked
with test_property_validity.
If the method does not succeed, returns None.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
Returns
prop [float] Calculated property, [units]
TP_dependent_property_derivative_P(T, P, order=1)
Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure
at constant temperature, of a given order, according to the selected method_P.
Calls calculate_derivative_P internally to perform the actual calculation.
𝑑(property)
derivative = |𝑇
𝑑𝑃
Parameters
T [float] Temperature at which to calculate the derivative, [K]
P [float] Pressure at which to calculate the derivative, [Pa]
order [int] Order of the derivative, >= 1
Returns
dprop_dP_T [float] Calculated derivative property, [units/Pa^order]
TP_dependent_property_derivative_T(T, P, order=1)
Method to calculate a derivative of a temperature and pressure dependent property with respect to temper-
ature at constant pressure, of a given order, according to the selected method_P.
Calls calculate_derivative_T internally to perform the actual calculation.
𝑑(property)
derivative = |𝑃
𝑑𝑇
Parameters
Warning: It can seem like a good idea to switch between a low-pressure and a high-pressure method
if the high pressure method is not working, however it can cause discontinuities and prevent numerical
methods from converging
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
Returns
prop [float] Calculated property, [units]
T_limits = {}
Dictionary containing method: (Tmin, Tmax) pairs for all methods applicable to the chemical
__call__(T, P)
Convenience method to calculate the property; calls TP_dependent_property. Caches previously
calculated value, which is an overhead when calculating many different values of a property. See
TP_dependent_property for more details as to the calculation procedure.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
Returns
prop [float] Calculated property, [units]
add_method(f, Tmin=None, Tmax=None, f_der=None, f_der2=None, f_der3=None, f_int=None,
f_int_over_T=None, name=None)
Define a new method and select it for future property calculations.
Parameters
f [callable] Object which calculates the property given the temperature in K, [-]
Tmin [float, optional] Minimum temperature to use the method at, [K]
Tmax [float, optional] Maximum temperature to use the method at, [K]
f_der [callable, optional] If specified, should take as an argument the temperature and return
the first derivative of the property, [-]
f_der2 [callable, optional] If specified, should take as an argument the temperature and return
the second derivative of the property, [-]
f_der3 [callable, optional] If specified, should take as an argument the temperature and return
the third derivative of the property, [-]
f_int [callable, optional] If specified, should take T1 and T2 and return the integral of the
property from T1 to T2, [-]
f_int_over_T [callable, optional] If specified, should take T1 and T2 and return the integral
of the property over T from T1 to T2, [-]
name [str, optional] Name of method.
Notes
Once a custom method has been added to an object, that object can no longer be serialized to json and the
TDependentProperty.__repr__ method can no longer be used to reconstruct the object completely.
add_tabular_data(Ts, properties, name=None, check_properties=True)
Method to set tabular data to be used for interpolation. Ts must be in increasing order. If no name is given,
data will be assigned the name ‘Tabular data series #x’, where x is the number of previously added tabular
data series.
After adding the data, this method becomes the selected method.
Parameters
Ts [array-like] Increasing array of temperatures at which properties are specified, [K]
properties [array-like] List of properties at Ts, [units]
name [str, optional] Name assigned to the data
check_properties [bool] If True, the properties will be checked for validity with
test_property_validity and raise an exception if any are not valid
add_tabular_data_P(Ts, Ps, properties, name=None, check_properties=True)
Method to set tabular data to be used for interpolation. Ts and Psmust be in increasing order. If no name is
given, data will be assigned the name ‘Tabular data series #x’, where x is the number of previously added
tabular data series.
After adding the data, this method becomes the selected high-pressure method.
Parameters
Ts [array-like] Increasing array of temperatures at which properties are specified, [K]
Ps [array-like] Increasing array of pressures at which properties are specified, [Pa]
properties [array-like] List of properties at Ts and Ps; the data should be indexed [P][T],
[units]
name [str, optional] Name assigned to the data
check_properties [bool] If True, the properties will be checked for validity with
test_property_validity and raise an exception if any are not valid
calculate(T, method)
Method to calculate a property with a specified method, with no validity checking or error handling. Demo
function for testing only; must be implemented according to the methods available for each individual
method. Include the interpolation call here.
Parameters
T [float] Temperature at which to calculate the property, [K]
method [str] Method name to use
Returns
prop [float] Calculated property, [units]
calculate_derivative_P(P, T, method, order=1)
Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure
at constant temperature, of a given order using a specified method. Uses SciPy’s derivative function, with
a delta of 0.01 Pa and a number of points equal to 2*order + 1.
This method can be overwritten by subclasses who may perfer to add analytical methods for some or all
methods as this is much faster.
If the calculation does not succeed, returns the actual error encountered.
Parameters
P [float] Pressure at which to calculate the derivative, [Pa]
T [float] Temperature at which to calculate the derivative, [K]
method [str] Method for which to find the derivative
order [int] Order of the derivative, >= 1
Returns
dprop_dP_T [float] Calculated derivative property at constant temperature,
[units/Pa^order]
calculate_derivative_T(T, P, method, order=1)
Method to calculate a derivative of a temperature and pressure dependent property with respect to tempera-
ture at constant pressure, of a given order using a specified method. Uses SciPy’s derivative function, with
a delta of 1E-6 K and a number of points equal to 2*order + 1.
This method can be overwritten by subclasses who may perfer to add analytical methods for some or all
methods as this is much faster.
If the calculation does not succeed, returns the actual error encountered.
Parameters
T [float] Temperature at which to calculate the derivative, [K]
P [float] Pressure at which to calculate the derivative, [Pa]
method [str] Method for which to find the derivative
order [int] Order of the derivative, >= 1
Returns
dprop_dT_P [float] Calculated derivative property at constant pressure, [units/K^order]
extrapolate(T, method, in_range='error')
Method to perform extrapolation on a given method according to the extrapolation setting.
Parameters
T [float] Temperature at which to extrapolate the property, [K]
method [str] The method to use, [-]
in_range [str] How to handle inputs which are not outside the temperature limits; set to ‘low’
to use the low T extrapolation, ‘high’ to use the high T extrapolation, ‘nearest’ to use the
nearest value, and ‘error’ or anything else to raise an error in those cases, [-]
Returns
prop [float] Calculated property, [units]
property extrapolation
The string setting of the current extrapolation settings. This can be set to a new value to change which
extrapolation setting is used.
interpolation_T = None
interpolation_T_inv = None
interpolation_property = None
interpolation_property_inv = None
property method
Method used to set a specific property method or to obtain the name of the method in use.
When setting a method, an exception is raised if the method specified isnt’t available for the chemical with
the provided information.
If method is None, no calculations can be performed.
Parameters
method [str] Method to use, [-]
property method_P
Method used to set or get a specific property method.
An exception is raised if the method specified isnt’t available for the chemical with the provided information.
Parameters
method [str or list] Methods by name to be considered or preferred
name = 'Property name'
plot_TP_dependent_property(Tmin=None, Tmax=None, Pmin=None, Pmax=None, methods_P=[],
pts=15, only_valid=True)
Method to create a plot of the property vs temperature and pressure according to either a specified list of
methods, or user methods (if set), or all methods. User-selectable number of points for each variable. If
only_valid is set,:obj:test_method_validity_P will be used to check if each condition in the specified range
is valid, and test_property_validity will be used to test the answer, and the method is allowed to fail;
only the valid points will be plotted. Otherwise, the result will be calculated and displayed as-is. This will
not suceed if the any method fails for any point.
Parameters
Tmin [float] Minimum temperature, to begin calculating the property, [K]
Tmax [float] Maximum temperature, to stop calculating the property, [K]
Pmin [float] Minimum pressure, to begin calculating the property, [Pa]
Pmax [float] Maximum pressure, to stop calculating the property, [Pa]
property_min = 0
ranked_methods = []
solve_property(goal)
Method to solve for the temperature at which a property is at a specified value. T_dependent_property
is used to calculate the value of the property as a function of temperature.
Checks the given property value with test_property_validity first and raises an exception if it is not
valid.
Parameters
goal [float] Propoerty value desired, [units]
Returns
T [float] Temperature at which the property is the specified value [K]
test_method_validity(T, method)
Method to test the validity of a specified method for a given temperature. Demo function for testing only;
must be implemented according to the methods available for each individual method. Include the interpo-
lation check here.
Parameters
T [float] Temperature at which to determine the validity of the method, [K]
method [str] Method name to use
Returns
validity [bool] Whether or not a specifid method is valid
classmethod test_property_validity(prop)
Method to test the validity of a calculated property. Normally, this method is used by a given property class,
and has maximum and minimum limits controlled by the variables property_min and property_max.
Parameters
prop [float] property to be tested, [units]
Returns
validity [bool] Whether or not a specifid method is valid
units = 'Property units'
valid_methods(T=None)
Method to obtain a sorted list of methods that have data available to be used. The methods are ranked in
the following order:
• The currently selected method is first (if one is selected)
• Other available methods are ranked by the attribute ranked_methods
If T is provided, the methods will be checked against the temperature limits of the correlations as well.
Parameters
T [float or None] Temperature at which to test methods, [K]
Returns
sorted_valid_methods [list] Sorted lists of methods valid at T according to
test_method_validity, [-]
valid_methods_P(T=None, P=None)
Method to obtain a sorted list of high-pressure methods that have data available to be used. The methods
are ranked in the following order:
• The currently selected method_P is first (if one is selected)
• Other available pressure-depenent methods are ranked by the attribute ranked_methods_P
If T and P are provided, the methods will be checked against the temperature and pressure limits of the
correlations as well.
Parameters
T [float] Temperature at which to test methods, [K]
P [float] Pressure at which to test methods, [Pa]
Returns
sorted_valid_methods_P [list] Sorted lists of methods valid at T and P according to
test_method_validity_P
class thermo.utils.MixtureProperty(**kwargs)
Bases: object
Attributes
correct_pressure_pure Method to set the pressure-dependence of the model; if set to False,
only temperature dependence is used, and if True, temperature and pressure dependence are
used.
method Method to set the T, P, and composition dependent property method desired.
prop_cached
Methods
__call__(T, P[, zs, ws]) Convenience method to calculate the property; calls
mixture_property.
as_json([references]) Method to create a JSON serialization of the mixture
property which can be stored, and reloaded later.
calculate_derivative_P(P, T, zs, ws, method) Method to calculate a derivative of a mixture prop-
erty with respect to pressure at constant temperature
and composition of a given order using a specified
method.
calculate_derivative_T(T, P, zs, ws, method) Method to calculate a derivative of a mixture prop-
erty with respect to temperature at constant pressure
and composition of a given order using a specified
method.
excess_property(T, P[, zs, ws]) Method to calculate the excess property with sanity
checking and without specifying a specific method.
from_json(string) Method to create a MixtureProperty from a JSON se-
rialization of another MixtureProperty.
continues on next page
pure_objs
set_poly_fit_coeffs
RAISE_PROPERTY_CALCULATION_ERROR = False
TP_zs_ws_cached = (None, None, None, None)
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
all_methods
Set of all methods available for a given set of information; filled by load_all_methods.
all_poly_fit = False
as_json(references=1)
Method to create a JSON serialization of the mixture property which can be stored, and reloaded later.
Parameters
references [int] How to handle references to other objects; internal parameter, [-]
Returns
json_repr [dict] JSON-friendly representation, [-]
calculate_derivative_P(P, T, zs, ws, method, order=1)
Method to calculate a derivative of a mixture property with respect to pressure at constant temperature and
composition of a given order using a specified method. Uses SciPy’s derivative function, with a delta of
0.01 Pa and a number of points equal to 2*order + 1.
This method can be overwritten by subclasses who may perfer to add analytical methods for some or all
methods as this is much faster.
If the calculation does not succeed, returns the actual error encountered.
Parameters
P [float] Pressure at which to calculate the derivative, [Pa]
T [float] Temperature at which to calculate the derivative, [K]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Method for which to find the derivative
order [int] Order of the derivative, >= 1
Returns
d_prop_d_P_at_T [float] Calculated derivative property at constant temperature,
[units/Pa^order]
calculate_derivative_T(T, P, zs, ws, method, order=1)
Method to calculate a derivative of a mixture property with respect to temperature at constant pressure and
composition of a given order using a specified method. Uses SciPy’s derivative function, with a delta of
1E-6 K and a number of points equal to 2*order + 1.
This method can be overwritten by subclasses who may perfer to add analytical methods for some or all
methods as this is much faster.
If the calculation does not succeed, returns the actual error encountered.
Parameters
T [float] Temperature at which to calculate the derivative, [K]
P [float] Pressure at which to calculate the derivative, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Method for which to find the derivative
order [int] Order of the derivative, >= 1
Returns
d_prop_d_T_at_P [float] Calculated derivative property at constant pressure,
[units/K^order]
property correct_pressure_pure
Method to set the pressure-dependence of the model; if set to False, only temperature dependence is used,
and if True, temperature and pressure dependence are used.
excess_property(T, P, zs=None, ws=None)
Method to calculate the excess property with sanity checking and without specifying a specific method.
This requires the calculation of the property as a function of composition at the limiting concentration of
each component. One or both of zs and ws are required.
∑︁
𝑚𝐸 = 𝑚𝑚𝑖𝑥𝑖𝑛𝑔 = 𝑚 − 𝑚𝑖,𝑝𝑢𝑟𝑒 · 𝑧𝑖
𝑖
Parameters
Notes
It is important that the input string be in the same format as that created by MixtureProperty.as_json.
property method
Method to set the T, P, and composition dependent property method desired. See the all_methods attribute
for a list of methods valid for the specified chemicals and inputs.
mixture_property(T, P, zs=None, ws=None)
Method to calculate the property with sanity checking and without specifying a specific method.
valid_methods is used to obtain a sorted list of methods to try. Methods are then tried in order until one
succeeds. The methods are allowed to fail, and their results are checked with test_property_validity.
On success, the used method is stored in the variable method.
If method is set, this method is first checked for validity with test_method_validity for the specified
temperature, and if it is valid, it is then used to calculate the property. The result is checked for validity,
and returned if it is valid. If either of the checks fail, the function retrieves a full list of valid methods with
valid_methods and attempts them as described above.
If no methods are found which succeed, returns None. One or both of zs and ws are required.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float], optional] Mole fractions of all species in the mixture, [-]
ws [list[float], optional] Weight fractions of all species in the mixture, [-]
Returns
prop [float] Calculated property, [units]
name = 'Test'
Parameters
T [float] Temperature at which to calculate the partial property, [K]
P [float] Pressure at which to calculate the partial property, [Pa]
i [int] Compound index, [-]
zs [list[float], optional] Mole fractions of all species in the mixture, [-]
ws [list[float], optional] Weight fractions of all species in the mixture, [-]
Returns
partial_prop [float] Calculated partial property, [units]
plot_isobar(P, zs=None, ws=None, Tmin=None, Tmax=None, methods=[], pts=50, only_valid=True)
Method to create a plot of the property vs temperature at a specific pressure and composition according to
either a specified list of methods, or the selected method. User-selectable number of points, and temperature
range. If only_valid is set,:obj:test_method_validity will be used to check if each condition in the specified
range is valid, and test_property_validity will be used to test the answer, and the method is allowed
to fail; only the valid points will be plotted. Otherwise, the result will be calculated and displayed as-is.
This will not suceed if the method fails. One or both of zs and ws are required.
Parameters
P [float] Pressure for the isobar, [Pa]
zs [list[float], optional] Mole fractions of all species in the mixture, [-]
ws [list[float], optional] Weight fractions of all species in the mixture, [-]
Tmin [float] Minimum temperature, to begin calculating the property, [K]
Tmax [float] Maximum temperature, to stop calculating the property, [K]
methods [list, optional] List of methods to consider
pts [int, optional] A list of points to calculate the property at; if Tmin to Tmax covers a wide
range of method validities, only a few points may end up calculated for a given method so
this may need to be large
only_valid [bool] If True, only plot successful methods and calculated properties, and handle
errors; if False, attempt calculation without any checking and use methods outside their
bounds
plot_isotherm(T, zs=None, ws=None, Pmin=None, Pmax=None, methods=[], pts=50, only_valid=True)
Method to create a plot of the property vs pressure at a specified temperature and composition according to
either a specified list of methods, or the set method. User-selectable number of points, and pressure range.
If only_valid is set, test_method_validity will be used to check if each condition in the specified range
is valid, and test_property_validity will be used to test the answer, and the method is allowed to fail;
only the valid points will be plotted. Otherwise, the result will be calculated and displayed as-is. This will
not suceed if the method fails. One or both of zs and ws are required.
Parameters
T [float] Temperature at which to create the plot, [K]
𝑑(property)
derivative = |𝑇,𝑧
𝑑𝑃
Parameters
T [float] Temperature at which to calculate the derivative, [K]
𝑑(property)
derivative = |𝑃,𝑧
𝑑𝑇
One or both of zs and ws are required.
Parameters
T [float] Temperature at which to calculate the derivative, [K]
P [float] Pressure at which to calculate the derivative, [Pa]
zs [list[float], optional] Mole fractions of all species in the mixture, [-]
ws [list[float], optional] Weight fractions of all species in the mixture, [-]
order [int] Order of the derivative, >= 1
Returns
d_prop_d_T_at_P [float] Calculated derivative property, [units/K^order]
property_max = 10.0
property_min = 0.0
pure_objs()
pure_reference_types = ()
pure_references = ()
ranked_methods = []
set_poly_fit_coeffs()
skip_method_validity_check = False
Flag to disable checking the validity of the method at the specified conditions. Saves a little time.
skip_prop_validity_check = False
Flag to disable checking the output of the value. Saves a little time.
classmethod test_property_validity(prop)
Method to test the validity of a calculated property. Normally, this method is used by a given property class,
and has maximum and minimum limits controlled by the variables property_min and property_max.
Parameters
• Vapor Pressure
• Sublimation Pressure
chemicals.vapor_pressure.Wagner_original
chemicals.vapor_pressure.Wagner
chemicals.vapor_pressure.TRC_Antoine_extended
chemicals.vapor_pressure.Antoine
chemicals.vapor_pressure.boiling_critical_relation
chemicals.vapor_pressure.Lee_Kesler
chemicals.vapor_pressure.Ambrose_Walton
chemicals.vapor_pressure.Sanjari
chemicals.vapor_pressure.Edalat
chemicals.iapws.iapws95_Psat
Notes
References
Methods
calculate(T, method)
Method to calculate vapor pressure of a fluid at temperature T with a given method.
This method has no exception handling; see thermo.utils.TDependentProperty.
T_dependent_property for that.
Parameters
T [float] Temperature at calculate vapor pressure, [K]
method [str] Name of the method to use
Returns
Psat [float] Vapor pressure at T, [Pa]
static interpolation_T(T )
Function to make the data-based interpolation as linear as possible. This transforms the input T into the
1/T domain.
static interpolation_property(P)
log(P) interpolation transformation by default.
static interpolation_property_inv(P)
exp(P) interpolation transformation by default; reverses interpolation_property_inv.
name = 'Vapor pressure'
property_max = 10000000000.0
Maximum valid value of vapor pressure. Set slightly above the critical point estimated for Iridium; Mer-
cury’s 160 MPa critical point is the highest known.
property_min = 0
Mimimum valid value of vapor pressure.
ranked_methods = ['IAPWS', 'WAGNER_MCGARRY', 'WAGNER_POLING',
'ANTOINE_EXTENDED_POLING', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'COOLPROP',
'ANTOINE_POLING', 'VDI_TABULAR', 'ANTOINE_WEBBOOK', 'ALCOCK_ELEMENTS',
'AMBROSE_WALTON', 'LEE_KESLER_PSAT', 'EDALAT', 'BOILING_CRITICAL', 'EOS', 'SANJARI']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
CSP methods, the models are considered valid from 0 K to the critical point. For tabular data, extrapolation
outside of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is
considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'Pa'
thermo.vapor_pressure.vapor_pressure_methods = ['IAPWS', 'WAGNER_MCGARRY',
'WAGNER_POLING', 'ANTOINE_EXTENDED_POLING', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'COOLPROP',
'ANTOINE_POLING', 'VDI_TABULAR', 'ANTOINE_WEBBOOK', 'ALCOCK_ELEMENTS', 'AMBROSE_WALTON',
'LEE_KESLER_PSAT', 'EDALAT', 'EOS', 'BOILING_CRITICAL', 'SANJARI']
Holds all methods available for the VaporPressure class, for use in iterating over them.
chemicals.vapor_pressure.Psub_Clapeyron
Notes
References
[1]
Methods
calculate(T, method)
Method to calculate sublimation pressure of a fluid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at calculate sublimation pressure, [K]
method [str] Name of the method to use
Returns
Psub [float] Sublimation pressure at T, [Pa]
static interpolation_T(T )
Function to make the data-based interpolation as linear as possible. This transforms the input T into the
1/T domain.
static interpolation_property(P)
log(P) interpolation transformation by default.
static interpolation_property_inv(P)
exp(P) interpolation transformation by default; reverses interpolation_property_inv.
name = 'Sublimation pressure'
property_max = 100000.0
Maximum valid value of sublimation pressure. Set to 1 bar tentatively.
property_min = 1e-300
Mimimum valid value of sublimation pressure.
ranked_methods = ['PSUB_CLAPEYRON']
Default rankings of the available methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
CSP methods, the models are considered valid from 0 K to the critical point. For tabular data, extrapolation
outside of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is
considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'Pa'
thermo.vapor_pressure.sublimation_pressure_methods = ['PSUB_CLAPEYRON']
Holds all methods available for the SublimationPressure class, for use in iterating over them.
This module contains implementations of TPDependentProperty representing liquid and vapor viscosity. A variety
of estimation and data methods are available as included in the chemicals library. Additionally liquid and vapor mixture
viscosity predictor objects are implemented subclassing MixtureProperty.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
chemicals.viscosity.Viswanath_Natarajan_3
chemicals.viscosity.Viswanath_Natarajan_2
chemicals.viscosity.Viswanath_Natarajan_2_exponential
chemicals.viscosity.Letsou_Stiel
chemicals.viscosity.Przedziecki_Sridhar
chemicals.viscosity.Lucas
thermo.joback.Joback
Notes
To iterate over all methods, use the lists stored in viscosity_liquid_methods and
viscosity_liquid_methods_P for low and high pressure methods respectively.
Low pressure methods:
DUTT_PRASAD: A simple function as expressed in [1], with data available for 100 fluids. Temperature limits
are available for all fluids. See chemicals.viscosity.Viswanath_Natarajan_3 for details.
VISWANATH_NATARAJAN_3: A simple function as expressed in [1], with data available for 432 fluids.
Temperature limits are available for all fluids. See chemicals.viscosity.Viswanath_Natarajan_3
for details.
VISWANATH_NATARAJAN_2: A simple function as expressed in [1], with data available for 135 fluids.
Temperature limits are available for all fluids. See chemicals.viscosity.Viswanath_Natarajan_2
for details.
References
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate low-pressure liquid viscosity at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate viscosity, [K]
method [str] Name of the method to use
Returns
mu [float] Viscosity of the liquid at T and a low pressure, [Pa*s]
calculate_P(T, P, method)
Method to calculate pressure-dependent liquid viscosity at temperature T and pressure P with a given
method.
This method has no exception handling; see TP_dependent_property for that.
Parameters
T [float] Temperature at which to calculate viscosity, [K]
P [float] Pressure at which to calculate viscosity, [K]
method [str] Name of the method to use
Returns
mu [float] Viscosity of the liquid at T and P, [Pa*s]
name = 'liquid viscosity'
property_max = 200000000.0
Maximum valid value of liquid viscosity. Generous limit, as the value is that of bitumen in a Pitch drop
experiment.
property_min = 0.0
Mimimum valid value of liquid viscosity.
ranked_methods = ['COOLPROP', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'DUTT_PRASAD',
'VISWANATH_NATARAJAN_3', 'VISWANATH_NATARAJAN_2', 'VISWANATH_NATARAJAN_2E',
'VDI_TABULAR', 'LETSOU_STIEL', 'JOBACK', 'PRZEDZIECKI_SRIDHAR']
Default rankings of the low-pressure methods.
ranked_methods_P = ['COOLPROP', 'LUCAS']
Default rankings of the high-pressure methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
CSP methods, the models are considered valid from 0 K to the critical point. For tabular data, extrapolation
outside of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is
considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
chemicals.viscosity.Gharagheizi_gas_viscosity
chemicals.viscosity.Yoon_Thodos
chemicals.viscosity.Stiel_Thodos
chemicals.viscosity.Lucas_gas
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most
convenient way to refer to a method. To iterate over all methods, use the lists stored in viscosity_gas_methods
and viscosity_gas_methods_P for low and high pressure methods respectively.
Low pressure methods:
GHARAGHEIZI: CSP method, described in chemicals.viscosity.Gharagheizi_gas_viscosity.
YOON_THODOS: CSP method, described in chemicals.viscosity.Yoon_Thodos.
STIEL_THODOS: CSP method, described in chemicals.viscosity.Stiel_Thodos.
LUCAS_GAS: CSP method, described in chemicals.viscosity.Lucas_gas.
DIPPR_PERRY_8E: A collection of 345 coefficient sets from the DIPPR database published openly in [3].
Provides temperature limits for all its fluids. chemicals.dippr.EQ102 is used for its fluids.
VDI_PPDS: Coefficients for a equation form developed by the PPDS, published openly in [2]. Provides no
temperature limits, but provides reasonable values at fairly high and very low temperatures.
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow.
VDI_TABULAR: Tabular data in [2] along the saturation curve; interpolation is as set by the user or the default.
High pressure methods:
COOLPROP: CoolProp external library; with select fluids from its library. Range is limited to that of the
equations of state it uses, as described in [1]. Very slow, but unparalled in accuracy for pressure dependence.
A minimum viscosity value of 1e-5 Pa*s is set according to [4]. This is also just above the lowest experimental
values of viscosity of helium, 9.4e-6 Pa*s.
References
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate low-pressure gas viscosity at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature of the gas, [K]
method [str] Name of the method to use
Returns
mu [float] Viscosity of the gas at T and a low pressure, [Pa*s]
calculate_P(T, P, method)
Method to calculate pressure-dependent gas viscosity at temperature T and pressure P with a given method.
This method has no exception handling; see TP_dependent_property for that.
Parameters
T [float] Temperature at which to calculate gas viscosity, [K]
P [float] Pressure at which to calculate gas viscosity, [K]
method [str] Name of the method to use
Returns
mu [float] Viscosity of the gas at T and P, [Pa*]
name = 'Gas viscosity'
property_max = 0.001
Maximum valid value of gas viscosity. Might be too high, or too low.
property_min = 0.0
Mimimum valid value of gas viscosity; limiting condition at low pressure is 0.
ranked_methods = ['COOLPROP', 'DIPPR_PERRY_8E', 'VDI_PPDS', 'VDI_TABULAR',
'GHARAGHEIZI', 'YOON_THODOS', 'STIEL_THODOS', 'LUCAS_GAS']
Default rankings of the low-pressure methods.
ranked_methods_P = ['COOLPROP']
Default rankings of the high-pressure methods.
test_method_validity(T, method)
Method to check the validity of a temperature-dependent low-pressure method. For CSP most methods,
the all methods are considered valid from 0 K up to 5000 K. For method GHARAGHEIZI, the method is
considered valud from 20 K to 2000 K.
For tabular data, extrapolation outside of the range is used if tabular_extrapolation_permitted is
set; if it is, the extrapolation is considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
test_method_validity_P(T, P, method)
Method to check the validity of a high-pressure method. For COOLPROP, the fluid must be both a gas
and under the maximum pressure of the fluid’s EOS. No other methods are implemented.
For tabular data, extrapolation outside of the range is used if tabular_extrapolation_permitted is
set; if it is, the extrapolation is considered valid for all temperatures and pressures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
Parameters
T [float] Temperature at which to test the method, [K]
P [float] Pressure at which to test the method, [Pa]
method [str] Name of the method to test
Returns
validity [bool] Whether or not a method is valid
units = 'Pa*s'
thermo.viscosity.viscosity_gas_methods = ['COOLPROP', 'DIPPR_PERRY_8E', 'VDI_PPDS',
'VDI_TABULAR', 'GHARAGHEIZI', 'YOON_THODOS', 'STIEL_THODOS', 'LUCAS_GAS']
Holds all low-pressure methods available for the ViscosityGas class, for use in iterating over them.
thermo.viscosity.viscosity_gas_methods_P = ['COOLPROP']
Holds all high-pressure methods available for the ViscosityGas class, for use in iterating over them.
thermo.electrochem.Laliberte_viscosity
Notes
References
[1]
Methods
Tmax
chemicals.viscosity.Brokaw
chemicals.viscosity.Herning_Zipperer
chemicals.viscosity.Wilke
Notes
References
[1]
Methods
calculate(T, P, zs, ws, method) Method to calculate viscosity of a gas mixture at tem-
perature T, pressure P, mole fractions zs and weight
fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate viscosity of a gas mixture at temperature T, pressure P, mole fractions zs and weight
fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
mu [float] Viscosity of gas mixture, [Pa*s]
name = 'gas viscosity'
property_max = 0.001
Maximum valid value of gas viscosity. Might be too high, or too low.
property_min = 0
Mimimum valid value of gas viscosity; limiting condition at low pressure is 0.
ranked_methods = ['BROKAW', 'HERNING_ZIPPERER', 'LINEAR', 'WILKE']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Method name to use
Returns
validity [bool] Whether or not a specifid method is valid
units = 'Pa*s'
thermo.viscosity.viscosity_gas_mixture_methods = ['BROKAW', 'HERNING_ZIPPERER', 'WILKE',
'LINEAR']
Holds all mixing rules available for the ViscosityGasMixture class, for use in iterating over them.
This module contains implementations of TDependentProperty representing liquid, vapor, and solid volume. A
variety of estimation and data methods are available as included in the chemicals library. Additionally liquid, vapor,
and solid mixture volume predictor objects are implemented subclassing MixtureProperty.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
chemicals.volume.Yen_Woods_saturation
chemicals.volume.Rackett
chemicals.volume.Yamada_Gunn
chemicals.volume.Townsend_Hales
chemicals.volume.Bhirud_normal
chemicals.volume.COSTALD
chemicals.volume.Campbell_Thodos
chemicals.volume.SNM0
chemicals.volume.CRC_inorganic
chemicals.volume.COSTALD_compressed
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most
convenient way to refer to a method. To iterate over all methods, use the lists stored in volume_liquid_methods
and volume_liquid_methods_P for low and high pressure methods respectively.
Low pressure methods:
DIPPR_PERRY_8E: A simple polynomial as expressed in [1], with data available for 344 fluids. Temperature
limits are available for all fluids. Believed very accurate.
VDI_PPDS: Coefficients for a equation form developed by the PPDS (EQ116 in terms of mass density), pub-
lished openly in [3]. Valid up to the critical temperature, and extrapolates to very low temperatures well.
MMSNM0FIT: Uses a fit coefficient for better accuracy in the SNM0 method, Coefficients available for 73 fluids
from [2]. Valid to the critical point.
HTCOSTALDFIT: A method with two fit coefficients to the COSTALD method. Coefficients available for 192
fluids, from [3]. Valid to the critical point.
RACKETTFIT: The Rackett method, with a fit coefficient Z_RA. Data is available for 186 fluids, from [3].
Valid to the critical point.
CRC_INORG_L: Single-temperature coefficient linear model in terms of mass density for the density of in-
organic liquids; converted to molar units internally. Data is available for 177 fluids normally valid over a
narrow range above the melting point, from [4]; described in CRC_inorganic.
References
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate low-pressure liquid molar volume at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
T [float] Temperature at which to calculate molar volume, [K]
method [str] Name of the method to use
Returns
Vm [float] Molar volume of the liquid at T and a low pressure, [m^3/mol]
calculate_P(T, P, method)
Method to calculate pressure-dependent liquid molar volume at temperature T and pressure P with a given
method.
This method has no exception handling; see TP_dependent_property for that.
Parameters
T [float] Temperature at which to calculate molar volume, [K]
P [float] Pressure at which to calculate molar volume, [K]
method [str] Name of the method to use
Returns
Vm [float] Molar volume of the liquid at T and P, [m^3/mol]
name = 'Liquid molar volume'
property_max = 0.002
Maximum valid value of liquid molar volume. Generous limit.
property_min = 0
Mimimum valid value of liquid molar volume. It should normally occur at the triple point, and be well
above this.
ranked_methods = ['DIPPR_PERRY_8E', 'VDI_PPDS', 'COOLPROP', 'MMSNM0FIT',
'VDI_TABULAR', 'HTCOSTALDFIT', 'RACKETTFIT', 'CRC_INORG_L', 'CRC_INORG_L_CONST',
'COMMON_CHEMISTRY', 'MMSNM0', 'HTCOSTALD', 'YEN_WOODS_SAT', 'RACKETT',
'YAMADA_GUNN', 'BHIRUD_NORMAL', 'TOWNSEND_HALES', 'CAMPBELL_THODOS', 'EOS']
Default rankings of the low-pressure methods.
ranked_methods_P = ['COOLPROP', 'COSTALD_COMPRESSED', 'EOS']
Default rankings of the high-pressure methods.
test_method_validity(T, method)
Method to check the validity of a method. Follows the given ranges for all coefficient-based methods. For
CSP methods, the models are considered valid from 0 K to the critical point. For tabular data, extrapolation
outside of the range is used if tabular_extrapolation_permitted is set; if it is, the extrapolation is
considered valid for all temperatures.
It is not guaranteed that a method will work or give an accurate prediction simply because this method
considers the method valid.
BHIRUD_NORMAL behaves poorly at low temperatures and is not used under 0.35Tc. The constant
value available for inorganic chemicals, from method CRC_INORG_L_CONST, is considered valid for
all temperatures.
Parameters
chemicals.virial.BVirial_Pitzer_Curl
chemicals.virial.BVirial_Abbott
chemicals.virial.BVirial_Tsonopoulos
chemicals.virial.BVirial_Tsonopoulos_extended
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most
convenient way to refer to a method. To iterate over all methods, use the list stored in volume_gas_methods.
PR: Peng-Robinson Equation of State. See the appropriate module for more information.
CRC_VIRIAL: Short polynomials, for 105 fluids from [1]. The full expression is:
4
∑︁ 𝑖−1
𝐵= 𝑎𝑖 [𝑇0 /298.15 − 1]
1
References
[1], [2]
Attributes
Tmax Maximum temperature (K) at which the current method can calculate the property.
Tmin Minimum temperature (K) at which the current method can calculate the property.
Methods
property Tmax
Maximum temperature (K) at which the current method can calculate the property.
property Tmin
Minimum temperature (K) at which the current method can calculate the property.
calculate(T, method)
Method to calculate a property with a specified method, with no validity checking or error handling. Demo
function for testing only; must be implemented according to the methods available for each individual
method. Include the interpolation call here.
Parameters
T [float] Temperature at which to calculate the property, [K]
method [str] Method name to use
Returns
prop [float] Calculated property, [units]
calculate_P(T, P, method)
Method to calculate pressure-dependent gas molar volume at temperature T and pressure P with a given
method.
This method has no exception handling; see TP_dependent_property for that.
Parameters
T [float] Temperature at which to calculate molar volume, [K]
P [float] Pressure at which to calculate molar volume, [K]
method [str] Name of the method to use
Returns
Vm [float] Molar volume of the gas at T and P, [m^3/mol]
chemicals.volume.Goodman
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most
convenient way to refer to a method. To iterate over all methods, use the list stored in volume_solid_methods.
CRC_INORG_S: Constant values in [1], for 1872 chemicals.
GOODMAN: Simple method using the liquid molar volume. Good up to 0.3*Tt. See Goodman for details.
References
[1]
Methods
calculate(T, method)
Method to calculate the molar volume of a solid at tempearture T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters
omegas [list[float], optional] Accentric factors of all species in the mixture, [-]
CASs [list[str], optional] The CAS numbers of all species in the mixture, [-]
VolumeLiquids [list[VolumeLiquid], optional] VolumeLiquid objects created for all species in
the mixture, [-]
correct_pressure_pure [bool, optional] Whether to try to use the better pressure-corrected pure
component models or to use only the T-only dependent pure species models, [-]
Notes
References
[1]
Methods
calculate(T, P, zs, ws, method) Method to calculate molar volume of a liquid mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate molar volume of a liquid mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
chemicals.volume.ideal_gas
thermo.eos_mix
Notes
References
[1]
Methods
calculate(T, P, zs, ws, method) Method to calculate molar volume of a gas mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate molar volume of a gas mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
Vm [float] Molar volume of the gas mixture at the given conditions, [m^3/mol]
Notes
Methods
calculate(T, P, zs, ws, method) Method to calculate molar volume of a solid mixture
at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
test_method_validity(T, P, zs, ws, method) Method to test the validity of a specified method for
the given conditions.
Tmax
Maximum temperature at which no method can calculate the property above.
Tmin
Minimum temperature at which no method can calculate the property under.
calculate(T, P, zs, ws, method)
Method to calculate molar volume of a solid mixture at temperature T, pressure P, mole fractions zs and
weight fractions ws with a given method.
This method has no exception handling; see mixture_property for that.
Parameters
T [float] Temperature at which to calculate the property, [K]
P [float] Pressure at which to calculate the property, [Pa]
zs [list[float]] Mole fractions of all species in the mixture, [-]
ws [list[float]] Weight fractions of all species in the mixture, [-]
method [str] Name of the method to use
Returns
Vm [float] Molar volume of the solid mixture at the given conditions, [m^3/mol]
name = 'Solid molar volume'
property_max = 0.002
Maximum value of Heat capacity; arbitrarily set to 0.002, as the largest in the data is 0.00136.
property_min = 0
Molar volume cannot be under 0.
ranked_methods = ['LINEAR']
test_method_validity(T, P, zs, ws, method)
Method to test the validity of a specified method for the given conditions. No methods have implemented
checks or strict ranges of validity.
Parameters
T [float] Temperature at which to check method validity, [K]
P [float] Pressure at which to check method validity, [Pa]
This module contains a class Wilson for performing activity coefficient calculations with the Wilson model. An older,
functional calculation for activity coefficients only is also present, Wilson_gammas.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• Wilson Class
• Wilson Functional Calculations
• Wilson Regression Calculations
[︂ ]︂
𝑏𝑖𝑗 𝑒𝑖𝑗 2
Λ𝑖𝑗 = exp 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2 + 𝑓𝑖𝑗 𝑇
𝑇 𝑇
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
lambda_coeffs [list[list[list[float]]], optional] Wilson parameters, indexed by [i][j] and then each
value is a 6 element list with parameters (a, b, c, d, e, f ); either lambda_coeffs or the lambda
parameters are required, [various]
ABCDEF [tuple(list[list[float]], 6), optional] The lamba parameters can be provided as a tuple,
[various]
lambda_as [list[list[float]], optional] a parameters used in calculating Wilson.lambdas, [-]
lambda_bs [list[list[float]], optional] b parameters used in calculating Wilson.lambdas, [K]
lambda_cs [list[list[float]], optional] c parameters used in calculating Wilson.lambdas, [-]
lambda_ds [list[list[float]], optional] d paraemeters used in calculating Wilson.lambdas,
[1/K]
lambda_es [list[list[float]], optional] e parameters used in calculating Wilson.lambdas, [K^2]
lambda_fs [list[list[float]], optional] f parameters used in calculating Wilson.lambdas,
[1/K^2]
Notes
In addition to the methods presented here, the methods of its base class thermo.activity.GibbsExcess are
available as well.
Warning: If parameters are ommited for all interactions, this model reverts to thermo.activity.
IdealSolution. In large systems it is common to only regress parameters for the most important compo-
nents; set lambda parameters for other components to 0 to “ignore” them and treat them as ideal components.
This class works with python lists, numpy arrays, and can be accelerated with Numba or PyPy quite effectively.
References
Examples
Example 1
This object-oriented class provides access to many more thermodynamic properties than Wilson_gammas, but
it can also be used like that function. In the following example, gammas are calculated with both functions. The
lambdas cannot be specified in this class; but fixed values can be converted with the log function so that fixed
values will be obtained.
>>> GE.gammas()
[1.881492608717, 1.165577493112]
We can check that the same lambda values were computed as well, and that there is no temperature dependency:
>>> GE.lambdas()
[[1.0, 0.154], [0.888, 1.0]]
>>> GE.dlambdas_dT()
[[0.0, 0.0], [0.0, 0.0]]
In this case, there is no temperature dependency in the Wilson model as the lambda values are fixed, so the excess
enthalpy is always zero. Other properties are not always zero.
Example 2
ChemSep is a (partially) free program for modeling distillation. Besides being a wonderful program, it also
ships with a permissive license several sets of binary interaction parameters. The Wilson parameters in it can be
accessed from Thermo as follows. In the following case, we compute activity coefficients of the ethanol-water
system at mole fractions of [.252, 0.748].
>>> GE.gammas()
[1.95733110, 1.1600677]
>>> T = 331.42
>>> N = 3
>>> Vs_ddbst = [74.04, 80.67, 40.73]
>>> as_ddbst = [[0, 375.2835, 31.1208], [-1722.58, 0, -1140.79], [747.217, 3596.17,␣
˓→0.0]]
>>> GE
Wilson(T=331.42, xs=[0.229, 0.175, 0.596], lambda_as=[[0.0, 3.870101271243586, 0.
˓→07939943395502425], [-6.491263271243587, 0.0, -3.276991837288562], [0.
˓→0]])
The solution given by the DDBST has the same values [1.223, 1.101, 1.205], and can be found here:
http://chemthermo.ddbst.com/Problems_Solutions/Mathcad_Files/05.09%20Compare%20Experimental%
20VLE%20to%20Wilson%20Equation%20Results.xps
Example 4
A simple example is given in [1]; other textbooks sample problems are normally in the same form as this - with
only volumes and the a term specified. The system is 2-propanol/water at 353.15 K, and the mole fraction of
2-propanol is 0.25.
>>> T = 353.15
>>> N = 2
>>> Vs = [76.92, 18.07] # cm^3/mol
>>> ais = [[0.0, 437.98],[1238.0, 0.0]] # cal/mol
>>> bis = cis = dis = eis = fis = [[0.0]*N for _ in range(N)]
>>> params = Wilson.from_DDBST_as_matrix(Vs=Vs, ais=ais, bis=bis, cis=cis, dis=dis,␣
˓→eis=eis, fis=fis, unit_conversion=True)
>>> GE.gammas()
[2.124064516, 1.1903745834]
The activity coefficients given in [1] are [2.1244, 1.1904]; matching ( with a slight deviation from their use of
1.987 as a gas constant).
Attributes
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
model_id [int] Unique identifier for the Wilson activity model, [-]
Methods
GE()
Calculate and return the excess Gibbs energy of a liquid phase represented with the Wilson model.
⎛ ⎞
∑︁ ∑︁
𝑔 𝐸 = −𝑅𝑇 𝑥𝑖 ln ⎝ 𝑥𝑗 𝜆𝑖,𝑗 ⎠
𝑖 𝑗
Returns
GE [float] Excess Gibbs energy of an ideal liquid, [J/mol]
d2GE_dT2()
Calculate and return the second temperature derivative of excess Gibbs energy of a liquid phase using the
Wilson activity coefficient model.
⎡ ⎛ ∑︀ ⎞ )︃⎤
𝜕 2 Λ𝑖𝑗 𝜕Λ𝑖𝑗 2 𝜕Λ𝑖𝑗
∑︀ (︃ ∑︀
2 𝐸 𝑥 (𝑥 ) 𝑥 ( 𝑥 ) 𝑥 𝑥
𝜕 𝐺 ⎝ 𝑖 ∑︀𝑗 𝑗 𝜕𝑇 2 − 𝑖 ∑︀ 𝑗 𝑗 𝜕𝑇 ⎠ + 2 𝑖 𝑗 𝜕𝑇
∑︀ 𝑗
∑︁ ∑︁
= −𝑅 ⎣𝑇 ⎦
𝜕𝑇 2 𝑖 𝑗 𝑥 𝑗 Λ 𝑖𝑗 ( 𝑗 𝑥 𝑗 Λ𝑖𝑗 )2
𝑖 𝑗 𝑥 𝑗 Λ𝑖𝑗
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy, [J/(mol*K^2)]
d2GE_dTdxs()
Calculate and return the temperature derivative of mole fraction derivatives of excess Gibbs energy of a
liquid represented by the Wilson model.
𝜕Λ
[︃ (︃ (︃ )︃ ∑︀ )︃ (︃ )︃ ]︃
𝑥𝑖 𝜕𝑛 𝜕Λ𝑘𝑖
∑︀
𝜕 2 𝐺𝐸 ∑︁
𝜕𝑇
𝑖𝑘 𝑥𝑖 Λ𝑖𝑘 ( 𝑗 𝑥𝑗 𝜕𝑇𝑖𝑗 ) 𝑖 𝑥𝑖 𝜕𝑇
∑︁ ∑︁ 𝑥𝑖 Λ𝑖𝑘
= −𝑅 𝑇 ∑︀ − + ∑︀ + ln 𝑥𝑖 Λ𝑘𝑖 + ∑︀
𝜕𝑥𝑘 𝜕𝑇 𝑖 𝑗 𝑥𝑗 Λ𝑖𝑗 (𝜕𝑗 𝑥𝑗 Λ𝑖𝑗 )2 𝑗 𝑥𝑗 Λ𝑘𝑗 𝑖 𝑖 𝑗 𝑥𝑗 Λ𝑖𝑗
Returns
d2GE_dTdxs [list[float]] Temperature derivative of mole fraction derivatives of excess
Gibbs energy, [J/mol/K]
d2GE_dxixjs()
Calculate and return the second mole fraction derivatives of excess Gibbs energy for the Wilson model.
(︃ )︃
𝜕 2 𝐺𝐸 ∑︁ 𝑥𝑖 Λ𝑖𝑘 Λ𝑖𝑚 Λ𝑘𝑚 Λ𝑚𝑘
= 𝑅𝑇 ∑︀ 2
− ∑︀ − ∑︀
𝜕𝑥𝑘 𝜕𝑥𝑚 𝑖
( 𝑗 𝑥𝑗 Λ 𝑖𝑗 ) 𝑗 𝑥 𝑗 Λ𝑘𝑗 𝑗 𝑥𝑗 Λ𝑚𝑗
Returns
d2GE_dxixjs [list[list[float]]] Second mole fraction derivatives of excess Gibbs energy,
[J/mol]
d2lambdas_dT2()
Calculate and return the second temperature derivative of the lambda termsfor the Wilson model at the
system temperature.
(︃ )︂2 )︃
𝜕 2 Λ𝑖𝑗
(︂
𝑐𝑖𝑗 𝑏𝑖𝑗 2𝑒𝑖𝑗 𝑐𝑖𝑗 2𝑏𝑖𝑗 6𝑒𝑖𝑗 𝑏 𝑒
𝑇 2 𝑓𝑖𝑗 +𝑇 𝑑𝑖𝑗 +𝑎𝑖𝑗 +𝑐𝑖𝑗 ln (𝑇 )+ 𝑇𝑖𝑗 + 𝑇𝑖𝑗
= 2𝑓 𝑖𝑗 + 2𝑇 𝑓𝑖𝑗 + 𝑑 𝑖𝑗 + − − − + + 𝑒 2
𝜕2𝑇 𝑇 𝑇2 𝑇3 𝑇2 𝑇3 𝑇4
Returns
d2lambdas_dT2 [list[list[float]]] Second temperature deriavtives of Lambda terms, asym-
metric matrix, [1/K^2]
Notes
Returns
d3GE_dT3 [float] Third temperature derivative of excess Gibbs energy, [J/(mol*K^3)]
d3GE_dxixjxks()
Calculate and return the third mole fraction derivatives of excess Gibbs energy using the Wilson model.
[︃ ]︃
𝜕 3 𝐺𝐸 ∑︁ (︂ 2𝑥𝑖 Λ𝑖𝑘 Λ𝑖𝑚 Λ𝑖𝑛 )︂ Λ𝑘𝑚 Λ𝑘𝑛 Λ𝑚𝑘 Λ𝑚𝑛 Λ𝑛𝑘 Λ𝑛𝑚
= −𝑅𝑇 ∑︀ − ∑︀ − ∑︀ − ∑︀
𝜕𝑥𝑘 𝜕𝑥𝑚 𝜕𝑥𝑛 𝑖
( 𝑥𝑗 Λ𝑖𝑗 )3 ( 𝑗 𝑥𝑗 Λ𝑘𝑗 )2 ( 𝑗 𝑥𝑗 Λ𝑚𝑗 )2 ( 𝑗 𝑥𝑗 Λ𝑛𝑗 )2
Returns
d3GE_dxixjxks [list[list[list[float]]]] Third mole fraction derivatives of excess Gibbs en-
ergy, [J/mol]
d3lambdas_dT3()
Calculate and return the third temperature derivative of the lambda terms for the Wilson model at the system
temperature.
⎛
)︂3
𝜕 3 Λ𝑖𝑗
(︂ )︂ (︂ )︂ (︂
= ⎝3 2𝑓𝑖𝑗 − 𝑐𝑖𝑗 + 2𝑏𝑖𝑗 + 6𝑒𝑖𝑗 2𝑇 𝑓𝑖𝑗 + 𝑑𝑖𝑗 +
𝑐𝑖𝑗
−
𝑏𝑖𝑗
−
2𝑒𝑖𝑗
+ 2𝑇 𝑓𝑖𝑗 + 𝑑 𝑖𝑗 +
𝑐𝑖𝑗
−
𝑏𝑖𝑗
−
2𝑒𝑖𝑗
−
𝜕3𝑇 𝑇2 𝑇3 𝑇4 𝑇 𝑇2 𝑇3 𝑇 𝑇2 𝑇3
Returns
d3lambdas_dT3 [list[list[float]]] Third temperature deriavtives of Lambda terms, asymmet-
ric matrix, [1/K^3]
Notes
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy of a liquid phase repre-
sented by the Wilson model, [J/(mol*K)]
dGE_dxs()
Calculate and return the mole fraction derivatives of excess Gibbs energy for the Wilson model.
⎡ ⎛ ⎞⎤
𝐸
𝜕𝐺 𝑥Λ
∑︀ 𝑖 𝑖𝑘 + ln ⎝
∑︁ ∑︁
= −𝑅𝑇 ⎣ 𝑥𝑗 Λ𝑘𝑗 ⎠⎦
𝜕𝑥𝑘 𝑖 𝑗 Λ𝑖𝑗 𝑥𝑗 𝑗
Returns
dGE_dxs [list[float]] Mole fraction derivatives of excess Gibbs energy, [J/mol]
dlambdas_dT()
Calculate and return the temperature derivative of the lambda terms for the Wilson model at the system
temperature.
(︂ )︂
𝜕Λ𝑖𝑗 𝑐𝑖𝑗 𝑏𝑖𝑗 2𝑒𝑖𝑗 2 𝑏𝑖𝑗 𝑒𝑖𝑗
= 2𝑇 ℎ𝑖𝑗 + 𝑑𝑖𝑗 + − 2 − 3 𝑒𝑇 ℎ𝑖𝑗 +𝑇 𝑑𝑖𝑗 +𝑎𝑖𝑗 +𝑐𝑖𝑗 ln (𝑇 )+ 𝑇 + 𝑇 2
𝜕𝑇 𝑇 𝑇 𝑇
Returns
dlambdas_dT [list[list[float]]] Temperature deriavtives of Lambda terms, asymmetric ma-
trix [1/K]
Notes
Notes
The units show how the different variables are related to each other.
Examples
Returns
lambdas [list[list[float]]] Lambda terms, asymmetric matrix [-]
Notes
Notes
If the new temperature is the same temperature as the existing temperature, if the lambda terms or their
derivatives have been calculated, they will be set to the new object as well.
thermo.wilson.Wilson_gammas(xs, params)
Calculates the activity coefficients of each species in a mixture using the Wilson method, given their mole frac-
tions, and dimensionless interaction parameters. Those are normally correlated with temperature, and need to
be calculated separately.
⎛ ⎞
𝑁 𝑁
∑︁ ∑︁ Λ𝑗𝑖 𝑥𝑗
ln 𝛾𝑖 = 1 − ln ⎝ Λ𝑖𝑗 𝑥𝑗 ⎠ − 𝑁
𝑗 𝑗
∑︁
Λ𝑗𝑘 𝑥𝑘
𝑘
Parameters
xs [list[float]] Liquid mole fractions of each species, [-]
params [list[list[float]]] Dimensionless interaction parameters of each compound with each
other, [-]
Returns
gammas [list[float]] Activity coefficient for each species in the liquid mixture, [-]
Notes
If a compound is not liquid at that temperature, the liquid volume is taken at the saturated pressure; and if the
component is supercritical, its liquid molar volume should be extrapolated to 25°C.
However, that form has less flexibility and offered no advantage over using only regressed parameters.
Most correlations for the interaction parameters include some of the terms shown in the following form:
𝑏𝑖𝑗 𝑒𝑖𝑗
ln Λ𝑖𝑗 = 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2 + ℎ𝑖𝑗 𝑇 2
𝑇 𝑇
The Wilson model is not applicable to liquid-liquid systems.
For this model to produce ideal acitivty coefficients (gammas = 1), all interaction parameters should be 1.
The specific process simulator implementations are as follows:
References
[1], [2]
Examples
Ethanol-water example, at 343.15 K and 1 MPa, from [2] also posted online http://chemthermo.ddbst.
com/Problems_Solutions/Mathcad_Files/P05.01a%20VLE%20Behavior%20of%20Ethanol%20-%20Water%
20Using%20Wilson.xps :
Notes
The lambda values are hard-coded to replace values under zero which are mathematically impossible, with a
very small number. This is helpful for regression which might try to make those values negative.
Examples
This module contains a class UNIQUAC for performing activity coefficient calculations with the UNIQUAC model. An
older, functional calculation for activity coefficients only is also present, UNIQUAC_gammas.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
• UNIQUAC Class
• UNIQUAC Functional Calculations
𝑟𝑖 𝑥𝑖
𝜑𝑖 = ∑︀
𝑗 𝑟𝑗 𝑥𝑗
𝑞 𝑖 𝑥𝑖
𝜃𝑖 = ∑︀
𝑗 𝑞𝑗 𝑥𝑗
[︂ ]︂
𝑏𝑖𝑗 𝑒𝑖𝑗 2
𝜏𝑖𝑗 = exp 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2 + 𝑓𝑖𝑗 𝑇
𝑇 𝑇
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
∑︀𝑛
rs [list[float]] r parameters 𝑟𝑖 = 𝑘=1 𝜈𝑘 𝑅𝑘 if from UNIFAC, otherwise regressed, [-]
∑︀𝑛
qs [list[float]] q parameters 𝑞𝑖 = 𝑘=1 𝜈𝑘 𝑄𝑘 if from UNIFAC, otherwise regressed, [-]
tau_coeffs [list[list[list[float]]], optional] UNIQUAC parameters, indexed by [i][j] and then each
value is a 6 element list with parameters [a, b, c, d, e, f ]; either tau_coeffs or ABCDEF are
required, [-]
ABCDEF [tuple[list[list[float]], 6], optional] Contains the following. One of tau_coeffs or
ABCDEF or some of the tau_as, etc parameters are required, [-]
tau_as [list[list[float]] or None, optional] a parameters used in calculating UNIQUAC.taus, [-]
tau_bs [list[list[float]] or None, optional] b parameters used in calculating UNIQUAC.taus, [K]
tau_cs [list[list[float]] or None, optional] c parameters used in calculating UNIQUAC.taus, [-]
tau_ds [list[list[float]] or None, optional] d paraemeters used in calculating UNIQUAC.taus,
[1/K]
tau_es [list[list[float]] or None, optional] e parameters used in calculating UNIQUAC.taus,
[K^2]
tau_fs [list[list[float]] or None, optional] f parameters used in calculating UNIQUAC.taus,
[1/K^2]
Notes
In addition to the methods presented here, the methods of its base class thermo.activity.GibbsExcess are
available as well.
Warning: There is no such thing as a missing parameter in the UNIQUAC model. It is possible to find 𝜏𝑖𝑗
and 𝜏𝑗𝑖 which make 𝛾𝑖 = 1 and 𝛾𝑗 = 1, but those tau values depend on rs, qs, and xs - the composition, which
obviously will change. It is therefore impossible to make an interaction parameter “missing”; whatever value
it has will always impact the phase equilibria problem. At best, the tau values can produce close to ideal
behavior.
References
[1], [2]
Examples
Example 1
Example 5.19 in [2] includes the calculation of liquid-liquid activity coefficients for the water-ethanol-benzene
system. Two calculations are reproduced accurately here. Note that the DDBST-style coefficients assume a
negative sign; for compatibility, their coefficients need to have their sign flipped.
>>> N = 3
>>> T = 25.0 + 273.15
>>> xs = [0.7273, 0.0909, 0.1818]
>>> rs = [.92, 2.1055, 3.1878]
>>> qs = [1.4, 1.972, 2.4]
>>> tausA = tausC = tausD = tausE = tausF = [[0.0]*N for i in range(N)]
>>> tausB = [[0, 526.02, 309.64], [-318.06, 0, -91.532], [1325.1, 302.57, 0]]
>>> tausB = [[-v for v in r] for r in tausB] # Flip the sign to come into UNIQUAC␣
˓→convention
The given values in [2] are [1.570, 0.2948, 18.11], matching exactly. The second phase has a different compo-
sition; the expected values are [8.856, 0.860, 1.425]. Once the UNIQUAC object has been constructed, it is very
easy to obtain properties at different conditions:
The string representation of the object presents enough information to reconstruct it as well.
>>> GE
UNIQUAC(T=298.15, xs=[0.7273, 0.0909, 0.1818], rs=[0.92, 2.1055, 3.1878], qs=[1.4,␣
˓→1.972, 2.4], ABCDEF=([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0, -
˓→526.02, -309.64], [318.06, 0, 91.532], [-1325.1, -302.57, 0]], [[0.0, 0.0, 0.0],␣
˓→[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0,␣
˓→0.0]], [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0], [0.
Example 2
Another problem is 8.32 in [1] - acetonitrile, benzene, n-heptane at 45 °C. The sign flip is needed here as well
to convert their single temperature-dependent values into the correct form, but it has already been done to the
coefficients:
>>> N = 3
>>> T = 45 + 273.15
>>> xs = [.1311, .0330, .8359]
>>> rs = [1.87, 3.19, 5.17]
>>> qs = [1.72, 2.4, 4.4]
>>> tausA = tausC = tausD = tausE = tausF = [[0.0]*N for i in range(N)]
>>> tausB = [[0.0, -60.28, -23.71], [-89.57, 0.0, 135.9], [-545.8, -245.4, 0.0]]
>>> ABCDEF = (tausA, tausB, tausC, tausD, tausE, tausF)
>>> GE = UNIQUAC(T=T, xs=xs, rs=rs, qs=qs, ABCDEF=ABCDEF)
>>> GE.gammas()
[7.1533533992, 1.25052436922, 1.060392792605]
−𝐴𝑖𝑗 −𝐴𝑖𝑗
𝑏𝑖𝑗 = =
𝑅 1.9872042586408316
This system was chosen because there is also a sample problem for the same components from the
DDBST which can be found here: http://chemthermo.ddbst.com/Problems_Solutions/Mathcad_Files/P05.01c%
20VLE%20Behavior%20of%20Ethanol%20-%20Water%20Using%20UNIQUAC.xps
In that example, with different data sets and parameters, they obtain at the same conditions activity coefficients
of [2.359, 1.244].
Attributes
T [float] Temperature, [K]
xs [list[float]] Mole fractions, [-]
Methods
GE()
Calculate and return the excess Gibbs energy of a liquid phase using the UNIQUAC model.
⎛ ⎞
𝐺𝐸 ∑︁ 𝜑𝑖 𝑧 ∑︁ 𝜃𝑖 ∑︁ ∑︁
= 𝑥𝑖 ln + 𝑞𝑖 𝑥𝑖 ln − 𝑞𝑖 𝑥𝑖 ln ⎝ 𝜃𝑗 𝜏𝑗𝑖 ⎠
𝑅𝑇 𝑖
𝑥 𝑖 2 𝑖
𝜑 𝑖 𝑖 𝑗
Returns
GE [float] Excess Gibbs energy, [J/mol]
d2GE_dT2()
Calculate and return the second temperature derivative of excess Gibbs energy of a liquid phase using the
UNIQUAC model.
⎡ ⎛ 2
⎞ )︃⎤
∑︁ 𝑞𝑖 𝑥𝑖 ( 𝑗 𝜃𝑗 𝜕𝜕𝑇𝜏𝑗𝑖 𝜕𝜏
∑︁ 𝑞𝑖 𝑥𝑖 ( 𝑗 𝜃𝑗 𝜕𝜏
(︃
𝑞𝑖 𝑥𝑖 ( 𝑗 𝜃𝑗 𝜕𝑇𝑗𝑖 )2
∑︀ ∑︀ ∑︀ 𝑗𝑖
𝜕𝐺𝐸 2 ) 𝜕𝑇 )
= −𝑅 ⎣𝑇 ⎝ ∑︀ − ∑︀ ⎠+2 ∑︀ ⎦
𝜕𝑇 2 𝑖 𝑗 𝜃 𝑗 𝜏𝑗𝑖 ( 𝑗 𝜃 𝑗 𝜏𝑗𝑖 )2
𝑖 𝑗 𝜃 𝑗 𝜏𝑗𝑖
Returns
d2GE_dT2 [float] Second temperature derivative of excess Gibbs energy, [J/(mol*K^2)]
d2GE_dTdxs()
Calculate and return the temperature derivative of mole fraction derivatives of excess Gibbs energy using
the UNIQUAC model.
⎡ ⎧ ∑︀ ⎫ (︁
𝜕𝜏𝑗𝑖 ∑︀ 𝜕𝜏𝑘𝑗 𝜕𝜃𝑘 𝜕𝜃𝑘 ∑︀ 𝜕𝜏𝑘𝑗 ⎬ 𝜕𝜃𝑗
𝑞 𝑥 𝑧
∑︀
𝜕𝐺 𝐸 ⎨ 𝑞𝑖 ( 𝑗 𝜃𝑗 𝜕𝑇 ) ∑︁ 𝑞𝑗 𝑥𝑗 ( 𝑘 𝜕𝑇 𝜕𝑥𝑖 ) ∑︁ 𝑞𝑗 𝑥𝑗 ( 𝑘 𝜏𝑘𝑗 𝜕𝑥𝑖 )( 𝑘 𝜃𝑘 𝜕𝑇 ) ∑︁ 𝑗 𝑗 𝜕𝑥𝑖
= 𝑅 −𝑇
⎣ ∑︀ + ∑︀ − ∑︀ +
𝜕𝑥𝑖 𝜕𝑇 ⎩ 𝑗 𝜏𝑘𝑖 𝜃𝑘 𝑗 𝑘 𝜏𝑘𝑗 𝜃𝑘 𝑗
( 𝑘 𝜏𝑘𝑗 𝜃𝑘 )2 ⎭
𝑗
2𝜃
Returns
Notes
The formula is extremely long and painful; see the source code for details.
d2taus_dT2()
Calculate and return the second temperature derivative of the tau terms for the UNIQUAC model for
a specified temperature.
(︃ )︂2 )︃
𝜕 2 𝜏𝑖𝑗
(︂
𝑐𝑖𝑗 𝑏𝑖𝑗 2𝑒𝑖𝑗 𝑐𝑖𝑗 2𝑏𝑖𝑗 6𝑒𝑖𝑗 2 𝑏𝑖𝑗 𝑒𝑖𝑗
2
= 2𝑓𝑖𝑗 + 2𝑇 𝑓𝑖𝑗 + 𝑑𝑖𝑗 + − 2− 3 − 2 + 3 + 4 𝑒𝑇 𝑓𝑖𝑗 +𝑇 𝑑𝑖𝑗 +𝑎𝑖𝑗 +𝑐𝑖𝑗 ln (𝑇 )+ 𝑇 + 𝑇 2
𝜕 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇
Returns
d2taus_dT2 [list[list[float]]] Second temperature derivatives of tau terms, asymmetric ma-
trix [1/K^2]
Notes
Returns
d3GE_dT3 [float] Third temperature derivative of excess Gibbs energy, [J/(mol*K^3)]
d3taus_dT3()
Calculate and return the third temperature derivative of the tau terms for the UNIQUAC model for a spec-
ified temperature.
⎛
)︂3
𝜕 3 𝜏𝑖𝑗
(︂ )︂ (︂ )︂ (︂
= ⎝3 2𝑓𝑖𝑗 − 𝑐𝑖𝑗 + 2𝑏𝑖𝑗 + 6𝑒𝑖𝑗 2𝑇 𝑓𝑖𝑗 + 𝑑𝑖𝑗 +
𝑐𝑖𝑗
−
𝑏𝑖𝑗
−
2𝑒𝑖𝑗
+ 2𝑇 𝑓𝑖𝑗 + 𝑑 𝑖𝑗 +
𝑐𝑖𝑗
−
𝑏𝑖𝑗
−
2𝑒𝑖𝑗
−
𝜕3𝑇 𝑇2 𝑇3 𝑇4 𝑇 𝑇2 𝑇3 𝑇 𝑇2 𝑇3
Returns
d3taus_dT3 [list[list[float]]] Third temperature derivatives of tau terms, asymmetric matrix
[1/K^3]
Notes
∑︁ 𝑞𝑖 𝑥𝑖 ( 𝑗 𝜃𝑗 𝜕𝜏
(︃ ∑︀ 𝑗𝑖
)︃
𝜕𝐺𝐸 𝐺𝐸 𝜕𝑇 )
= − 𝑅𝑇 ∑︀
𝜕𝑇 𝑇 𝑖 𝑗 𝜃𝑗 𝜏𝑗𝑖
Returns
dGE_dT [float] First temperature derivative of excess Gibbs energy, [J/(mol*K)]
dGE_dxs()
Calculate and return the mole fraction derivatives of excess Gibbs energy using the UNIQUAC model.
⎡ (︃ )︃ (︃ )︃ ⎛ ⎞
∑︀ 𝜕𝜃𝑘
𝐸 𝑞 𝑥 ( 𝜏 )
(︂ )︂
𝜕𝐺 𝑞𝑗 𝑥𝑗 𝜑𝑗 𝑧 1 𝜕𝜃𝑗 𝜃𝑗 𝜕𝜑𝑗 𝑗 𝑗 𝑘𝑗 𝜕𝑥𝑖 𝜃𝑖
∑︀ 𝑘
∑︁ ∑︁ ∑︁
= 𝑅𝑇 ⎣ · − 2· − + 0.5𝑧𝑞𝑖 ln − 𝑞𝑖 ln ⎝ 𝜏𝑗𝑖 𝜃𝑗 ⎠
𝜕𝑥𝑖 𝑗
2𝜃 𝑗 𝜑 𝑗 𝜕𝑥𝑖 𝜑 𝑗 𝜕𝑥 𝑖 𝑗 𝑘 𝜏 𝑘𝑗 𝜃 𝑘 𝜑 𝑖 𝑗
Returns
dGE_dxs [list[float]] Mole fraction derivatives of excess Gibbs energy, [J/mol]
dtaus_dT()
Calculate and return the temperature derivative of the tau terms for the UNIQUAC model for a specified
temperature.
(︂ )︂
𝜕𝜏𝑖𝑗 𝑐𝑖𝑗 𝑏𝑖𝑗 2𝑒𝑖𝑗 2 𝑏𝑖𝑗 𝑒𝑖𝑗
= 2𝑇 ℎ𝑖𝑗 + 𝑑𝑖𝑗 + − 2 − 3 𝑒𝑇 ℎ𝑖𝑗 +𝑇 𝑑𝑖𝑗 +𝑎𝑖𝑗 +𝑐𝑖𝑗 ln (𝑇 )+ 𝑇 + 𝑇 2
𝜕𝑇 𝑇 𝑇 𝑇
Returns
dtaus_dT [list[list[float]]] First temperature derivatives of tau terms, asymmetric matrix
[1/K]
Notes
Returns
phis [list[float]] phi parameters, [-]
classmethod regress_binary_parameters(gammas, xs, rs, qs, use_numba=False, do_statistics=True,
**kwargs)
Perform a basic regression to determine the values of the tau terms in the UNIQUAC model, given a series
of known or predicted activity coefficients and mole fractions.
Parameters
gammas [list[list[float, 2]]] List of activity coefficient pairs, [-]
Notes
Examples
In the following example, the tau values required to zero-out the coefficients for the n-pentane and n-
hexane system are calculated. The parameters are converted back into aij parameters as used by this activity
coefficient object, and then the calculated values are verified to be fairly nearly one.
Note how the tau coefficients need to be converted into the a parameters of the tau equation. They could
also have been converted into any of the other parameters, but then the activity coefficients predicted would
no longer be close to 1 at other temperatures.
[︂ ]︂
𝑏𝑖𝑗 𝑒𝑖𝑗 2
𝜏𝑖𝑗 = exp 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2 + 𝑓𝑖𝑗 𝑇
𝑇 𝑇
The UNIQUAC model’s r and q parameters create their own biases in the model, based on the structure of
each of the pure species. Water and n-pentane are not miscible liquids; they will form two liquid phases
except when one component is present in trace amounts. No matter the values of tau, it is not possible to
make the UNIQUAC equation predict activity coefficients very close to one for this system, as shown in the
following sample.
taus()
Calculate and return the tau terms for the UNIQUAC model for the system temperature.
[︂ ]︂
𝑏𝑖𝑗 𝑒𝑖𝑗 2
𝜏𝑖𝑗 = exp 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2 + 𝑓𝑖𝑗 𝑇
𝑇 𝑇
Returns
taus [list[list[float]]] tau terms, asymmetric matrix [-]
Notes
Returns
thetas [list[float]] theta parameters, [-]
to_T_xs(T, xs)
Method to construct a new UNIQUAC instance at temperature T, and mole fractions xs with the same param-
eters as the existing object.
Parameters
T [float] Temperature, [K]
xs [list[float]] Mole fractions of each component, [-]
Returns
obj [UNIQUAC] New UNIQUAC object at the specified conditions [-]
Notes
If the new temperature is the same temperature as the existing temperature, if the tau terms or their deriva-
tives have been calculated, they will be set to the new object as well.
Notes
However, it is seldom used. Most correlations for the interaction parameters include some of the terms shown in
the following form:
𝑏𝑖𝑗 𝑒𝑖𝑗
ln 𝜏𝑖𝑗 = 𝑎𝑖𝑗 + + 𝑐𝑖𝑗 ln 𝑇 + 𝑑𝑖𝑗 𝑇 + 2
𝑇 𝑇
This model is recast in a slightly more computationally efficient way in [2], as shown below:
ln 𝛾𝑖 = ln 𝛾𝑖𝑟𝑒𝑠 + ln 𝛾𝑖𝑐𝑜𝑚𝑏
⎛ ∑︀𝑁 ⎞
𝑞 𝑥
𝑗 𝑗 𝑗 𝑗𝑖 𝜏 𝑞 𝑥 𝜏
∑︀ 𝑘 𝑗 𝑖𝑗 ⎠
∑︁
ln 𝛾𝑖𝑟𝑒𝑠 = 𝑞𝑖 ⎝1 − ln ∑︀𝑁 −
𝑗 𝑞 𝑗 𝑥𝑗 𝑗 𝑘 𝑞𝑘 𝑥𝑘 𝜏𝑘𝑗
(︂ )︂
𝑐𝑜𝑚𝑏 𝑧 𝑉𝑖 𝑉𝑖
ln 𝛾𝑖 = (1 − 𝑉𝑖 + ln 𝑉𝑖 ) − 𝑞𝑖 1 − + ln
2 𝐹𝑖 𝐹𝑖
𝑟𝑖
𝑉𝑖 = ∑︀𝑁
𝑗 𝑟𝑗 𝑥𝑗
𝑞𝑖
𝐹𝑖 = ∑︀
𝑗 𝑞𝑗 𝑥𝑗
There is no global set of parameters which will make this model yield ideal acitivty coefficients (gammas = 1)
for this model.
References
Examples
This module contains an implementation of the Joback group-contribution method. This functionality requires the
RDKit library to work.
For submitting pull requests, please use the GitHub issue tracker.
Warning: The Joback class method does not contain all the groups for every chemical. There are often multiple
ways of fragmenting a chemical. Other times, the fragmentation algorithm will fail. These limitations are present
in both the implementation and the method itself. You are welcome to seek to improve this code but no to little help
can be offered.
Parameters
mol [rdkitmol or smiles str] Input molecule for the analysis, [-]
atom_count [int, optional] The total number of atoms including hydrogen in the molecule; this
will be counted by rdkit if it not provided, [-]
MW [float, optional] Molecular weight of the molecule; this will be calculated by rdkit if not
provided, [g/mol]
Tb [float, optional] An experimentally known boiling temperature for the chemical; this in-
creases the accuracy of the calculated critical point if provided. [K]
Notes
Be sure to check the status of the automatic fragmentation; not all chemicals with the Joback method are appli-
cable.
Approximately 68% of chemcials in the thermo database seem to be able to be estimated with the Joback method.
If a group which was identified is missign a regressed contribution, the estimated property will be None. However,
if not all atoms of a molecule are identified as particular groups, property estimation will go ahead with heavily
reduced accuracy. Check the status attribute to be sure a molecule was properly fragmented.
References
[1], [2]
Examples
Analysis of Acetone:
>>> J = Joback('CC(=O)C')
>>> J.Hfus(J.counts)
5125.0
>>> J.Cpig(350)
84.69109750000001
>>> J.status
'OK'
>>> J.estimate(callables=False)
{'Tb': 322.11, 'Tm': 173.5, 'Tc': 500.5590049525365, 'Pc': 4802499.604994407, 'Vc':␣
˓→0.0002095, 'Hf': -217829.99999999997, 'Gf': -154540.00000000003, 'Hfus': 5125.0,
The results for propionic anhydride (if the status is not OK) should not be used.
>>> J = Joback('CCC(=O)OC(=O)CC')
>>> J.status
'Matched some atoms repeatedly: [4]'
>>> J.Cpig(300)
175.85999999999999
None of the routines need to use the automatic routine; they can be used manually too:
Attributes
calculated_Cpig_coeffs
calculated_mul_coeffs
Methods
Cpig(T )
Computes ideal-gas heat capacity at a specified temperature of an organic compound using the Joback
method as a function of chemical structure only.
[︃ ]︃ [︃ ]︃ [︃ ]︃
∑︁ ∑︁ ∑︁ ∑︁
𝑖𝑔 −4 2 −7
𝐶𝑝 = 𝑎𝑖 − 37.93 + 𝑏𝑖 + 0.210 𝑇 + 𝑐𝑖 − 3.91 · 10 𝑇 + 𝑑𝑖 + 2.06 · 10 𝑇3
𝑖 𝑖 𝑖 𝑖
Parameters
T [float] Temperature, [K]
Returns
Cpig [float] Ideal-gas heat capacity, [J/mol/K]
Examples
>>> J = Joback('CC(=O)C')
>>> J.Cpig(300)
75.32642000000001
static Cpig_coeffs(counts)
Computes the ideal-gas polynomial heat capacity coefficients of an organic compound using the Joback
method as a function of chemical structure only.
[︃ ]︃ [︃ ]︃ [︃ ]︃
∑︁ ∑︁ ∑︁ ∑︁
𝑖𝑔 −4 2 −7
𝐶𝑝 = 𝑎𝑖 − 37.93 + 𝑏𝑖 + 0.210 𝑇 + 𝑐𝑖 − 3.91 · 10 𝑇 + 𝑑𝑖 + 2.06 · 10 𝑇3
𝑖 𝑖 𝑖 𝑖
288 compounds were used by Joback in this determination. No overall error was reported.
The ideal gas heat capacity values used in developing the heat capacity polynomials used 9 data points
between 298 K and 1000 K.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
coefficients [list[float]] Coefficients which will result in a calculated heat capacity in in units
of J/mol/K, [-]
Examples
static Gf(counts)
Estimates the ideal-gas Gibbs energy of formation at 298.15 K of an organic compound using the Joback
method as a function of chemical structure only.
∑︁
𝐺𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 53.88 + 𝐺𝑓,𝑖
In the above equation, Gibbs energy of formation is calculated in kJ/mol; it is converted to J/mol here.
328 compounds were used by Joback in this determination, with an absolute average error of 2.0 kcal/mol,
standard devaition 4.37 kcal/mol, and AARE of 15.7%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Gf [float] Estimated ideal-gas Gibbs energy of formation at 298.15 K, [J/mol]
Examples
static Hf(counts)
Estimates the ideal-gas enthalpy of formation at 298.15 K of an organic compound using the Joback method
as a function of chemical structure only.
∑︁
𝐻𝑓 𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 = 68.29 + 𝐻𝑓,𝑖
𝑖
In the above equation, enthalpy of formation is calculated in kJ/mol; it is converted to J/mol here.
370 compounds were used by Joback in this determination, with an absolute average error of 2.2 kcal/mol,
standard devaition 2.0 kcal/mol, and AARE of 15.2%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Hf [float] Estimated ideal-gas enthalpy of formation at 298.15 K, [J/mol]
Examples
static Hfus(counts)
Estimates the enthalpy of fusion of an organic compound at its melting point using the Joback method as a
function of chemical structure only.
∑︁
∆𝐻𝑓 𝑢𝑠 = −0.88 + 𝐻𝑓 𝑢𝑠,𝑖
𝑖
In the above equation, enthalpy of fusion is calculated in kJ/mol; it is converted to J/mol here.
For 155 compounds tested by Joback, the absolute average error was 485.2 cal/mol and standard deviation
was 661.4 cal/mol; the average relative error was 38.7%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Hfus [float] Estimated enthalpy of fusion of the compound at its melting point, [J/mol]
Examples
static Hvap(counts)
Estimates the enthalpy of vaporization of an organic compound at its normal boiling point using the Joback
method as a function of chemical structure only.
∑︁
∆𝐻𝑣𝑎𝑝 = 15.30 + 𝐻𝑣𝑎𝑝,𝑖
𝑖
In the above equation, enthalpy of fusion is calculated in kJ/mol; it is converted to J/mol here.
For 368 compounds tested by Joback, the absolute average error was 303.5 cal/mol and standard deviation
was 429 cal/mol; the average relative error was 3.88%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Hvap [float] Estimated enthalpy of vaporization of the compound at its normal boiling point,
[J/mol]
Examples
Examples
static Tb(counts)
Estimates the normal boiling temperature of an organic compound using the Joback method as a function
of chemical structure only.
∑︁
𝑇𝑏 = 198.2 + 𝑇𝑏,𝑖
𝑖
For 438 compounds tested by Joback, the absolute average error was 12.91 K and standard deviation was
17.85 K; the average relative error was 3.6%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Tb [float] Estimated normal boiling temperature, [K]
Examples
For 409 compounds tested by Joback, the absolute average error was 4.76 K and standard deviation was
6.94 K; the average relative error was 0.81%.
Appendix BI of Joback’s work lists 409 estimated critical temperatures.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Tb [float, optional] Experimental normal boiling temperature, [K]
Returns
Tc [float] Estimated critical temperature, [K]
Examples
static Tm(counts)
Estimates the melting temperature of an organic compound using the Joback method as a function of chem-
ical structure only.
∑︁
𝑇𝑚 = 122.5 + 𝑇𝑚,𝑖
𝑖
For 388 compounds tested by Joback, the absolute average error was 22.6 K and standard deviation was
24.68 K; the average relative error was 11.2%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Tm [float] Estimated melting temperature, [K]
Examples
static Vc(counts)
Estimates the critcal volume of an organic compound using the Joback method as a function of chemical
structure only.
∑︁
𝑉𝑐 = 17.5 + 𝑉𝑐,𝑖
𝑖
In the above equation, critical volume is calculated in cm^3/mol; it is converted to m^3/mol here.
310 compounds were used by Joback in this determination, with an absolute average error of 7.54 cm^3/mol,
standard devaition 13.16 cm^3/mol, and AARE of 2.27%.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
Vc [float] Estimated critical volume, [m^3/mol]
Examples
calculated_Cpig_coeffs = None
calculated_mul_coeffs = None
estimate(callables=True)
Method to compute all available properties with the Joback method; returns their results as a dict. For the
tempearture dependent values Cpig and mul, both the coefficients and objects to perform calculations are
returned.
mul(T )
Computes liquid viscosity at a specified temperature of an organic compound using the Joback method as
a function of chemical structure only.
(︃ ∑︀ )︃
𝑖 𝜇𝑎 − 597.82
∑︁
𝜇𝑙𝑖𝑞 = MW exp + 𝜇𝑏 − 11.202
𝑇 𝑖
Parameters
T [float] Temperature, [K]
Returns
mul [float] Liquid viscosity, [Pa*s]
Examples
>>> J = Joback('CC(=O)C')
>>> J.mul(300)
0.0002940378347162687
static mul_coeffs(counts)
Computes the liquid phase viscosity Joback coefficients of an organic compound using the Joback method
as a function of chemical structure only.
(︃ ∑︀ )︃
𝜇𝑎 − 597.82 ∑︁
𝜇𝑙𝑖𝑞 = MW exp 𝑖
+ 𝜇𝑏 − 11.202
𝑇 𝑖
288 compounds were used by Joback in this determination. No overall error was reported.
The liquid viscosity data used was specified to be at “several temperatures for each compound” only. A
small and unspecified number of compounds were used in this estimation.
Parameters
counts [dict] Dictionary of Joback groups present (numerically indexed) and their counts,
[-]
Returns
coefficients [list[float]] Coefficients which will result in a liquid viscosity in in units of Pa*s,
[-]
Examples
This module contains an implementation of the Fedors group-contribution method. This functionality requires the
RDKit library to work.
thermo.group_contribution.Fedors(mol)
Estimate the critical volume of a molecule using the Fedors [1] method, which is a basic group contribution
method that also uses certain bond count features and the number of different types of rings.
Parameters
mol [str or rdkit.Chem.rdchem.Mol, optional] Smiles string representing a chemical or a rdkit
molecule, [-]
Returns
Vc [float] Estimated critical volume, [m^3/mol]
status [str] A string holding an explanation of why the molecule failed to be fragmented, if it
fails; ‘OK’ if it suceeds, [-]
unmatched_atoms [bool] Whether or not all atoms in the molecule were matched successfully;
if this is True, the results should not be trusted, [-]
unrecognized_bond [bool] Whether or not all bonds in the molecule were matched successfully;
if this is True, the results should not be trusted, [-]
unrecognized_ring_size [bool] Whether or not all rings in the molecule were matched success-
fully; if this is True, the results should not be trusted, [-]
Notes
References
[1], [2]
Examples
This module contains an implementation of the Wilson-Jasperson group-contribution method. This functionality re-
quires the RDKit library to work.
thermo.group_contribution.Wilson_Jasperson(mol, Tb, second_order=True)
Estimate the critical temperature and pressure of a molecule using the molecule itself, and a known or estimated
boiling point using the Wilson-Jasperson method.
Parameters
mol [str or rdkit.Chem.rdchem.Mol, optional] Smiles string representing a chemical or a rdkit
molecule, [-]
Tb [float] Known or estimated boiling point, [K]
second_order [bool] Whether to use the first order method (False), or the second order method,
[-]
Returns
Tc [float] Estimated critical temperature, [K]
Pc [float] Estimated critical pressure, [Pa]
missing_Tc_increments [bool] Whether or not there were missing atoms for the Tc calculation,
[-]
missing_Pc_increments [bool] Whether or not there were missing atoms for the Pc calculation,
[-]
Notes
References
Examples
EIGHT
The following Jupyter notebooks show some of the many calculations that can be done with Thermo.
These problems often make use of fluids, ht, chemicals, and pint so make sure you have them installed! More details
on the unit handling library can be found at fluids.units.
Heat transfer fluids are pure species or chemical mixtures with specially tailored properties that make them suitable
for use in heat exchangers. Usually this means not fouling, requiring little heat transfer area because of a high heat
capacity, thermal conductivity, and potentially high density and low flammability.
Therminol LT is a fluid chosen for the demonstration. It is in fact a pure chemical, 1,2-diethylbenzene.
The data comes from therminol itself, in the following PDF.
https://web.archive.org/web/20210615044602/https://www.therminol.com/sites/therminol/files/documents/TF-
8726_Therminol_LT.pdf
[1]: from fluids.core import C2K, F2K
from fluids.constants import R
import numpy as np
from chemicals import rho_to_Vm, Vm_to_rho, property_mass_to_molar, omega_definition,␣
˓→simple_formula_parser, similarity_variable, molecular_weight
SurfaceTension)
name = '1,2-diethylbenzene'
CAS = "25340-17-4"
formula = "C10H14"
atoms = simple_formula_parser(formula)
sv = similarity_variable(atoms)
MW = molecular_weight(atoms)
Tc = 377.0 + 273.15
Pc = 34.5e5
rhoc_mass = 298.0 # kg/m^3
Vc = rho_to_Vm(rhoc_mass, MW)
Zc = Pc*Vc/(R*Tc)
(continues on next page)
1129
thermo Documentation, Release 0.2.24
Tm = C2K(-75.0)
Ts = [-73, -62, -51, -40, -29, -18, -7, 4, 16, 27, 38, 49, 60, 71, 82, 93, 104, 116, 127,
˓→ 138, 149, 160, 171, 181, 182, 193, 204, 216, 227, 238, 249, 260, 271, 282, 293, 304,␣
˓→316]
Psats = [ 0.002, 0.006, 0.016, 0.038, 0.084, 0.175, 0.345, 0.649, 1.17, 2.02, 3.37, 5.43,
˓→ 8.51, 13.0, 19.3, 28.1, 40.1, 56.1, 77.1, 101, 104, 139, 183, 237, 304, 386, 484, 601,
rhols_mass = [938, 930, 921, 913, 904, 896, 887, 878, 869, 860, 852, 843, 833, 824, 815,␣
˓→806, 796, 786, 776, 766, 756, 746, 735, 726, 724, 713, 702, 690, 678, 666, 652, 639,␣
Cpls_mass = [1.44, 1.48, 1.53, 1.57, 1.61, 1.66, 1.70, 1.74, 1.78, 1.83, 1.87, 1.91, 1.
˓→95, 1.99, 2.03, 2.07, 2.11, 2.15, 2.19, 2.23, 2.27, 2.30, 2.34, 2.38, 2.38, 2.42, 2.46,
˓→ 2.50, 2.54, 2.58, 2.63, 2.67, 2.72, 2.78, 2.84, 2.91, 3.01]
Cpgs_mass = [0.766, 0.813, 0.860, 0.908, 0.955, 1.002, 1.049, 1.095, 1.142, 1.188, 1.234,
˓→ 1.280, 1.325, 1.370, 1.415, 1.459, 1.503, 1.547, 1.590, 1.634, 1.676, 1.719, 1.761, 1.
˓→799, 1.803, 1.845, 1.886, 1.928, 1.970, 2.012, 2.055, 2.099, 2.144, 2.191, 2.241, 2.
˓→297, 2.362]
kls = [0.1426, 0.1405, 0.1384, 0.1362, 0.1341, 0.1320, 0.1298, 0.1277, 0.1255, 0.1233, 0.
˓→1212, 0.1190, 0.1168, 0.1146, 0.1124, 0.1102, 0.1080, 0.1058, 0.1036, 0.1013, 0.0991,␣
˓→0.0968, 0.0946, 0.0926, 0.0923, 0.0901, 0.0878, 0.0855, 0.0832, 0.0810, 0.0786, 0.0763,
muls = [10.09, 6.03, 3.99, 2.84, 2.13, 1.67, 1.35, 1.12, 0.947, 0.814, 0.708, 0.624, 0.
˓→554, 0.496, 0.447, 0.405, 0.369, 0.338, 0.310, 0.286, 0.265, 0.246, 0.229, 0.215, 0.
˓→213, 0.199, 0.187, 0.175, 0.165, 0.155, 0.146, 0.138, 0.131, 0.124, 0.117, 0.112, 0.
˓→106]
Hvaps_mass = [492.7, 485.2, 477.8, 470.4, 463.0, 455.7, 448.5, 441.3, 434.1, 427.0, 420.
˓→0, 412.9, 405.9, 399.0, 392.1, 385.2, 378.4, 371.6, 364.7, 357.9, 351.0, 344.1, 337.2,␣
(continues
˓→330.9, 330.1, 323.0, 315.7, 308.2, 300.5, 292.5, 284.3, 275.6, 266.4, 256.7, on next page)
246.2,␣
˓→234.7, 221.8]
kgs = [ 0.0051, 0.0057, 0.0063, 0.0069, 0.0075, 0.0082, 0.0088, 0.0095, 0.0101, 0.0108,␣
˓→0.0115, 0.0122, 0.0130, 0.0137, 0.0144, 0.0152, 0.0160, 0.0168, 0.0176, 0.0184, 0.0192,
˓→ 0.0200, 0.0209, 0.0216, 0.0217, 0.0226, 0.0235, 0.0244, 0.0253, 0.0262, 0.0272, 0.
mugs = [0.00434, 0.00458, 0.00482, 0.00506, 0.00530, 0.00554, 0.00578, 0.00603, 0.00628,␣
˓→0.00652, 0.00677, 0.00702, 0.00727, 0.00752, 0.00777, 0.00802, 0.00828, 0.00853, 0.
˓→00878, 0.00903, 0.00928, 0.00952, 0.00977, 0.01000, 0.01002, 0.01027, 0.01051, 0.01076,
prop_kwargs = {'Tc': Tc, 'Pc': Pc, 'Vc': Vc, 'Zc': Zc, 'omega': omega,
'MW': MW, 'Tb': Tb, 'Tm': Tm, 'CASRN': CAS}
prop_kwargs = {} # Comment this out to show the estimation method results
Now that the data has been added into Python objects, we can fit them to equations. The plots below show how good
the fits are.
VolLiqObj = VolumeLiquid(**prop_kwargs)
VolLiqObj.fit_add_model(Ts=Ts, data=Vms, model='DIPPR100', name=source)
CpLiqObj = HeatCapacityLiquid(**prop_kwargs)
CpLiqObj.fit_add_model(Ts=Ts, data=Cpls, model='DIPPR100', name=source)
CpGasObj = HeatCapacityGas(**prop_kwargs)
CpGasObj.fit_add_model(Ts=Ts, data=Cpgs, model='DIPPR100', name=source)
MuLiqObj = ViscosityLiquid(**prop_kwargs)
MuLiqObj.fit_add_model(Ts=Ts, data=muls, model='mu_TDE', name=source)
MuGasObj = ViscosityGas(**prop_kwargs)
MuGasObj.fit_add_model(Ts=Ts, data=mugs, model='DIPPR100', name=source)
KGasObj = ThermalConductivityGas(**prop_kwargs)
KGasObj.fit_add_model(Ts=Ts, data=kgs, model='DIPPR100', name=source)
KLiqObj = ThermalConductivityLiquid(**prop_kwargs)
KLiqObj.fit_add_model(Ts=Ts, data=kls, model='DIPPR100', name=source)
(continues on next page)
HvapObj = EnthalpyVaporization(**prop_kwargs)
HvapObj.fit_add_model(Ts=Ts, data=Hvaps, model_kwargs={'Tc': Tc}, model='PPDS12',␣
˓→name=source)
SigmaObj = SurfaceTension(**prop_kwargs)
SigmaObj.fit_add_model(Ts=sigma_Ts, data=sigmas, model_kwargs={'Tc': Tc}, model='linear',
˓→ name=source)
if plot:
PsatObj.plot_T_dependent_property(axes='semilogy', **plot_kwargs)
VolLiqObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
CpLiqObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
CpGasObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
MuLiqObj.plot_T_dependent_property(axes='semilogy', **plot_kwargs)
MuGasObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
KGasObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
KLiqObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
HvapObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
SigmaObj.plot_T_dependent_property(axes='plot', **plot_kwargs)
/home/caleb/.local/lib/python3.11/site-packages/scipy/optimize/_minpack_py.py:492:␣
˓→RuntimeWarning: Number of calls to function has reached maxfev = 500.
warnings.warn(errors[info][0], RuntimeWarning)
Vml_STPs=[Vml_STP], rhol_STPs_mass=[rhol_STPs_mass],
similarity_variables=[sv])
correlations = PropertyCorrelationsPackage(constants=constants, VaporPressures=[PsatObj],
˓→ VolumeLiquids=[VolLiqObj],
HeatCapacityLiquids=[CpLiqObj],␣
˓→HeatCapacityGases=[CpGasObj],
ViscosityLiquids=[MuLiqObj],␣
˓→ViscosityGases=[MuGasObj],
ThermalConductivityGases=[KGasObj],␣
˓→ThermalConductivityLiquids=[KLiqObj],
EnthalpyVaporizations=[HvapObj],␣
˓→SurfaceTensions=[SigmaObj])
Now that the ChemicalConstantsPackage and PropertyCorrelationsPackage have been created, we are ready to make
HeatCapacityGases=correlations.HeatCapacityGases, equilibrium_basis=
˓→'Psat')
gas = IdealGas(HeatCapacityGases=correlations.HeatCapacityGases)
flasher_ideal = FlashPureVLS(constants, correlations, gas=gas, liquids=[liquid],␣
˓→solids=[])
print(flasher_ideal.flash(T=300, P=1e5))
<EquilibriumState, T=300.0000, P=100000.0000, zs=[1.0], betas=[1.0], phases=[
˓→<GibbsExcessLiquid, T=300 K, P=100000 Pa>]>
Using a thermodynamically consistent model is much more challenging than directly predicting a property. Liquid
heat capacity, heat of vaporization, and density are all particularly challenging properties. The following plots show
the accuracy of the models.
[6]: Cpls_calc_PR = []
Cpls_calc_ideal = []
for T in Ts:
Cpls_calc_PR.append(flasher_PR.flash(T=T, VF=0).Cp())
Cpls_calc_ideal.append(flasher_ideal.flash(T=T, VF=0).Cp())
Hvaps_calc_PR = []
Hvaps_calc_ideal = []
for T in Ts:
Hvaps_calc_PR.append(flasher_PR.flash(T=T, VF=1).H() - flasher_PR.flash(T=T, VF=0).
˓→H())
Vl_calc_PR = []
Vl_calc_ideal = []
for T in Ts:
Vl_calc_PR.append(flasher_PR.flash(T=T, VF=0).V())
Vl_calc_ideal.append(flasher_ideal.flash(T=T, VF=0).V())
Finding the solution to multiphase equilibrium calculations is challenging and the topic of continuing research. Many
commercial packages offer users a great deal of confidence in their answers, but can they be trusted? Thermo can be
used to validate the results from other software or identify defects in them.
The following example uses a natural gas mixture two pseudocomponents C7-C16 and C17+. The properties of pure
components are taken from Thermo. To do a perfect comparison, the critical properties from other software packages
should be substituted into Thermo. This is example S3 from Fonseca-Pérez (2021). The kijs are from Harding and
Floudas (2000), and the original pseudocomponents are from Nagarajan, Cullick, and Griewank (1991).
Fonseca-Pérez, R. M., A. Bonilla-Petriciolet, J. C. Tapia-Picazo, and J. E. Jaime-Leal. “A Reconsideration on the
Resolution of Phase Stability Analysis Using Stochastic Global Optimization Methods: Proposal of a Reliable Set
of Benchmark Problems.” Fluid Phase Equilibria 548 (November 15, 2021): 113180. https://doi.org/10.1016/j.fluid.
2021.113180.
Harding, S. T., and C. A. Floudas. “Phase Stability with Cubic Equations of State: Global Optimization Approach.”
AIChE Journal 46, no. 7 (July 1, 2000): 1422–40. https://doi.org/10.1002/aic.690460715.
Nagarajan, N. R., A. S. Cullick, and A. Griewank. “New Strategy for Phase Equilibrium and Critical Point Calculations
by Thermodynamic Energy Analysis. Part I. Stability Analysis and Flash.” Fluid Phase Equilibria 62, no. 3 (January
1, 1991): 191–210. https://doi.org/10.1016/0378-3812(91)80010-S.
[1]: from thermo import *
from scipy.constants import atm
(continues on next page)
properties = PropertyCorrelationsPackage(constants=constants)
T = 353
P = 38500e3
zs = [0.7212, 0.09205, 0.04455, 0.03123, 0.01273, 0.01361, 0.07215, 0.01248]
Thermo is a general phase equilibrium engine, and if the user provides enough properties for the components, there is
no issue adding your own components. In this basic example below, a made-up extended gas analysis is used to specify
a gas consisting of the standard real components and three heavier fractions, C10+, C12+ and C15+.
A bare minimum of basic properties are estimated using the Kesler-Lee method (1976), and the estimated fraction
molecular weights are turned into atomic compositions. The heat capacities of each pseudocomponent is found with
the similarity variable concept of Lastovka and Shaw (2013) based on atomic composition.
This example ends with calculating a flash at 270 Kelvin and 1 bar.
[1]: from math import log, exp
import numpy as np
from scipy.constants import psi
from thermo import *
from chemicals import *
.. math::
T_c = 341.7 + 811.1SG + [0.4244 + 0.1174SG]T_b
+ \frac{[0.4669 - 3.26238SG]10^5}{T_b}
Parameters
----------
SG : float
Specific gravity of the fluid at 60 degrees Farenheight [-]
Tb : float
Boiling point the fluid [K]
Returns
-------
Tc : float
Estimated critical temperature [K]
Notes
-----
Model shows predictions for Tc, Pc, MW, and omega.
Original units in degrees Rankine.
Examples
--------
Example 2.2 from [2]_, but with K instead of R.
References
----------
.. [1] Kesler, M. G., and B. I. Lee. "Improve Prediction of Enthalpy of
(continues on next page)
.. math::
\ln(P_c) = 8.3634 - \frac{0.0566}{SG} - \left[0.24244 + \frac{2.2898}
{SG} + \frac{0.11857}{SG^2}\right]10^{-3}T_b
+ \left[1.4685 + \frac{3.648}{SG} + \frac{0.47227}{SG^2}\right]
10^{-7}T_b^2-\left[0.42019 + \frac{1.6977}{SG^2}\right]10^{-10}T_b^3
Parameters
----------
SG : float
Specific gravity of the fluid at 60 degrees Farenheight [-]
Tb : float
Boiling point the fluid [K]
Returns
-------
Pc : float
Estimated critical pressure [Pa]
Notes
-----
Model shows predictions for Tc, Pc, MW, and omega.
Original units in degrees Rankine and psi.
Examples
--------
Example 2.2 from [2]_, but with K instead of R and Pa instead of psi.
References
----------
.. [1] Kesler, M. G., and B. I. Lee. "Improve Prediction of Enthalpy of
Fractions." Hydrocarbon Processing (March 1976): 153-158.
.. [2] Ahmed, Tarek H. Equations of State and PVT Analysis: Applications
for Improved Reservoir Modeling. Gulf Pub., 2007.
'''
Tb = 9/5.*Tb # K to R
(continues on next page)
.. math::
MW = -12272.6 + 9486.4SG + [4.6523 - 3.3287SG]T_b + [1-0.77084SG
- 0.02058SG^2]\left[1.3437 - \frac{720.79}{T_b}\right]\frac{10^7}{T_b}
+ [1-0.80882SG + 0.02226SG^2][1.8828 - \frac{181.98}{T_b}]
\frac{10^{12}}{T_b^3}
Parameters
----------
SG : float
Specific gravity of the fluid at 60 degrees Farenheight [-]
Tb : float
Boiling point the fluid [K]
Returns
-------
MW : float
Estimated molecular weight [g/mol]
Notes
-----
Model shows predictions for Tc, Pc, MW, and omega.
Original units in degrees Rankine.
Examples
--------
Example 2.2 from [2]_, but with K instead of R and Pa instead of psi.
References
----------
.. [1] Kesler, M. G., and B. I. Lee. "Improve Prediction of Enthalpy of
Fractions." Hydrocarbon Processing (March 1976): 153-158.
.. [2] Ahmed, Tarek H. Equations of State and PVT Analysis: Applications
for Improved Reservoir Modeling. Gulf Pub., 2007.
'''
Tb = 9/5.*Tb # K to R
MW = (-12272.6 + 9486.4*SG + (4.6523 - 3.3287*SG)*Tb + (1.-0.77084*SG - 0.
˓→02058*SG**2)*
Otherwise:
.. math::
\omega = \frac{-\ln\frac{P_c}{14.7} - 5.92714 + \frac{6.09648}{T_{br}}
+ 1.28862\ln T_{br} - 0.169347T_{br}^6}{15.2518 - \frac{15.6875}{T_{br}}
- 13.4721\ln T_{br} + 0.43577T_{br}^6}
K = \frac{T_b^{1/3}}{SG}
T_{br} = \frac{T_b}{T_c}
Parameters
----------
SG : float
Specific gravity of the fluid at 60 degrees Farenheight [-]
Tb : float
Boiling point the fluid [K]
Tc : float, optional
Estimated critical temperature [K]
Pc : float, optional
Estimated critical pressure [Pa]
Returns
-------
omega : float
Acentric factor [-]
Notes
-----
Model shows predictions for Tc, Pc, MW, and omega.
Original units in degrees Rankine and psi.
Examples
--------
Example 2.2 from [2]_, but with K instead of R and Pa instead of psi.
[2]: # Basic composition and names. All pure component properties are obtained from Chemicals␣
˓→and Thermo.
pure_constants = ChemicalConstantsPackage.constants_from_IDs(
['water', 'hydrogen', 'helium', 'nitrogen', 'carbon dioxide', 'hydrogen sulfide',
˓→'methane',
# Using the estimation methods defined earlier, we obtain some critical properties
pseudo_Tcs = [Tc_Kesler_Lee_SG_Tb(SG, Tb) for SG, Tb in zip(pseudo_SGs, pseudo_Tbs)]
pseudo_Pcs = [Pc_Kesler_Lee_SG_Tb(SG, Tb) for SG, Tb in zip(pseudo_SGs, pseudo_Tbs)]
pseudo_MWs = [MW_Kesler_Lee_SG_Tb(SG, Tb) for SG, Tb in zip(pseudo_SGs, pseudo_Tbs)]
pseudo_omegas = [omega_Kesler_Lee_SG_Tb_Tc_Pc(SG, Tb) for SG, Tb in zip(pseudo_SGs,␣
˓→pseudo_Tbs)]
# The API SRK equation of state is used, but other cubic equations of state can be uesd␣
˓→instead
A common request is to obtain a large number of properties from Thermo at once. Thermo is not NumPy - it cannot
just automatically do all of the calculations in parallel.
If you have a specific property that does not require phase equilibrium calculations to obtain, it is possible to use
the chemicals.numba interface to in your own numba-accelerated code. https://chemicals.readthedocs.io/chemicals.
numba.html
For those cases where lots of flashes are needed, your best bet is to brute force it - use multiprocessing (and maybe a
beefy machine) to obtain the results faster. The following code sample uses joblib to facilitate the calculation. Note
that joblib won’t show any benefits on sub-second calculations. Also note that the threading backend of joblib will
not offer any performance improvements due to the CPython GIL.
[7]: # For small multiprocessing jobs, the slowest job can cause a significant delay
# For longer and larger jobs the full benefit of using all cores is shown better.
%timeit -r 1 -n 1 processed_data = Parallel(n_jobs=8, batch_size=30)(delayed(get_
˓→properties)(T, P) for T, P in zip(Ts_grid.flat, Ps_grid.flat))
[8]: # Joblib returns the data as a flat structure, but we can re-construct it into a grid
processed_data = Parallel(n_jobs=16, batch_size=30)(delayed(get_properties)(T, P) for T,␣
˓→P in zip(Ts_grid.flat, Ps_grid.flat))
ax.set_yscale('log')
ax.set_xlabel('Temperature [K]')
ax.set_ylabel('Pressure [Pa]')
plt.show()
8.5 Creating Nitrogen, oxygen, and nitrogen ternary air system phase
envelope
8.5. Creating Nitrogen, oxygen, and nitrogen ternary air system phase envelope 1155
thermo Documentation, Release 0.2.24
[3]: flasher.plot_ternary(T=120)
[4]: flasher.plot_ternary(P=1e5)
8.5. Creating Nitrogen, oxygen, and nitrogen ternary air system phase envelope 1157
thermo Documentation, Release 0.2.24
Note: Bubble and dew point calculations can be difficult to converge; not all systems will solve for all conditions.
Not all flash specifications have a unique solution. You are welcome to send these cases to the author but the
library is provided AS IS, with NO SUPPORT.
8.6 Creating Txy, Pxy, and xy diagrams for the binary water ethanol
system with Modified UNIFAC (Dortmund)
interaction_data=DOUFIP2016, subgroups=DOUFSG)
# Configure the liquid model with activity coefficients
liquid = GibbsExcessLiquid(
VaporPressures=properties.VaporPressures,
HeatCapacityGases=properties.HeatCapacityGases,
VolumeLiquids=properties.VolumeLiquids,
GibbsExcessModel=GE,
equilibrium_basis='Psat', caloric_basis='Psat',
T=T, P=P, zs=zs)
8.6. Creating Txy, Pxy, and xy diagrams for the binary water ethanol system with Modified UNIFAC
1159
(Dortmund)
thermo Documentation, Release 0.2.24
8.6. Creating Txy, Pxy, and xy diagrams for the binary water ethanol system with Modified UNIFAC
1161
(Dortmund)
thermo Documentation, Release 0.2.24
A stream of nitrogen is expanded from T1 = 300 K, P1 = 200 bar, to 1 bar by a throttling valve. An ideal throttling
valve has the conditions of being adiabatic (no heat loss, energy is conserved); and is either solved using a valve Cv to
solve for pressure or solved with the outlet pressure directly specified.
Calculate the outlet temperature using:
(1) A high precision (helmholtz fundamental) equation of state
(2) The Peng-Robinson equation of state
fluid = 'nitrogen'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 300.0
P1 = 200*bar
P2 = 1*bar
zs = [1]
[2]: # Thermo can use CoolProp to provide properties of one or all phases
# For pure species this is quite reliable within the temperature,
# pressure, etc. limits of the EOSs implemented by CoolProp
backend = 'HEOS'
gas = CoolPropGas(backend, fluid, T=T1, P=P1, zs=zs)
liquid = CoolPropLiquid(backend, fluid, T=T1, P=P1, zs=zs)
The outlet temperature anwsers given in the book are 269.19 K for the high-precision EOS, and for the PR EOS they
used a very low precision Cp of 1 J/(g*K) and obtained an outlet temperature of 283.05 K.
The book textbook cites this 14 K difference as coming from the cubic EOS’s lack of precision but the above calculation
shows that if an accurate heat capacity is used the difference is only ~ 4K.
A heat pump using the refrigerant R-22 operates with a mass flow rate of 100 kg/hr. The fluid enters the compressor
at T1 = 300 K and P1 = 1 bar. The compressor heat loss is neglected. The outlet pressure of the compressor is 5 bar.
If the isentropic efficiency of the compressor is 0.7 and the mechanical efficiency is 0.9, what is the power draw of the
compressor and how how is the refrigerant when it exits the compressor?
The textbook uses the Peng-Robinson EOS, so to compare, use that as well.
# To compute the actual power, itis more convinient to use the mass enthalpy
actual_power_per_kg = (state_2.H_mass() - state_1.H_mass())/(eta_mechanical) # W/kg
actual_power = actual_power_per_kg*100/hour
print(f'The actual power is {actual_power:.0f} W')
print(f'The actual outlet temperature is {state_2.T: .2f} K')
The actual power is 2252 W
The actual outlet temperature is 406.60 K
The power given in the textbook is 2257 W and 405.68 K out. No details as to the liquid heat capacity are given. As
refrigerants are well defined substances, it is recommended for anyone doing modeling with them to use a high-accuracy
model wherever possible.
What is the Joule-Thomson coefficient of nitrogen at 150 K and 10 atm? Use a) the Tsonopoulos virial method, and b)
the SRK equation of state.
8.9.1 Solution
This requires configuring both phase objects and calling the appropriate method only.
T = 150
P = 10*atm
print(f"The Joule Thomson coefficient of nitrogen for the virial prediction is {virial_
˓→gas.Joule_Thomson():g} K/Pa")
The Joule Thomson coefficient of nitrogen for the virial prediction is 9.48161e-06 K/Pa
print(f"The Joule Thomson coefficient of nitrogen for the SRK prediction is {gas.Joule_
˓→Thomson():g} K/Pa")
The Joule Thomson coefficient of nitrogen for the SRK prediction is 2.13403e-06 K/Pa
A stream of gaseous oxygen is compressed from 1 bar to 10 bar. The inlet temperature is 25 °C. Calculate the specific
work and the temperature of the outlet gas if the process as an isentropic efficiency of 1, using both the ideal gas law
and the SRK equation of state.
8.9. Problem 14.01 Joule-Thomson Coefficient of Nitrogen Using the Virial Equation and the SRK
1165
EOS
thermo Documentation, Release 0.2.24
8.10.1 Solution
This requires a PT and then a PS flash only. This problem is also good for contrasting simple engineering formulas for
compression vs. rigorous thermodynamics.
fluid = 'oxygen'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 298.15
P1 = 1*bar
P2 = 10*bar
[3]: # SRK
eos_kwargs = dict(Tcs=constants.Tcs, Pcs=constants.Pcs, omegas=constants.omegas)
liquid = CEOSLiquid(SRKMIX, HeatCapacityGases=correlations.HeatCapacityGases, eos_
˓→kwargs=eos_kwargs)
These calculations make use of the full power of the Thermo engine. It is also possible to use simpler calculations to
calculate, as shown below.
From these results, we can see that for small pressure increases, the ideal-gas and SRK equations work quite similarly.
There is also a very large difference in outlet temperature between the simplified equations given in many textbooks, and
the real isentropic calculations when a temperature-dependent heat capacity is used. Therefore, there are substantial
advantages to rigorous modeling, regardless of the complexity of the EOS for the gas phase.
A flow of 2000 kg/h liquid water at 25 °C and 1 bar is pumped to a pressure of 100 bar. The pump is “cooled”, so the
process is reversible and isothermal. What is the duty of the pump shaft, and the energy that must be removed from the
water being compressed?
8.11.1 Solution
We can use the high-accuracy IAPWS-95 implementation of the properties of water to easily and extremely accurately
calculate these values.
T1 = T2 = 25 + 273.15
P1 = 1*bar
(continues on next page)
8.11. Problem 14.03 Reversible and Isothermal Compression of Liquid Water 1167
thermo Documentation, Release 0.2.24
mass_flow = 2000/hour
mole_flow = property_molar_to_mass(mass_flow, MW=iapws_constants.MWs[0])
The above shows the numerical integral calculation. That is the correct formulation.
However, it can be a little unintuitive. We can contrast this with another calculation - a series of tiny isentropic com-
pression, then cooling steps.
[2]: cooling_duty = 0
compressing_duty = 0
increments = 30 # Number of increments
dP = (P2 - P1)/increments
old_state = entry
for i in range(increments):
P = P1+(i+1)*dP
old_state = new_cooled_state
8.12 Problem 14.04 Heat Effect Upon Mixing of Methane and Dode-
cane at Elevated Temperature and Pressure Using SRK
1600 kg/hr of methane is mixed with 170 kg/hr of dodecane. The inlet temperature of both streams is 160 °C, and each
enter at a pressure of 2 MPa. The mixing process is isobaric. What is the temperature of the combined stream? Use
the SRK EOS with no binary interaction parameters.
8.12.1 Solution
This is a straightforward calculation. The energy of both streams is combined; and the outlet pressure is known. The
calculation only requires calculating the inlet energy of both streams, adding it up, and finding the mole fractions of
the outlet.
P1 = P2 = 2e6
T1 = 160+273.15
ws = [1600, 170]
zs = ws_to_zs(ws=ws, MWs=constants.MWs)
8.12. Problem 14.04 Heat Effect Upon Mixing of Methane and Dodecane at Elevated Temperature
1169
and Pressure Using SRK
thermo Documentation, Release 0.2.24
Refrigerant R134a is compressed from a saturated vapor at 5 °C to an outlet pressure of 1 MPa. Calculate the power
of the compressor, using a high-precision EOS.
The mechanical efficiency is 0.95, and the isentropic efficiency 0.7; the mass flow rate is 3000 kg/hr.
8.13.1 Solution
This is straightforward.
fluid = 'R134a'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 5 + 273.15
VF1 = 1
P2 = 10*bar
zs = [1]
eta_isentropic = 0.7
eta_mechanical = 0.9
# To compute the actual power, itis more convinient to use the mass enthalpy
actual_power_per_kg = (state_2.H_mass() - state_1.H_mass())/(eta_mechanical) # W/kg
actual_power = actual_power_per_kg*3000/hour
print(f'The actual power is {actual_power:.0f} W')
print(f'The actual outlet temperature is {state_2.T: .2f} K')
The actual power is 28858 W
The actual outlet temperature is 324.80 K
8.14 Problem 14.06 Required Volume for a Gas Storage Tank for Am-
monia
50 m^3 of liquid ammonia is stored at the conditions 50 °C and 100 bar. The vessel fails, and the contents empties into
a backup containment vessel. The backup vessel has a maximum pressure of 10 bar. What volume must be vessel be
to not exceed this pressure?
8.14.1 Solution
This is straightforward; energy is conserved and a pressure is specified. Find the amount of ammonia in the original
vessel; find the molar volume of ammonia in the new vessel; and multiply that by the amount of ammonia.
Ammonia is a highly non-ideal fluid, so we use a high-precision EOS.
fluid = 'ammonia'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 50 + 273.15
P1 = 100*bar
P2 = 10*bar
zs = [1]
volume_1 = 50
backend = 'HEOS'
gas = CoolPropGas(backend, fluid, T=T1, P=1e5, zs=zs)
liquid = CoolPropLiquid(backend, fluid, T=T1, P=1e5, zs=zs)
volume_2 = moles*state_2.V()
print(f'The thermodynamically required secondary containment volume is {volume_2: .2f} m^
˓→3')
8.14. Problem 14.06 Required Volume for a Gas Storage Tank for Ammonia 1171
thermo Documentation, Release 0.2.24
Nitrogen at -104 °C and 250 bar flows through a valve to a pressure of 1 bar. What fraction of the stream becomes
liquid?
8.15.1 Solution
This is straightforward; energy is conserved and outlet presure is specified, making this a PH flash. This problem is
also an important application that can show the results of different equations of state and how important good thermo-
dynamics are.
We can compare many different EOSs with Thermo easily.
[1]: from thermo import *
from thermo.interaction_parameters import SPDB
fluid = 'nitrogen'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = -104 + 273.15
P1 = 240*1e5
zs = [1]
P2 = 1e5
[2]: flasher_objects = []
flasher_names = []
flasher_objects.append(high_precision)
flasher_names.append('High-Precision')
Ms = SPDB.get_parameter_vector(name='SRKTwu_PinaMartinez', CASs=constants.CASs,␣
˓→parameter='TwuSRKM')
Ns = SPDB.get_parameter_vector(name='SRKTwu_PinaMartinez', CASs=constants.CASs,␣
˓→parameter='TwuSRKN')
cs = SPDB.get_parameter_vector(name='SRKTwu_PinaMartinez', CASs=constants.CASs,␣
˓→parameter='TwuSRKc')
flasher_objects.append(eos_obj)
flasher_names.append(eos_name)
8.15. Problem 14.07 Liquid Nitrogen Production Via Volume Expansion of the Compressed Gas
1173
thermo Documentation, Release 0.2.24
As can be see, the equation of state used changes the results drastically. Even the best of the cubic equations of state
given results 30-50% off from the high-precision equation of state. This problem was admittedly constructed to show
off the importance of using higher precision models, but the point applies elsewhere also.
A stream of 1000 mol/hour CO2 and 1000 mol/hour O2 is compressed from 290 K and 1 bar to 5 bar. Calculate
the compression power for both adiabatic compression, and isothermal compression. The compression is reversible
(assumed) in each case - no efficiencies are necessary.
8.16.1 Solution
This is a straightforward calculation. Using Thermo, working with complicated mixtures can be about as easy as pure
components - if binary interaction parameters are zero. In this case, we try to load a parameter from a sample ChemSep
database, but no values are available.
The values in that database are just a sample - it is entirely the user’s responsibility to provide the correct data to
Thermo. If garbage is put in, garbage will come out!
The problem says to use the ideal-gas law, so we can do that too and see how the answers compare.
[1]: from scipy.constants import hour
T1 = 290
P1 = 1e5
P2 = 5e5
flow = 2000/hour # mol/s
Adiabatic compression
Isothermal Compression
This problem is more interesting, because there is the cooling duty as well as the compressing duty.
From theory, in an ideal gas, the cooling duty will be exactly equal to the compressing duty.
For a real-gas, it will be different as enthalpy is pressure-dependent.
In both cases, the evaluation of the following integral is required.
∫︁ 𝑃 2
duty = flow 𝑉 𝜕𝑃
𝑃1
8.16. Problem 14.08 Required Compressor Power for Isothermal and Adiabatic Compression of
1175
a
Gas Mixture (CO2, O2) Using the Ideal Gas Law
thermo Documentation, Release 0.2.24
The above shows the numerical integral calculation. That is the correct formulation.
However, it can be a little unintuitive. We can contrast this with another calculation - a series of tiny isentropic com-
pression, then cooling steps.
[4]: cooling_duty = 0
compressing_duty = 0
increments = 3 # Number of increments
dP = (P2 - P1)/increments
old_state = entry
for i in range(increments):
P = P1+(i+1)*dP
old_state = new_cooled_state
Ethylene is expanded from P1 = 3000 bar, T1 = 600 K to P2 = 300 bar by a first valve, and then to P3 = 1 bar by a
second valve. What are the temperatures T2 and T3? Neglect the velocity term in the solution.
8.17.1 Solution
This is straightforward - an initial PT flash calculation, followed by two separate PH flash calculations.
fluid = 'ethylene'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 600
P1 = 3000*bar
P2 = 300*bar
P3 = 1*bar
zs = [1]
In sub-atmospheric pressure distillation columns, a vacuum system removes entering air by removing a vapor stream,
usually near the top of the column. If air is not removed the pressure will continue to increase, as the air itself won’t
condense through the condenser (unless it is cryogenic). Air can also pose a fire hazard in some cases.
How will the leakage rate into the column change if the pressure of the column is lowered from 0.4 bar to 0.1 bar?
Assume the ambient pressure is 1.013 bar.
8.17. Problem 14.09 Temperature Change Upon Ethylene Expansion in Throttle Valves Using a1177
High Precision EOS
thermo Documentation, Release 0.2.24
8.18.1 Solution
Leaks into a column are usually around flanges, through valve or pump packings, inspection or sampling ports, or
manholes.
There are a variety of empirical correlations that can be used to estimate leakage depending on pressure. The first
answer uses one of those. These are not truly mechanistic, however.
We can also imagine a single hole, and treat the flow as through an orifice. This is the second answer.
We can also treat the hole as an isothermal compressible gas flow problem. The third answer uses that.
rho = 1.2
D = .8
H = 15
V = pi/4*D**2*H
m1 = vacuum_air_leakage_Seider(V=V, P=P1)*hour
m2 = vacuum_air_leakage_Seider(V=V, P=P2)*hour
m_ratio = m2/m1
print(f'Using an emperical correlation, the ratio of air increase is {m_ratio: .3f}.')
Using an emperical correlation, the ratio of air increase is 1.029.
m_ratio = m2/m1
print(f'Using a flow meter correlation, the ratio of air increase is {m_ratio: .3f}.')
Using a flow meter correlation, the ratio of air increase is 1.031.
Using isothermal compressible gas flow, the ratio of air increase is 1.081.
500 kg of propylene is contained in a 1 m^3 vessel stored at 30 °C. The vessel is heated - from solar radiation in the
problem statement. What is the initial pressure?
The safety valve of the tank activates at 60 bar. If the cooling system is disabled, what temperature will the contents of
the vessel be when the valve actuates?
8.19.1 Solution
This is straightforward - an initial solution with total volume, mass, and temperature specified, followed by solving for
the end temperature to obtain a specified pressure.
From experience the vessel is known to be liquid. Because of that, we can skip the flash calculations and work directly
with the liquid phase object. That is normally much faster than the flash calculations.
fluid = 'propylene'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 30 + 273.15
P2 = 60*bar
zs = [1]
V_total = 1 # m^3
m = 500 # kg
backend = 'HEOS'
gas = CoolPropGas(backend, fluid, T=T1, P=1e5, zs=zs)
liquid = CoolPropLiquid(backend, fluid, T=T1, P=1e5, zs=zs)
# We know the phase is liquid, so we can skip the flash and solve for the liquid at this␣
˓→state
8.19. Problem 14.11 Pressure Rise In a Storage Tank Upon Heating 1179
thermo Documentation, Release 0.2.24
A stream of oxygen is compressed by a compressor from a pressure P1 = 1 bar to P2 = 10 bar. The flow rate of the
oxygen stream is 250 kg/h and the temperature is 25°C.
What is the power of the compressor, and the outlet temperature of the gas?
8.20.1 Solution
fluid = 'oxygen'
constants, correlations = ChemicalConstantsPackage.from_IDs([fluid])
T1 = 25 + 273.15
P1 = 1*bar
P2 = 10*bar
zs = [1]
eta_isentropic = 0.75
eta_mechanical = 0.95
# To compute the actual power, itis more convinient to use the mass enthalpy
actual_power_per_kg = (state_2.H_mass() - state_1.H_mass())/(eta_mechanical) # W/kg
(continues on next page)
# To compute the actual power, itis more convinient to use the mass enthalpy
actual_power_per_kg = (state_2.H_mass() - state_1.H_mass())/(eta_mechanical) # W/kg
actual_power = actual_power_per_kg*250/hour
print('With the ideal EOS:')
print(f'The actual power is {actual_power:.0f} W')
print(f'The actual outlet temperature is {state_2.T: .2f} K')
With the ideal EOS:
The actual power is 24341 W
The actual outlet temperature is 643.68 K
A thermodynamic cycle with water as the working fluid consists of the following steps:
• Constant-pressure heating to P1 = 100 bar and T1 = 350 °C
• Isentropic expansion of the gas in a turbine to P2 = 1 bar (reversible; efficiency = 100%)
• Constant pressure condensation
• Isentropic compression of the liquid to P4 = 100 bar
What is the thermal efficiency of the process?
𝑃12 + 𝑃34
𝜂𝑡ℎ = −
𝑄41
8.21. Problem 14.13 Thermodynamic Cycle Calculation Using a High-Precision EOS 1181
thermo Documentation, Release 0.2.24
8.21.1 Solution
T1 = 350 + 273.15
P1 = 100*1e5
P2 = 1e5
# Entropy conserved in step 2 as well
VF3 = 0
P3 = P2
P4 = P1
# entropy conserved in step 5 as well
[3]: # Not quite sure what definition is being suggested by the textbook
eta_th = -expander_duty/heating_duty
print(f'The thermal efficiency is {eta_th*100:.2f} %')
The thermal efficiency is 31.08 %
A refrigerator uses the refrigerant R-12, dichlorodifluoromethane. The steps and conditions of the cycle are as follows:
• Isobaric condensation to saturation temperature 30°C
• Adiabatic let-down to P2 = 20 degrees subcooling
• Isobaric evaporation to saturation temperature of 20 °C
• Isentropic compression to P4 = 30 °C
Use the Peng-Robinson EOS.
8.22.1 Solution
This is quite straightforward, with the only complication coming from the degrees of subcooling.
zs = [1]
T1 = 273.15+30
state_1 = flasher.flash(VF=0, T=T1)
saturation_state_1 = flasher.flash(T=-20+273.15, VF=1)
# Wording is unclear for state 2 but thermodynamically his is what makes sense
state_2 = flasher.flash(H=state_1.H(), P=saturation_state_1.P)
# Check the flash lowers the pressure
assert state_2.P < state_1.P
state_3 = flasher.flash(P=state_2.P, VF=1)
saturation_state_2 = flasher.flash(T=30+273.15, VF=1)
state_4 = flasher.flash(P=saturation_state_2.P, S=state_3.S())
states = [state_1, state_2, state_3, state_4]
8.22. Problem 14.14 Refrigeration Cycle Calculation Using the Peng-Robinson EOS 1183
thermo Documentation, Release 0.2.24
Calculate the Joule-Thomson coefficient of methane at 300 K and 30 bar, using the Peng Robinson model.
8.23.1 Solution
This is straightforward.
T = 300
P = 30*bar
zs = [1]
8.24 Problem 14.16 Compressor Duty and State Properties after Am-
monia Compression
Ammonia at 100 °C and 5 bar is compressed to a pressure of 10 bar. The thermal efficiency of the process is 0.8; and
the mechanical efficiency is 0.9. What is the compressor duty per mole and the temperature of the outlet?
8.24.1 Solution
T1 = 100 + 273.15
P1 = 5*bar
P2 = 10*bar
zs = [1]
eta_isentropic = 0.8
eta_mechanical = 0.9
8.24. Problem 14.16 Compressor Duty and State Properties after Ammonia Compression 1185
thermo Documentation, Release 0.2.24
NINE
INSTALLATION
1187
thermo Documentation, Release 0.2.24
TEN
1189
thermo Documentation, Release 0.2.24
ELEVEN
BUG REPORTS
1191
thermo Documentation, Release 0.2.24
TWELVE
LICENSE INFORMATION
See LICENSE.txt for information on the terms & conditions for usage of this software, and a DISCLAIMER OF ALL
WARRANTIES.
Although not required by the Thermo license, if it is convenient for you, please cite Thermo if used in your work. Please
also consider contributing any changes you make back, and benefit the community.
1193
thermo Documentation, Release 0.2.24
THIRTEEN
CITATION
Caleb Bell and Contributors (2016-2023). Thermo: Chemical properties component of␣
˓→Chemical Engineering Design Library (ChEDL)
https://github.com/CalebBell/thermo.
1195
thermo Documentation, Release 0.2.24
FOURTEEN
• genindex
• modindex
• search
1197
thermo Documentation, Release 0.2.24
1199
thermo Documentation, Release 0.2.24
[1] Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Den-
sity and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60.
doi:10.1021/je8008123
[1] Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Den-
sity and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60.
doi:10.1021/je8008123
[1] Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Den-
sity and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60.
doi:10.1021/je8008123
[1] Magomedov, U. B. “The Thermal Conductivity of Binary and Multicomponent Aqueous Solutions of In-
organic Substances at High Parameters of State.” High Temperature 39, no. 2 (March 1, 2001): 221-26.
doi:10.1023/A:1017518731726.
[1] Magomedov, U. B. “The Thermal Conductivity of Binary and Multicomponent Aqueous Solutions of In-
organic Substances at High Parameters of State.” High Temperature 39, no. 2 (March 1, 2001): 221-26.
doi:10.1023/A:1017518731726.
[1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics, 95E. Boca Raton,
FL: CRC press, 2014.
[1] McCleskey, R. Blaine. “Electrical Conductivity of Electrolytes Found In Natural Waters from (5 to 90) °C.”
Journal of Chemical & Engineering Data 56, no. 2 (February 10, 2011): 317-27. doi:10.1021/je101012n.
[1] Chen, Chau-Chyun, H. I. Britt, J. F. Boston, and L. B. Evans. “Local Composition Model for Excess Gibbs En-
ergy of Electrolyte Systems. Part I: Single Solvent, Single Completely Dissociated Electrolyte Systems.” AIChE
Journal 28, no. 4 (July 1, 1982): 588-96. doi:10.1002/aic.690280410
[2] Gmehling, Jurgen. Chemical Thermodynamics: For Process Simulation. Weinheim, Germany: Wiley-VCH,
2012.
[1] Speight, James. Lange’s Handbook of Chemistry. 16 edition. McGraw-Hill Professional, 2005.
[1] Arcis, Hugues, Jane P. Ferguson, Jenny S. Cox, and Peter R. Tremaine. “The Ionization Constant of Water at Ele-
vated Temperatures and Pressures: New Data from Direct Conductivity Measurements and Revised Formulations
from T = 273 K to 674 K and p = 0.1 MPa to 31 MPa.” Journal of Physical and Chemical Reference Data 49, no.
3 (July 23, 2020): 033103. https://doi.org/10.1063/1.5127662.
[1] Bandura, Andrei V., and Serguei N. Lvov. “The Ionization Constant of Water over Wide Ranges of Tem-
perature and Density.” Journal of Physical and Chemical Reference Data 35, no. 1 (March 1, 2006): 15-30.
doi:10.1063/1.1928231
[1] Bandura, Andrei V., and Serguei N. Lvov. “The Ionization Constant of Water over Wide Ranges of Tem-
perature and Density.” Journal of Physical and Chemical Reference Data 35, no. 1 (March 1, 2006): 15-30.
doi:10.1063/1.1928231
[1] Marshall, William L., and E. U. Franck. “Ion Product of Water Substance, 0-1000 degree C, 1010,000 Bars New
International Formulation and Its Background.” Journal of Physical and Chemical Reference Data 10, no. 2 (April
1, 1981): 295-304. doi:10.1063/1.555643.
[1] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
[1] Soave, G. “Direct Calculation of Pure-Compound Vapour Pressures through Cubic Equations of State.” Fluid
Phase Equilibria 31, no. 2 (January 1, 1986): 203-7. doi:10.1016/0378-3812(86)90013-0.
[1] Thorade, Matthis, and Ali Saadat. “Partial Derivatives of Thermodynamic State Properties for Dynamic Simula-
tion.” Environmental Earth Sciences 70, no. 8 (April 10, 2013): 3497-3503. doi:10.1007/s12665-013-2394-z.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
1200 Bibliography
thermo Documentation, Release 0.2.24
[1] Johansson, Fredrik. Mpmath: A Python Library for Arbitrary-Precision Floating-Point Arithmetic, 2010.
[1] Peng, Ding-Yu, and Donald B. Robinson. “A New Two-Constant Equation of State.” Industrial & Engineering
Chemistry Fundamentals 15, no. 1 (February 1, 1976): 59-64. doi:10.1021/i160057a011.
[2] Robinson, Donald B., Ding-Yu Peng, and Samuel Y-K Chung. “The Development of the Peng - Robinson Equation
and Its Application to Phase Equilibrium in a System Containing Methanol.” Fluid Phase Equilibria 24, no. 1
(January 1, 1985): 25-41. doi:10.1016/0378-3812(85)87035-7.
[3] Privat, R., and J.-N. Jaubert. “PPR78, a Thermodynamic Model for the Prediction of Petroleum Fluid-Phase
Behaviour,” 11. EDP Sciences, 2011. doi:10.1051/jeep/201100011.
[1] Robinson, Donald B, and Ding-Yu Peng. The Characterization of the Heptanes and Heavier Fractions for the GPA
Peng-Robinson Programs. Tulsa, Okla.: Gas Processors Association, 1978.
[2] Robinson, Donald B., Ding-Yu Peng, and Samuel Y-K Chung. “The Development of the Peng - Robinson Equation
and Its Application to Phase Equilibrium in a System Containing Methanol.” Fluid Phase Equilibria 24, no. 1
(January 1, 1985): 25-41. doi:10.1016/0378-3812(85)87035-7.
[1] Stryjek, R., and J. H. Vera. “PRSV: An Improved Peng-Robinson Equation of State for Pure Com-
pounds and Mixtures.” The Canadian Journal of Chemical Engineering 64, no. 2 (April 1, 1986): 323-33.
doi:10.1002/cjce.5450640224.
[2] Stryjek, R., and J. H. Vera. “PRSV - An Improved Peng-Robinson Equation of State with New Mixing Rules for
Strongly Nonideal Mixtures.” The Canadian Journal of Chemical Engineering 64, no. 2 (April 1, 1986): 334-40.
doi:10.1002/cjce.5450640225.
[3] Stryjek, R., and J. H. Vera. “Vapor-liquid Equilibrium of Hydrochloric Acid Solutions with the PRSV Equation
of State.” Fluid Phase Equilibria 25, no. 3 (January 1, 1986): 279-90. doi:10.1016/0378-3812(86)80004-8.
[4] Proust, P., and J. H. Vera. “PRSV: The Stryjek-Vera Modification of the Peng-Robinson Equation of State. Pa-
rameters for Other Pure Compounds of Industrial Interest.” The Canadian Journal of Chemical Engineering 67,
no. 1 (February 1, 1989): 170-73. doi:10.1002/cjce.5450670125.
[1] Stryjek, R., and J. H. Vera. “PRSV2: A Cubic Equation of State for Accurate Vapor-liquid Equilib-
ria Calculations.” The Canadian Journal of Chemical Engineering 64, no. 5 (October 1, 1986): 820-26.
doi:10.1002/cjce.5450640516.
[1] Twu, Chorng H., John E. Coon, and John R. Cunningham. “A New Generalized Alpha Function for a Cubic
Equation of State Part 1. Peng-Robinson Equation.” Fluid Phase Equilibria 105, no. 1 (March 15, 1995): 49-59.
doi:10.1016/0378-3812(94)02601-V.
[1] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Twu, Chorng H., David Bluck, John R. Cunningham, and John E. Coon. “A Cubic Equation of State with a New Al-
pha Function and a New Mixing Rule.” Fluid Phase Equilibria 69 (December 10, 1991): 33-50. doi:10.1016/0378-
3812(91)90024-2.
[1] Le Guennec, Yohann, Romain Privat, and Jean-Noël Jaubert. “Development of the Translated-Consistent Tc-PR
and Tc-RK Cubic Equations of State for a Safe and Accurate Prediction of Volumetric, Energetic and Saturation
Properties of Pure Compounds in the Sub- and Super-Critical Domains.” Fluid Phase Equilibria 429 (December
15, 2016): 301-12. https://doi.org/10.1016/j.fluid.2016.09.003.
[1] Pina-Martinez, Andrés, Romain Privat, Jean-Noël Jaubert, and Ding-Yu Peng. “Updated Versions of the Gen-
eralized Soave -Function Suitable for the Redlich-Kwong and Peng-Robinson Equations of State.” Fluid Phase
Equilibria, December 7, 2018. https://doi.org/10.1016/j.fluid.2018.12.007.
[1] Soave, Giorgio. “Equilibrium Constants from a Modified Redlich-Kwong Equation of State.” Chemical Engineer-
ing Science 27, no. 6 (June 1972): 1197-1203. doi:10.1016/0009-2509(72)80096-4.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
Bibliography 1201
thermo Documentation, Release 0.2.24
1202 Bibliography
thermo Documentation, Release 0.2.24
[2] Robinson, Donald B., Ding-Yu Peng, and Samuel Y-K Chung. “The Development of the Peng - Robinson Equation
and Its Application to Phase Equilibrium in a System Containing Methanol.” Fluid Phase Equilibria 24, no. 1
(January 1, 1985): 25-41. doi:10.1016/0378-3812(85)87035-7.
[1] Chang, Yih-Bor. “Development and Application of an Equation of State Compositional Simulator” 1990. https:
//repositories.lib.utexas.edu/handle/2152/80585.
[1] Peng, Ding-Yu, and Donald B. Robinson. “A New Two-Constant Equation of State.” Industrial & Engineering
Chemistry Fundamentals 15, no. 1 (February 1, 1976): 59-64. doi:10.1021/i160057a011.
[2] Robinson, Donald B., Ding-Yu Peng, and Samuel Y-K Chung. “The Development of the Peng - Robinson Equation
and Its Application to Phase Equilibrium in a System Containing Methanol.” Fluid Phase Equilibria 24, no. 1
(January 1, 1985): 25-41. doi:10.1016/0378-3812(85)87035-7.
[1] Stryjek, R., and J. H. Vera. “PRSV: An Improved Peng-Robinson Equation of State for Pure Com-
pounds and Mixtures.” The Canadian Journal of Chemical Engineering 64, no. 2 (April 1, 1986): 323-33.
doi:10.1002/cjce.5450640224.
[2] Stryjek, R., and J. H. Vera. “PRSV - An Improved Peng-Robinson Equation of State with New Mixing Rules for
Strongly Nonideal Mixtures.” The Canadian Journal of Chemical Engineering 64, no. 2 (April 1, 1986): 334-40.
doi:10.1002/cjce.5450640225.
[3] Stryjek, R., and J. H. Vera. “Vapor-liquid Equilibrium of Hydrochloric Acid Solutions with the PRSV Equation
of State.” Fluid Phase Equilibria 25, no. 3 (January 1, 1986): 279-90. doi:10.1016/0378-3812(86)80004-8.
[4] Proust, P., and J. H. Vera. “PRSV: The Stryjek-Vera Modification of the Peng-Robinson Equation of State. Pa-
rameters for Other Pure Compounds of Industrial Interest.” The Canadian Journal of Chemical Engineering 67,
no. 1 (February 1, 1989): 170-73. doi:10.1002/cjce.5450670125.
[1] Stryjek, R., and J. H. Vera. “PRSV2: A Cubic Equation of State for Accurate Vapor-liquid Equilib-
ria Calculations.” The Canadian Journal of Chemical Engineering 64, no. 5 (October 1, 1986): 820-26.
doi:10.1002/cjce.5450640516.
[1] Twu, Chorng H., John E. Coon, and John R. Cunningham. “A New Generalized Alpha Function for a Cubic
Equation of State Part 1. Peng-Robinson Equation.” Fluid Phase Equilibria 105, no. 1 (March 15, 1995): 49-59.
doi:10.1016/0378-3812(94)02601-V.
[1] Peng, Ding-Yu, and Donald B. Robinson. “A New Two-Constant Equation of State.” Industrial & Engineering
Chemistry Fundamentals 15, no. 1 (February 1, 1976): 59-64. doi:10.1021/i160057a011.
[2] Robinson, Donald B., Ding-Yu Peng, and Samuel Y-K Chung. “The Development of the Peng - Robinson Equation
and Its Application to Phase Equilibrium in a System Containing Methanol.” Fluid Phase Equilibria 24, no. 1
(January 1, 1985): 25-41. doi:10.1016/0378-3812(85)87035-7.
[1] Le Guennec, Yohann, Romain Privat, and Jean-Noël Jaubert. “Development of the Translated-Consistent Tc-PR
and Tc-RK Cubic Equations of State for a Safe and Accurate Prediction of Volumetric, Energetic and Saturation
Properties of Pure Compounds in the Sub- and Super-Critical Domains.” Fluid Phase Equilibria 429 (December
15, 2016): 301-12. https://doi.org/10.1016/j.fluid.2016.09.003.
[1] Pina-Martinez, Andrés, Romain Privat, Jean-Noël Jaubert, and Ding-Yu Peng. “Updated Versions of the Gen-
eralized Soave -Function Suitable for the Redlich-Kwong and Peng-Robinson Equations of State.” Fluid Phase
Equilibria, December 7, 2018. https://doi.org/10.1016/j.fluid.2018.12.007.
[1] Soave, Giorgio. “Equilibrium Constants from a Modified Redlich-Kwong Equation of State.” Chemical Engineer-
ing Science 27, no. 6 (June 1972): 1197-1203. doi:10.1016/0009-2509(72)80096-4.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
Bibliography 1203
thermo Documentation, Release 0.2.24
[1] Twu, Chorng H., John E. Coon, and John R. Cunningham. “A New Generalized Alpha Function for a Cubic
Equation of State Part 2. Redlich-Kwong Equation.” Fluid Phase Equilibria 105, no. 1 (March 15, 1995): 61-69.
doi:10.1016/0378-3812(94)02602-W.
[1] API Technical Data Book: General Properties & Characterization. American Petroleum Institute, 7E, 2005.
[1] Le Guennec, Yohann, Romain Privat, and Jean-Noël Jaubert. “Development of the Translated-Consistent Tc-PR
and Tc-RK Cubic Equations of State for a Safe and Accurate Prediction of Volumetric, Energetic and Saturation
Properties of Pure Compounds in the Sub- and Super-Critical Domains.” Fluid Phase Equilibria 429 (December
15, 2016): 301-12. https://doi.org/10.1016/j.fluid.2016.09.003.
[1] Soave, G. “Rigorous and Simplified Procedures for Determining the Pure-Component Parameters in the
Redlich—Kwong—Soave Equation of State.” Chemical Engineering Science 35, no. 8 (January 1, 1980): 1725-
30. https://doi.org/10.1016/0009-2509(80)85007-X.
[2] Sandarusi, Jamal A., Arthur J. Kidnay, and Victor F. Yesavage. “Compilation of Parameters for a Polar Fluid
Soave-Redlich-Kwong Equation of State.” Industrial & Engineering Chemistry Process Design and Development
25, no. 4 (October 1, 1986): 957-63. https://doi.org/10.1021/i200035a020.
[3] Valderrama, Jose O., Héctor De la Puente, and Ahmed A. Ibrahim. “Generalization of a Polar-Fluid Soave-
Redlich-Kwong Equation of State.” Fluid Phase Equilibria 93 (February 11, 1994): 377-83. https://doi.org/10.
1016/0378-3812(94)87021-7.
[1] Holderbaum, T., and J. Gmehling. “PSRK: A Group Contribution Equation of State Based on UNIFAC.” Fluid
Phase Equilibria 70, no. 2-3 (December 30, 1991): 251-65. https://doi.org/10.1016/0378-3812(91)85038-V.
[1] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
[1] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Walas, Stanley M. Phase Equilibria in Chemical Engineering. Butterworth-Heinemann, 1985.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E. Properties of Gases and Liquids. McGraw-Hill Companies,
1987.
[1] Zhi, Yun, and Huen Lee. “Fallibility of Analytic Roots of Cubic Equations of State in Low Temperature Re-
gion.” Fluid Phase Equilibria 201, no. 2 (September 30, 2002): 287-94. https://doi.org/10.1016/S0378-3812(02)
00072-9.
[1] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E. Properties of Gases and Liquids. McGraw-Hill Companies,
1987.
[1] Johansson, Fredrik. Mpmath: A Python Library for Arbitrary-Precision Floating-Point Arithmetic, 2010.
[1] Meurer, Aaron, Christopher P. Smith, Mateusz Paprocki, Ondřej Čertík, Sergey B. Kirpichev, Matthew Rocklin,
AMiT Kumar, Sergiu Ivanov, Jason K. Moore, and Sartaj Singh. “SymPy: Symbolic Computing in Python.” PeerJ
Computer Science 3 (2017): e103.
[1] Almeida, G. S., M. Aznar, and A. S. Telles. “Uma Nova Forma de Dependência Com a Temperatura Do Termo
Atrativo de Equações de Estado Cúbicas.” RBE, Rev. Bras. Eng., Cad. Eng. Quim 8 (1991): 95.
[1] Androulakis, I. P., N. S. Kalospiros, and D. P. Tassios. “Thermophysical Properties of Pure Polar and Nonpolar
Compounds with a Modified VdW-711 Equation of State.” Fluid Phase Equilibria 45, no. 2 (April 1, 1989):
135-63. doi:10.1016/0378-3812(89)80254-7.
1204 Bibliography
thermo Documentation, Release 0.2.24
[1] Chen, Zehua, and Daoyong Yang. “Optimization of the Reduced Temperature Associated with Peng–Robinson
Equation of State and Soave-Redlich-Kwong Equation of State To Improve Vapor Pressure Prediction
for Heavy Hydrocarbon Compounds.” Journal of Chemical & Engineering Data, August 31, 2017.
doi:10.1021/acs.jced.7b00496.
[1] Coquelet, C., A. Chapoy, and D. Richon. “Development of a New Alpha Function for the Peng–Robinson
Equation of State: Comparative Study of Alpha Function Models for Pure Gases (Natural Gas Compo-
nents) and Water-Gas Systems.” International Journal of Thermophysics 25, no. 1 (January 1, 2004): 133-58.
doi:10.1023/B:IJOT.0000022331.46865.2f.
[1] Gasem, K. A. M, W Gao, Z Pan, and R. L Robinson Jr. “A Modified Temperature Dependence for the Peng-
Robinson Equation of State.” Fluid Phase Equilibria 181, no. 1–2 (May 25, 2001): 113-25. doi:10.1016/S0378-
3812(01)00488-5.
[1] Gibbons, Richard M., and Andrew P. Laughton. “An Equation of State for Polar and Non-Polar Substances and
Mixtures” 80, no. 9 (January 1, 1984): 1019-38. doi:10.1039/F29848001019.
[1] Haghtalab, A., M. J. Kamali, S. H. Mazloumi, and P. Mahmoodi. “A New Three-Parameter Cubic Equation of
State for Calculation Physical Properties and Vapor-liquid Equilibria.” Fluid Phase Equilibria 293, no. 2 (June 25,
2010): 209-18. doi:10.1016/j.fluid.2010.03.029.
[1] Harmens, A., and H. Knapp. “Three-Parameter Cubic Equation of State for Normal Substances.” Industrial &
Engineering Chemistry Fundamentals 19, no. 3 (August 1, 1980): 291-94. doi:10.1021/i160075a010.
[1] Heyen, G. Liquid and Vapor Properties from a Cubic Equation of State. In “Proceedings of the 2nd International
Conference on Phase Equilibria and Fluid Properties in the Chemical Industry”. DECHEMA: Frankfurt, 1980; p
9-13.
[1] Mathias, Paul M. “A Versatile Phase Equilibrium Equation of State.” Industrial & Engineering Chemistry Process
Design and Development 22, no. 3 (July 1, 1983): 385-91. doi:10.1021/i200022a008.
[1] Mathias, Paul M., and Thomas W. Copeman. “Extension of the Peng-Robinson Equation of State to Complex Mix-
tures: Evaluation of the Various Forms of the Local Composition Concept.” Fluid Phase Equilibria 13 (January
1, 1983): 91-108. doi:10.1016/0378-3812(83)80084-3.
[1] Mathias, Paul M., and Thomas W. Copeman. “Extension of the Peng-Robinson Equation of State to Complex Mix-
tures: Evaluation of the Various Forms of the Local Composition Concept.” Fluid Phase Equilibria 13 (January
1, 1983): 91-108. doi:10.1016/0378-3812(83)80084-3.
[1] Melhem, Georges A., Riju Saini, and Bernard M. Goodwin. “A Modified Peng-Robinson Equation of State.” Fluid
Phase Equilibria 47, no. 2 (August 1, 1989): 189-237. doi:10.1016/0378-3812(89)80176-1.
[1] Saffari, Hamid, and Alireza Zahedi. “A New Alpha-Function for the Peng-Robinson Equation of State: Ap-
plication to Natural Gas.” Chinese Journal of Chemical Engineering 21, no. 10 (October 1, 2013): 1155-61.
doi:10.1016/S1004-9541(13)60581-9.
[1] J. Schwartzentruber, H. Renon, and S. Watanasiri, “K-values for Non-Ideal Systems:An Easier Way,” Chem. Eng.,
March 1990, 118-124.
[1] Soave, Giorgio. “Equilibrium Constants from a Modified Redlich- Kwong Equation of State.” Chemical Engi-
neering Science 27, no. 6 (June 1972): 1197-1203. doi:10.1016/0009-2509(72)80096-4.
[2] Young, André F., Fernando L. P. Pessoa, and Victor R. R. Ahón. “Comparison of 20 Alpha Functions Applied
in the Peng–Robinson Equation of State for Vapor Pressure Estimation.” Industrial & Engineering Chemistry
Research 55, no. 22 (June 8, 2016): 6506-16. doi:10.1021/acs.iecr.6b00721.
[1] Soave, G. “Improvement of the Van Der Waals Equation of State.” Chemical Engineering Science 39, no. 2
(January 1, 1984): 357-69. doi:10.1016/0009-2509(84)80034-2.
[1] Soave, G. “Rigorous and Simplified Procedures for Determining the Pure-Component Parameters in the
Redlich—Kwong—Soave Equation of State.” Chemical Engineering Science 35, no. 8 (January 1, 1980): 1725-
30. https://doi.org/10.1016/0009-2509(80)85007-X.
Bibliography 1205
thermo Documentation, Release 0.2.24
[1] Soave, G. “Improving the Treatment of Heavy Hydrocarbons by the SRK EOS.” Fluid Phase Equilibria 84 (April
1, 1993): 339-42. doi:10.1016/0378-3812(93)85131-5.
[1] Trebble, M. A., and P. R. Bishnoi. “Development of a New Four- Parameter Cubic Equation of State.” Fluid Phase
Equilibria 35, no. 1 (September 1, 1987): 1-18. doi:10.1016/0378-3812(87)80001-8.
[1] Twu, Chorng H., David Bluck, John R. Cunningham, and John E. Coon. “A Cubic Equation of State with a New Al-
pha Function and a New Mixing Rule.” Fluid Phase Equilibria 69 (December 10, 1991): 33-50. doi:10.1016/0378-
3812(91)90024-2.
[1] Yu, Jin-Min, and Benjamin C. -Y. Lu. “A Three-Parameter Cubic Equation of State for Asymmetric Mixture Den-
sity Calculations.” Fluid Phase Equilibria 34, no. 1 (January 1, 1987): 1-19. doi:10.1016/0378-3812(87)85047-1.
[1] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[2] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Michelsen, Michael L., and Jørgen M. Mollerup. Thermodynamic Models: Fundamentals & Computational As-
pects. Tie-Line Publications, 2007.
[2] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[3] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Michelsen, Michael L., and Jørgen M. Mollerup. Thermodynamic Models: Fundamentals & Computational As-
pects. Tie-Line Publications, 2007.
[2] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[3] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Tsonopoulos, C., and J. L. Heidman. “From the Virial to the Cubic Equation of State.” Fluid Phase Equilibria 57,
no. 3 (1990): 261-76. doi:10.1016/0378-3812(90)85126-U
[2] Tsonopoulos, Constantine, and John H. Dymond. “Second Virial Coefficients of Normal Alkanes, Linear 1-
Alkanols (and Water), Alkyl Ethers, and Their Mixtures.” Fluid Phase Equilibria, International Workshop on
Vapour-Liquid Equilibria and Related Properties in Binary and Ternary Mixtures of Ethers, Alkanes and Alka-
nols, 133, no. 1-2 (June 1997): 11-34. doi:10.1016/S0378-3812(97)00058-7.
[1] Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and
Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[4] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[5] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[6] Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.
18434/T4M88Q
[1] Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds in the Gas State, Volume II: V. 2.
College Station, Tex: CRC Press, 1994.
1206 Bibliography
thermo Documentation, Release 0.2.24
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[4] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[5] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[6] Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.
18434/T4M88Q
[7] Joback, K.G., and R.C. Reid. “Estimation of Pure-Component Properties from Group-Contributions.” Chemical
Engineering Communications 57, no. 1-6 (July 1, 1987): 233-43. doi:10.1080/00986448708960487.
[1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[2] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[3] Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.
18434/T4M88Q
[1] Somayajulu, G. R. “A Generalized Equation for Surface Tension from the Triple Point to the Critical Point.”
International Journal of Thermophysics 9, no. 4 (July 1988): 559-66. doi:10.1007/BF00503154.
[2] Mulero, A., M. I. Parra, and I. Cachadina. “The Somayajulu Correlation for the Surface Tension Revisited.” Fluid
Phase Equilibria 339 (February 15, 2013): 81-88. doi:10.1016/j.fluid.2012.11.038.
[3] Jasper, Joseph J. “The Surface Tension of Pure Liquid Compounds.” Journal of Physical and Chemical Reference
Data 1, no. 4 (October 1, 1972): 841-1010. doi:10.1063/1.3253106.
[4] Speight, James. Lange’s Handbook of Chemistry. 16 edition. McGraw-Hill Professional, 2005.
[5] Mulero, A., I. Cachadiña, and M. I. Parra. “Recommended Correlations for the Surface Tension of Com-
mon Fluids.” Journal of Physical and Chemical Reference Data 41, no. 4 (December 1, 2012): 043105.
doi:10.1063/1.4768782.
[6] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Government of Canada.. “Substances Lists” Feb 11, 2015. https://www.ec.gc.ca/subsnouvelles-newsubs/default.
asp?n=47F768FE-1.
[2] US EPA. “TSCA Chemical Substance Inventory.” Accessed April 2016. https://www.epa.gov/tsca-inventory.
[3] ECHA. “EC Inventory”. Accessed March 2015. http://echa.europa.eu/information-on-chemicals/ec-inventory.
[4] SPIN. “SPIN Substances in Products In Nordic Countries.” Accessed March 2015. http://195.215.202.233/
DotNetNuke/default.aspx.
[1] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[2] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Renon, Henri, and J. M. Prausnitz. “Local Compositions in Thermodynamic Excess Functions for Liquid Mix-
tures.” AIChE Journal 14, no. 1 (1968): 135-144. doi:10.1002/aic.690140124.
Bibliography 1207
thermo Documentation, Release 0.2.24
[2] Gmehling, Jurgen, Barbel Kolbe, Michael Kleiber, and Jurgen Rarey. Chemical Thermodynamics for Process
Simulation. 1st edition. Weinheim: Wiley-VCH, 2012.
[1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[1] O’Connell, J. P., and J. M. Prausnitz. “Empirical Correlation of Second Virial Coefficients for Vapor-Liquid
Equilibrium Calculations.” Industrial & Engineering Chemistry Process Design and Development 6, no. 2 (April
1, 1967): 245-50. https://doi.org/10.1021/i260022a016.
[2] Pitzer, Kenneth S., and R. F. Curl. “The Volumetric and Thermodynamic Properties of Fluids. III. Empirical
Equation for the Second Virial Coefficient1.” Journal of the American Chemical Society 79, no. 10 (May 1,
1957): 2369-70. doi:10.1021/ja01567a007.
[3] Smith, H. C. Van Ness Joseph M. Introduction to Chemical Engineering Thermodynamics 4E 1987.
[4] Tsonopoulos, Constantine. “An Empirical Correlation of Second Virial Coefficients.” AIChE Journal 20, no. 2
(March 1, 1974): 263-72. doi:10.1002/aic.690200209.
[5] Tsonopoulos, C., and J. L. Heidman. “From the Virial to the Cubic Equation of State.” Fluid Phase Equilibria 57,
no. 3 (1990): 261-76. doi:10.1016/0378-3812(90)85126-U
[6] Tsonopoulos, Constantine, and John H. Dymond. “Second Virial Coefficients of Normal Alkanes, Linear 1-
Alkanols (and Water), Alkyl Ethers, and Their Mixtures.” Fluid Phase Equilibria, International Workshop on
Vapour-Liquid Equilibria and Related Properties in Binary and Ternary Mixtures of Ethers, Alkanes and Alka-
nols, 133, no. 1-2 (June 1997): 11-34. doi:10.1016/S0378-3812(97)00058-7.
[7] Xiang, H. W. “The New Simple Extended Corresponding-States Principle: Vapor Pressure and Second
Virial Coefficient.” Chemical Engineering Science 57, no. 8 (April 2002): 1439049. https://doi.org/10.1016/
S0009-2509(02)00017-9.
[8] Meng, Long, Yuan-Yuan Duan, and Lei Li. “Correlations for Second and Third Virial Coefficients of Pure Fluids.”
Fluid Phase Equilibria 226 (December 10, 2004): 109-20. https://doi.org/10.1016/j.fluid.2004.09.023.
[9] Orbey, Hasan, and J. H. Vera. “Correlation for the Third Virial Coefficient Using Tc, Pc and as Parameters.”
AIChE Journal 29, no. 1 (January 1, 1983): 107-13. https://doi.org/10.1002/aic.690290115.
[10] Liu, D. X., and H. W. Xiang. “Corresponding-States Correlation and Prediction of Third Virial Coefficients for
a Wide Range of Substances.” International Journal of Thermophysics 24, no. 6 (November 1, 2003): 1667-80.
https://doi.org/10.1023/B:IJOT.0000004098.98614.38.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[2] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[3] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[4] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[5] Gharagheizi, Farhad, Poorandokht Ilani-Kashkouli, William E. Acree Jr., Amir H. Mohammadi, and Deresh
Ramjugernath. “A Group Contribution Model for Determining the Vaporization Enthalpy of Organic Compounds
at the Standard Reference Temperature of 298 K.” Fluid Phase Equilibria 360 (December 25, 2013): 279-92.
doi:10.1016/j.fluid.2013.09.021.
[6] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[7] Alibakhshi, Amin. “Enthalpy of Vaporization, Its Temperature Dependence and Correlation with Surface Tension:
A Theoretical Approach.” Fluid Phase Equilibria 432 (January 25, 2017): 62-69. doi:10.1016/j.fluid.2016.10.013.
1208 Bibliography
thermo Documentation, Release 0.2.24
[1] Gharagheizi, Farhad, Poorandokht Ilani-Kashkouli, William E. Acree Jr., Amir H. Mohammadi, and Deresh
Ramjugernath. “A Group Contribution Model for Determining the Sublimation Enthalpy of Organic Compounds
at the Standard Reference Temperature of 298 K.” Fluid Phase Equilibria 354 (September 25, 2013): 265-
doi:10.1016/j.fluid.2013.06.046.
[2] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics, 95E. Boca Raton,
FL: CRC press, 2014.
[3] Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.
18434/T4M88Q
[1] Bennett, Jim, and Kurt A. G. Schmidt. “Comparison of Phase Identification Methods Used in Oil Industry Flow
Simulations.” Energy & Fuels 31, no. 4 (April 20, 2017): 3370-79. https://doi.org/10.1021/acs.energyfuels.
6b02316.
[1] Bennett, Jim, and Kurt A. G. Schmidt. “Comparison of Phase Identification Methods Used in Oil Industry Flow
Simulations.” Energy & Fuels 31, no. 4 (April 20, 2017): 3370-79. https://doi.org/10.1021/acs.energyfuels.
6b02316.
[1] Chang, Yih-Bor. “Development and Application of an Equation of State Compositional Simulator,” 1990. https:
//repositories.lib.utexas.edu/handle/2152/80585.
[1] Poling, Bruce E., Edward A. Grens, and John M. Prausnitz. “Thermodynamic Properties from a Cubic Equation
of State: Avoiding Trivial Roots and Spurious Derivatives.” Industrial & Engineering Chemistry Process Design
and Development 20, no. 1 (January 1, 1981): 127-30. https://doi.org/10.1021/i200012a019.
[1] Venkatarathnam, G., and L. R. Oellrich. “Identification of the Phase of a Fluid Using Partial Derivatives of Pres-
sure, Volume, and Temperature without Reference to Saturation Properties: Applications in Phase Equilibria
Calculations.” Fluid Phase Equilibria 301, no. 2 (February 25, 2011): 225-33. doi:10.1016/j.fluid.2010.12.001.
[1] Bennett, Jim, and Kurt A. G. Schmidt. “Comparison of Phase Identification Methods Used in Oil Industry Flow
Simulations.” Energy & Fuels 31, no. 4 (April 20, 2017): 3370-79. https://doi.org/10.1021/acs.energyfuels.
6b02316.
[1] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[2] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[3] Elliott, J., and Carl Lira. Introductory Chemical Engineering Thermodynamics. 2nd edition. Upper Saddle River,
NJ: Prentice Hall, 2012.
[4] Kooijman, Harry A., and Ross Taylor. The ChemSep Book. Books on Demand Norderstedt, Germany, 2000.
[1] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[2] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[3] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[1] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[2] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[3] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
Bibliography 1209
thermo Documentation, Release 0.2.24
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[2] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Gmehling, Jurgen. Chemical Thermodynamics: For Process Simulation. Weinheim, Germany: Wiley-VCH,
2012.
[2] Fredenslund, Aage, Russell L. Jones, and John M. Prausnitz. “Group Contribution Estimation of Activ-
ity Coefficients in Nonideal Liquid Mixtures.” AIChE Journal 21, no. 6 (November 1, 1975): 1086-99.
doi:10.1002/aic.690210607.
[3] Jakob, Antje, Hans Grensemann, Jürgen Lohmann, and Jürgen Gmehling. “Further Development of Modified
UNIFAC (Dortmund): Revision and Extension 5.” Industrial & Engineering Chemistry Research 45, no. 23
(November 1, 2006): 7924-33. doi:10.1021/ie060355c.
[4] Kang, Jeong Won, Vladimir Diky, and Michael Frenkel. “New Modified UNIFAC Parameters Using Crit-
ically Evaluated Phase Equilibrium Data.” Fluid Phase Equilibria 388 (February 25, 2015): 128-41.
doi:10.1016/j.fluid.2014.12.042.
[5] Jäger, Andreas, Ian H. Bell, and Cornelia Breitkopf. “A Theoretically Based Departure Function for Multi-Fluid
Mixture Models.” Fluid Phase Equilibria 469 (August 15, 2018): 56-69. https://doi.org/10.1016/j.fluid.2018.04.
015.
[1] Gmehling, Jurgen. Chemical Thermodynamics: For Process Simulation. Weinheim, Germany: Wiley-VCH,
2012.
[2] Fredenslund, Aage, Russell L. Jones, and John M. Prausnitz. “Group Contribution Estimation of Activ-
ity Coefficients in Nonideal Liquid Mixtures.” AIChE Journal 21, no. 6 (November 1, 1975): 1086-99.
doi:10.1002/aic.690210607.
[1] Gmehling, Jurgen. Chemical Thermodynamics: For Process Simulation. Weinheim, Germany: Wiley-VCH,
2012.
[1] Wei, James, Morton M. Denn, John H. Seinfeld, Arup Chakraborty, Jackie Ying, Nicholas Peppas, and George
Stephanopoulos. Molecular Modeling and Theory in Chemical Engineering. Academic Press, 2001.
[1] Wei, James, Morton M. Denn, John H. Seinfeld, Arup Chakraborty, Jackie Ying, Nicholas Peppas, and George
Stephanopoulos. Molecular Modeling and Theory in Chemical Engineering. Academic Press, 2001.
[1] McGarry, Jack. “Correlation and Prediction of the Vapor Pressures of Pure Liquids over Large Pressure Ranges.”
Industrial & Engineering Chemistry Process Design and Development 22, no. 2 (April 1, 1983): 313-22.
doi:10.1021/i200021a023.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[4] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[5] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[6] Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.
18434/T4M88Q
1210 Bibliography
thermo Documentation, Release 0.2.24
[7] Alcock, C. B., V. P. Itkin, and M. K. Horrigan. “Vapour Pressure Equations for the Metallic Elements: 298-
2500K.” Canadian Metallurgical Quarterly 23, no. 3 (July 1, 1984): 309-13. https://doi.org/10.1179/cmq.1984.
23.3.309.
[1] Goodman, B. T., W. V. Wilding, J. L. Oscarson, and R. L. Rowley. “Use of the DIPPR Database for the Devel-
opment of QSPR Correlations: Solid Vapor Pressure and Heat of Sublimation of Organic Compounds.” Interna-
tional Journal of Thermophysics 25, no. 2 (March 1, 2004): 337-50. https://doi.org/10.1023/B:IJOT.0000028471.
77933.80.
[1] Viswanath, Dabir S., and G. Natarajan. Databook On The Viscosity Of Liquids. New York: Taylor & Francis,
1989
[2] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[3] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[4] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[5] Joback, K.G., and R.C. Reid. “Estimation of Pure-Component Properties from Group-Contributions.” Chemical
Engineering Communications 57, no. 1-6 (July 1, 1987): 233-43. doi:10.1080/00986448708960487.
[6] Trachenko, K., and V. V. Brazhkin. “Minimal Quantum Viscosity from Fundamental Physical Constants.” Science
Advances, April 2020. https://doi.org/10.1126/sciadv.aba3747.
[1] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[2] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[3] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[4] Trachenko, K., and V. V. Brazhkin. “Minimal Quantum Viscosity from Fundamental Physical Constants.” Science
Advances, April 2020. https://doi.org/10.1126/sciadv.aba3747.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, 8E. McGraw-Hill Professional, 2007.
[2] Mchaweh, A., A. Alsaygh, Kh. Nasrifar, and M. Moshfeghian. “A Simplified Method for Calculating Saturated
Liquid Densities.” Fluid Phase Equilibria 224, no. 2 (October 1, 2004): 157-67. doi:10.1016/j.fluid.2004.06.054
[3] Hankinson, Risdon W., and George H. Thomson. “A New Correlation for Saturated Densities of Liquids and Their
Mixtures.” AIChE Journal 25, no. 4 (1979): 653-663. doi:10.1002/aic.690250412
[4] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[5] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[6] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
[1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
Bibliography 1211
thermo Documentation, Release 0.2.24
[2] Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering
Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
[1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton,
FL]: CRC press, 2014.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[1] Smith, H. C. Van Ness Joseph M. Introduction to Chemical Engineering Thermodynamics 4th Edition, Joseph
M. Smith, H. C. Van Ness, 1987.
[2] Kooijman, Harry A., and Ross Taylor. The ChemSep Book. Books on Demand Norderstedt, Germany, 2000.
[3] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Wilson, Grant M. “Vapor-Liquid Equilibrium. XI. A New Expression for the Excess Free Energy of Mixing.”
Journal of the American Chemical Society 86, no. 2 (January 1, 1964): 127-130. doi:10.1021/ja01056a002.
[2] Gmehling, Jurgen, Barbel Kolbe, Michael Kleiber, and Jurgen Rarey. Chemical Thermodynamics for Process
Simulation. 1st edition. Weinheim: Wiley-VCH, 2012.
[1] Poling, Bruce E., John M. Prausnitz, and John P. O’Connell. The Properties of Gases and Liquids. 5th edition.
New York: McGraw-Hill Professional, 2000.
[2] Gmehling, Jürgen, Michael Kleiber, Bärbel Kolbe, and Jürgen Rarey. Chemical Thermodynamics for Process
Simulation. John Wiley & Sons, 2019.
[1] Abrams, Denis S., and John M. Prausnitz. “Statistical Thermodynamics of Liquid Mixtures: A New Expression
for the Excess Gibbs Energy of Partly or Completely Miscible Systems.” AIChE Journal 21, no. 1 (January 1,
1975): 116-28. doi:10.1002/aic.690210115.
[2] Gmehling, Jurgen, Barbel Kolbe, Michael Kleiber, and Jurgen Rarey. Chemical Thermodynamics for Process
Simulation. 1st edition. Weinheim: Wiley-VCH, 2012.
[3] Maurer, G., and J. M. Prausnitz. “On the Derivation and Extension of the Uniquac Equation.” Fluid Phase Equi-
libria 2, no. 2 (January 1, 1978): 91-99. doi:10.1016/0378-3812(78)85002-X.
[1] Joback, Kevin G. “A Unified Approach to Physical Property Estimation Using Multivariate Statistical Tech-
niques.” Thesis, Massachusetts Institute of Technology, 1984.
[2] Joback, K.G., and R.C. Reid. “Estimation of Pure-Component Properties from Group-Contributions.” Chemical
Engineering Communications 57, no. 1-6 (July 1, 1987): 233-43. doi:10.1080/00986448708960487.
[1] Fedors, R. F. “A Method to Estimate Critical Volumes.” AIChE Journal 25, no. 1 (1979): 202-202. https://doi.
org/10.1002/aic.690250129.
[2] Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Profes-
sional, 2007.
[1] Wilson, G. M., and L. V. Jasperson. “Critical Constants Tc, Pc, Estimation Based on Zero, First and Second Order
Methods.” In Proceedings of the AIChE Spring Meeting, 21, 1996.
[2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
[3] Yan, Xinjian, Qian Dong, and Xiangrong Hong. “Reliability Analysis of Group-Contribution Methods in Predict-
ing Critical Temperatures of Organic Compounds.” Journal of Chemical & Engineering Data 48, no. 2 (March 1,
2003): 374-80. https://doi.org/10.1021/je025596f.
1212 Bibliography
PYTHON MODULE INDEX
t
thermo.activity, 51
thermo.bulk, 62
thermo.chemical, 76
thermo.chemical_package, 115
thermo.datasheet, 129
thermo.electrochem, 130
thermo.eos, 151
thermo.eos_alpha_functions, 375
thermo.eos_mix, 256
thermo.eos_mix_methods, 357
thermo.eos_volume, 362
thermo.equilibrium, 402
thermo.flash, 559
thermo.functional_groups, 572
thermo.group_contribution.fedors, 1126
thermo.group_contribution.joback, 1115
thermo.group_contribution.wilson_jasperson,
1127
thermo.heat_capacity, 605
thermo.interaction_parameters, 623
thermo.interface, 618
thermo.law, 627
thermo.mixture, 638
thermo.nrtl, 629
thermo.permittivity, 680
thermo.phase_change, 890
thermo.phase_identification, 895
thermo.phases, 682
thermo.property_package, 895
thermo.regular_solution, 907
thermo.stream, 912
thermo.thermal_conductivity, 981
thermo.unifac, 994
thermo.uniquac, 1105
thermo.utils, 1032
thermo.vapor_pressure, 1062
thermo.viscosity, 1067
thermo.volume, 1079
thermo.wilson, 1094
1213
thermo Documentation, Release 0.2.24
Symbols 356
a_alpha_and_derivatives_full()
__add__() (thermo.chemical_package.ChemicalConstantsPackage (in module
method), 121 thermo.eos_mix_methods), 358
a_alpha_and_derivatives_pure()
__add__() (thermo.chemical_package.PropertyCorrelationsPackage
method), 128 (thermo.eos.APISRK method), 235
__call__() (thermo.utils.TDependentProperty method), a_alpha_and_derivatives_pure()
1036 (thermo.eos.GCEOS method), 174
__call__() (thermo.utils.TPDependentProperty a_alpha_and_derivatives_pure() (thermo.eos.IG
method), 1049 method), 249
__eq__() (thermo.activity.GibbsExcess method), 54 a_alpha_and_derivatives_pure() (thermo.eos.PR
__eq__() (thermo.phases.Phase method), 792 method), 209
__hash__() (thermo.activity.GibbsExcess method), 54 a_alpha_and_derivatives_pure()
__hash__() (thermo.phases.Phase method), 792 (thermo.eos.PRSV method), 214
__repr__() (thermo.activity.GibbsExcess method), 54 a_alpha_and_derivatives_pure()
__repr__() (thermo.eos.GCEOS method), 174 (thermo.eos.PRSV2 method), 217
__repr__() (thermo.phases.CEOSGas method), 864 a_alpha_and_derivatives_pure()
__repr__() (thermo.phases.HelmholtzEOS method), (thermo.eos.PRTranslatedPoly method),
886 223
__repr__() (thermo.phases.IdealGas method), 857 a_alpha_and_derivatives_pure() (thermo.eos.RK
__repr__() (thermo.phases.VirialCSP method), 877 method), 247
__repr__() (thermo.phases.VirialGas method), 870 a_alpha_and_derivatives_pure() (thermo.eos.SRK
__repr__() (thermo.utils.TDependentProperty method), method), 229
1036 a_alpha_and_derivatives_pure()
(thermo.eos.TWUPR method), 220
A a_alpha_and_derivatives_pure()
A (thermo.chemical.Chemical property), 86 (thermo.eos.TWUSRK method), 232
a (thermo.eos.IG attribute), 249 a_alpha_and_derivatives_pure()
A (thermo.eos_mix.PSRKMixingRules attribute), 356 (thermo.eos.VDW method), 244
A (thermo.mixture.Mixture property), 648 a_alpha_and_derivatives_pure()
A (thermo.stream.StreamArgs property), 979 (thermo.eos_alpha_functions.Almeida_a_alpha
A() (thermo.equilibrium.EquilibriumState method), 451 method), 384
A() (thermo.phases.Phase method), 734 a_alpha_and_derivatives_pure()
a_alpha_aijs_composition_independent() (in (thermo.eos_alpha_functions.Androulakis_a_alpha
module thermo.eos_mix_methods), 357 method), 384
a_alpha_and_derivatives() (in module a_alpha_and_derivatives_pure()
thermo.eos_mix_methods), 359 (thermo.eos_alpha_functions.Chen_Yang_a_alpha
a_alpha_and_derivatives() (thermo.eos.GCEOS method), 385
method), 174 a_alpha_and_derivatives_pure()
a_alpha_and_derivatives() (thermo.eos_alpha_functions.Coquelet_a_alpha
(thermo.eos_mix.GCEOSMIX method), 272 method), 385
a_alpha_and_derivatives() a_alpha_and_derivatives_pure()
(thermo.eos_mix.PSRKMixingRules method), (thermo.eos_alpha_functions.Gasem_a_alpha
1215
thermo Documentation, Release 0.2.24
1216 Index
thermo Documentation, Release 0.2.24
Index 1217
thermo Documentation, Release 0.2.24
1218 Index
thermo Documentation, Release 0.2.24
Index 1219
thermo Documentation, Release 0.2.24
1220 Index
thermo Documentation, Release 0.2.24
Index 1221
thermo Documentation, Release 0.2.24
1222 Index
thermo Documentation, Release 0.2.24
Bromine_atom_mass_fraction() 457
(thermo.phases.Phase method), 739 Caesium_atom_count_flow() (thermo.phases.Phase
Bulk (class in thermo.bulk), 62 method), 739
bulk (thermo.equilibrium.EquilibriumState attribute), Caesium_atom_flow()
511 (thermo.equilibrium.EquilibriumState method),
bulk (thermo.stream.EquilibriumStream attribute), 964 457
bulk_phase_type (thermo.phases.Phase attribute), 794 Caesium_atom_flow() (thermo.phases.Phase method),
BulkSettings (class in thermo.bulk), 72 739
Bvirial (thermo.chemical.Chemical property), 87 Caesium_atom_fraction()
Bvirial (thermo.mixture.Mixture property), 648 (thermo.equilibrium.EquilibriumState method),
Bvirial() (thermo.phases.Phase method), 739 457
BVirial_Tsonopoulos_extended_ab() (in module Caesium_atom_fraction() (thermo.phases.Phase
thermo.functional_groups), 604 method), 740
Caesium_atom_mass_flow()
C (thermo.equilibrium.EquilibriumState method),
C() (thermo.phases.VirialGas method), 870 457
c1 (thermo.eos.GCEOS attribute), 177 Caesium_atom_mass_flow() (thermo.phases.Phase
c1 (thermo.eos.PR attribute), 210 method), 740
c1 (thermo.eos.RK attribute), 247 Caesium_atom_mass_fraction()
c1 (thermo.eos.SRK attribute), 230 (thermo.equilibrium.EquilibriumState method),
c2 (thermo.eos.GCEOS attribute), 177 457
c2 (thermo.eos.PR attribute), 210 Caesium_atom_mass_fraction()
c2 (thermo.eos.RK attribute), 247 (thermo.phases.Phase method), 740
c2 (thermo.eos.SRK attribute), 230 calc_H() (thermo.chemical.Chemical method), 101
C_interactions() (thermo.phases.VirialCSP method), calc_H_excess() (thermo.chemical.Chemical method),
877 101
C_pures() (thermo.phases.VirialCSP method), 877 calc_S() (thermo.chemical.Chemical method), 101
Cadmium_atom_count_flow() calc_S_excess() (thermo.chemical.Chemical method),
(thermo.equilibrium.EquilibriumState method), 101
457 Calcium_atom_count_flow()
Cadmium_atom_count_flow() (thermo.phases.Phase (thermo.equilibrium.EquilibriumState method),
method), 739 457
Cadmium_atom_flow() Calcium_atom_count_flow() (thermo.phases.Phase
(thermo.equilibrium.EquilibriumState method), method), 740
457 Calcium_atom_flow()
Cadmium_atom_flow() (thermo.phases.Phase method), (thermo.equilibrium.EquilibriumState method),
739 457
Cadmium_atom_fraction() Calcium_atom_flow() (thermo.phases.Phase method),
(thermo.equilibrium.EquilibriumState method), 740
457 Calcium_atom_fraction()
Cadmium_atom_fraction() (thermo.phases.Phase (thermo.equilibrium.EquilibriumState method),
method), 739 457
Cadmium_atom_mass_flow() Calcium_atom_fraction() (thermo.phases.Phase
(thermo.equilibrium.EquilibriumState method), method), 740
457 Calcium_atom_mass_flow()
Cadmium_atom_mass_flow() (thermo.phases.Phase (thermo.equilibrium.EquilibriumState method),
method), 739 457
Cadmium_atom_mass_fraction() Calcium_atom_mass_flow() (thermo.phases.Phase
(thermo.equilibrium.EquilibriumState method), method), 740
457 Calcium_atom_mass_fraction()
Cadmium_atom_mass_fraction() (thermo.equilibrium.EquilibriumState method),
(thermo.phases.Phase method), 739 457
Caesium_atom_count_flow() Calcium_atom_mass_fraction()
(thermo.equilibrium.EquilibriumState method), (thermo.phases.Phase method), 740
Index 1223
thermo Documentation, Release 0.2.24
1224 Index
thermo Documentation, Release 0.2.24
Index 1225
thermo Documentation, Release 0.2.24
1226 Index
thermo Documentation, Release 0.2.24
Index 1227
thermo Documentation, Release 0.2.24
1228 Index
thermo Documentation, Release 0.2.24
Index 1229
thermo Documentation, Release 0.2.24
1230 Index
thermo Documentation, Release 0.2.24
Index 1231
thermo Documentation, Release 0.2.24
1232 Index
thermo Documentation, Release 0.2.24
Index 1233
thermo Documentation, Release 0.2.24
1234 Index
thermo Documentation, Release 0.2.24
Index 1235
thermo Documentation, Release 0.2.24
1236 Index
thermo Documentation, Release 0.2.24
Index 1237
thermo Documentation, Release 0.2.24
1238 Index
thermo Documentation, Release 0.2.24
Index 1239
thermo Documentation, Release 0.2.24
1240 Index
thermo Documentation, Release 0.2.24
Index 1241
thermo Documentation, Release 0.2.24
1242 Index
thermo Documentation, Release 0.2.24
Index 1243
thermo Documentation, Release 0.2.24
1244 Index
thermo Documentation, Release 0.2.24
884 Germanium_atom_mass_fraction()
gammas() (thermo.phases.Phase method), 841 (thermo.phases.Phase method), 750
gammas() (thermo.unifac.UNIFAC method), 1016 get_ip_asymmetric_matrix()
gammas_args() (thermo.unifac.UNIFAC method), 1016 (thermo.interaction_parameters.InteractionParameterDB
gammas_infinite_dilution() method), 623
(thermo.activity.GibbsExcess method), 58 get_ip_automatic() (thermo.interaction_parameters.InteractionParamet
gammas_infinite_dilution() (thermo.phases.Phase method), 624
method), 842 get_ip_specific() (thermo.interaction_parameters.InteractionParamete
gas (thermo.equilibrium.EquilibriumState attribute), 547 method), 624
gas (thermo.stream.EquilibriumStream attribute), 964 get_ip_symmetric_matrix()
gas_beta (thermo.equilibrium.EquilibriumState at- (thermo.interaction_parameters.InteractionParameterDB
tribute), 547 method), 624
gas_beta (thermo.stream.EquilibriumStream attribute), get_tables_with_type()
964 (thermo.interaction_parameters.InteractionParameterDB
gas_count (thermo.equilibrium.EquilibriumState method), 625
attribute), 547 Gf() (thermo.group_contribution.joback.Joback static
gas_count (thermo.stream.EquilibriumStream at- method), 1119
tribute), 964 Gfgs (thermo.equilibrium.EquilibriumState property),
Gasem_a_alpha (class in thermo.eos_alpha_functions), 467
386 Gfgs (thermo.phases.Phase property), 750
Gasem_alpha_pure() (in module Gfgs_mass (thermo.equilibrium.EquilibriumState prop-
thermo.eos_alpha_functions), 402 erty), 467
GCEOS (class in thermo.eos), 152 Gfgs_mass (thermo.phases.Phase property), 750
GCEOSMIX (class in thermo.eos_mix), 259 GHARAGHEIZI_L (in module
GE() (thermo.activity.IdealSolution method), 60 thermo.thermal_conductivity), 985
GE() (thermo.nrtl.NRTL method), 635 Gibbons_Laughton_a_alpha (class in
GE() (thermo.regular_solution.RegularSolution method), thermo.eos_alpha_functions), 386
909 Gibbons_Laughton_alpha_pure() (in module
GE() (thermo.unifac.UNIFAC method), 1000 thermo.eos_alpha_functions), 401
GE() (thermo.uniquac.UNIQUAC method), 1109 GibbsExcess (class in thermo.activity), 51
GE() (thermo.wilson.Wilson method), 1098 GibbsExcessLiquid (class in thermo.phases), 879
Germanium_atom_count_flow() Gold_atom_count_flow()
(thermo.equilibrium.EquilibriumState method), (thermo.equilibrium.EquilibriumState method),
467 467
Germanium_atom_count_flow() Gold_atom_count_flow() (thermo.phases.Phase
(thermo.phases.Phase method), 750 method), 751
Germanium_atom_flow() Gold_atom_flow() (thermo.equilibrium.EquilibriumState
(thermo.equilibrium.EquilibriumState method), method), 468
467 Gold_atom_flow() (thermo.phases.Phase method), 751
Germanium_atom_flow() (thermo.phases.Phase Gold_atom_fraction()
method), 750 (thermo.equilibrium.EquilibriumState method),
Germanium_atom_fraction() 468
(thermo.equilibrium.EquilibriumState method), Gold_atom_fraction() (thermo.phases.Phase
467 method), 751
Germanium_atom_fraction() (thermo.phases.Phase Gold_atom_mass_flow()
method), 750 (thermo.equilibrium.EquilibriumState method),
Germanium_atom_mass_flow() 468
(thermo.equilibrium.EquilibriumState method), Gold_atom_mass_flow() (thermo.phases.Phase
467 method), 751
Germanium_atom_mass_flow() (thermo.phases.Phase Gold_atom_mass_fraction()
method), 750 (thermo.equilibrium.EquilibriumState method),
Germanium_atom_mass_fraction() 468
(thermo.equilibrium.EquilibriumState method), Gold_atom_mass_fraction() (thermo.phases.Phase
467 method), 751
Index 1245
thermo Documentation, Release 0.2.24
1246 Index
thermo Documentation, Release 0.2.24
Index 1247
thermo Documentation, Release 0.2.24
1248 Index
thermo Documentation, Release 0.2.24
473 547
Hsubs() (thermo.phases.Phase method), 756 hydrogen_molar_weight() (thermo.phases.Phase
humidity_ratio() (thermo.equilibrium.EquilibriumState method), 842
method), 547 hydrogen_partial_pressure()
humidity_ratio() (thermo.phases.Phase method), 842 (thermo.equilibrium.EquilibriumState method),
Hvap (thermo.chemical.Chemical property), 91 547
Hvap() (thermo.eos.GCEOS method), 164 hydrogen_partial_pressure()
Hvap() (thermo.group_contribution.joback.Joback static (thermo.phases.Phase method), 842
method), 1120 hydrogen_sulfide_molar_weight()
Hvap_298s (thermo.equilibrium.EquilibriumState prop- (thermo.equilibrium.EquilibriumState method),
erty), 474 547
Hvap_298s (thermo.phases.Phase property), 757 hydrogen_sulfide_molar_weight()
Hvap_298s_mass (thermo.equilibrium.EquilibriumState (thermo.phases.Phase method), 842
property), 474 hydrogen_sulfide_partial_pressure()
Hvap_298s_mass (thermo.phases.Phase property), 757 (thermo.equilibrium.EquilibriumState method),
Hvap_Tbs (thermo.equilibrium.EquilibriumState prop- 548
erty), 474 hydrogen_sulfide_partial_pressure()
Hvap_Tbs (thermo.phases.Phase property), 757 (thermo.phases.Phase method), 842
Hvap_Tbs_mass (thermo.equilibrium.EquilibriumState
property), 474 I
Hvap_Tbs_mass (thermo.phases.Phase property), 757 IAPWS95 (class in thermo.phases), 888
Hvapm (thermo.chemical.Chemical property), 91 IAPWS95Gas (class in thermo.phases), 888
Hvapms (thermo.mixture.Mixture property), 654 IAPWS95Liquid (class in thermo.phases), 889
Hvaps (thermo.mixture.Mixture property), 654 iapws_constants (in module
Hvaps() (thermo.equilibrium.EquilibriumState method), thermo.chemical_package), 129
474 iapws_correlations (in module
Hvaps() (thermo.phases.Phase method), 757 thermo.chemical_package), 129
Hydrogen_atom_count_flow() ideal_gas_basis (thermo.phases.Phase attribute), 842
(thermo.equilibrium.EquilibriumState method), IdealGas (class in thermo.phases), 855
474 IdealSolution (class in thermo.activity), 59
Hydrogen_atom_count_flow() (thermo.phases.Phase identify_sort_phases() (in module
method), 758 thermo.phase_identification), 896
Hydrogen_atom_flow() identity_phase_states() (in module
(thermo.equilibrium.EquilibriumState method), thermo.phase_identification), 898
474 IDs (thermo.equilibrium.EquilibriumState property), 475
Hydrogen_atom_flow() (thermo.phases.Phase IG (class in thermo.eos), 248
method), 758 IGMIX (class in thermo.eos_mix), 353
Hydrogen_atom_fraction() InChI_Keys (thermo.equilibrium.EquilibriumState prop-
(thermo.equilibrium.EquilibriumState method), erty), 475
474 InChI_Keys (thermo.mixture.Mixture property), 654
Hydrogen_atom_fraction() (thermo.phases.Phase InChI_Keys (thermo.phases.Phase property), 758
method), 758 InChIs (thermo.equilibrium.EquilibriumState property),
Hydrogen_atom_mass_flow() 475
(thermo.equilibrium.EquilibriumState method), InChIs (thermo.mixture.Mixture property), 654
475 InChIs (thermo.phases.Phase property), 758
Hydrogen_atom_mass_flow() (thermo.phases.Phase INCOMPRESSIBLE_CONST (thermo.phases.Phase at-
method), 758 tribute), 758
Hydrogen_atom_mass_fraction() Indium_atom_count_flow()
(thermo.equilibrium.EquilibriumState method), (thermo.equilibrium.EquilibriumState method),
475 475
Hydrogen_atom_mass_fraction() Indium_atom_count_flow() (thermo.phases.Phase
(thermo.phases.Phase method), 758 method), 758
hydrogen_molar_weight() Indium_atom_flow() (thermo.equilibrium.EquilibriumState
(thermo.equilibrium.EquilibriumState method), method), 475
Index 1249
thermo Documentation, Release 0.2.24
1250 Index
thermo Documentation, Release 0.2.24
Index 1251
thermo Documentation, Release 0.2.24
1252 Index
thermo Documentation, Release 0.2.24
Index 1253
thermo Documentation, Release 0.2.24
1254 Index
thermo Documentation, Release 0.2.24
Index 1255
thermo Documentation, Release 0.2.24
1256 Index
thermo Documentation, Release 0.2.24
Index 1257
thermo Documentation, Release 0.2.24
1258 Index
thermo Documentation, Release 0.2.24
Index 1259
thermo Documentation, Release 0.2.24
1260 Index
thermo Documentation, Release 0.2.24
Index 1261
thermo Documentation, Release 0.2.24
1262 Index
thermo Documentation, Release 0.2.24
Index 1263
thermo Documentation, Release 0.2.24
1264 Index
thermo Documentation, Release 0.2.24
oxygen_partial_pressure() Palladium_atom_fraction()
(thermo.equilibrium.EquilibriumState method), (thermo.equilibrium.EquilibriumState method),
552 483
oxygen_partial_pressure() (thermo.phases.Phase Palladium_atom_fraction() (thermo.phases.Phase
method), 847 method), 766
Palladium_atom_mass_flow()
P (thermo.equilibrium.EquilibriumState method),
P (thermo.equilibrium.EquilibriumState attribute), 483 483
P (thermo.stream.EquilibriumStream attribute), 962 Palladium_atom_mass_flow() (thermo.phases.Phase
P (thermo.stream.StreamArgs property), 979 method), 767
P_calc (thermo.equilibrium.EquilibriumState property), Palladium_atom_mass_fraction()
483 (thermo.equilibrium.EquilibriumState method),
P_calc (thermo.phases.Phase property), 766 483
P_calc (thermo.stream.StreamArgs property), 979 Palladium_atom_mass_fraction()
P_default (thermo.mixture.Mixture attribute), 656 (thermo.phases.Phase method), 767
P_discriminant_zero_g() (thermo.eos.GCEOS Parachor (thermo.chemical.Chemical property), 92
method), 167 Parachor (thermo.mixture.Mixture property), 656
P_discriminant_zero_l() (thermo.eos.GCEOS Parachors (thermo.equilibrium.EquilibriumState prop-
method), 167 erty), 483
P_discriminant_zeros() (thermo.eos.GCEOS Parachors (thermo.mixture.Mixture property), 656
method), 168 Parachors (thermo.phases.Phase property), 767
P_discriminant_zeros_analytical() partial_pressures()
(thermo.eos.GCEOS static method), 168 (thermo.equilibrium.EquilibriumState method),
P_discriminant_zeros_analytical() 552
(thermo.eos.VDW static method), 242 partial_pressures() (thermo.phases.Phase method),
P_max_at_V() (thermo.eos.GCEOS method), 169 848
P_max_at_V() (thermo.eos.PR method), 208 partial_property() (thermo.utils.MixtureProperty
P_max_at_V() (thermo.eos.SRK method), 229 method), 1058
P_max_at_V() (thermo.phases.Phase method), 766 Pbubble (thermo.mixture.Mixture property), 657
P_MAX_FIXED (thermo.phases.Phase attribute), 766 Pc() (thermo.group_contribution.joback.Joback static
P_MIN_FIXED (thermo.phases.Phase attribute), 766 method), 1121
P_PIP_transition() (thermo.eos.GCEOS method), Pcs (thermo.equilibrium.EquilibriumState property), 483
166 Pcs (thermo.phases.Phase property), 767
P_REF_IG (thermo.equilibrium.EquilibriumState at- Pdew (thermo.mixture.Mixture property), 657
tribute), 483 Peclet_heat() (thermo.chemical.Chemical method), 93
P_REF_IG (thermo.phases.Phase attribute), 766 Peclet_heat() (thermo.mixture.Mixture method), 657
P_REF_IG_INV (thermo.equilibrium.EquilibriumState at- permittivites (thermo.mixture.Mixture property), 674
tribute), 483 permittivity (thermo.chemical.Chemical property),
P_REF_IG_INV (thermo.phases.Phase attribute), 766 111
P_transitions() (thermo.phases.Phase method), 766 permittivity_methods (in module
P_zero_g_cheb_limits (thermo.eos.GCEOS at- thermo.permittivity), 682
tribute), 169 PermittivityLiquid (class in thermo.permittivity),
P_zero_l_cheb_limits (thermo.eos.GCEOS at- 681
tribute), 169 PermittivityLiquids
Palladium_atom_count_flow() (thermo.equilibrium.EquilibriumState prop-
(thermo.equilibrium.EquilibriumState method), erty), 484
483 Phase (class in thermo.phases), 683
Palladium_atom_count_flow() phase (thermo.equilibrium.EquilibriumState property),
(thermo.phases.Phase method), 766 552
Palladium_atom_flow() phase (thermo.mixture.Mixture attribute), 674
(thermo.equilibrium.EquilibriumState method), phase_count (thermo.equilibrium.EquilibriumState at-
483 tribute), 553
Palladium_atom_flow() (thermo.phases.Phase phase_count (thermo.stream.EquilibriumStream at-
method), 766 tribute), 964
Index 1265
thermo Documentation, Release 0.2.24
1266 Index
thermo Documentation, Release 0.2.24
Index 1267
thermo Documentation, Release 0.2.24
1268 Index
thermo Documentation, Release 0.2.24
Index 1269
thermo Documentation, Release 0.2.24
1270 Index
thermo Documentation, Release 0.2.24
Index 1271
thermo Documentation, Release 0.2.24
1272 Index
thermo Documentation, Release 0.2.24
Index 1273
thermo Documentation, Release 0.2.24
1274 Index
thermo Documentation, Release 0.2.24
Index 1275
thermo Documentation, Release 0.2.24
Seaborgium_atom_fraction() set_dnzs_derivatives_and_departures()
(thermo.equilibrium.EquilibriumState method), (thermo.eos_mix.GCEOSMIX method), 294
493 set_eos() (thermo.chemical.Chemical method), 114
Seaborgium_atom_fraction() (thermo.phases.Phase set_eos() (thermo.mixture.Mixture method), 678
method), 777 set_extensive_flow() (thermo.stream.Stream
Seaborgium_atom_mass_flow() method), 976
(thermo.equilibrium.EquilibriumState method), set_extensive_properties() (thermo.stream.Stream
493 method), 976
Seaborgium_atom_mass_flow() set_from_PT() (thermo.eos.GCEOS method), 197
(thermo.phases.Phase method), 777 set_poly_fit_coeffs()
Seaborgium_atom_mass_fraction() (thermo.utils.MixtureProperty method), 1061
(thermo.equilibrium.EquilibriumState method), set_properties_from_solution()
493 (thermo.eos.GCEOS method), 197
Seaborgium_atom_mass_fraction() set_property_package() (thermo.mixture.Mixture
(thermo.phases.Phase method), 777 method), 678
Selenium_atom_count_flow() set_ref() (thermo.chemical.Chemical method), 114
(thermo.equilibrium.EquilibriumState method), set_thermo() (thermo.chemical.Chemical method), 114
493 set_TP_sources() (thermo.chemical.Chemical
Selenium_atom_count_flow() (thermo.phases.Phase method), 114
method), 777 set_TP_sources() (thermo.mixture.Mixture method),
Selenium_atom_flow() 678
(thermo.equilibrium.EquilibriumState method), settings (thermo.equilibrium.EquilibriumState at-
493 tribute), 555
Selenium_atom_flow() (thermo.phases.Phase settings (thermo.stream.EquilibriumStream attribute),
method), 777 964
Selenium_atom_fraction() Sfgs (thermo.equilibrium.EquilibriumState property),
(thermo.equilibrium.EquilibriumState method), 493
493 Sfgs (thermo.phases.Phase property), 777
Selenium_atom_fraction() (thermo.phases.Phase Sfgs_mass (thermo.equilibrium.EquilibriumState prop-
method), 777 erty), 494
Selenium_atom_mass_flow() Sfgs_mass (thermo.phases.Phase property), 777
(thermo.equilibrium.EquilibriumState method), SG (thermo.chemical.Chemical property), 95
493 SG (thermo.mixture.Mixture property), 659
Selenium_atom_mass_flow() (thermo.phases.Phase SG() (thermo.equilibrium.EquilibriumState method), 490
method), 777 SG() (thermo.phases.Phase method), 774
Selenium_atom_mass_fraction() SG_gas() (thermo.equilibrium.EquilibriumState
(thermo.equilibrium.EquilibriumState method), method), 491
493 SG_gas() (thermo.phases.Phase method), 774
Selenium_atom_mass_fraction() SGg (thermo.chemical.Chemical property), 95
(thermo.phases.Phase method), 777 SGg (thermo.mixture.Mixture property), 659
set_chemical_constants() (thermo.mixture.Mixture SGl (thermo.chemical.Chemical property), 95
method), 678 SGl (thermo.mixture.Mixture property), 659
set_Chemical_property_objects() SGs (thermo.chemical.Chemical property), 95
(thermo.mixture.Mixture method), 678 SGs (thermo.mixture.Mixture property), 659
set_chemical_TP() (thermo.mixture.Mixture method), SHEFFY_JOHNSON (in module
678 thermo.thermal_conductivity), 985
set_constant_sources() (thermo.chemical.Chemical sigma (thermo.chemical.Chemical property), 114
method), 114 sigma (thermo.mixture.Mixture property), 678
set_constant_sources() (thermo.mixture.Mixture sigma() (thermo.bulk.Bulk method), 71
method), 678 sigma() (thermo.equilibrium.EquilibriumState method),
set_constants() (thermo.chemical.Chemical method), 555
114 sigma() (thermo.phases.Phase method), 851
set_constants() (thermo.mixture.Mixture method), SIGMA_LL_METHODS (in module thermo.bulk), 76
678
1276 Index
thermo Documentation, Release 0.2.24
Index 1277
thermo Documentation, Release 0.2.24
1278 Index
thermo Documentation, Release 0.2.24
Index 1279
thermo Documentation, Release 0.2.24
1280 Index
thermo Documentation, Release 0.2.24
Index 1281
thermo Documentation, Release 0.2.24
1282 Index
thermo Documentation, Release 0.2.24
Thallium_atom_fraction() thermo.activity
(thermo.equilibrium.EquilibriumState method), module, 51
497 thermo.bulk
Thallium_atom_fraction() (thermo.phases.Phase module, 62
method), 781 thermo.chemical
Thallium_atom_mass_flow() module, 76
(thermo.equilibrium.EquilibriumState method), thermo.chemical_package
497 module, 115
Thallium_atom_mass_flow() (thermo.phases.Phase thermo.datasheet
method), 781 module, 129
Thallium_atom_mass_fraction() thermo.electrochem
(thermo.equilibrium.EquilibriumState method), module, 130
497 thermo.eos
Thallium_atom_mass_fraction() module, 151
(thermo.phases.Phase method), 781 thermo.eos_alpha_functions
thermal_conductivity_gas_methods (in module module, 375
thermo.thermal_conductivity), 989 thermo.eos_mix
thermal_conductivity_gas_methods_P (in module module, 256
thermo.thermal_conductivity), 989 thermo.eos_mix_methods
thermal_conductivity_gas_mixture_methods (in module, 357
module thermo.thermal_conductivity), 994 thermo.eos_volume
thermal_conductivity_liquid_methods (in module module, 362
thermo.thermal_conductivity), 985 thermo.equilibrium
thermal_conductivity_liquid_methods_P (in mod- module, 402
ule thermo.thermal_conductivity), 985 thermo.flash
thermal_conductivity_liquid_mixture_methods module, 559
(in module thermo.thermal_conductivity), 991 thermo.functional_groups
thermal_conductivity_Magomedov() (in module module, 572
thermo.electrochem), 138 thermo.group_contribution.fedors
thermal_diffusivity() module, 1126
(thermo.equilibrium.EquilibriumState method), thermo.group_contribution.joback
557 module, 1115
thermal_diffusivity() (thermo.phases.Phase thermo.group_contribution.wilson_jasperson
method), 853 module, 1127
ThermalConductivityGas (class in thermo.heat_capacity
thermo.thermal_conductivity), 986 module, 605
ThermalConductivityGases thermo.interaction_parameters
(thermo.equilibrium.EquilibriumState prop- module, 623
erty), 497 thermo.interface
ThermalConductivityGasMixture (class in module, 618
thermo.thermal_conductivity), 992 thermo.law
ThermalConductivityGasMixture module, 627
(thermo.equilibrium.EquilibriumState prop- thermo.mixture
erty), 497 module, 638
ThermalConductivityLiquid (class in thermo.nrtl
thermo.thermal_conductivity), 981 module, 629
ThermalConductivityLiquidMixture (class in thermo.permittivity
thermo.thermal_conductivity), 990 module, 680
ThermalConductivityLiquidMixture thermo.phase_change
(thermo.equilibrium.EquilibriumState prop- module, 890
erty), 498 thermo.phase_identification
ThermalConductivityLiquids module, 895
(thermo.equilibrium.EquilibriumState prop- thermo.phases
erty), 498 module, 682
Index 1283
thermo Documentation, Release 0.2.24
1284 Index
thermo Documentation, Release 0.2.24
Index 1285
thermo Documentation, Release 0.2.24
TP_dependent_property() 396
(thermo.utils.TPDependentProperty method), Twu91_alpha_pure() (in module
1048 thermo.eos_alpha_functions), 401
TP_dependent_property_derivative_P() TWUPR (class in thermo.eos), 219
(thermo.utils.TPDependentProperty method), TwuPR95_a_alpha (class in
1048 thermo.eos_alpha_functions), 397
TP_dependent_property_derivative_T() TWUPRMIX (class in thermo.eos_mix), 315
(thermo.utils.TPDependentProperty method), TWUSRK (class in thermo.eos), 231
1048 TwuSRK95_a_alpha (class in
TP_or_T_dependent_property() thermo.eos_alpha_functions), 399
(thermo.utils.TPDependentProperty method), TWUSRKMIX (class in thermo.eos_mix), 329
1049
TP_zs_ws_cached (thermo.utils.MixtureProperty U
attribute), 1056 U (thermo.chemical.Chemical property), 96
TPDependentProperty (class in thermo.utils), 1046 u (thermo.eos_mix.PSRKMixingRules attribute), 356
translated (thermo.eos_mix.GCEOSMIX attribute), U (thermo.mixture.Mixture property), 660
300 U (thermo.stream.StreamArgs property), 979
Trebble_Bishnoi_a_alpha (class in U() (thermo.equilibrium.EquilibriumState method), 499
thermo.eos_alpha_functions), 395 U() (thermo.phases.Phase method), 783
Trebble_Bishnoi_alpha_pure() (in module U_dep() (thermo.equilibrium.EquilibriumState method),
thermo.eos_alpha_functions), 401 500
Tsat() (thermo.chemical.Chemical method), 96 U_dep() (thermo.phases.Phase method), 783
Tsat() (thermo.eos.GCEOS method), 172 U_dep_flow() (thermo.equilibrium.EquilibriumState
Tts (thermo.equilibrium.EquilibriumState property), 499 method), 500
Tts (thermo.phases.Phase property), 782 U_dep_flow() (thermo.phases.Phase method), 783
Tungsten_atom_count_flow() U_dep_g (thermo.eos.GCEOS property), 172
(thermo.equilibrium.EquilibriumState method), U_dep_l (thermo.eos.GCEOS property), 172
499 U_dep_mass() (thermo.equilibrium.EquilibriumState
Tungsten_atom_count_flow() (thermo.phases.Phase method), 500
method), 782 U_dep_mass() (thermo.phases.Phase method), 784
Tungsten_atom_flow() U_flow() (thermo.equilibrium.EquilibriumState
(thermo.equilibrium.EquilibriumState method), method), 500
499 U_flow() (thermo.phases.Phase method), 784
Tungsten_atom_flow() (thermo.phases.Phase U_formation_ideal_gas()
method), 782 (thermo.equilibrium.EquilibriumState method),
Tungsten_atom_fraction() 500
(thermo.equilibrium.EquilibriumState method), U_formation_ideal_gas() (thermo.phases.Phase
499 method), 784
Tungsten_atom_fraction() (thermo.phases.Phase U_formation_ideal_gas_mass()
method), 783 (thermo.equilibrium.EquilibriumState method),
Tungsten_atom_mass_flow() 501
(thermo.equilibrium.EquilibriumState method), U_formation_ideal_gas_mass()
499 (thermo.phases.Phase method), 784
Tungsten_atom_mass_flow() (thermo.phases.Phase U_ideal_gas() (thermo.equilibrium.EquilibriumState
method), 783 method), 501
Tungsten_atom_mass_fraction() U_ideal_gas() (thermo.phases.Phase method), 784
(thermo.equilibrium.EquilibriumState method), U_ideal_gas_mass() (thermo.equilibrium.EquilibriumState
499 method), 501
Tungsten_atom_mass_fraction() U_ideal_gas_mass() (thermo.phases.Phase method),
(thermo.phases.Phase method), 783 784
TWAs (thermo.equilibrium.EquilibriumState property), U_mass (thermo.stream.StreamArgs property), 979
495 U_mass() (thermo.equilibrium.EquilibriumState
TWAs (thermo.phases.Phase property), 779 method), 501
Twu91_a_alpha (class in thermo.eos_alpha_functions), U_mass() (thermo.phases.Phase method), 784
1286 Index
thermo Documentation, Release 0.2.24
Index 1287
thermo Documentation, Release 0.2.24
1288 Index
thermo Documentation, Release 0.2.24
Index 1289
thermo Documentation, Release 0.2.24
1290 Index
thermo Documentation, Release 0.2.24
Index 1291
thermo Documentation, Release 0.2.24
1292 Index
thermo Documentation, Release 0.2.24
Zirconium_atom_flow() (thermo.phases.Phase
method), 791
Zirconium_atom_fraction()
(thermo.equilibrium.EquilibriumState method),
508
Zirconium_atom_fraction() (thermo.phases.Phase
method), 791
Zirconium_atom_mass_flow()
(thermo.equilibrium.EquilibriumState method),
508
Zirconium_atom_mass_flow() (thermo.phases.Phase
method), 792
Zirconium_atom_mass_fraction()
(thermo.equilibrium.EquilibriumState method),
509
Zirconium_atom_mass_fraction()
(thermo.phases.Phase method), 792
Zl (thermo.chemical.Chemical property), 99
Zl (thermo.mixture.Mixture property), 664
Zl_STP (thermo.mixture.Mixture property), 664
Zls (thermo.mixture.Mixture property), 664
Zmc() (thermo.bulk.Bulk method), 68
Zmc() (thermo.equilibrium.EquilibriumState method),
509
Zmc() (thermo.phases.Phase method), 792
Zs (thermo.chemical.Chemical property), 99
zs (thermo.equilibrium.EquilibriumState attribute), 558
zs (thermo.stream.EquilibriumStream attribute), 965
zs (thermo.stream.StreamArgs property), 981
zs_calc (thermo.equilibrium.EquilibriumState prop-
erty), 558
zs_calc (thermo.phases.Phase property), 854
zs_calc (thermo.stream.StreamArgs property), 981
zs_no_water() (thermo.equilibrium.EquilibriumState
method), 558
zs_no_water() (thermo.phases.Phase method), 854
Zss (thermo.mixture.Mixture property), 665
Index 1293