shell.build_problem_from_connectivity

shell.build_problem_from_connectivity(
    thermo,
    elements,
    conn,
    area,
    mdot_ref,
    p_ref,
    h_ref,
    edge_models=None,
    composite_map=None,
    require_connected=None,
)

Assemble a CompiledProblem from elements and a prebuilt Connectivity.

Parameters

Name Type Description Default
thermo ThermoConfig The thermodynamic model (perfect gas, frozen, or reacting equilibrium). required
elements list of ElementSpec The network elements, in node order. required
conn Connectivity The compiled connectivity, carrying explicit per-edge ports (tail_port / head_port), so port-ordering conventions are preserved exactly. required
area ndarray Per-edge cross-sectional area, indexed by global edge id. required
mdot_ref float Reference mass flow, pressure and total enthalpy for the residual/variable scaling. required
p_ref float Reference mass flow, pressure and total enthalpy for the residual/variable scaling. required
h_ref float Reference mass flow, pressure and total enthalpy for the residual/variable scaling. required
edge_models sequence of int Per-edge thermo-model id override; None uses the config’s model on every edge. None
composite_map CompositeMap Bridges the user-facing element ids to the expanded ones when the network carried composite elements (set by :func:build_problem); None otherwise. None
require_connected bool Reject a model that splits into disconnected sub-networks; None (default) follows the :data:nefes.shell.checks.CHECK_CONNECTED toggle. None

Returns

Name Type Description
CompiledProblem The immutable compiled problem ready for the solver.
Back to top