Skip to content

pyflightstream.cases.fsi_workspace (stable)

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

Bounded workspace adapter for the existing structural driver.

No new structural model lives here. Native deformation validity remains a separate gate; this adapter fixes configuration, ordering and callback wiring.

THE PIECES A COUPLED ROUTE CALLS (FSI-1), each usable on its own so the rotor route and the fixed-wing route wire the same facts once:

  • :func:fsi_workflow_refusal, which workflows accept FSI;
  • :func:aeroelastic_surface_ids, the boundary ID the solver stores, which the Aeroelastic toolbox matches against and which is not the tree position for an OBJ import;
  • :func:structural_node_layout, the nodes placed inside the blade and refused when one is not;
  • :func:patch_structural_node_frame, the node-block frame field a scripted import cannot set;
  • :func:aeroelastic_rbf_type, the morphing kernel a beam line needs;
  • :func:aeroelastic_post_script, :func:emit_steady_aeroelastic_analysis and :func:steady_aeroelastic_finished, when an export shows the deformation and how a steady coupled run is waited for;
  • :func:direct_morphing_refusal, where the solver's direct mesh morphing (FR-341, route C, morphing = "direct" in the FSI input) is refused.

THE ROUTES: :func:wire_fixed_wing_fsi couples a fixed wing on steady and unsteady (FSI-G), :func:wire_quasi_steady_sector_fsi the blade of a qsteady_rotor periodic sector (steady, the blade held still, the structure turning at the speed the free stream turns), and :func:wire_workspace_fsi the rotor's blades on unsteady_rotor, accepted and warned with :data:FSI_ROTOR_IN_DEBUG; all three stage and emit through one helper.

Advanced

pyflightstream.cases.fsi_workspace.BEAM_LINE_RBF_TYPE module-attribute

BEAM_LINE_RBF_TYPE = 'MULTI_QUADRATIC'

pyflightstream.cases.fsi_workspace.BEFORE_CALL_SURFACE_FILE module-attribute

BEFORE_CALL_SURFACE_FILE = 'fsi_before_call.vtk'

pyflightstream.cases.fsi_workspace.CALLBACK_FILE module-attribute

CALLBACK_FILE = 'fsi_callback.py'

pyflightstream.cases.fsi_workspace.DEFORMED_SURFACE_FILE module-attribute

DEFORMED_SURFACE_FILE = 'fsi_surface.vtk'

pyflightstream.cases.fsi_workspace.DIRECT_MORPHING_COMMAND module-attribute

DIRECT_MORPHING_COMMAND = (
    "SET_DIRECT_AEROELASTIC_MESH_MORPHING"
)

pyflightstream.cases.fsi_workspace.DIRECT_MORPHING_NODES module-attribute

DIRECT_MORPHING_NODES = 'RIGID'

pyflightstream.cases.fsi_workspace.DIRECT_MORPHING_WORKFLOWS module-attribute

DIRECT_MORPHING_WORKFLOWS: tuple[str, ...] = (
    QUASI_STEADY_WORKFLOW,
    "unsteady_rotor",
)

pyflightstream.cases.fsi_workspace.FAMILY_FILE module-attribute

FAMILY_FILE = 'fsi_family_map.json'

pyflightstream.cases.fsi_workspace.FIXED_WING_WORKFLOWS module-attribute

FIXED_WING_WORKFLOWS: tuple[str, ...] = (
    "steady",
    "unsteady",
)

pyflightstream.cases.fsi_workspace.FSI_ON_A_SAVED_FILE module-attribute

FSI_ON_A_SAVED_FILE = "the coupled blade's boundary ID and the section order the structural program reads are taken from the saved file (the ID on its boundary record; its own surface sections ahead of the row's), not proved by a fresh mesh import."

pyflightstream.cases.fsi_workspace.FSI_ROTOR_IN_DEBUG module-attribute

FSI_ROTOR_IN_DEBUG = "the solver applies the aeroelastic morph of a rotating blade to the blade at its imported azimuth, where it replaces the rotation instead of composing with it (measured on 26.124 and 26.125, reported to the vendor), so the coupled loads of this row are not yet those of the deformed rotating blade."

pyflightstream.cases.fsi_workspace.FSI_WITH_SYMMETRY_COPIES module-attribute

FSI_WITH_SYMMETRY_COPIES = "the blade the row names is coupled in its own rotating frame and its copies are left to the solver's symmetry; how the solver treats the copies of a coupled blade is not measured (a run of this kind diverged after the first non-zero structural call on 26.126), so the copies may not carry the deformation."

pyflightstream.cases.fsi_workspace.FSI_WORKFLOW_STATE module-attribute

FSI_WORKFLOW_STATE: Mapping[str, str | None] = (
    MappingProxyType(
        {
            "unsteady_rotor": None,
            "steady": None,
            "unsteady": None,
            "qsteady_rotor": None,
        }
    )
)

pyflightstream.cases.fsi_workspace.IMPORT_BOUNDARY_ID_OFFSET module-attribute

IMPORT_BOUNDARY_ID_OFFSET: Mapping[str, int] = (
    MappingProxyType({".obj": 1, ".stl": 0})
)

pyflightstream.cases.fsi_workspace.NODES_FILE module-attribute

NODES_FILE = 'fsi_nodes.csv'

pyflightstream.cases.fsi_workspace.POST_FILE module-attribute

POST_FILE = 'fsi_post.txt'

pyflightstream.cases.fsi_workspace.QUASI_STEADY_WORKFLOW module-attribute

QUASI_STEADY_WORKFLOW = 'qsteady_rotor'

pyflightstream.cases.fsi_workspace.SAVED_SECTIONS_FAMILY module-attribute

SAVED_SECTIONS_FAMILY = 'saved-file sections'

pyflightstream.cases.fsi_workspace.SAVED_SIMULATION_SUFFIX module-attribute

SAVED_SIMULATION_SUFFIX = '.fsm'

pyflightstream.cases.fsi_workspace.STEADY_AEROELASTIC_COMPLETION module-attribute

STEADY_AEROELASTIC_COMPLETION = (
    "Aeroelastic solver run time"
)

pyflightstream.cases.fsi_workspace.STEADY_AEROELASTIC_ITERATIONS module-attribute

STEADY_AEROELASTIC_ITERATIONS = 50

pyflightstream.cases.fsi_workspace.aeroelastic_post

aeroelastic_post(
    version: str | FsVersion,
    *,
    surface_exports: Sequence[
        tuple[str, Sequence[object]]
    ] = (),
    exports: Callable[[Script], None] | None = None,
    updates: Callable[[Script], None] | None = None,
) -> Script

Build the aeroelastic post-processing script, as a script.

:func:aeroelastic_post_script renders it; this is the same script before rendering, for a caller that needs what its exports recorded (the Tecplot surfaces a steady coupled run writes from its VTK).

Parameters:

Name Type Description Default
version str

The FlightStream version the script is built for.

required
surface_exports sequence of (command, arguments)

As :func:aeroelastic_post_script takes them.

()
exports callable

Emits the row's own exports into the script, after the loads the structural program reads and the surface exports: a steady coupled run's whole export block, which no line of the run's script may follow EXECUTE_AEROELASTIC_ANALYSIS to write. It exports only: the sections are updated and their loads computed once, here, before any export, and every other update those exports read is emitted by updates.

None
updates callable

Emits the updates the row's exports read beyond the sections and their loads (the probe points), after those two and before the first export: every update is an analysis command, which the library's phase order refuses after an export (a library rule, not a measured solver fact; in the L1 runs a coupled row with the default exports updated the sections a second time after this script's loads export and did not build).

None

Returns:

Type Description
Script

The post-processing script.

pyflightstream.cases.fsi_workspace.aeroelastic_post_script

aeroelastic_post_script(
    version: str | FsVersion,
    *,
    surface_exports: Sequence[
        tuple[str, Sequence[object]]
    ] = (),
    exports: Callable[[Script], None] | None = None,
    updates: Callable[[Script], None] | None = None,
) -> str

Render the aeroelastic post-processing script.

The solver runs it after every aerodynamic solve of a coupled run: in unsteady twice per step, before the structural call and after the morph that call returns; in steady after every coupling iteration, the last one included. So it is where an export that must show the deformation belongs, and the only place a steady coupled run can be observed: each pass writes the same file names, so the file left on disk after a step (unsteady) or after the analysis (steady) is the one written after the structural call.

The sectional loads the structural program reads come first, so the call reads the loads of the solve that preceded it.

Parameters:

Name Type Description Default
version str

The FlightStream version the script is built for.

required
surface_exports sequence of (command, arguments)

The surface exports that must show the deformation, emitted in the order given after the loads (a Tecplot or VTK surface export: those write the solver's morphed vertices, where a triangulation export and SAVEAS keep the reference ones).

()
exports callable

The row's own exports, as :func:aeroelastic_post takes them.

None
updates callable

The updates those exports read, as :func:aeroelastic_post takes them.

None

Returns:

Type Description
str

The script text.

pyflightstream.cases.fsi_workspace.aeroelastic_rbf_type

aeroelastic_rbf_type(case: SimCase) -> str

Return the morphing kernel a coupled row emits: the row's, else the beam line's.

Parameters:

Name Type Description Default
case SimCase

The case; a setup stating aeroelastic_rbf_type is kept.

required

Returns:

Type Description
str

The AEROELASTIC_RBF_TYPE value: the row's own, or :data:BEAM_LINE_RBF_TYPE for the package's beam-line nodes.

pyflightstream.cases.fsi_workspace.aeroelastic_surface_ids

aeroelastic_surface_ids(
    case: SimCase,
    script: Script,
    boundaries: Sequence[int | str],
    *,
    context: str,
) -> list[int]

Return the solver's boundary IDs of the cited boundaries (FSI-1).

The Aeroelastic toolbox stores ASSIGN_AEROELASTIC_SURFACES as written and maps the surfaces whose boundary ID matches, so it must be handed the ID the solver gives the boundary, which is the ID the same boundary's motion holds (:data:IMPORT_BOUNDARY_ID_OFFSET).

Parameters:

Name Type Description Default
case SimCase

The case; its geometry's suffix names the import route.

required
script Script

The script the geometry was imported into, with its boundary inventory declared.

required
boundaries sequence of int or str

Boundary labels or 1-based tree positions.

required
context str

Names the citing location in error messages.

required

Returns:

Type Description
list of int

One boundary ID per cited boundary, in the order given.

Raises:

Type Description
CampaignConfigError

If the geometry is neither a fresh import whose numbering was measured nor a saved simulation whose mesh block states the IDs (FR-3408: read from each boundary record's head line), or a cited boundary's name is not one the opened inventory holds exactly once where the ID is looked up by name (after delete_surfaces, or in a saved simulation), rather than guessing the ID.

pyflightstream.cases.fsi_workspace.blade_mesh_frame

blade_mesh_frame(
    case: SimCase,
    blades: Sequence[str],
    *,
    origin: Sequence[float] = (0.0, 0.0, 0.0),
    script: Script | None = None,
) -> dict[str, Any]

Return how a row's mesh file holds its coupled blades, in metres about the hub.

The facts the plan's contour check (FR-3417) and the post placement check (FR-3416) read the imported mesh by, resolved once: metres_per_unit, the factor taking the unit the import states ([import] units) to metres, None where it names no length; hub_m, the hub the blades' rotating frames sit on: where script placed the first blade's frame, taken from the simulation's length unit to metres (a flat row's ROTOR_ORIGIN moves it off the rotor block's origin), else origin; moves_mesh, whether the row moves the mesh before the solve (ROTATE, TRANSLATE, or an import operation other than rename), so the file no longer holds the blade where the solver has it; and groups, each blade's name in the file, before the import's renames.

Parameters:

Name Type Description Default
case SimCase

The coupled row.

required
blades sequence of str

The blade names the solver sees.

required
origin sequence of float

The rotor's origin [m], the hub where script placed no blade frame.

(0.0, 0.0, 0.0)
script Script

The row's built script, whose placed blade frame gives the hub.

None

Returns:

Type Description
dict

metres_per_unit, hub_m, moves_mesh and groups.

pyflightstream.cases.fsi_workspace.direct_morphing_refusal

direct_morphing_refusal(
    case: SimCase,
    *,
    workflow: str,
    version: str | FsVersion,
) -> str | None

Return why a row's direct mesh morphing is refused, or None (FR-678).

Direct morphing couples a rotor blade: a qsteady_rotor row (whose builder accepts FSI on a periodic sector alone) or an unsteady_rotor row (FR-3404, planned with the warning of :data:FSI_ROTOR_IN_DEBUG), on a build whose command database records :data:DIRECT_MORPHING_COMMAND; where the database records it and not verified, the plan warns and emits it (:func:validate_workspace_fsi). The fixed wing couples through its structural nodes. A build without the command cannot write it, so that alone is refused.

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi.morphing states the route.

required
workflow str

The row's workflow.

required
version str or FsVersion

The FlightStream version the script is built for.

required

Returns:

Type Description
str or None

The refusal, naming the remedy; None when the row does not choose direct morphing, or chooses it where it is offered.

pyflightstream.cases.fsi_workspace.emit_aeroelastic_rbf_type

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

Emit the beam-line kernel unless the row's setup already emitted its own.

Parameters:

Name Type Description Default
case SimCase

The case; its solver settings say whether the setup emitted a kernel of its own.

required
script Script

The script being built.

required

pyflightstream.cases.fsi_workspace.emit_steady_aeroelastic_analysis

emit_steady_aeroelastic_analysis(script: Script) -> None

Emit EXECUTE_AEROELASTIC_ANALYSIS as the script's last line.

Nothing may follow it: an export after it runs before the analysis has iterated and a CLOSE_FLIGHTSTREAM after it ends the analysis (:data:STEADY_AEROELASTIC_COMPLETION). The exports belong in :func:aeroelastic_post_script, and the process that ran the script is stopped by its runner once :func:steady_aeroelastic_finished reads the completion line. :func:refuse_lines_after_steady_analysis holds the order on the finished script.

Parameters:

Name Type Description Default
script Script

The steady coupled script, at its end.

required

pyflightstream.cases.fsi_workspace.frame_compensation_skip

frame_compensation_skip(
    cfg: FsiConfig | None,
    *,
    workflow: str,
    version: str | FsVersion,
    rpm: float | None = None,
) -> str | None

Return why a requested solver-frame compensation is skipped on a row, or None.

FR-3415: :attr:FsiConfig.solver_frame_compensation applies to an unsteady_rotor row with a Direct route, on a build of :data:~pyflightstream.fsi.config.SOLVER_FRAME_COMPENSATION_BUILDS, on a rotor turning about +X (positive rpm; None is not judged). Elsewhere it does not apply: the plan warns with this reason and stages it off, so the field is written uncompensated. Never a refusal.

Parameters:

Name Type Description Default
cfg FsiConfig or None

The row's structure; None or the compensation off returns None.

required
workflow str

The row's workflow.

required
version str or FsVersion

The build the row's script is written for.

required
rpm float

The rotor's signed speed.

None

Returns:

Type Description
str or None

The reason, worded to follow "<setting> is skipped: ", or None.

pyflightstream.cases.fsi_workspace.fsi_workflow_refusal

fsi_workflow_refusal(workflow: str) -> str | None

Return why FSI is refused on a workflow, or None.

Parameters:

Name Type Description Default
workflow str

The workflow name :func:pyflightstream.cases.workflows.select_workflow returned.

required

Returns:

Type Description
str or None

The refusal's reason, from :data:FSI_WORKFLOW_STATE; None when the workflow accepts FSI (steady and unsteady, the fixed wing; qsteady_rotor, whose builder accepts it on a sector only; unsteady_rotor, planned with the warning :data:FSI_ROTOR_IN_DEBUG). A workflow outside the package's is refused.

pyflightstream.cases.fsi_workspace.is_steady_aeroelastic_script

is_steady_aeroelastic_script(rendered: str) -> bool

Whether a rendered script is a steady coupled run's: its last command is the analysis.

The run layer asks it of the script it launches: such a process never exits by itself (:data:STEADY_AEROELASTIC_COMPLETION), so it is waited on until the solver prints the completion line and then stopped. Comment lines and blank lines are not commands.

Parameters:

Name Type Description Default
rendered str

The rendered script text.

required

Returns:

Type Description
bool

True when the script's last command is EXECUTE_AEROELASTIC_ANALYSIS.

pyflightstream.cases.fsi_workspace.patch_structural_node_frame

patch_structural_node_frame(
    saved: bytes, frame_index: int, *, node_count: int
) -> bytes

Return a saved simulation with its structural nodes in another frame.

Only field 1 of the node-block line changes; every other byte is kept. The route that needs a moving node frame saves the built simulation, patches it here and opens the patched file; a node set in Reference never needs it.

Parameters:

Name Type Description Default
saved bytes

The saved simulation (.fsm) as written by SAVEAS.

required
frame_index int

The 1-based index of the frame in the simulation's frame table, the index the script cites it by.

required
node_count int

The number of structural nodes imported; field 4 of the line must state it, so a line that is not the node block is never patched.

required

Returns:

Type Description
bytes

The patched file.

Raises:

Type Description
CampaignConfigError

If the file has no single $AEROELASTIC$ block, or the line where the node block sits does not have its shape or its count.

pyflightstream.cases.fsi_workspace.quasi_steady_fsi_config

quasi_steady_fsi_config(
    case: SimCase, *, rpm: float, quiet: bool = False
) -> FsiConfig

Return the structure of a quasi-steady sector turning at the row's speed.

On qsteady_rotor the structural solve applies the centrifugal loads at the speed the free stream turns. So the configuration's omega_rad_per_s is TAKEN FROM THE ROW, |RPM| pi / 30, the speed its SET_FREESTREAM ROTATION (or its rotating custom field) states, whatever the FSI input wrote; an input that states another non-zero speed is warned, naming both, and the row's wins. The run stages this configuration as the point's config.json, so an RPM sweep couples each point at its own speed. quiet leaves the warning to the builder, which says it once at plan and once at run; the run's staging asks it quietly.

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi states the FSI input.

required
rpm float

The row's rotor speed in revolutions per minute; its magnitude sets the configuration's angular speed.

required
quiet bool

Leave out the warning when the input states another speed; the run's staging asks quietly.

False

Returns:

Type Description
FsiConfig

The input's configuration with omega_rad_per_s set to |rpm| pi / 30.

Raises:

Type Description
CampaignConfigError

A row that does not turn: the route exists to apply the centrifugal loads, and a blade at rest is a fixed structure.

pyflightstream.cases.fsi_workspace.refuse_lines_after_steady_analysis

refuse_lines_after_steady_analysis(rendered: str) -> None

Refuse a steady coupled script with any command after its analysis.

Parameters:

Name Type Description Default
rendered str

The rendered script text.

required

Raises:

Type Description
CampaignConfigError

If EXECUTE_AEROELASTIC_ANALYSIS is absent, or any command follows it, naming the first.

pyflightstream.cases.fsi_workspace.steady_aeroelastic_finished

steady_aeroelastic_finished(native_output: str) -> bool

Whether a steady coupled run's output shows its analysis finished.

Parameters:

Name Type Description Default
native_output str

What the solver process printed so far.

required

Returns:

Type Description
bool

True when the output carries :data:STEADY_AEROELASTIC_COMPLETION.

pyflightstream.cases.fsi_workspace.structural_node_layout

structural_node_layout(cfg: FsiConfig) -> NodeOrderingMap

Return the structural node layout, refused when a node is not inside the blade.

The rule: the structural nodes sit inside the component. With the blade's sections in the configuration (BladeProperties.section_contours_m), the nodes are placed on each section's camber line and a node outside its section, or inside it by less than max(0.1 % of chord, 10 % of local thickness), is refused naming it (:func:pyflightstream.fsi.nodes.generate_node_layout). Without them, the configuration states offsets and no geometry, and the layout is the offset layout, unchecked: the geometry the check needs is the configuration's sections, and the imported mesh is not read here.

Parameters:

Name Type Description Default
cfg FsiConfig

The structural configuration.

required

Returns:

Type Description
NodeOrderingMap

The node layout of :func:pyflightstream.fsi.nodes.generate_node_layout.

Raises:

Type Description
CampaignConfigError

Naming the node, when one is not inside its section.

pyflightstream.cases.fsi_workspace.validate_workspace_fsi

validate_workspace_fsi(
    case: SimCase,
    script: Script,
    *,
    workflow: str,
    continuation: bool,
) -> None

Refuse cases whose initial state cannot establish the coupling ordering.

The workflow is judged first (:func:fsi_workflow_refusal), so a row FSI is refused on hears why before any other check.

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi states the FSI input.

required
script Script

The script built so far.

required
workflow str

The row's workflow, judged first by :func:fsi_workflow_refusal.

required
continuation bool

Whether the point continues a stopped run.

required

Raises:

Type Description
CampaignConfigError

If the workflow is refused for FSI, the point is a continuation, the script carries raw commands or custom flags, the mesh is not freshly imported (a saved simulation couples on unsteady_rotor, FR-3408), the sections include symmetry copies, the blades rely on symmetry copies off unsteady_rotor and qsteady_rotor (an unsteady_rotor row with copies couples the blade it names and is warned, FR-3408), or the rotor speed is not positive.

pyflightstream.cases.fsi_workspace.wire_fixed_wing_fsi

wire_fixed_wing_fsi(
    case: SimCase,
    script: Script,
    *,
    workflow: str,
    interpreter: str,
    exports: Callable[[Script], None] | None,
    updates: Callable[[Script], None] | None = None,
) -> list[dict[str, object]]

Stage the fixed wing's structure and emit its coupling (FSI-G).

The wing is one clamped beam fed by ONE section distribution of the row's pproc: over the wing's one family, on the XZ plane (sections normal to the span), in a frame with the reference axes whose origin sits on the wing's own origin along the span, so the export's offset is the station's distance (a frame with other axes, or elsewhere, is refused rather than converted). The surface list holds that family's boundary ID (:func:aeroelastic_surface_ids), the linked frame is that frame (the manual forbids the reference itself there), and the nodes are the configuration's, placed inside the wing's sections and stored in the reference frame (:func:structural_node_layout); a fixed wing needs no node-frame patch. The kernel is the beam line's (:data:BEAM_LINE_RBF_TYPE).

Steady: at most :data:STEADY_AEROELASTIC_ITERATIONS coupling iterations, and the row's whole export block runs in the post-processing script (exports); the builder ends the script with :func:emit_steady_aeroelastic_analysis. Unsteady: one coupling iteration per time step inside the march (SET_AEROELASTIC_COUPLING_IN_UNSTEADY ENABLE), and exports writes the deformed surface after every call.

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi states a fixed wing.

required
script Script

The script, after the section distributions were emitted.

required
workflow str

steady or unsteady.

required
interpreter str

The Python the structural callback runs under.

required
exports callable or None

Emits the exports the post-processing script carries.

required
updates callable

Emits the updates those exports read, as :func:aeroelastic_post takes them.

None

Returns:

Type Description
list of dict

The Tecplot surfaces the post-processing script's exports recorded, for the caller to state in the run's script once its loads frame is placed; empty when the exports write none.

Raises:

Type Description
CampaignConfigError

If the configuration is not a wing, the sections do not identify one wing, or a node is not inside its section.

pyflightstream.cases.fsi_workspace.wire_quasi_steady_sector_fsi

wire_quasi_steady_sector_fsi(
    case: SimCase,
    script: Script,
    *,
    config: FsiConfig,
    rotor: RotorBlock,
    interpreter: str,
    exports: Callable[[Script], None] | None,
    updates: Callable[[Script], None] | None = None,
) -> list[dict[str, object]]

Stage a quasi-steady sector's rotating blade and emit its coupling.

THE ROUTE of the FSI study's test 2: the blade is held still, the free stream turns about the shaft at the rotor's speed, and the structure is the ROTATING blade at that speed (config, from :func:quasi_steady_fsi_config): the structural program solves it with the centrifugal tension and its stiffening, the propeller moment and the in-plane centrifugal softening (the run folder is marked with :data:~pyflightstream.fsi.state.QUASI_STEADY_ROTOR_FILE, which routes each call to that solve). The run is steady: at most :data:STEADY_AEROELASTIC_ITERATIONS coupling iterations, the row's whole export block in the post-processing script (exports), and the builder ends the script with :func:emit_steady_aeroelastic_analysis; the runner stops the process after :data:STEADY_AEROELASTIC_COMPLETION.

THE BLADE IS FIXED, so its frame is the one it was meshed in, and no frame patch is needed where that frame is the reference: blade one, at azimuth 0 with its datum on Z, on a shaft along X through the origin, is the blade frame of the rotor route (x the shaft, z the span) and the reference frame at once. The structure is that ONE blade (blade_count = 1), fed by one section distribution over it, cut on XY (normal to the span) in a frame the run created that coincides with the reference. Anything else is refused rather than converted: the scripted import stores the nodes in the reference frame (FSI-1), so a blade elsewhere would be described twice. The surface list holds the blade's boundary ID (:func:aeroelastic_surface_ids), the nodes are placed inside its sections (:func:structural_node_layout) and the kernel is the beam line's (:data:BEAM_LINE_RBF_TYPE).

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi states the FSI input.

required
script Script

The script, after the section distributions were emitted.

required
config FsiConfig

The rotating blade's configuration, from :func:quasi_steady_fsi_config.

required
rotor RotorBlock

The rotor block the sector was built for.

required
interpreter str

The Python the structural callback runs under.

required
exports callable or None

Emits the exports the post-processing script carries.

required
updates callable

Emits the updates those exports read, as :func:aeroelastic_post takes them.

None

Returns:

Type Description
list of dict

The Tecplot surfaces the post-processing script's exports recorded, for the caller to state in the run's script once its loads frame is placed.

Raises:

Type Description
CampaignConfigError

A structure of more than one blade, a blade other than blade one at azimuth 0 on Z, a shaft other than X through the origin, or sections that do not identify the blade in the reference frame.

pyflightstream.cases.fsi_workspace.wire_workspace_fsi

wire_workspace_fsi(
    case: SimCase,
    script: Script,
    *,
    rotor: RotorBlock,
    rpm: float,
    delta_time_s: float,
    frames: Mapping[str, int | None | Mapping[str, int]],
    interpreter: str,
    exports: Callable[[Script], None] | None = None,
) -> None

Stage one structural source and emit the native unsteady callback contract.

On a saved simulation (FR-3408) the surface sections the file carries stand ahead of the row's in the loads export, so the section-order map opens with them as one family the structural solve does not read, and the plan warns with :data:FSI_ON_A_SAVED_FILE; where the file's post block is not a shape the reader knows, the map holds the row's blades alone and the warning says so.

Parameters:

Name Type Description Default
case SimCase

The case; case.fsi states the FSI input.

required
script Script

The unsteady rotor script, after its section distributions.

required
rotor RotorBlock

The resolved rotor block.

required
rpm float

The rotor speed in revolutions per minute; its magnitude must match the configuration's angular speed.

required
delta_time_s float

The resolved time increment in seconds, positive.

required
frames mapping

The frames the script created, by name, each blade's rotating frame <alias>_RMRP<n> among them.

required
interpreter str

The Python the structural callback runs under.

required
exports callable

Emits exports into the aeroelastic post-processing script after the loads the structural program reads: the surface before each structural call, where the FSI input sets export_surface_before_call (FR-3408).

None

Raises:

Type Description
CampaignConfigError

If the configuration's speed or blade count differs from the resolved rotor, the time increment is not positive, the blade, frame and boundary mapping is not one to one, a blade has other than one section distribution, or the rotor frame is not shaft X with blade datum Z.