Generators

Parametric structure generators: 2D trusses, space frames, building frames, grids, and ground structures.

Asap.Warren2DType
Warren2D <: AbstractGenerator

A 2D Warren truss (arch or catenary form) in the XY plane, generated and solved on construction.

Fields

  • model::Model{Float64} solved structural model
  • n::Integer number of bays (odd)
  • dx::Real bay span [length]
  • dy::Real truss depth [length]
  • section::AbstractSection cross section applied to all members
  • type::Symbol :arch (long chord at bottom) or :catenary (long chord at top)
source
Asap.Warren2DMethod
generatewarren2d(n::Integer,...)

Generate a 2D warren truss in the XY plane.

Required inputs:

  • n::Integer Number of bays
  • dx::Real Bay span
  • dy::Real truss depth
  • section::AbstractSection cross section of elements

Default inputs:

  • type::Symbol = :arch :arch = long chord at bottom; :catenary = long chord at top
source
Asap.Pratt2DType
Pratt2D <: AbstractGenerator

A 2D Pratt truss in the XY plane, generated and solved on construction.

Fields

  • model::Model{Float64} solved structural model
  • L::Real total span [length]
  • nbays::Integer number of bays
  • dx::Real bay spacing = L / nbays [length]
  • dy::Real truss depth [length]
source
Asap.BakerTrussType
BakerTruss(nbays::Integer, dx::Real, dy::Real, section::AbstractSection, load = [0., -10., 0.])

Generate a 2D modified Baker truss.

Arguments

  • nbays::Integer number of total bays (must be even)
  • dx::Real x-spacing of bays
  • dy::Real y-spacing of bays
  • section::AbstractSection cross section of bars
  • load::Vector{Float64} = [0., -10., 0.] Load applied to free bottom nodes
source
Asap.BakerTrussType
BakerTruss <: AbstractGenerator

A 2D modified Baker truss with X-bracing in each bay offset to quarter points.

Fields

  • model::Model{Float64} structural model
  • nbays::Integer number of bays across span
  • dx::Real x-spacing of bays
  • dy::Real y-spacing of bays
  • section::AbstractSection section applied to elements
source
Asap.TrussFrameType
TrussFrame <: AbstractGenerator

A 2D trussed tower/frame in the XY plane: nx × ny braced bays stacked vertically, generated and solved on construction.

Fields

  • model::Model{Float64} solved structural model
  • nx::Integer number of bays in x
  • dx::Real bay width [length]
  • ny::Integer number of stories in y
  • dy::Real story height [length]
  • section::AbstractSection cross section applied to all members
  • single_base::Bool support only the central base node (true) or all base nodes (false)
source
Asap.SpaceFrameType
SpaceFrame(nx, dx, ny, dy, z0, interpolator, section, offset = false; ...)

Variable-depth spaceframe: the top-layer height is sampled from interpolator(u, v), any callable mapping normalized plan coordinates u, v ∈ [0, 1] to a height offset added to z0. Pass e.g. a closure over an analytic surface, or an Interpolations.jl extrapolation built on a (0,1) × (0,1) grid — the generator only ever calls it as a function.

source
Asap.SpaceFrameType
SpaceFrame <: AbstractGenerator

A double-layer spaceframe grid (offset square-on-square), generated and solved on construction.

Fields

  • model::Model{Float64} solved structural model
  • nx::Integer, dx::Real bays and bay span in x [length]
  • ny::Integer, dy::Real bays and bay span in y [length]
  • dz::Real layer offset (roof thickness) [length]
  • section::AbstractSection cross section applied to all members
  • support::Symbol support layout: :corner, :x, :y, or :xy
  • load::Vector nodal load applied to top-layer nodes [force]
  • base::Vector origin offset of the generated grid [length]
  • ibottom, itop::Matrix{Int64} node indices of the bottom/top layers
  • isquares::Matrix{Vector{Int64}} node indices of each top-layer module
  • isupport::Vector{Int64} supported node indices
  • iX1, iX2, iY1, iY2::Vector{Int64} node indices of the four exterior edges
source
Asap.SpaceFrameMethod
SpaceFrame(nx::Integer,
dx::Real,
ny::Integer,
dy::Real,
dz::Real,
section::AbstractSection;
support = :corner,
load = [0., 0., -10.],
base = [0., 0., 0.])

Generate a spaceframe truss model of planar bay spacing dx, dy, with nx, ny nodes in each direction, with roof thickness dz. Options for support include:

  • :corner pinned supports at the 4 corner bays (total of 16 pinned supports)
  • :x pinned supports along exterior nodes parallel to the global X direction
  • :y pinned supports along exterior nodes parallel to the global Y direction
  • :xy pinned supports along all exterior nodes
source
Asap.SpaceFrameBeamType
SpaceFrameBeam <: AbstractGenerator

A linear (one-bay-wide) spaceframe beam: two bottom chords, one elevated top chord, and web members, generated and solved on construction.

Fields

  • model::Model{Float64} solved structural model
  • nx::Integer number of bays along the beam
  • dx::Real bay length [length]
  • dy::Real beam width [length]
  • dz::Real beam depth [length]
  • section::AbstractSection cross section applied to all members
source
Asap.FrameType
Frame <: AbstractGenerator

A multistory frame structure with joist-beam-column hierarchy.

Fields

  • model Asap model
  • nx number of bays in x direction
  • dx bay spacing in x direction
  • ny number of bays in y direction
  • dy bay spacing in y direction
  • dz column height
  • joistSpacing spacing of joists
  • columnSection Asap section used for columns
  • primarySection Asap section used for primary spans
  • joistSection Asap section used for joists
  • braceSection Asap section used for braces
  • columnRelease End release for columns
  • primaryRelease End release used for primary spans
  • joistRelease End release used for joists
  • braceRelease End release used for braces
  • columnPsi LCS rotation for columns
  • primaryPsi LCS rotation for primary spans
  • joistPsi LCS rotation for joists
  • Base Base point of Frame generator
  • iExteriorXnodes Indices of nodes that are parallel to the global X axis, are on the exterior ends of the frame, and coincide with primary-column intersections
  • iExteriorYnodes Indices of nodes that are parallel to the global Y axis, are on the exterior ends of the frame, and coincide with joist-column intersections
  • iExteriorXjoists Indices of elements that are parallel to the global Y axis and are on the exterior ends of the frame
  • iExteriorYprimaries indices of elements that are parallel to the global X axis and are on the exterior ends of the frame
source
Asap.FrameMethod
Frame(nx, dx, ny, dy, nz, dz, joistSpacing, columnSection, primarySection, joistSection, braceSection)

Generate a 3D frame model.

Arguments

  • nx::Integer Number of bays in primary span direction
  • dx::Real Primary span length
  • ny::Integer Number of bays in secondary span direction
  • dy::Real Secondary span length
  • nz::Integer Number of stories
  • dz::Real Story height
  • joistSpacing::Real Approx. center spacing between secondary spans
  • columnSection::Section Section of column elements
  • primarySection::Section Section of primary beams
  • joistSection::Section Section of secondary beams
  • braceSection::Section Section for lateral bracing

Optional inputs

  • diaphragm::Bool = false Include floor diaphragm (as X braces between columns)
  • diaphragmSection::Section = nothing Element section for diaphragm members (defaults to braceSection)
  • columnRelease::Symbol = :fixedfixed DOF end release for column elements
  • primaryRelease::Symbol = :fixedfixed DOF end release for primary elements
  • joistRelease::Symbol = :joist DOF end release for joist elements
  • braceRelease::Symbol = :freefree DOF end release for braces
  • columnPsi::Real = 0 Roll angle for column LCS
  • primaryPsi::Real = π/2 Roll angle for primary beam LCS
  • joistPsi::Real = π/2 Roll angle for secondary beam LCS
  • base::Vector{Real} = [0, 0, 0] base point for frame grid generation
source
Asap.GridFrameType
GridFrame(Lx, nx, Ly, ny, section; load = [0., 0., -1.], support = :corner, support_type = :pinned)

Generate a grid-topology Asap model.

Arguments

  • Lx::Real total length in x direction
  • nx::Integer number of bays in x direction
  • Ly::Real total length in y direction
  • ny::Integer number of bays in y direction
  • section::Section cross section assigned to elements

Optional arguments

  • load = [0, 0, 1] force applied to all free nodes
  • support = :corner nodes to fix. Choose from: :corner, :x, :y, :xy
  • support_type = :pinned boundary condition on support nodes. See fixDict for valud entries

Return

Returns a GridFrame structure.

struct GridFrame <: AbstractGenerator
    model::Model
    nx::Integer
    dx::Real
    ny::Integer
    dy::Real
    igrid::Matrix{Int64}

Fields

Along with bay spacing fields, additional fields are included in the returned GridNetwork struct:

  • network::Network FDM network constructed from parameters
  • igrid::Matrix{Int64} Matrix of nodal indices in relation to the generated grid
source
Asap.GridNetworkType
GridNetwork(nx, Lx, ny, Ly, q::Real = 1.0; load = [0., 0., 1.], support = :corner)

Generate a grid-topology Force Density Network.

Arguments

  • nx::Integer number of bays in x direction
  • dx::Real bay spacing in x direction
  • ny::Integer number of bays in y direction
  • dy::Real bay spacing in y direction
  • q::Real force density of elements. Defaults to 1.0.

Optional arguments

  • load = [0, 0, 1] force applied to all free nodes
  • support = :corner nodes to fix. Choose from: :corner, :x, :y, :xy

Return

Returns a GridNetwork structure.

struct GridNetwork <: AbstractGenerator
    network::Network
    nx::Integer
    dx::Real
    ny::Integer
    dy::Real
    igrid::Matrix{Int64}

Fields

Along with bay spacing fields, additional fields are included in the returned GridNetwork struct:

  • network::Network FDM network constructed from parameters
  • igrid::Matrix{Int64} Matrix of nodal indices in relation to the generated grid
source
Asap.BoundedGroundStructureType
BoundedGroundStructure(Lx, nx, Ly, ny, ub)

Returns a ground structure topology object.

Arguments

  • Lx length in x direction
  • nx number of bays in x direction
  • Ly length in y direction
  • ny number of bays in y direction
  • ub node-node length threshold to generate a connection

Return

Returns a BoundedGroundStructure object.

struct BoundedGroundStructure <: GroundStructure
    Lx::Float64
    nx::Float64
    dx::Float64
    Ly::Float64
    ny::Float64
    dy::Float64
    xy::Vector{Vector{Float64}}
    Xmatrix::Matrix{Float64}
    Ymatrix::Matrix{Float64}
    igrid::Matrix{Int64}
    ielements::Vector{Vector{Int64}}
    C::SparseMatrixCSC{Int64, Int64}

Additional Fields

  • igrid Matrix of node indices with respect to the generated grid
  • Xmatrix Matrix of nodal x positions with respect to the generated grid
  • Ymatrix Matrix of nodal y positions with respect to the generated grid
  • ielements Element start/end nodal indices
  • C An [nelement × nnode] connectivity matrix
source
Asap.DenseGroundStructureType
DenseGroundStructure(Lx, nx, Ly, ny)

Returns a ground structure topology object.

Arguments

  • Lx length in x direction
  • nx number of bays in x direction
  • Ly length in y direction
  • ny number of bays in y direction

Return

Returns a DenseGroundStructure object.

struct DenseGroundStructure <: GroundStructure
    Lx::Float64
    nx::Float64
    dx::Float64
    Ly::Float64
    ny::Float64
    dy::Float64
    xy::Vector{Vector{Float64}}
    Xmatrix::Matrix{Float64}
    Ymatrix::Matrix{Float64}
    igrid::Matrix{Int64}
    ielements::Vector{Vector{Int64}}
    C::SparseMatrixCSC{Int64, Int64}

Additional Fields

  • igrid Matrix of node indices with respect to the generated grid
  • Xmatrix Matrix of nodal x positions with respect to the generated grid
  • Ymatrix Matrix of nodal y positions with respect to the generated grid
  • ielements Element start/end nodal indices
  • C An [nelement × nnode] connectivity matrix
source
Asap.XGroundStructureType
XGroundStructure(Lx, nx, Ly, ny)

Returns a ground structure topology object.

Arguments

  • Lx length in x direction
  • nx number of bays in x direction
  • Ly length in y direction
  • ny number of bays in y direction

Return

Returns a XGroundStructure object.

struct XGroundStructure <: GroundStructure
    Lx::Float64
    nx::Float64
    dx::Float64
    Ly::Float64
    ny::Float64
    dy::Float64
    xy::Vector{Vector{Float64}}
    Xmatrix::Matrix{Float64}
    Ymatrix::Matrix{Float64}
    igrid::Matrix{Int64}
    ielements::Vector{Vector{Int64}}
    C::SparseMatrixCSC{Int64, Int64}

Additional Fields

  • igrid Matrix of node indices with respect to the generated grid
  • Xmatrix Matrix of nodal x positions with respect to the generated grid
  • Ymatrix Matrix of nodal y positions with respect to the generated grid
  • ielements Element start/end nodal indices
  • C An [nelement × nnode] connectivity matrix
source
Asap.to_frameMethod
to_frame(gs::GroundStructure, section::Section; load = [0.0, 0.0, -1.0], support = :xy, planar = false, support_type = :pinned) -> Model

Convert a ground structure topology into a solved frame Model: one FrameElement per candidate line, with section assigned uniformly.

Arguments

  • gs: the candidate topology (XGroundStructure, DenseGroundStructure, or BoundedGroundStructure)
  • section: section assigned to every candidate element
  • load: force vector [force] applied to every free node
  • support: which grid nodes are supported — :xy (full perimeter), :x / :y (two opposite edges), or :corner
  • planar: constrain to 2D behavior via planarize!
  • support_type: :pinned or :fixed supports

The model is solved before it is returned.

source
Asap.to_trussMethod
to_truss(gs::GroundStructure, section::AbstractSection; load = [1.0, 0.0, 0.0], support = :xy, planar = true) -> Model

Convert a ground structure topology into a solved truss Model: one TrussElement per candidate line, with section assigned uniformly.

Arguments

  • gs: the candidate topology (XGroundStructure, DenseGroundStructure, or BoundedGroundStructure)
  • section: section assigned to every candidate element
  • load: force vector [force] applied to every free node
  • support: which grid nodes are pinned — :xy (full perimeter), :x / :y (two opposite edges), or :corner
  • planar: constrain to 2D behavior via planarize!

The model is solved before it is returned.

source