Repository navigation
Select Property Enhancements
The select method has been expanded to support all table data types, including TableData, TableMatrixData, TableEquation, and TableMatrixEquation. This change replaces the need for check_property and check_function methods.
Simplified Property Retrieval
We've introduced a new, more intuitive way to retrieve properties from TableData and TableMatrixData objects.
Select Methods
select_function used to select an equation from thermodb loaded (pickle file). select method can be used for data, matrix-data, equation, and matrix-equation.
# select function
func1_ = data_thermodb.select_function('heat-capacity')
print(func1_.args)
# exec
func1_.cal(T=295.15, message="heat capacity of methanol")TableData Retrieval
Before
prop1_ = data_thermodb.select('general-data')
# or
# prop1_ = data_thermodb.select_property('general-data')
prop1_.get_property('dHf_IG')After
dHf_IG_src = 'general-data | dHf_IG'
data_thermodb.retrieve(dHf_IG_src, message="enthalpy of formation")Both results in:
{
'value': '-200.7',
'unit': 'kJ/mol',
'symbol': 'dHf_IG',
'property_name': 'dHf_IG',
'message': 'enthalpy of formation',
'databook_name': 'CO2 Hydrogenation Reaction',
'table_name': 'CO2 hydrogenation - General Data'
}
TableMatrixData Retrieval
Before
nrtl_alpha_data.get_matrix_property("Alpha_i_j",
[comp1, comp2], symbol_format='alphabetic')After
nrtl_data_ = " nrtl_alpha | Alpha_i_j | methanol | ethanol"
nrtl_thermodb.retrieve(nrtl_data_, message="NRTL Alpha value")Both results in:
{
'property_name': 'Alpha',
'symbol': 'Alpha_methanol_ethanol',
'unit': '1',
'value': 0.3,
'message': 'NRTL Alpha value',
'databook_name': 'NRTL',
'table_name': 'Non-randomness parameters of the NRTL equation'
}
Upgrade Notes
- The
check_propertyandcheck_functionmethods have been deprecated in favor of theselect_properyandselect_functionmethods. - The
get_propertyandget_matrix_propertymethods have been replaced with theretrievemethod. selectmethod can be used for data, matrix-data, equation, and matrix-equation.
Feedback
We welcome your feedback and look forward to hearing about your experiences with this release.