Skip to content

pyflightstream.post.section_distributions (stable)

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

Sectional loads and chordwise Cp, one table per recorded pproc distribution.

Advanced

pyflightstream.post.section_distributions.write_section_distributions

write_section_distributions(
    *,
    sim_dir: Path,
    record: RunRecord,
    stem: str,
    out: Path,
    target: Callable[[Path], Path],
    skipped: dict[str, str],
    step: int | None,
    pproc: PprocSpec | None = None,
    current_pproc: PprocSpec | None = None,
    current_aliases: Mapping[str, Sequence[str]]
    | None = None,
    current_rotors: Mapping[str, RotorBlock] | None = None,
    integration_error: str | None = None,
    condition: Mapping[str, object] | None = None,
    reference: Mapping[str, object] | None = None,
    rotors: Mapping[str, Mapping[str, object]]
    | None = None,
    inventory: Sequence[str] | None = None,
    overwrite: bool = True,
) -> tuple[list[Path], dict[str, dict[str, object]]]

Write both distribution products from all stamps, or the end-of-run exports.

A bad or missing export skips its kind by name without costing the other kind. Layout counts must cover every section before any split is written.

A quasi-steady WHEEL point exports its distributions at every clocking: each file then holds every clocking's rows, clocking 0 first, with a CLOCKING column after the export's own and AZIMUTH stating each block's blade at that clocking (:func:pyflightstream.post.qsteady.wheel_block_identity). A clocking whose export is missing is named and the others are written.

Parameters:

Name Type Description Default
sim_dir Path

Simulation directory containing the recorded exports.

required
record RunRecord

Run metadata, including outputs, section layout and export clock.

required
stem str

Point's export filename stem.

required
out Path

Root directory for the products.

required
target callable

Prepare a destination path, applying the caller's archive policy.

required
skipped dict[str, str]

Mutable mapping of product names to skip reasons.

required
step int or None

End-of-run STEP when there are no stamped exports. On an unsteady run this is the solver's 1-based time step, never the export header's inner-iteration counter; stamps supply their own time steps. On a steady run it is the exported solver iteration. Unknown values are written as NA. See The sections table, and which row is which <../definitions/the-sections-table-and-which-row-is-which.md#the-sections-table-and-which-row-is-which>_.

required
pproc PprocSpec or None

Recorded post-processing specification used to resolve legacy distribution ownership. Also selects strip integrals when current_pproc is omitted. See Per-distribution sectional loads and Cp <../definitions/the-sections-table-and-which-row-is-which.md#per-distribution-sectional-loads-and-cp-0250>_.

None
current_pproc PprocSpec or None

Effective post specification selecting integration against recorded blocks.

None
current_aliases Mapping[str, Sequence[str]] or None

Live reference aliases for integration selections. Recorded aliases remain the fallback when no live reference is available and own legacy layouts.

None
current_rotors Mapping[str, RotorBlock] or None

Live rotor definitions for the export builder's family and frame expansion.

None
integration_error str or None

Unresolved effective specification; retain raw files and name integration skips.

None
condition Mapping[str, object] or None

Point's condition, with case-insensitive keys: ALPHA, BETA (degrees, solver-reported angles in the export frame: x aft, y right, z up), MACH and J (dimensionless), RE (millions), VINF and VREF (m/s), ALT (ft), RHO (kg/m3), TEMP (K) and MU (Pa s). Spellings in :data:pyflightstream.post.products.CONDITION_KEY_ALIASES are also accepted without unit conversion. Missing values are NA. See What every product states <../definitions/what-every-product-states.md#what-every-product-states>_ and The axes of a steady polar <../definitions/the-axes-of-a-steady-polar.md#the-axes-of-a-steady-polar>_.

None
reference Mapping[str, object] or None

Reference dimensions, with case-insensitive keys SREF (m2), CREF and BREF (m); missing values are NA. These scalars require no frame transformation. See What every product states <../definitions/what-every-product-states.md#what-every-product-states>_.

None
rotors Mapping[str, Mapping[str, object]] or None

Rotor alias to metadata: families is the list of owned geometry families, blade1_azimuth_deg is blade one's datum in degrees in that rotor's frame, rpm is its signed speed in revolutions/minute, and steps_per_revolution is its own clock in time steps/turn. They determine ROTOR and AZIMUTH at each STEP; missing identity or azimuth is NA. Section coordinates and loads retain their recorded distribution frame. See The sections table, and which row is which <../definitions/the-sections-table-and-which-row-is-which.md#the-sections-table-and-which-row-is-which>_.

None
inventory Sequence[str] or None

The geometry's boundary names in the solver's order, as the caller recovered them for a record that states none (:meth:~pyflightstream.workspace.CampaignWorkspace.recorded_inventory). Omitted, the record's own inventory is read, and None there leaves the match to the recorded cuts. With the names, a selection is read by the export builder's own expansion over them, for integration and for the ownership of a layout recorded in legacy releases, for a block recorded in a common frame; integration also reads them in a rotor's frame when current_rotors holds the rotor definitions. A block in a frame spelt like a rotor's with no rotor definition, and names that give one name to two boundaries, leave the match to the cuts as well. See Integrated sectional loads <../definitions/the-sections-table-and-which-row-is-which.md#integrated-sectional-loads-since-0260>_.

None
overwrite bool

Replace a file that already exists, as the writer always did (the default). False refuses an existing file, naming it, before it is replaced.

True

Returns:

Type Description
tuple[list[Path], dict[str, dict[str, object]]]

Written paths and their product-manifest entries.