This section covers the post-processing pipeline that transforms the raw linear system solution u = K−1f into the physical quantities available in the GearMaster results viewer: nodal displacements, strains, stresses, and strain energy density.
All post-processing code lives in GM_modules/Meshfree/src/solver/mlpg/ and follows a
stateless, pure-function design: every routine takes arrays as input and returns new
arrays; no internal state is mutated.
recovery_sampling;
legacy: regular background grid), then fit a local polynomial per node.The results settings (results_n_gauss, recovery_sampling, results_refine_levels) act on the stored solution: changing them recomputes the results without a re-solve.
The solver stores in-memory the data needed for on-demand post-processing in the
SolverResults.solver_context dictionary:
| Key | Type | Description |
|---|---|---|
nodes_2d | (N, 2) float64 | Node coordinates (xy) |
support_radii | (N,) float64 | Per-node MLS support radii |
D_per_node | (N, 3, 3) float64 | Per-node constitutive matrices |
weight_name | str | MLS weight function used in assembly |
mls_basis | str | MLS polynomial basis |
u_flat | (2N,) float64 | Displacement solution vector |
solver_context is intentionally not serialised to the
.gmmfr results file. It is available only during the current session. If a
results file is reloaded, post-processing must be re-triggered by re-running the analysis.
| Quantity | Symbol | Shape | Units | Function |
|---|---|---|---|---|
| Displacement | u | (N, 3) | mm | TimestepResult.displacement |
| Reaction forces | R | (N, 3) | N | TimestepResult.reaction_forces |
| Voigt strain | [εxx, εyy, γxy] | (N, 3) | — | compute_nodal_strain() |
| Voigt stress | [σxx, σyy, τxy] | (N, 3) | MPa | compute_nodal_stress() |
| Von Mises stress | σVM | (N,) | MPa | von_mises_stress() |
| Signed Von Mises | sign(σh) ⋅ σVM | (N,) | MPa | signed_von_mises_stress() |
| Principal stresses | σ1, σ2 | (N,) | MPa | principal_stresses() |
| Max shear stress | τmax | (N,) | MPa | max_shear_stress() |
| Stress intensity | σ1 − σ2 | (N,) | MPa | stress_intensity() |
| Von Mises strain | εVM | (N,) | — | von_mises_strain() |
| Principal strains | ε1, ε2 | (N,) | — | principal_strains() |
| Strain energy density | U0 | (N,) | MPa | strain_energy_density() |
| Averaged SED (Lazzarin-Berto) | ASED | (N,) | MPa | ased_lazzarin_berto() |