Results and recovery

Result containers, nodal/element accessors, and exact internal force and displacement recovery along members.

Asap.LinearResultsType
LinearResults{T}

Results of a linear static solve — displacements, reactions, element end forces, and compliance. Results live HERE, not on nodes/elements: this keeps definition objects pure and lets the result scalar type differ from the model's (e.g. dual numbers flowing through the AD path).

Access through the functions below rather than raw fields where possible — they handle global-DOF bookkeeping for you.

Fields

  • u::Vector{T}: global displacement vector, full DOF space (fixed and inactive slots are zero) [length, rad]
  • reactions::Vector{T}: support reactions, full DOF space (nonzero only at fixed DOFs) [force, force·length]
  • element_forces::Vector{Vector{T}}: per element, the LOCAL end-force 12-vector [N₁, Vy₁, Vz₁, T₁, My₁, Mz₁, N₂, Vy₂, Vz₂, T₂, My₂, Mz₂] — forces the element exerts on its ends, in element local coordinates
  • compliance::T: external work uᵀF — the standard stiffness objective

Accessors

source
Asap.axial_forceMethod
axial_force(res::LinearResults, el) -> T

The element's axial force, tension-positive [force]. Uniform across element types (slot 7 of the local end-force vector — the axial action at the end node, which equals the member force for a two-node element). For a VariableElement, the axial force of its LAST segment (constant along the member absent axial element loads).

source
Asap.displacementMethod
displacement(res::LinearResults, node) -> SVector{6}

The node's displacements (ux, uy, uz, θx, θy, θz) in global coordinates.

source
Asap.element_forcesMethod
element_forces(res::LinearResults, el) -> Vector{T}

The element's local end-force vector (see LinearResults for the component ordering). Requires the element's index (assigned by process!).

source
Asap.element_forcesMethod
element_forces(res::LinearResults, el::VariableElement, s::Int) -> Vector{T}

Local end-force 12-vector of segment s of a super-element (the stored vector concatenates one 12-block per segment, start → end).

source
Asap.reactionMethod
reaction(res::LinearResults, node) -> SVector{6}

Support reactions (Fx, Fy, Fz, Mx, My, Mz) at the node in global coordinates. Zero at unsupported nodes.

source
Asap.InternalForcesType
InternalForces{T}

Densely sampled internal-force diagrams of one member, for plotting. Stations include every load breakpoint and BOTH sides of each point action (offset by ~√eps relative), so shear/moment discontinuities render as true jumps instead of aliased slopes.

Fields

  • x::Vector{T}: stations along the member [length]
  • N: axial force (tension +)
  • Vy, Mz: shear and moment of the local x–y bending plane
  • Vz, My: shear and moment of the local x–z bending plane
  • Mx: torsion

(NOTE for AsapToolkit migrants: names are axis-correct here — the legacy Toolkit .My corresponds to Mz, .Mz to My, .P to N.)

source
Asap.InternalForcesMethod
InternalForces(model, el; resolution = 20) -> InternalForces
InternalForces(state::ElementForceState; resolution = 20)

Sample a member's internal forces at resolution evenly spaced stations plus all load breakpoints and both sides of point actions. For a VariableElement, segments are sampled in turn with globally increasing stations.

source
Asap.LoadTraceType
LoadTrace{T}

The merged LOCAL loading of one prismatic member (or segment of a super-element): everything needed to evaluate internal forces at any station by closed form.

Fields

  • L::T: member length
  • xb::Vector{T}: breakpoint stations 0 = xb[1] < … < xb[end] = L (union of all distributed-load breakpoints)
  • w::Matrix{T}: 3 × n local distributed intensity components (wx, wy, wz) at each breakpoint, piecewise linear between [force/length]
  • W0::Matrix{T}: cumulative ∫₀^xb w ds per component (zeroth moment)
  • W1::Matrix{T}: cumulative ∫₀^xb w·s ds per component (first moment) — together these make ∫₀ˣ w(s)(x−s) ds = x·W0(x) − W1(x) a closed form
  • pstation::Vector{T}: point-action stations
  • pforce::Matrix{T}: 3 × np local point force components
  • pmoment::Matrix{T}: 3 × np local point moment components
source
Asap.axial_forceMethod
axial_force(state::ElementForceState, t) -> T

Internal axial force at fraction t [force], tension-positive.

source
Asap.internal_forcesMethod
internal_forces(model, el) -> ElementForceState
internal_forces(model, el::VariableElement) -> Vector{ElementForceState}

Build the closed-form internal-force state of an element from a solved model (requires solve! to have run). For a VariableElement, one state per segment; use locate_segment or the fraction-based evaluators below, which handle the mapping for you:

axial_force(model, el, t), shear_y(model, el, t), moment_z(model, el, t), …
source
Asap.local_displacementsMethod
local_displacements(state::ElementForceState, t) -> SVector{3}

Local displacements (u, v, w) at fraction t: axial extension plus transverse deflections in the local y and z directions [length].

Recovered exactly by double integration of the exact internal-force fields — v(x) = v₀ + ∫θz, θz(x) = θz₀ + ∫Mz/EIx (and the x–z analogue with the sign flip θy = −w′), axial u(x) = u₀ + ∫N/EA. The integrands are piecewise polynomials of degree ≤ 3, so per-interval 3-point Gauss evaluates the integrals exactly.

source
Asap.moment_yMethod
moment_y(state::ElementForceState, t) -> T

Internal bending moment about local y at fraction t [force·length] — paired with Vz (bending in the local x–z plane); dMy/dx = −Vz.

source
Asap.moment_zMethod
moment_z(state::ElementForceState, t) -> T

Internal bending moment about local z at fraction t [force·length] — the moment paired with Vy (bending in the local x–y plane), sagging-positive for +y loading.

source
Asap.shear_yMethod
shear_y(state::ElementForceState, t) -> T

Internal shear in the local y direction at fraction t [force]. Satisfies dMz/dx = Vy.

source
Asap.shear_zMethod
shear_z(state::ElementForceState, t) -> T

Internal shear in the local z direction at fraction t [force].

source
Asap.torsionMethod
torsion(state::ElementForceState, t) -> T

Internal torsional (twisting) moment at fraction t [force·length].

source