pyflightstream.results.wake (provisional)¶
Generated from the docstrings at build time: every one of the 3 names in the __all__ of pyflightstream.results.wake has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
The reader of the solver's wake export, <name>_wakes.vtk (FR-1023).
Pipeline role: parses the wake lines the surface VTK export writes beside the
surface when SET_VTK_EXPORT_VARIABLES states the wake: VTK legacy ASCII
polydata of POINTS, two-point LINES and one cell scalar,
Normalized_Vorticity. The segments chain into one wake line per
trailing-edge node, each line carrying one value, constant along it; the value
is read as the circulation shed by that wake line (FR-1023; the reading is
not measured in a committed solver report). Trefftz B of
the far-field family reads it (:mod:pyflightstream.farfield.trefftz).
A rotor's wake is written as a vortex lattice per blade (26.125): trailing filaments of one node per time step, joined in every row but the trailing-edge row by shed segments that carry the mean of the trailing values beside them, so an interior node joins four segments. Such a component is read as one line per trailing filament, from its trailing-edge node downstream, valued by its segment at the trailing edge; the shed segments are dropped. Components without a node of more than two segments are read as lines, as above.
Refused, as every reader refuses (FR-16, FR-17): a file whose counts do not add up, a file that ends inside a block it declared, polygons (a surface is not a wake), a segment that is not two points, a chain that branches or closes, and a value that changes along one line. Empty polygon blocks and the exported point-coordinate scalars are accepted; connected node indices preserve both mirror halves and collapsed lines.
Advanced¶
pyflightstream.results.wake.WakeExport
dataclass
¶
WakeExport(
lines: tuple[ndarray, ...],
values: ndarray,
blades: ndarray | None = None,
)
The wake lines of one export.
Attributes:
| Name | Type | Description |
|---|---|---|
lines |
tuple of numpy.ndarray
|
One |
values |
ndarray
|
One value per line, :data: |
blades |
ndarray or None
|
The lattice (one blade's wake) each line belongs to, |
pyflightstream.results.wake.parse_wake_export
¶
parse_wake_export(text: str) -> WakeExport
Read the wake lines of a <name>_wakes.vtk export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The file's text. |
required |
Returns:
| Type | Description |
|---|---|
WakeExport
|
The lines, each from its upstream end, and their values. |
Raises:
| Type | Description |
|---|---|
MalformedOutputError
|
If the file is not ASCII polydata of two-point lines with the
:data: |
IncompleteOutputError
|
If the file is empty or ends before a required header, block or value. |
Examples:
>>> text = (
... "# vtk DataFile Version 3.0\nwakes\nASCII\nDATASET POLYDATA\n"
... "POINTS 3 float\n0 0 0\n1 0 0\n2 0 0\nLINES 2 6\n2 0 1\n2 1 2\n"
... "CELL_DATA 2\nSCALARS Normalized_Vorticity float 1\nLOOKUP_TABLE default\n"
... "0.5\n0.5\n"
... )
>>> wake = parse_wake_export(text)
>>> len(wake.lines), wake.lines[0].shape, wake.values.tolist()
(1, (3, 3), [0.5])