pyflightstream.fsi.external (provisional)¶
Generated from the docstrings at build time: every one of the 9 names in the __all__ of pyflightstream.fsi.external has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
The external structural program and the archiving step that calls it (FR-462).
An FSI input with mode = "external" names a structural program of the
user's own. The solver does not call it directly: its aeroelastic execution
command calls pyfs-fsi external in the point folder at every coupling
iteration, and :func:external_step runs the program, then archives and
validates the call (FR-1092).
THE EXCHANGE IS THE PACKAGE BEAM'S (FR-1091): the solver writes the section
loads file :data:~pyflightstream.fsi.state.LOADS_FILE in the point folder,
and the program writes :data:~pyflightstream.fsi.state.DISPLACEMENT_FILE, one
comma-separated dx,dy,dz translation in metres per structural node, in the
order of the node file, which is the user's (one x,y,z row per node, in
metres, the grammar :func:~pyflightstream.fsi.nodes.write_node_file writes).
Advanced¶
pyflightstream.fsi.external.EXTERNAL_CALLS_LOG
module-attribute
¶
EXTERNAL_CALLS_LOG = 'fsi_external_calls.csv'
pyflightstream.fsi.external.EXTERNAL_MANIFEST
module-attribute
¶
EXTERNAL_MANIFEST = 'fsi_external.json'
pyflightstream.fsi.external.EXTERNAL_NODES_FILE
module-attribute
¶
EXTERNAL_NODES_FILE = 'fsi_external_nodes.csv'
pyflightstream.fsi.external.ExternalStructure
¶
Bases: BaseModel
A resolved external structural program, as the plan hashed it (FR-1090, FR-1095).
Attributes:
| Name | Type | Description |
|---|---|---|
source |
str
|
The FSI input file. |
source_sha256 |
str
|
Its digest. |
executable |
str
|
The program's absolute path, under the workspace's |
executable_sha256 |
str
|
Its digest, verified before every call. |
arguments |
list of str
|
The arguments the step passes the program, after its path. |
structural_nodes |
str
|
The node file's absolute path. |
structural_nodes_sha256 |
str
|
Its digest. |
node_count |
int
|
The number of nodes, so of rows the displacement file must hold. |
inputs |
dict of str to str
|
The files the program reads, by the name it reads them under in the point folder, each to its absolute source path. |
inputs_sha256 |
dict of str to str
|
Their digests, verified in the point folder before every call. |
outputs |
list of str
|
The files the program writes per call, archived with each call. |
timeout_s |
float
|
The longest one call may run. |
families |
list of str
|
The coupled family, one. |
max_iterations |
int or None
|
The cap on a steady row's coupling iterations; None takes the package's. |
convergence_threshold |
float or None
|
The displacement residual the solver stops at; None leaves the solver's. |
provenance
¶
provenance(*, portable: bool = False) -> dict[str, object]
Return FSI identity, optionally without machine-specific source locations.
Staged provenance uses file names and digests. The default retains live paths for pre-run source revalidation; the execution manifest separately retains the executable location needed by the local structural callback.
pyflightstream.fsi.external.STEP_NAMES
module-attribute
¶
STEP_NAMES = frozenset(
{
EXTERNAL_MANIFEST,
EXTERNAL_CALLS_LOG,
EXTERNAL_NODES_FILE,
ARCHIVE_RECORD,
_ARCHIVE_DIR,
_ERROR_LOG,
_STDOUT,
LOADS_FILE,
DISPLACEMENT_FILE,
}
)
pyflightstream.fsi.external.count_structural_nodes
¶
count_structural_nodes(path: str | Path) -> int
Count the nodes of a node file: one x,y,z row each, finite (FR-1091).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or Path
|
The node file. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of nodes. |
Raises:
| Type | Description |
|---|---|
FsiInputError
|
A row that is not three numbers, a value that is not finite, or no node at all. |
pyflightstream.fsi.external.external_step
¶
external_step(directory: str | Path) -> int
Run, archive and validate one call of the external structural program (FR-1092).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str or Path
|
The point folder the solver runs the coupling in, holding
:data: |
required |
Returns:
| Type | Description |
|---|---|
int
|
0 when the call passed every check; 1 otherwise, with the reason in
|
pyflightstream.fsi.external.step_name_collisions
¶
step_name_collisions(names: Iterable[str]) -> list[str]
Return names identifying a file of :data:STEP_NAMES (FR-1093).
Use the staged-file identity rule, including Windows trailing dots and spaces, so an alias cannot overwrite the archive record (REL9-001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
names
|
iterable of str
|
Declared input or output file names. |
required |
Returns:
| Type | Description |
|---|---|
list of str
|
The colliding names, as declared, in their order. |