Repository navigation
Search Functionality
We are excited to announce the addition of a search function to PyThermoDB. This feature allows users to search for a component and retrieve information on the available thermodynamic properties for calculation.
Example Usage:
# Search for a component
key1 = 'Carbon dioxide'
search_terms = [key1]
search_res = tdb.search_databook(
search_terms, res_format='dict', search_mode='exact')
print(search_res)Search Results:
The search function returns a dictionary containing information on the available data for the searched component. The results include:
databook-id: The ID of the databook containing the data.
databook-name: The name of the databook containing the data.
table-id: The ID of the table containing the data.
table-name: The name of the table containing the data.
data-type: The type of data available (e.g., "data").
Example search results:
{
'record-1': {
'search-mode': 'exact',
'search-terms': 'CARBON DIOXIDE',
'databook-id': 3,
'databook-name': 'Chemical and Engineering Thermodynamics',
'table-id': 2,
'table-name': 'Table A.IV Enthalpies and Gibbs Energies of Formation',
'data-type': 'data'
},
'record-2': {
'search-mode': 'exact',
'search-terms': 'CARBON DIOXIDE',
'databook-id': 5,
'databook-name': 'Introduction to Chemical Engineering Thermodynamics, 9th Edition',
'table-id': 1,
'table-name': 'Table B.1 Characteristic Properties of Pure Species',
'data-type': 'data'
}
}