Model

The Model container and model-level utilities.

Asap.ModelType
Model{T<:Real}

A structural model: the complete definition of a structure — nodes, elements (frame and truss mixed freely), loads, and elastic supports.

The model is the first of three separated layers:

  1. Model — user definition data (this type). Mutable containers so models can be built and edited incrementally.
  2. AnalysisCache — analysis structure derived from the definition by process!: DOF partition, sparsity pattern, buffers, cached factorization. Rebuilt when topology changes.
  3. LinearResults — outputs of solve!: displacements, reactions, element forces, queried through accessor functions.

Fields

  • nodes::Vector{Node{T}}
  • elements::Vector{AbstractElement{T}}: heterogeneous by design — truss and frame elements coexist; assembly groups them by concrete type behind function barriers so hot loops stay type-stable
  • loads::Vector{AbstractLoad{T}}
  • springs::Vector{NodalSpring{T}}: elastic supports (applicative — nodes don't know about their springs)
  • cache: the AnalysisCache after processing (nothing before)
  • results: the most recent LinearResults (nothing before solving)

Constructor

Model(nodes, elements, loads = AbstractLoad{T}[]; springs = NodalSpring{T}[])

Typical use

julia> model = Model(nodes, elements, loads)

julia> solve!(model)

julia> displacement(model.results, nodes[end])
source
Asap.connectivityMethod
connectivity(model) -> SparseMatrixCSC

n_elements × n_nodes signed incidence matrix: −1 at each element's start node, +1 at its end node — so C * X gives element vectors for nodal coordinate columns X.

source
Asap.planarize!Function
planarize!(model, plane = :XY)

Constrain the model to 2D behavior: planarize all nodes (fix out-of-plane DOFs) and, for the :XY plane, zero every frame element's roll angle rollangle so local bending axes align with the working plane (legacy behavior, preserved).

source
Asap.volumeMethod
volume(model) -> T

Total material volume: Σ A·L over elements whose sections expose a geometric area (Section); RigiditySections have no geometric area and contribute zero (they represent effective rigidities, not geometry).

source
Asap.clear_supports!Method
clear_supports!(model::Model)

Remove all fixed DOFs from a model and reprocess. Will require new definitions of fixed supports before running solve!()

source
Asap.element_connectivityMethod
element_connectivity(model::Model)

Get the Cel = [nelement × nelement] adjacency matrix for a given model, where Cel[i, j] = 1 if element i shares a node with element j, and is 0 otherwise.

source