Skip to content

registry

create_critical_properties(substance, temperature, pressure, volume)

Create the critical properties of a chemical substance.

Existing critical properties can be overriden with this function.

Source code in src/chemical_utils/properties/registry.py
def create_critical_properties(
    substance, temperature: Temperature, pressure: Pressure, volume: MolarVolume
) -> CriticalProperties:
    """
    Create the critical properties of a chemical substance.

    Existing critical properties can be overriden with this function.
    """
    _critical_properties[substance] = CriticalProperties(temperature, pressure, volume)
    return _critical_properties[substance]

create_standard_entropy(substance, entropy)

Create the standard (25 Celcius, 1 bar) entropy of a chemical substance.

Existing standard entropy can be overriden with this function.

Source code in src/chemical_utils/properties/registry.py
def create_standard_entropy(substance, entropy: Entropy) -> Entropy:
    """
    Create the standard (25 Celcius, 1 bar) entropy of a chemical substance.

    Existing standard entropy can be overriden with this function.
    """
    _standard_entropies[substance] = entropy
    return _standard_entropies[substance]

create_standard_formation_properties(substance, formation_enthalpy, formation_gibbs_energy)

Create the standard (25 Celcius, 1 bar) formation properties of a chemical substance.

Existing standard formation properties can be overriden with this function.

Source code in src/chemical_utils/properties/registry.py
def create_standard_formation_properties(
    substance,
    formation_enthalpy: MolarEnergy,
    formation_gibbs_energy: MolarEnergy,
) -> FormationProperties:
    """
    Create the standard (25 Celcius, 1 bar) formation properties of a chemical
    substance.

    Existing standard formation properties can be overriden with this function.
    """
    _standard_formation_properties[substance] = FormationProperties(
        formation_enthalpy, formation_gibbs_energy
    )
    return _standard_formation_properties[substance]

create_thermal_capacity_coefficients(substance, coefficient)

Create thermal capacity coefficients of a chemical substance.

Exisintg thermal capacity coefficient can be overriden with this function.

Source code in src/chemical_utils/properties/registry.py
def create_thermal_capacity_coefficients(
    substance, coefficient: ThermalCapacityCoefficient
) -> ThermalCapacityCoefficient:
    """
    Create thermal capacity coefficients of a chemical substance.

    Exisintg thermal capacity coefficient can be overriden with this function.
    """
    _thermal_capacity_coefficient[substance] = coefficient
    return _thermal_capacity_coefficient[substance]

get_critical_properties(substance)

Get the critical properties of a chemical substance. Returns None if the properties have not been created for the given substance.

Source code in src/chemical_utils/properties/registry.py
def get_critical_properties(substance) -> Optional[CriticalProperties]:
    """
    Get the critical properties of a chemical substance. Returns None if the properties
    have not been created for the given substance.
    """
    return _critical_properties.get(substance, None)

get_standard_entropy(substance)

Get the standard (25 Celcius, 1 bar) entropy of a chemical substance. Returns None if the entropy has not been created for the given substance.

Source code in src/chemical_utils/properties/registry.py
def get_standard_entropy(substance) -> Optional[Entropy]:
    """
    Get the standard (25 Celcius, 1 bar) entropy of a chemical substance. Returns None
    if the entropy has not been created for the given substance.
    """
    return _standard_entropies.get(substance, None)

get_standard_formation_properties(substance)

Get the standard (25 Celcius, 1 bar) formation properties of a chemical substance. Returns None if the properties have not been created for the given substance.

Source code in src/chemical_utils/properties/registry.py
def get_standard_formation_properties(substance) -> Optional[FormationProperties]:
    """
    Get the standard (25 Celcius, 1 bar) formation properties of a chemical substance.
    Returns None if the properties have not been created for the given substance.
    """
    return _standard_formation_properties.get(substance, None)

get_thermal_capacity_coefficients(substance)

Get the thermal capacity coefficient of a chemical substance. Returns None if the coefficient have not been created for the given substance.

Source code in src/chemical_utils/properties/registry.py
def get_thermal_capacity_coefficients(
    substance,
) -> Optional[ThermalCapacityCoefficient]:
    """
    Get the thermal capacity coefficient of a chemical substance. Returns None if the
    coefficient have not been created for the given substance.
    """
    return _thermal_capacity_coefficient.get(substance, None)