Skip to content

aragog.interfaces

interfaces

Interfaces

FloatOrArray = float | npt.NDArray module-attribute

logger = logging.getLogger(__name__) module-attribute

MixedPhaseEvaluatorProtocol

Bases: PhaseEvaluatorProtocol, Protocol

Mixed phase evaluator protocol

PhaseEvaluatorABC

Bases: ABC

Phase evaluator ABC

dTdPs()

TODO: Update reference to sphinx: Solomatov (2007), Treatise on Geophysics, Eq. 3.2

Source code in aragog/interfaces.py
107
108
109
110
111
112
113
def dTdPs(self) -> npt.NDArray:
    """TODO: Update reference to sphinx: Solomatov (2007), Treatise on Geophysics, Eq. 3.2"""
    dTdPs: npt.NDArray = (
        self.thermal_expansivity() * self.temperature / (self.density() * self.heat_capacity())
    )

    return dTdPs

set_pressure(pressure)

Sets the pressure.

Source code in aragog/interfaces.py
96
97
98
99
def set_pressure(self, pressure: npt.NDArray) -> None:
    """Sets the pressure."""
    logger.debug("set_pressure = %s", pressure)
    self.pressure = pressure

set_temperature(temperature)

Sets the temperature.

Source code in aragog/interfaces.py
91
92
93
94
def set_temperature(self, temperature: npt.NDArray) -> None:
    """Sets the temperature."""
    logger.debug("set_temperature = %s", temperature)
    self.temperature = temperature

update()

Updates quantities to avoid repeat, possibly expensive, calculations.

Source code in aragog/interfaces.py
101
102
def update(self) -> None:
    """Updates quantities to avoid repeat, possibly expensive, calculations."""

PhaseEvaluatorProtocol

Bases: Protocol

Phase evaluator protocol

PropertyProtocol

Bases: Protocol

Property protocol