Property functions

Temperature- (and state-) dependent component properties. Plain numbers, tuples, and callables convert automatically where a property function is expected; see the User Guide's property-function section.

Pyrolysis.Materials.ConstantProperty — Type
ConstantProperty{T<:Real}

A property that does not depend on temperature.

Example

k = ConstantProperty(0.21)  # W/(m·K)
k(300.0)  # Returns 0.21
k(500.0)  # Returns 0.21
source
Pyrolysis.Materials.LinearProperty — Type
LinearProperty{T<:Real}

A property that varies linearly with temperature: p(T) = a + b*T

Fields

  • a::T: Intercept (value at T=0)
  • b::T: Slope (change per Kelvin)

Example

cp = LinearProperty(1420.0, 2.5)  # J/(kg·K)
cp(300.0)  # Returns 1420 + 2.5*300 = 2170
source
Pyrolysis.Materials.PolynomialProperty — Type
PolynomialProperty{N,T<:Real}

A property defined by a polynomial: p(T) = c₀ + c₁T + c₂T² + ...

Fields

  • coeffs::NTuple{N,T}: Polynomial coefficients (c₀, c₁, ..., cₙ₋₁)

Example

cp = PolynomialProperty((1000.0, 2.0, 0.001))  # c₀ + c₁T + c₂T²
cp(300.0)  # Returns 1000 + 2*300 + 0.001*300² = 1690
source
Pyrolysis.Materials.ArrheniusProperty — Type
ArrheniusProperty{T<:Real}

A property following Arrhenius form: p(T) = A * exp(-E / (R*T))

Primarily used for reaction rate constants.

Fields

  • A::T: Pre-exponential factor
  • E::T: Activation energy [J/mol]
  • T_ref::T: Reference temperature (for normalization, optional)

Example

k = ArrheniusProperty(8.5e12, 188e3, 298.15)
k(600.0)  # Returns 8.5e12 * exp(-188000 / (8.314 * 600))
source
Pyrolysis.Materials.TableProperty — Type
TableProperty{N,T<:Real}

A property defined by tabulated data with linear interpolation.

Fields

  • temperatures::NTuple{N,T}: Temperature values (must be sorted ascending)
  • values::NTuple{N,T}: Property values at each temperature

Example

k = TableProperty((300.0, 400.0, 500.0), (0.20, 0.22, 0.25))
k(350.0)  # Returns 0.21 (linear interpolation)
source
Pyrolysis.Materials.CallableProperty — Type
CallableProperty{F}

A property defined by an arbitrary callable (function or functor).

Fields

  • func::F: Any callable f(T) -> value

Example

# Ideal gas density
ρ_gas = CallableProperty(T -> P_REF * M / (R_GAS * T))
ρ_gas(300.0)  # Returns density at 300 K
source
Pyrolysis.Materials.SutherlandProperty — Type
SutherlandProperty(μ_ref, T_ref, S)
SutherlandProperty()   # canonical air constants

Sutherland's law for the temperature dependence of a gas transport property:

μ(T) = μ_ref × (T/T_ref)^(3/2) × (T_ref + S)/(T + S)

The zero-argument form is the canonical Sutherland air triple (μref = 1.716e-5 Pa·s at Tref = 273.15 K, S = 110.4 K; e.g. White, Viscous Fluid Flow), giving μ(300 K) = 1.846e-5 Pa·s. This is the default carried by Material's gas_viscosity field.

Fields

  • μ_ref: Reference viscosity at T_ref [Pa·s]
  • T_ref: Correlation reference temperature [K] — not the global enthalpy datum T_REF = 298.15 K; do not conflate the two
  • S: Sutherland constant [K]

Temperature bracket

Like every property law, it evaluates at property_temperature(T), the temperature clamped to [T_PROPERTY_MIN, T_PROPERTY_MAX], so a diverging Newton trial state cannot reach T^1.5 at a negative temperature. The viscosity floor MU_FLOOR is applied separately, in Properties.effective_gas_viscosity(T, material).

Example

SutherlandProperty()(300.0)                  # ≈ 1.846e-5 Pa·s (air)
SutherlandProperty(2.0e-5, 350.0, 120.0)     # a different gas
source
Pyrolysis.Materials.StateDependentProperty — Type
StateDependentProperty{F}

A property that depends on both temperature and cell state (concentrations).

This is used for properties like moisture-dependent heat of sorption where the property value depends on the current composition of the material, not just temperature.

Fields

  • func::F: Any callable f(T, ξ) -> value where ξ is the concentration tuple

Example

# Heat of sorption that increases as moisture content decreases
# HoS(MC) = 2275 + 860 * exp(-0.120 * MC) [kJ/kg]
MOISTURE_IDX = 7
heat_sorption = StateDependentProperty((T, ξ) -> begin
	ξ_total = sum(ξ[i] for i in 1:7)  # total solid + liquid mass
	MC = 100.0 * ξ[MOISTURE_IDX] / max(ξ_total, 1.0)  # moisture content %
	return (2275.0 + 860.0 * exp(-0.120 * MC)) * 1e3  # Convert to J/kg
end)

Notes

  • When used as a heat of reaction, the concentration ξ is automatically passed by the kinetics evaluation functions.
  • Calling with just T (without ξ) will raise an error since state is required.
source