BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
36 stars 17 forks source link

Consultation about melting point check #94

Closed zasddsgg closed 7 months ago

zasddsgg commented 7 months ago

Hello, I want to check the melting point of Riboflavin at 7atm or whether Riboflavin is liquid or solid state at 7atm, 650K. I use Riboflavin.get_phase to check the phase state of Riboflavin at specified temperature and pressure, but it seems that at 7atm and 1atm, the phase of Riboflavin is the same, but in fact, the melting point of Riboflavin is dependent on pressure, the higher the pressure, the higher the melting point, so it seems like Riboflavin should not be liquid state at 7atm, 560K, right?

I also tried to use Riboflavin.get_property('Tm','K', P=7*101325) to check the melting point of Riboflavin at 7 atm, but an error was reported. Could I consult you how to check the melting point of a substance at a specified pressure in BioSTEAM? Thanks for your help. Wish you a good day.

The code is as follows:

import biosteam as bst
bst.nbtutorial()

Riboflavin = bst.Chemical('Riboflavin', Hf=-55700, Tc=650+273.15, Tb=240+273.15, Hvap=70000)
print(Riboflavin.Tm)
print(Riboflavin.get_phase(T=560, P=7*101325))
print(Riboflavin.get_phase(T=560, P=101325))
print(Riboflavin.get_phase(T=550, P=7*101325))
print(Riboflavin.get_phase(T=550, P=101325))
Riboflavin.get_property('Tm','K', P=7*101325)

The error information is as follows:

TypeError                                 Traceback (most recent call last)
Cell In[1], line 10
      8 print(Riboflavin.get_phase(T=550, P=7*101325))
      9 print(Riboflavin.get_phase(T=550, P=101325))
---> 10 Riboflavin.get_property('Tm','K', P=7*101325)

File D:\anaconda\envs\zddd\lib\site-packages\thermosteam\_chemical.py:863, in Chemical.get_property(self, name, units, *args, **kwargs)
    839 def get_property(self, name, units, *args, **kwargs):
    840     """
    841     Return property in requested units.
    842 
   (...)
    861 
    862     """
--> 863     value = getattr(self, name)(*args, **kwargs)
    864     units_dct = thermo_units.chemical_units_of_measure
    865     if name in units_dct:

TypeError: 'float' object is not callable
yoelcortes commented 7 months ago

@zasddsgg, BioSTEAM does not yet have P-dependent melting point models. The melting point temperature Tm is a float (constant).

zasddsgg commented 7 months ago

However, at high pressure, such as 7atm, the phase state of Riboflavin seems not quite right, for example, if it should be solid state at 650K, but because the melting point does not change with the pressure, it is still liquid state at 650K. If I want to use press filtration for solid-liquid separation, that seems to affect the separation of Riboflavin.

yoelcortes commented 7 months ago

@zasddsgg, process specifications can help you get around this limitation to model mass and energy balances exactly the way you would like it to work: https://biosteam.readthedocs.io/en/latest/tutorial/Process_specifications.html

Thanks!