visualdynamics.io.exodus¶
exodus
¶
Importer for Exodus finite element files (.exo/.e).
Exodus is netCDF underneath; we read it directly with netCDF4. Imports nodes
and element blocks (no tracelines — exodus has none). The format carries no
units; length_unit may be given to declare them at import, otherwise the
geometry arrives unit-less.
Beyond the mesh, exodus carries results: time_whole is a step axis,
nodal variables are (steps x nodes) records, global variables scalars
per step. What the step axis means the file cannot say — a modal run
stores one mode per step with frequency as time, a transient stores
time, and spectral conventions store frequency — so load(steps=...)
declares it rather than guessing, the same principle as declaring
units. See "Exodus beyond the mesh" in PLAN.md.
Functions:
| Name | Description |
|---|---|
load |
Read an exodus file: the mesh, and whatever results it carries. |
save |
Write a geometry, or mode shapes, as exodus. |
result_summary |
What the file's results are, cheaply — the import dialog's facts. |
node_set_nodes |
The node ids one node set holds — what |
Classes¶
Functions:¶
load
¶
load(
path: str | PathLike,
length_unit: str | None = None,
blocks: dict[int, str] | None = None,
steps: str | None = None,
nodes: Any | None = None,
) -> Any
Read an exodus file: the mesh, and whatever results it carries.
steps declares what the file's step axis means, because the file
cannot say: 'modes' (the default) reads displacement variables as
a mode per step with frequency as the step's time; 'time' reads
every nodal and global variable as a TimeHistory; 'frequency'
reads them as a Spectrum, with _RE/_IM variable pairs merged
into complex records. nodes limits the result records to those
node ids — a large transient is records x steps for every node, and
nobody wants all of a 200k-node mesh as channels.
Source code in src/visualdynamics/io/exodus.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
save
¶
save(
obj: Any,
path: str | PathLike,
title: str = "visualdynamics geometry",
tracelines_as_beams: bool = True,
geometry: Geometry | None = None,
unit_system: UnitSystem | None = None,
) -> None
Write a geometry, or mode shapes, as exodus.
Source code in src/visualdynamics/io/exodus.py
result_summary
¶
What the file's results are, cheaply — the import dialog's facts.
{'nodal': [names], 'global': [names], 'steps': n, 'nodes': n, 'node_sets': [(id, name, count)]} — everything empty or zero for a bare mesh, which is how a caller knows there is nothing to ask about. Names only; no values are read.
Source code in src/visualdynamics/io/exodus.py
node_set_nodes
¶
The node ids one node set holds — what load(nodes=...) wants.
Exodus stores set members as 1-based local indices; they come back
mapped through node_num_map into the ids everything else speaks.