optimus.material.common
Module Contents
Classes
Functions
|
Read excel database file as a pandas dataframe |
|
Extract material properties from all databases. |
|
Write a pandas dataframe of user-defined properties to the user-defined |
- optimus.material.common.get_excel_database(database='default', sheet_name=0, header_format=(0, 1), index_col=None)
Read excel database file as a pandas dataframe
- Parameters
- database: string
The type of the database to be loaded. Accepted values are: ‘default’: to load default database, ‘user-defined’: to load user-defined database.
- sheet_name: str, int
The excel sheet to be loaded
- header_format: tuple[int]
The header format of data table in the sheet
- index_colint, None
Column index for labels.
- Returns
- dataframe: pandas.Dataframe
The database with material parameters.
- optimus.material.common.get_material_properties(name)
Extract material properties from all databases.
- Parameters
- namestring
The name of material in the database.
- Returns
- propertiesdict
A dictionary of material properties
- optimus.material.common.write_material_database(properties)
Write a pandas dataframe of user-defined properties to the user-defined material database Excel file.
- Parameters
- properties: dict
The dictionary of material properties defined by the user
- Returns
- None
- class optimus.material.common.Material(properties)
- compute_wavenumber(frequency)
Calculate the wavenumber for the specified frequency.
- Parameters
- frequency: float
The wave frequency
- Returns
- wavenumbercomplex
The wavenumber
- compute_wavelength(frequency)
Calculate the wave length for the specified frequency.
- Parameters
- frequency: float
The wave frequency
- Returns
- wavelengthfloat
The wave length
- compute_attenuation(frequency)
Calculate the power law attenuation coefficient (alpha) for the specified frequency.
- Parameters
- frequency: float
The wave frequency
- Returns
- attenuationfloat
The attenuation coefficient
- print()
Print the material properties
- Returns
- None