Closed yalinli2 closed 4 years ago
The density is so small because the phase of NH3 is locked as a gas. To fix this, you could remove the line that locks NH3 as a gas in your "chemicals.py" script. You would also have to make sure to add key properties that are missing
Some volume models work better for some liquids than with others (e.g. polar vs non-polar). For water in particular, I believe the best one to use is "Campbell_Thodos":
>>> from thermosteam import Chemical, functional as fn
>>> Water = Chemical('Water')
>>> Water.V.l
TPDependentModelHandle(T, P) -> V.l [m^3/mol]
[0] VDI_PPDS
[1] Yen_Woods
[2] Rackett
[3] Yamada_Gunn
[4] Bhirud_Normal
[5] Townsend_Hales
[6] Rackett
[7] SNM0
[8] Campbell_Thodos
[9] CRC_inorganic_liquid_constant
[10] Rackett
[11] Costald
[12] Costald_Compressed
>>> Water.V.l.models.rotate(-8) # switch model to Campbell_Thodos
>>> V_298 = Water.V('l', 298.15, 101325)
>>> fn.V_to_rho(V_298, Water.MW)
999.2786185445884
>>> V_350 = Water.V('l', 350, 101325)
>>> fn.V_to_rho(V_350, Water.MW)
966.0898522462588
Oh wow I never thought 0.4% of NH3 could make such a big difference, thanks a bunch!!!
Quick update: There were some problems with the VDI_PPDS
method. But its fixed now. Its actually a pretty good method for water too.
Ah I see, yes indeed it's giving good results now, thanks!!!
Description I think there might be problems with how thermosteam calculates stream volumes. I found this when trying to calculate concentration of certain compounds in kg/L, then realize that volume/density is off.
For example, run the following codes:
My output:
My questions:
Environment python: v3.7.6 OS: macOS Catalina 10.15.3 biosteam: v2.11.0 thermosteam: v.0.9.0 biorefineries: v2.8.0
Thanks!!!