Skip to content

properties

Conditions dataclass

A list of properties that defines the conditions of some calculation, etc.

Source code in src/chemical_utils/properties/properties.py
@dataclass(frozen=True)
class Conditions:
    """
    A list of properties that defines the conditions of some calculation, etc.
    """

    properties: List[Property]

CriticalProperties dataclass

Properties at the critical point of chemical substances.

Source code in src/chemical_utils/properties/properties.py
@dataclass
class CriticalProperties:
    """
    Properties at the critical point of chemical substances.
    """

    temperature: Temperature
    pressure: Pressure
    volume: MolarVolume

Entropy

Bases: ValidatedProperty

Entropy property with default units of J/kmol/K.

Source code in src/chemical_utils/properties/properties.py
class Entropy(ValidatedProperty):
    """
    Entropy property with default units of J/kmol/K.
    """

    generic_unit_descriptor = EnergyUnit / AmountUnit / AbsoluteTemperatureUnit
    default_units = JOULE / KILO_MOL / KELVIN

    def validate_value(self, value: float) -> None:
        if not value >= 0:
            raise PropertyValidationError("entropy must be bigger than 0. ")

EquilibriumConstant dataclass

Equilibrium constant at certain conditions.

Source code in src/chemical_utils/properties/properties.py
@dataclass
class EquilibriumConstant:
    """
    Equilibrium constant at certain conditions.
    """

    value: NonDimensionalProperty
    conditions: Conditions

FormationProperties dataclass

Formation properties of chemical substances.

Source code in src/chemical_utils/properties/properties.py
@dataclass
class FormationProperties:
    """
    Formation properties of chemical substances.
    """

    enthalpy: MolarEnergy
    gibbs_energy: MolarEnergy

MolarEnergy

Bases: Property

Molar energy property with default units of J/kmol.

Source code in src/chemical_utils/properties/properties.py
class MolarEnergy(Property):
    """
    Molar energy property with default units of J/kmol.
    """

    default_units = JOULE / KILO_MOL

MolarVolume

Bases: ValidatedProperty

Molar volume property with default units of m^3/kmol.

Source code in src/chemical_utils/properties/properties.py
class MolarVolume(ValidatedProperty):
    """
    Molar volume property with default units of m^3/kmol.
    """

    generic_unit_descriptor = LengthUnit**3 / AmountUnit
    default_units = METER**3 / KILO_MOL

    def validate_value(self, value: float) -> None:
        if not value >= 0:
            raise PropertyValidationError(
                "cannot create a volume with value less than 0. "
            )

NonDimensionalProperty

Bases: Property

Property without units.

Source code in src/chemical_utils/properties/properties.py
class NonDimensionalProperty(Property):
    """
    Property without units.
    """

    default_units = NON_DIMENSIONAL

Pressure

Bases: ValidatedProperty

Pressure property with default units of bar.

Source code in src/chemical_utils/properties/properties.py
class Pressure(ValidatedProperty):
    """
    Pressure property with default units of bar.
    """

    generic_unit_descriptor = PressureUnit
    default_units = BAR

    def validate_value(self, value: float) -> None:
        if not value >= 0:
            raise PropertyValidationError(
                "cannot create a pressure with value less than 0. "
            )

Temperature

Bases: ValidatedProperty

Temperature property with default units of Kelvin.

Source code in src/chemical_utils/properties/properties.py
class Temperature(ValidatedProperty):
    """
    Temperature property with default units of Kelvin.
    """

    generic_unit_descriptor = AbsoluteTemperatureUnit
    default_units = KELVIN

    def validate_value(self, value: float) -> None:
        if p(value, self.unit) < p(0, KELVIN):
            raise PropertyValidationError(
                "cannot create a temperature with value less than absolute 0. "
            )