Comments (4)
Pure components should work fine but instead of FlashVL you need to use FlashPureVLS: https://thermo.readthedocs.io/thermo.flash.html#thermo.flash.FlashPureVLS
from thermo.
Hi @mikeyj777,
The legacy Stream interface doesn't use the same enthalpy basis as the new Phase/flasher-based stuff, would not recommend trying to use them together. EquilibriumStream is the replacement for Stream. I have put off documenting it & don't have a tutorial; however, to combine to EquilibriumStream objects, you would add their flow rates (.ns attribute) and energy (.energy atribute) and provide them as input to a new EquilibriumStream object, as well as the pressure & the flasher object.
Here's a brief example
from thermo import *
constants, properties = ChemicalConstantsPackage.from_IDs(['methane', 'ethane', 'nitrogen'])
eos_kwargs = {'Pcs': constants.Pcs, 'Tcs': constants.Tcs, 'omegas': constants.omegas}
gas = CEOSGas(PRMIX, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
liquid = CEOSLiquid(PRMIX, eos_kwargs=eos_kwargs, HeatCapacityGases=properties.HeatCapacityGases)
flasher = FlashVL(constants, properties, liquid=liquid, gas=gas)
S1 = EquilibriumStream(flasher=flasher, T=300, P=1e5, ns=[1,2,3])
S2 = EquilibriumStream(flasher=flasher, T=305, P=1e5, ns=[.5,.3,.8])
ns_out = [na+nb for na, nb in zip(S1.ns, S2.ns)]
S3 = EquilibriumStream(flasher=flasher, P=1e5, ns=ns_out, energy=S1.energy+S2.energy)
S3.T, S3.ns
(300.9985275567583, [1.5, 2.2999999999999994, 3.7999999999999994])
Sincerely,
Caleb
from thermo.
thank you so much for the great support! I will give it a go and comment back with any issues.
from thermo.
How would you recommend working with a pure component stream? the equilibrium stream failed with a div by zero error in property_package.py, line 455
from thermo.
Related Issues (20)
- Gas phase mixture enthalpy values decreasing with increased pressure HOT 3
- 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
- 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.