flow.solver.FlowConfig

flow.solver.FlowConfig(
    shape=(32, 64, 32),
    inlet_speed=0.05,
    reynolds=100.0,
    characteristic_cells=None,
    alpha_max=200.0,
    steady=SteadyOptions(),
)

Static settings for one flow problem.

Attributes

Name Type Description
shape tuple[int, int, int] (NX, NY, NZ) grid, with the duct axis along +Y.
inlet_speed float Inlet velocity in cells per step (lattice units).
reynolds float Reynolds number, which together with inlet_speed and characteristic_cells fixes the viscosity.
characteristic_cells int | None The length scale of the Reynolds number, in cells. None uses the duct’s NZ.
alpha_max float Brinkman drag at chi = 1. Large enough that the solid is effectively impermeable, small enough that the linearised operator stays well conditioned; see :func:recommended_alpha_max for the sweep that picks it. Note that it multiplies chi everywhere, so it is only safe with a compactly supported profile – see :mod:cadjoint.flow.domain.
steady SteadyOptions Convergence settings for the forward and adjoint solves.

Raises

Name Type Description
ValueError If the implied omega exceeds :data:OMEGA_CEILING.