Skip to content

pyflightstream.cases.setup_surfaces (provisional)

Generated from the docstrings at build time: every one of the 6 names in the __all__ of pyflightstream.cases.setup_surfaces has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

Setup operations on a point's surfaces: removing surfaces, and the wake option it emits.

Pipeline role: the cases row, where a row's solver commands are emitted. It emits the removal of the surfaces a setup names, preserving survivor IDs in the surface inventory, and the slipstream wake stabilization a setup states.

Two setup keys reach the solver here, each through a short hook in :mod:pyflightstream.cases.workflows:

delete_surfaces Boundaries named by NAME, alias or family, never by index. Each is removed with DELETE_SURFACES. Survivors keep their original IDs, as measured on 26.124 and 26.125 in the committed fixture pfs2119_016_delete_surfaces_ids_2026-10-16.md. Tree position after deletion is not an ID. Later selections use the retained IDs. Families are removed in descending ID order. A name the row's model lacks is skipped and said with or without a study vocabulary, and a list every name of which is skipped emits no removal.

slipstream_wake_stabilization A toggle emitted as SET_MOTION_SLIPSTREAM_WAKE_STABILIZATION for each rotor motion the row creates. The same round (probe W1_wake_stab_disable) showed DISABLE stored after an ENABLE, in the form 1 DISABLE 1.

A key that reaches nothing is refused, never dropped: a setup naming surfaces on a row that opens no geometry, or a wake stabilization on a row that creates no rotor motion, is a silent no-op otherwise.

Advanced

pyflightstream.cases.setup_surfaces.DELETE_SURFACES_KEY module-attribute

DELETE_SURFACES_KEY = 'delete_surfaces'

pyflightstream.cases.setup_surfaces.WAKE_STABILIZATION_KEY module-attribute

WAKE_STABILIZATION_KEY = 'slipstream_wake_stabilization'

pyflightstream.cases.setup_surfaces.emit_setup_surfaces

emit_setup_surfaces(script: Script, case: SimCase) -> None

Emit removal of the named surfaces, preserving every surviving boundary ID.

Nothing is emitted, and the script is left as it was, when the setup states no delete_surfaces.

Parameters:

Name Type Description Default
script Script

The script being built for the point, with the geometry opened and its boundary inventory declared.

required
case SimCase

The point's case; case.solver.delete_surfaces names the surfaces and case.aliases the row's aliases.

required

Raises:

Type Description
CampaignConfigError

If the list is empty, the geometry declares no boundary names, a name resolves to no surface of the inventory and the row's study does not skip it (FR-435), or the removal would leave no surface.

pyflightstream.cases.setup_surfaces.emit_wake_stabilization

emit_wake_stabilization(
    script: Script,
    case: SimCase,
    motion_id: int,
    blades: int | None,
) -> None

Emit the slipstream wake stabilization the setup states, for one rotor motion.

Parameters:

Name Type Description Default
script Script

The script being built, with the motion already created.

required
case SimCase

The point's case; case.solver.slipstream_wake_stabilization is the toggle, or None to emit nothing.

required
motion_id int

The rotor motion the setting applies to.

required
blades int

The row's blade count. An ENABLE needs it, because the solver reads the count per propeller; a DISABLE reads none, so one is written when the row states none (the form probe W1 ran).

required

Raises:

Type Description
CampaignConfigError

If the setup enables the stabilization, the build's command takes a blade count, and the row states none.

pyflightstream.cases.setup_surfaces.refuse_setup_keys_that_reached_nothing

refuse_setup_keys_that_reached_nothing(
    script: Script, case: SimCase
) -> None

Refuse a stated surface or wake key the finished script never emitted.

Called after the workflow's builder, because only then is it known whether the row opened a geometry and created a rotor motion.

Parameters:

Name Type Description Default
script Script

The finished script, after the workflow's builder.

required
case SimCase

The case whose setup keys are checked.

required

Raises:

Type Description
CampaignConfigError

If delete_surfaces is stated and no removal was emitted, or slipstream_wake_stabilization is stated and no rotor motion received it.

pyflightstream.cases.setup_surfaces.the_model_inventory

the_model_inventory(script: Script) -> list[str]

Return the boundary labels of the row's model as its geometry opened them.

FR-982: every key of FR-979 after delete_surfaces asks whether the MODEL carries a name, and a key judged against the list AFTER the removal would call a name the setup itself removed a name the model lacks (a model carrying a Sting, removing it, and citing it in a group). The emission still resolves against the list after the removal; only the classification reads this one. Empty where no inventory was declared.

Parameters:

Name Type Description Default
script Script

The script being built for the point.

required

Returns:

Type Description
list of str

The labels in inventory order, before any removal.