Comments (3)
Hi Odhran!
Yes, this is expected behavior. By the way, there is now a high-accuracy gas-only pseudo-pure model specifically for air in Thermo.
from thermo import *
import numpy as np
from thermo.phases import DryAirLemmon
import matplotlib.pyplot as plt
from thermo.chemical_package import lemmon2000_constants, lemmon2000_correlations
T, P = 298.15, 101325.0
gas = DryAirLemmon(T=T, P=P)
flasher = FlashPureVLS(constants=lemmon2000_constants, correlations=lemmon2000_correlations,
gas=gas, liquids=[], solids=[])
Ps = np.linspace(500000,20000000, 100)
gas_H = np.zeros_like(Ps)
k=0
for P in Ps:
gas_H[k] = flasher.flash(T=500, P=float(P)).H()
k=k+1
plt.figure()
plt.plot(Ps,gas_H, label = "gas_H")
plt.xlabel("Pressure")
plt.ylabel("Enthalpy")
plt.legend()
plt.show()
It also shows the same behavior. Note that when compressing air in real life, the temperature increases as the process is isentropic, which results in the significant compression duty.
from thermo.
Hi Odhran,
Unfortunately the Lemmon model is pseudo-pure, i.e. incapable of participating in vapor-liquid equilibrium. In thermo, you can only use it for obtaining vapor properties. Adding a liquid phase would not work with it. Additionally, it is slower due to its complexity.
Sincerely,
Caleb
from thermo.
Much appreciated Caleb! Ah interesting I did read that Lemmon paper a few years back actually. So can I swap out the current gas phase EOS then for the improved Lemmon one, and leave the liquid phase as it is? How would that look?
My current code for reference:
constants, properties = ChemicalConstantsPackage.from_IDs(['nitrogen', 'oxygen', 'argon'])
kijs = IPDB.get_ip_asymmetric_matrix('ChemSep PR', constants.CASs, 'kij')
eos_kwargs = {'Pcs': constants.Pcs, 'Tcs': constants.Tcs, 'omegas': constants.omegas, 'kijs': kijs}
gas = CEOSGas(PRMIXTranslatedConsistent, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
liquid = CEOSLiquid(PRMIXTranslatedConsistent, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
flasher = FlashVL(constants, properties, liquid=liquid, gas=gas)
zs = normalize([78.08, 20.95, .93])
Also, do you know if the Lemmon model is faster than the alternative I have above, or is it actually slower due to the increased accuracy?
Much appreciated
from thermo.
Related Issues (20)
- Data for CAS# 64742-48-9 (Petroleum Naptha) missing HOT 4
- Certain properties missing from nitrogen gas HOT 4
- Mixture diffusion coefficient HOT 1
- PT_surface_special fails for mixture PR78MIX due to missing Tc and Pc attributes HOT 1
- Example for P-T diagrams?
- Mercury density HOT 3
- air.lemmon2000_rho HOT 2
- ImportError: cannot import name 'horner' from 'chemicals.utils' HOT 2
- Proposal on lists/numpy array support
- Chemical serialize able HOT 3
- Issues for Zg calculation HOT 1
- SQLite Fail on threading HOT 4
- Stream generation for air - cas_id references different chemical and H_reactive is attempted to use in calculation, but is None HOT 2
- Thermo v. 0.2.26 flash_vl - Raising Exception on PH flash HOT 4
- Examples on Raoult's Law PT Flash
- Phase envelope fails for mixtures HOT 2
- HELP VaporPressure HOT 1
- Inconsistent "rhol_60Fs_mass" values for normal paraffins HOT 1
- Help with implementing binary excess enthalpy predictions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thermo.