flow.FlowStudyResult

flow.FlowStudyResult(
    name,
    kind,
    grid,
    chi,
    velocity,
    density,
    temperature,
    pressure_drop,
    peak_temperature,
    mean_temperature,
    bulk_outlet_temperature,
    thermal_resistance,
    power,
    energy_imbalance,
    reynolds,
    peclet_cell,
    richardson,
)

Everything one conjugate solve produced, fields and scalars alike.

The scalars are JAX arrays rather than floats on purpose: they are what an objective is built from, and converting them to Python floats here would sever the gradient path the whole study exists to provide.

Attributes

Name Type Description
name str The study’s name.
kind str StudyKind.FLOW.
grid FlowGrid The lattice the solve ran on.
chi jax.Array Solid fraction, (NX, NY, NZ).
velocity jax.Array Converged velocity in lattice units, (3, NX, NY, NZ); exactly zero when the inlet speed is zero.
density jax.Array Converged density, (NX, NY, NZ); exactly 1 with no flow.
temperature jax.Array Temperature rise above the inlet, (NX, NY, NZ).
pressure_drop jax.Array Inlet-to-outlet pressure difference, lattice units.
peak_temperature jax.Array Hottest cell in the solid.
mean_temperature jax.Array chi-weighted mean over the solid.
bulk_outlet_temperature jax.Array Mixing-cup temperature of the air leaving.
thermal_resistance jax.Array (T_peak - T_inlet) / power.
power float Total injected power, the sum over every heat source.
energy_imbalance jax.Array | None What the solve failed to conserve, as a fraction of power; None when no power was injected or when a held temperature or an isothermal wall gives heat another way out, in which case the balance is not the study’s to close.
reynolds float The Reynolds number solved at.
peclet_cell float Largest cell Peclet number in the fluid – how far the energy discretisation is from the diffusive regime.
richardson float g beta dT L / U^2, the buoyancy the one-way coupling neglects; see this module’s docstring.

Methods

Name Description
warnings Everything about this solve a reader should not have to derive.

warnings

flow.FlowStudyResult.warnings()

Everything about this solve a reader should not have to derive.

Returned rather than logged so a test can assert on them and a caller can decide how loud to be. Empty means every assumption the study makes held on the numbers it actually ran.

Returns

Name Type Description
list[str] Human-readable strings, one per assumption that did not hold.