SolverMode#
- class ansys.fluent.mcp.solve.lib.active_path.SolverMode#
A snapshot of the live solver mode facets that gate path selection.
Every field defaults to the “simplest” value (standard namespace, steady, pressure-based, segregated, single-phase, energy off) so a partially-known mode still resolves deterministically.
Overview#
Build a |
|
Build a |
True when the pressure-velocity scheme is a coupled-family one. |
|
True when the solver type is pressure-based (opposite of density-based). |
|
True when any multiphase model is active. |
Import detail#
from ansys.fluent.mcp.solve.lib.active_path import SolverMode
Property detail#
Attribute detail#
Method detail#
- classmethod SolverMode.from_state(state: Mapping[str, Any] | None, *, utl: bool | None = None, phases: tuple[str, Ellipsis] = ()) SolverMode#
Build a
SolverModefrom a live state snapshot dict.stateis a flat{path: value}mapping as returned bybackend.get_state([...]).utlis passed separately because UTL detection is a dedicated probe (detect_utl_mode), not a plain settings read.phases(ordered phase keys) is likewise supplied by the caller when known (it comes fromlist_named_objectsonsetup.models.multiphase.phases).
- classmethod SolverMode.from_backend_state(state: Mapping[str, Any] | None, *, utl: bool | None = None, phases: tuple[str, Ellipsis] = ()) SolverMode#
Build a
SolverModefrom the rawbackend.get_state()output.The Fluent PyFluent backend returns a nested dict of dicts keyed by slash-separated node paths (e.g.
"setup/general/ solver"->{"time": "steady", "type": "pressure-based", ...}), NOT the flat dotted mappingfrom_state()expects. This adapter flattens the shape the backend uses onto the flat dotted mappingfrom_state()consumes so callers don’t have to reimplement the translation.Silently tolerant of missing keys — a partial or empty state still produces a valid
SolverModepopulated with the “simplest” defaults. Only the specific facetsfrom_state()cares about are extracted; other backend-state keys are ignored.