Generators
Parametric structure generators: 2D trusses, space frames, building frames, grids, and ground structures.
Asap.Warren2D — Type
Warren2D <: AbstractGeneratorA 2D Warren truss (arch or catenary form) in the XY plane, generated and solved on construction.
Fields
model::Model{Float64}solved structural modeln::Integernumber of bays (odd)dx::Realbay span [length]dy::Realtruss depth [length]section::AbstractSectioncross section applied to all memberstype::Symbol:arch(long chord at bottom) or:catenary(long chord at top)
Asap.Warren2D — Method
generatewarren2d(n::Integer,...)Generate a 2D warren truss in the XY plane.
Required inputs:
n::IntegerNumber of baysdx::RealBay spandy::Realtruss depthsection::AbstractSectioncross section of elements
Default inputs:
type::Symbol = :arch:arch = long chord at bottom; :catenary = long chord at top
Asap.Pratt2D — Type
Pratt2D <: AbstractGeneratorA 2D Pratt truss in the XY plane, generated and solved on construction.
Fields
model::Model{Float64}solved structural modelL::Realtotal span [length]nbays::Integernumber of baysdx::Realbay spacing = L / nbays [length]dy::Realtruss depth [length]
Asap.BakerTruss — Type
BakerTruss(nbays::Integer, dx::Real, dy::Real, section::AbstractSection, load = [0., -10., 0.])Generate a 2D modified Baker truss.
Arguments
nbays::Integernumber of total bays (must be even)dx::Realx-spacing of baysdy::Realy-spacing of bayssection::AbstractSectioncross section of barsload::Vector{Float64} = [0., -10., 0.]Load applied to free bottom nodes
Asap.BakerTruss — Type
BakerTruss <: AbstractGeneratorA 2D modified Baker truss with X-bracing in each bay offset to quarter points.
Fields
model::Model{Float64}structural modelnbays::Integernumber of bays across spandx::Realx-spacing of baysdy::Realy-spacing of bayssection::AbstractSectionsection applied to elements
Asap.TrussFrame — Type
TrussFrame <: AbstractGeneratorA 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 modelnx::Integernumber of bays in xdx::Realbay width [length]ny::Integernumber of stories in ydy::Realstory height [length]section::AbstractSectioncross section applied to all memberssingle_base::Boolsupport only the central base node (true) or all base nodes (false)
Asap.SpaceFrame — Type
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.
Asap.SpaceFrame — Type
SpaceFrame <: AbstractGeneratorA double-layer spaceframe grid (offset square-on-square), generated and solved on construction.
Fields
model::Model{Float64}solved structural modelnx::Integer,dx::Realbays and bay span in x [length]ny::Integer,dy::Realbays and bay span in y [length]dz::Reallayer offset (roof thickness) [length]section::AbstractSectioncross section applied to all memberssupport::Symbolsupport layout::corner,:x,:y, or:xyload::Vectornodal load applied to top-layer nodes [force]base::Vectororigin offset of the generated grid [length]ibottom,itop::Matrix{Int64}node indices of the bottom/top layersisquares::Matrix{Vector{Int64}}node indices of each top-layer moduleisupport::Vector{Int64}supported node indicesiX1,iX2,iY1,iY2::Vector{Int64}node indices of the four exterior edges
Asap.SpaceFrame — Method
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:
:cornerpinned supports at the 4 corner bays (total of 16 pinned supports):xpinned supports along exterior nodes parallel to the global X direction:ypinned supports along exterior nodes parallel to the global Y direction:xypinned supports along all exterior nodes
Asap.SpaceFrameBeam — Type
SpaceFrameBeam <: AbstractGeneratorA 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 modelnx::Integernumber of bays along the beamdx::Realbay length [length]dy::Realbeam width [length]dz::Realbeam depth [length]section::AbstractSectioncross section applied to all members
Asap.Frame — Type
Frame <: AbstractGeneratorA multistory frame structure with joist-beam-column hierarchy.
Fields
modelAsap modelnxnumber of bays in x directiondxbay spacing in x directionnynumber of bays in y directiondybay spacing in y directiondzcolumn heightjoistSpacingspacing of joistscolumnSectionAsap section used for columnsprimarySectionAsap section used for primary spansjoistSectionAsap section used for joistsbraceSectionAsap section used for bracescolumnReleaseEnd release for columnsprimaryReleaseEnd release used for primary spansjoistReleaseEnd release used for joistsbraceReleaseEnd release used for bracescolumnPsiLCS rotation for columnsprimaryPsiLCS rotation for primary spansjoistPsiLCS rotation for joistsBaseBase point of Frame generatoriExteriorXnodesIndices of nodes that are parallel to the global X axis, are on the exterior ends of the frame, and coincide with primary-column intersectionsiExteriorYnodesIndices of nodes that are parallel to the global Y axis, are on the exterior ends of the frame, and coincide with joist-column intersectionsiExteriorXjoistsIndices of elements that are parallel to the global Y axis and are on the exterior ends of the frameiExteriorYprimariesindices of elements that are parallel to the global X axis and are on the exterior ends of the frame
Asap.Frame — Method
Frame(nx, dx, ny, dy, nz, dz, joistSpacing, columnSection, primarySection, joistSection, braceSection)Generate a 3D frame model.
Arguments
nx::IntegerNumber of bays in primary span directiondx::RealPrimary span lengthny::IntegerNumber of bays in secondary span directiondy::RealSecondary span lengthnz::IntegerNumber of storiesdz::RealStory heightjoistSpacing::RealApprox. center spacing between secondary spanscolumnSection::SectionSection of column elementsprimarySection::SectionSection of primary beamsjoistSection::SectionSection of secondary beamsbraceSection::SectionSection for lateral bracing
Optional inputs
diaphragm::Bool = falseInclude floor diaphragm (as X braces between columns)diaphragmSection::Section = nothingElement section for diaphragm members (defaults to braceSection)columnRelease::Symbol = :fixedfixedDOF end release for column elementsprimaryRelease::Symbol = :fixedfixedDOF end release for primary elementsjoistRelease::Symbol = :joistDOF end release for joist elementsbraceRelease::Symbol = :freefreeDOF end release for bracescolumnPsi::Real = 0Roll angle for column LCSprimaryPsi::Real = π/2Roll angle for primary beam LCSjoistPsi::Real = π/2Roll angle for secondary beam LCSbase::Vector{Real} = [0, 0, 0]base point for frame grid generation
Asap.GridFrame — Type
GridFrame(Lx, nx, Ly, ny, section; load = [0., 0., -1.], support = :corner, support_type = :pinned)Generate a grid-topology Asap model.
Arguments
Lx::Realtotal length in x directionnx::Integernumber of bays in x directionLy::Realtotal length in y directionny::Integernumber of bays in y directionsection::Sectioncross section assigned to elements
Optional arguments
load = [0, 0, 1]force applied to all free nodessupport = :cornernodes to fix. Choose from: :corner, :x, :y, :xysupport_type = :pinnedboundary 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::NetworkFDM network constructed from parametersigrid::Matrix{Int64}Matrix of nodal indices in relation to the generated grid
Asap.GridNetwork — Type
GridNetwork(nx, Lx, ny, Ly, q::Real = 1.0; load = [0., 0., 1.], support = :corner)Generate a grid-topology Force Density Network.
Arguments
nx::Integernumber of bays in x directiondx::Realbay spacing in x directionny::Integernumber of bays in y directiondy::Realbay spacing in y directionq::Realforce density of elements. Defaults to 1.0.
Optional arguments
load = [0, 0, 1]force applied to all free nodessupport = :cornernodes 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::NetworkFDM network constructed from parametersigrid::Matrix{Int64}Matrix of nodal indices in relation to the generated grid
Asap.BoundedGroundStructure — Type
BoundedGroundStructure(Lx, nx, Ly, ny, ub)Returns a ground structure topology object.
Arguments
Lxlength in x directionnxnumber of bays in x directionLylength in y directionnynumber of bays in y directionubnode-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
igridMatrix of node indices with respect to the generated gridXmatrixMatrix of nodal x positions with respect to the generated gridYmatrixMatrix of nodal y positions with respect to the generated gridielementsElement start/end nodal indicesCAn [nelement × nnode] connectivity matrix
Asap.DenseGroundStructure — Type
DenseGroundStructure(Lx, nx, Ly, ny)Returns a ground structure topology object.
Arguments
Lxlength in x directionnxnumber of bays in x directionLylength in y directionnynumber 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
igridMatrix of node indices with respect to the generated gridXmatrixMatrix of nodal x positions with respect to the generated gridYmatrixMatrix of nodal y positions with respect to the generated gridielementsElement start/end nodal indicesCAn [nelement × nnode] connectivity matrix
Asap.XGroundStructure — Type
XGroundStructure(Lx, nx, Ly, ny)Returns a ground structure topology object.
Arguments
Lxlength in x directionnxnumber of bays in x directionLylength in y directionnynumber 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
igridMatrix of node indices with respect to the generated gridXmatrixMatrix of nodal x positions with respect to the generated gridYmatrixMatrix of nodal y positions with respect to the generated gridielementsElement start/end nodal indicesCAn [nelement × nnode] connectivity matrix
Asap.to_frame — Method
to_frame(gs::GroundStructure, section::Section; load = [0.0, 0.0, -1.0], support = :xy, planar = false, support_type = :pinned) -> ModelConvert 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, orBoundedGroundStructure)section: section assigned to every candidate elementload: force vector [force] applied to every free nodesupport: which grid nodes are supported —:xy(full perimeter),:x/:y(two opposite edges), or:cornerplanar: constrain to 2D behavior viaplanarize!support_type::pinnedor:fixedsupports
The model is solved before it is returned.
Asap.to_truss — Method
to_truss(gs::GroundStructure, section::AbstractSection; load = [1.0, 0.0, 0.0], support = :xy, planar = true) -> ModelConvert 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, orBoundedGroundStructure)section: section assigned to every candidate elementload: force vector [force] applied to every free nodesupport: which grid nodes are pinned —:xy(full perimeter),:x/:y(two opposite edges), or:cornerplanar: constrain to 2D behavior viaplanarize!
The model is solved before it is returned.