BioSTEAMDevelopmentGroup / Bioindustrial-Park

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

Counseling on the loss of physical properties #168

Closed zasddsgg closed 1 month ago

zasddsgg commented 2 months ago

Hello, after I customize a substance using the following code, I find the following properties are missing through Sugar_model.get_missing_properties(). Do all the following missing properties need to be completed (as follows)? Does the absence of 'Dortmund', 'UNIFAC', 'PSRK' affect the accuracy of the results? Does the absence of iscyclic_aliphatic affect the accuracy of the results?

Sugar_model=bst.Chemical('Sugar_model',
                  default=True,
                  search_db=False,
                  formula='C10H15O3',
                  Tb=350.7+273.15, 
                  Hvap=82035.54660,
                  phase_ref="l", 
                  Tm=70+273.15,
                  Hfus=29600,
                  Hf=-790760,
                  Tc=580,
                  Pc=2500002,
                  Vc=0.0005)

The following missing properties are as follows.

['Dortmund',
 'UNIFAC',
 'PSRK',
 'Pt',
 'dipole',
 'Sfus',
 'iscyclic_aliphatic',
 'Tm',
 'similarity_variable',
 'Tt',
 'sigma',
 'epsilon',
 'omega']
zasddsgg commented 2 months ago

Hello, for custom substances, due to the lack of 'Dortmund','UNIFAC', 'PSRK', I added them through the code Sugar_model.Dortmund = {'CH3': 2, 'CH2': 3}, but error AttributeError: can't set attribute 'Dortmund' will report. A lack of Dortmund seems to lead to a lack of ActivityCoefficients (https://biosteam.readthedocs.io/en/latest/API/thermosteam/equilibrium/activity_coefficients_module.html#thermosteam.equilibrium.activity_coefficients.DortmundActivityCoefficients:~:text=Create%20a%20DortmundActivityCoefficients%20that%20estimates%20activity%20coefficients%20using%20the%20Dortmund%20UNIFAC%20group%20contribution%20method%20when%20called%20with%20a%20composition%20and%20a%20temperature%20(K).).

If I add Dortmund in the following way, AttributeError: 'VLE' object has no attribute '_dew_point' will report.

Sugar_model=bst.Chemical('Sugar_model',
                  default=True,
                  search_db=False,
                  formula='C10H15O3',
                  Tb=350.7+273.15, 
                  Hvap=82035.54660,
                  phase_ref="l", 
                  Tm=70+273.15,
                  Hfus=29600,
                  Hf=-790760,
                  Tc=580,
                  Pc=2500002,
                  Vc=0.0005,
                  Dortmund = {'CH3': 2, 'CH2': 3})
yoelcortes commented 1 month ago

@zasddsgg,

You can use the <GroupCounts>.set_group_counts_by_name method.

Sugar_model.Dortmund.set_group_counts_by_name({'CH3': 2, 'CH2': 3})
zasddsgg commented 1 month ago

Thank you for your answer. If the following properties are missing, do all the following missing properties need to be completed (as follows). If the following properties are missing, will it affect the accuracy of the simulation results, TEA and LCA?

['Pt',
 'dipole',
 'Sfus',
 'iscyclic_aliphatic',
 'Tm',
 'similarity_variable',
 'Tt',
 'sigma',
 'epsilon',
 'omega']
zasddsgg commented 1 month ago

@yoelcortes, Hello, could you please take some time to look at this problem.