Model
The Model container and model-level utilities.
Asap.Model — Type
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:
Model— user definition data (this type). Mutable containers so models can be built and edited incrementally.AnalysisCache— analysis structure derived from the definition byprocess!: DOF partition, sparsity pattern, buffers, cached factorization. Rebuilt when topology changes.LinearResults— outputs ofsolve!: 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-stableloads::Vector{AbstractLoad{T}}springs::Vector{NodalSpring{T}}: elastic supports (applicative — nodes don't know about their springs)cache: theAnalysisCacheafter processing (nothingbefore)results: the most recentLinearResults(nothingbefore 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])Asap.connectivity — Method
connectivity(model) -> SparseMatrixCSCn_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.
Asap.node_positions — Method
node_positions(model) -> Matrix{T}n × 3 matrix of nodal coordinates (one row per node).
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).
Asap.volume — Method
volume(model) -> TTotal 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).
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!()
Asap.element_connectivity — Method
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.