Closed zasddsgg closed 9 months ago
@zasddsgg,
As long as there is a vapor pressure and a gas phase, there will always be a small amount of that chemical in the gas phase (that's part of the reason there is moisture in the air):
import biosteam as bst
Riboflavin = bst.Chemical('Riboflavin', Hf=-55700, Tc=650+273.15, Tb=240+273.15)
Riboflavin.Psat(453.15) # -> 42750
The error is a result of not having a Hvap model:
import biosteam as bst
Riboflavin = bst.Chemical('Riboflavin', Hf=-55700, Tc=650+273.15, Tb=240+273.15)
Riboflavin.H.g # ->
"""
Functor: Gas_Enthalpy_Ref_Solid(T, P) -> H.g [J/mol]
Cn_g: HeatCapacityGas(T)
H_int_T_ref_to_Tm_s: 1.5409e+05 J/mol
Hfus: 0 J/mol
H_int_Tm_to_Tb_l: -30866 J/mol
Hvap_Tb: None
Tb: 513.15 K
H_ref: 0 J/mol
"""
Yes, Hfus of 0 is not correct, feel free to change it!
Tc is the critical temperature, the reference phase is based only on Tm, Tb, and Tref (298.15 K in BioSTEAM).
Thanks!
Hello, I encountered the following error when calling Flash, I tried various ways, while still no solution, could I consult you how to solve it? Thanks for your help. Wish you a good day.
a) According to line 74 error information "return H_ref + H_int_T_ref_to_Tm_s + Hfus + H_int_Tm_to_Tb_l + Hvap_Tb + Cn_g.T_dependent_property_integral(Tb, T)", It seems that riboflavin becomes a gas, could I consult you why does riboflavin become a gas (the temperature T(453.15K) I set does not reach Tc(923.15K) of riboflavin)? b) For line 116 error information “if self.force_gas_critical_phase and T > self.Tc: phase = 'g'”, when T > self.Tc, why is the chemical in the gas state? c) In addition, error information "TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'" seems to indicate that H_int_T_ref_to_Tm_s and H_int_Tm_to_Tb_l are of type “None” caused by False Cns and Cnl as in https://biosteam.readthedocs.io/en/latest/_modules/thermosteam/_chemical.html#Chemical.get_property:~:text=else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20H_int_Tm_to_Tb_l,S_int_T_ref_to_Tm_s%20%3D%20None, could I consult you how to solve this problem? I tried to call Riboflavin.Cn('s', 298.15), it is valid. So I do not know where is the error from.
d) Also, riboflavin has a Hfus of 0, which doesn't seem right?
e) Could I confirm with you is Tc a fixed value, just like the boiling point, and not related to the reference phase of the chemical?
The code is as follows:
The error information is as follows: