pyflightstream.post.streamlines (provisional)¶
Generated from the docstrings at build time: every one of the 4 names in the __all__ of pyflightstream.post.streamlines has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
The streamline products of a point (FR-1083).
A point whose pproc states [streamlines] leaves the solver's own export
files, collected and hashed in its run record: <point>_slo.txt for the
off-body lines and <point>_sls.txt for the surface friction lines. The post
writes, from the off-body file, streamlines/<point>_off_body.vtk: a legacy
VTK polydata file holding one polyline per streamline, in integration order,
with the export's per-point variables as point data (Mach, Cp_ref,
vtot, Cp as scalars and velocity as the vector vx, vy, vz).
THE POSITIONS ARE THE EXPORT'S, written as the export prints them with no
conversion; the unit and the frame of the off-body streamline export are not
measured in a committed report, and are assumed to follow the analysis frame the
export names, as the solver's surface VTK does (RPT-074, "the VTK surface export ...
in the loads frame", 2026-09-25); velocities are taken as m/s, the coefficients
dimensionless (:data:pyflightstream.results.OFF_BODY_STREAMLINE_COLUMNS).
THE SURFACE FRICTION LINES GET NO VTK YET: their export has never been read by
a probe, so its grammar is unknown, and a reader written against a guess would
turn a misread file into a plausible picture. The post records that as a skip
in post.log, naming the solver file that stays in the record.
Advanced¶
pyflightstream.post.streamlines.render_streamlines_vtk
¶
render_streamlines_vtk(
report: OffBodyStreamlinesReport, *, title: str
) -> str
Render an off-body streamline export as legacy VTK polydata, one polyline per line.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
OffBodyStreamlinesReport
|
The parsed export. |
required |
title
|
str
|
The file's title line (one line). |
required |
Returns:
| Type | Description |
|---|---|
str
|
The VTK text, LF line ends. |
Raises:
| Type | Description |
|---|---|
ProductError
|
If a value of the export is not finite. |
pyflightstream.post.streamlines.write_point_streamlines
¶
write_point_streamlines(ctx: Any, point: str) -> None
Write one point's streamline products into a simulation's post context.
The post step of FR-1083: the context (the post's SimContext) holds
the point's streamline exports by kind (ctx.streamlines), its pproc,
its products root and its sinks; a product written is added to the
manifest as an instant of the point's runs, and one not written is a skip
that post.log states.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
SimContext
|
The simulation's post context. |
required |
point
|
str
|
The point's name. |
required |
pyflightstream.post.streamlines.write_streamline_products
¶
write_streamline_products(
exported: Mapping[str, Path],
out: Path,
point: str,
*,
vtk: bool = True,
target: Callable[[Path], Path] | None = None,
overwrite: bool = True,
) -> dict[str, Path | str]
Write one point's streamline products; say why each one not written is not.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exported
|
mapping of str to Path
|
The point's streamline exports by kind ( |
required |
out
|
Path
|
The products root. |
required |
point
|
str
|
The point's name. |
required |
vtk
|
bool
|
The |
True
|
target
|
callable
|
Archives or refuses what stands at a product's path and returns the path to write (the post's own rule); the path itself where None. |
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 |
|---|---|
dict of str to Path or str
|
Per product name relative to |