sandlerprops.properties module¶
- class PropertiesDatabase[source]¶
Bases:
objectProperties database for thermophysical data.
Class Attributes¶
- resources_rootPath
Root directory:
files('sandlerprops') / 'resources'- data_dirPath
Data directory:
resources_root / 'data'- datafile_pathPath
Database CSV path:
data_dir / 'properties_database.csv'
- resources_root: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/sandlerprops/checkouts/latest/src/sandlerprops/resources')¶
- data_dir: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/sandlerprops/checkouts/latest/src/sandlerprops/resources/data')¶
- datafile_path: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/sandlerprops/checkouts/latest/src/sandlerprops/resources/data/properties_database.csv')¶
- show_properties(args=None)[source]¶
Subcommand handler that displays the list of available properties with their units.
- Parameters:
args (argparse.Namespace, optional) – Not used; present for compatibility since this is a subcommand handler.
- find_compound(args)[source]¶
Subcommand handler that looks for a compound by name and displays if found.
- Parameters:
args (argparse.Namespace) – Must contain attribute ‘compound_name’ with the name of the compound to find.
- show_compound_properties(args)[source]¶
Display all properties of a specified compound.
- Parameters:
args (Namespace)
- get_property(compound_id, property_name, with_units=True)[source]¶
Get a property value for a compound.
- Parameters:
- Returns:
Property value
- Return type:
float or
pint.Quantity