Material physical property models are created based on sets of data that are determined experimentally. One can also test an existing property model against a data set to determine how well the model describes the physical property in question. In auxi these data sets are stored in csv files that have a specific format required by auxi. The DataSet class makes it easy to create, store, read, and use these data sets from inside the Python environment.
In this example we will address the following aspects:
DataSet class.create_template() method.auxi.
In [ ]:
from auxi.tools.materialphysicalproperties.core import DataSet
You are now ready to use the DataSet class.
The DataSet's create_template method makes it easy to create your own physical property data set. You only provide the material, path, and show parameters. A csv file will then be generated, and it will be automatically opened in your default csv editor if you set show to True.
In this csv file you would see text between < > signs. This indicates which text you should edit, like parameter name, units, symbol and values.
In [ ]:
path = '../../temp'
material = 'auxiite'
DataSet.create_template(material, path, show=True)
In [ ]:
dataset = DataSet('data/dataset-auxiite2.csv')
We can now use the content of the DataSet object. For this example, we will print the different variables inside the object. These include:
In [ ]:
print('Material: ', dataset.material)
print('Description: ', dataset.description)
print('References: ', dataset.reference)
print('Properties: ', dataset.col_names)
print('Symbols: ', dataset.col_symbols)
print('Display symbols: ', dataset.display_symbols_dict)
print('Units: ', dataset.col_units)
print('Data:')
print(dataset.data)
You can also print the content of the data set by simply doing the following:
In [ ]:
print(dataset)
In [ ]:
from auxi.tools.materialphysicalproperties.gases import air_dataset
print(air_dataset)
There is also a data set for water.
In [ ]:
from auxi.tools.materialphysicalproperties.liquids import h2o_dataset
print(h2o_dataset)