sandlerprops package¶
- 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/stable/src/sandlerprops/resources')¶
- data_dir: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/sandlerprops/checkouts/stable/src/sandlerprops/resources/data')¶
- datafile_path: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/sandlerprops/checkouts/stable/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
- get_database()[source]¶
Get or create the singleton database instance.
- Returns:
The singleton instance of the PropertiesDatabase.
- Return type:
- class Compound[source]¶
Bases:
objectChemical compound with thermophysical properties.
- __init__(No=0, Formula='', Name='', Molwt=<factory>, Tfp=<factory>, Tb=<factory>, Tc=<factory>, Pc=<factory>, Vc=<factory>, Zc=0.0, Omega=0.0, Dipm=<factory>, CpA=0.0, CpB=0.0, CpC=0.0, CpD=0.0, dHf=<factory>, dGf=<factory>, Eq=0, VpA=0.0, VpB=0.0, VpC=0.0, VpD=0.0, Tmin=<factory>, Tmax=<factory>, Lden=0.0, Tden=<factory>, charge=0, atomset=<factory>, atomdict=<factory>, metadata=<factory>)¶
- Parameters:
No (int)
Formula (str)
Name (str)
Molwt (Quantity)
Tfp (Quantity)
Tb (Quantity)
Tc (Quantity)
Pc (Quantity)
Vc (Quantity)
Zc (float)
Omega (float)
Dipm (Quantity)
CpA (float)
CpB (float)
CpC (float)
CpD (float)
dHf (Quantity)
dGf (Quantity)
Eq (int)
VpA (float)
VpB (float)
VpC (float)
VpD (float)
Tmin (Quantity)
Tmax (Quantity)
Lden (float)
Tden (Quantity)
charge (int)
atomset (set)
atomdict (dict)
metadata (dict)
- Return type:
None
- get_Cp_coeffs()[source]¶
Get ideal gas heat capacity coefficients as dict.
Returns coefficients for: Cp = a + b*T + c*T^2 + d*T^3 where Cp is in J/(mol*K) and T is in K (dimensionless values).
- property Cp¶
Returns ideal gas heat capacity coefficients as a numpy array
- Cp_ideal_gas(T)[source]¶
Calculate ideal gas heat capacity at temperature T.
- Parameters:
T (Quantity) – Temperature
- Returns:
Heat capacity in J/(mol-K)
- Return type:
Quantity
Submodules¶
- sandlerprops.cli module
- sandlerprops.compound module
CompoundCompound.NoCompound.FormulaCompound.NameCompound.MolwtCompound.TfpCompound.TbCompound.TcCompound.PcCompound.VcCompound.ZcCompound.OmegaCompound.DipmCompound.CpACompound.CpBCompound.CpCCompound.CpDCompound.dHfCompound.dGfCompound.EqCompound.VpACompound.VpBCompound.VpCCompound.VpDCompound.__init__()Compound.TminCompound.TmaxCompound.LdenCompound.TdenCompound.chargeCompound.atomsetCompound.atomdictCompound.metadataCompound.get_Cp_coeffs()Compound.__post_init__()Compound.CpCompound.Cp_ideal_gas()Compound.Cp_mean()Compound.Pvap_est
bankblock()blockify()flattify()my_flatten()reduce()parse_empirical_formula()
- sandlerprops.properties module
PropertiesDatabasePropertiesDatabase.resources_rootPropertiesDatabase.data_dirPropertiesDatabase.datafile_pathPropertiesDatabase.__init__()PropertiesDatabase.show_properties()PropertiesDatabase.find_compound()PropertiesDatabase.show_compound_properties()PropertiesDatabase.get_property()PropertiesDatabase.get_compound()
get_database()