Library
Public API
Creating an Assembly
GXBeam.curve_length — Function
curve_length(start, stop, curvature)Calculate the length of a curve given its endpoints and its curvature vector.
GXBeam.discretize_beam — Function
discretize_beam(L, start, discretization; frame, curvature)Discretize a beam of length L located at start according to the discretization provided in discretization
Return the lengths, endpoints, midpoints, and reference frame of the beam elements.
Arguments
L: Beam lengthstart: Beam starting pointdiscretization: Number of beam elements, or the normalized endpoints of each beam element, with values ranging from 0 to 1.
Keyword Arguments
frame: Reference frame at the start of the beam element, represented by a 3x3 transformation matrix from the undeformed local frame to the body frame.curvature: curvature vector
discretize_beam(start, stop, discretization; frame, curvature)Discretize a beam from start to stop according to the discretization provided in discretization.
Return the lengths, endpoints, midpoints, and reference frame of the beam elements.
Arguments
start: Beam starting pointstop: Beam ending pointdiscretization: Number of beam elements, or the normalized endpoints of each beam element, with values ranging from 0 to 1.
Keyword Arguments
frame: Reference frame at the start of the beam element, represented by a 3x3 transformation matrix from the undeformed local frame to the body frame.curvature: curvature vector
GXBeam.Assembly — Type
Assembly{TF, TP<:AbstractVector{<:AbstractVector{TF}},
TC<:AbstractVector{<:Integer}, TE<:AbstractVector{Element{TF}}}Composite type that defines an assembly of connected nonlinear beam elements.
Fields
points: Array of all beam element endpointsstart: Array containing point index where each beam element startsstop: Array containing point index where each beam element stopselements: Array containing beam element definitions (seeElement)
GXBeam.Assembly — Method
Assembly(points, start, stop; kwargs...)Construct an assembly of connected nonlinear beam elements. Beam lengths and midpoints may be manually specified in case beam elements are curved rather than straight.
Arguments
points: Array of all beam element endpointsstart: Array containing point indices where each beam element startsstop: Array containing point indices where each beam element stops
Keyword Arguments
frames: Array of (3 x 3) tranformation matrices for each beam element. Transforms from the local undeformed beam frame to the global frame. Defaults to the identity matrix.compliance: Array of (6 x 6) compliance matrices for each beam element. Defaults tozeros(6,6)for each beam element.mass: Array of (6 x 6) mass matrices for each beam element. Defaults tozeros(6,6)for each beam element.damping: Array of (6) structural damping coefficients for each beam element. Defaults tofill(0.01, 6)for each beam element.lengths: Array containing the length of each beam element. Defaults to the distance between beam endpoints.midpoints: Array containing the midpoint of each beam element. Defaults to the average of the beam element endpoints.
Section Properties
GXBeam.Material — Type
Material(E1, E2, E3, G12, G13, G23, nu12, nu13, nu23, rho,
S1t=1.0, S1c=1.0, S2t=1.0, S2c=1.0, S3t=1.0, S3c=1.0, S12=1.0, S13=1.0, S23=1.0)Orthotropic material properties. Axis 1 is the main ply axis, axis 2 is the transverse ply axis, and axis 3 is normal to the ply. For a fiber orientation of zero, axis 1 is along the beam axis.
Arguments
Ei::float: Young's modulus along ith axis.Gij::float: Shear modulinuij::float: Poisson's ratio. $nu_ij E_j = nu_ji E_i$rho::float: DensitySit::float: Tensile strength in ith directionSic::float: Compressive strength in ith directionSij::float: Strength in ij direction
GXBeam.Node — Type
Node(x, y)A node in the finite element mesh at location x, y. If assembled in a vector, the vector index is the node number.
Arguments
x::float: x-location of node in global coordinate systemy::float: y-location of node in global coordinate system
GXBeam.MeshElement — Type
MeshElement(nodenum, material, theta)An element in the mesh, consisting of four ordered nodes, a material, and a fiber orientation.
Arguments
nodenum::Vector{integer}: Node indices, defined counterclockwise starting from the bottom left node (as defined in the local coordinate system, see the figure).material::Material: Material propertiestheta::float: Fiber orientation
GXBeam.Layer — Type
Layer(material, t, theta)A layer (could be one ply or many plys of same material). A layup is a vector of layers.
Arguments
material::Material: material of layert::float: thickness of layertheta::float: fiber orientation (rad)
GXBeam.afmesh — Function
afmesh(xaf, yaf, chord, twist, paxis, xbreak, webloc, segments, webs; ds=nothing, dt=nothing, ns=nothing, nt=nothing, wns=4, wnt=nothing)Create structural mesh for airfoil. The airfoil coordinates define the meshing density tangential to the airfoil. Whereas the number of layers defines the resolution normal to the airfoil. All segments are meshed with the same resolution in the normal direction, using the number of grid points as defined by segment with the most layers.
Arguments
xaf, yaf::Vector{float}: points defining airfoil start at trailing edge and traverse counterclockwise back to trailing edge (can be blunt or sharp T.E.)chord::float: chord lengthtwist::float: twist angle (rad)paxis::float: pitch axis (normalized by chord). e.g., 0.25 means twist about quarter chord.xbreak::Vector{float}: x-locations, normalized by chord, defining break points between segments. must start at 0 and end at 1. e.g., [0, 0.2, 0.4, 0.7, 1.0] defines 4 segments.webloc::Vector{float}: x-locations, normalized by chord, defining web centers (and length of vector is number of webs). e.g., [0.25, 0.55] means there is a web at 25% chord and a second web at 55% chord.segments::Vector{Vector{Layer}}: A Layer defines a ply (or multiple plys with the same material/orientation). At a given x location the ply stack (segment) is defined a vector of layers starting from outside surface towards inside. Segments then is a vector of these segments that defines properties between segments as defined by xbreak.webs::Vector{Vector{Layer}}: same structure as segments, except each inner vector is from left to right (although this is usually symmetric), and each outer vector is for a separate webds::float: if provided, airfoil spacing will be resampling with approximately this spacing, normalized by chord. e.g., 0.01 will have points on the airfoil roughly 1% chord apart.dt::float: if provided, thickness will be resampled with this maximum mesh size (thickness is absolute). Note that the total number of cells remains constant along airfoil, so most thicknesses will be much less. e.g., 0.01 will target a maximum mesh thickness of 0.01 (absolute).ns::vector{int}: if provided, rather than use a targert size ds, we specify the number of cells to use in each segment. This is desirable for gradient-based optimization, if airfoil coordinates are changed, so that during resizing operations the mesh stretch/shrinks rather than experiencing discrete jumps. For example, ns=[15, 20, 40, 30] would use 15 elements between xbreak[1] and xbreak[2] and so on.nt::vector{vector{int}}: if provided, defines how many elements to use across tangential direction. Again, prefered over dt for gradient-based optimization, if the thicknesses are changed during optimization. each entry defines how many cells to put in that layer following order of original layup. for example, nt=[[1, 2, 1], [1, 3]] would use 1 element, 2 elements (subdivide), then 1 elements over first sector, and so on.wns::int: discretization level for number of elements vertically along web.wnt::vector{vector{int}}: same definition as nt but for the webs
Returns
nodes::Vector{Node{Float64}}: nodes for this meshelements::Vector{MeshElement{Float64}}: elements for this mesh
GXBeam.initialize_cache — Function
initialize_cache([TF,] nodes, elements)Construct the cache for the section property calculations.
GXBeam.compliance_matrix — Function
compliance_matrix(nodes, elements; cache=initialize_cache(nodes, elements),
gxbeam_order=true, shear_center=true)Compute compliance matrix given a finite element mesh described by nodes and elements.
Arguments
nodes: Vector containing all the nodes in the meshelements: Vector containing all the elements in the meshcache::SectionCache: A pre-allocated cache which may be passed in to reduce allocations across multiple calls to this function when the number of nodes, number of elements, and connectivity remain the same.gxbeam_order::Bool: Indicates whether the compliance matrix should be provided in the order expected by GXBeam (rather than the internal ordering used by the section analysis)shear_center::Bool: Indicates whether the compliance matrix should be provided about the shear center
Returns
S::Matrix: compliance matrixsc::Vector{float}: x, y location of shear center (location where a transverse/shear force will not produce any torsion, i.e., beam will not twist)tc::Vector{float}: x, y location of tension center, aka elastic center, aka centroid (location where an axial force will not produce any bending, i.e., beam will remain straight)
GXBeam.mass_matrix — Function
mass_matrix(nodes, elements)Compute mass matrix for the structure using GXBeam ordering.
Returns
M::Matrix: mass matrixmc::Vector{float}: x, y location of mass center
GXBeam.plotmesh — Function
plotmesh(nodes, elements, pyplot; plotnumbers=false)plot nodes and elements for a quick visualization. Need to pass in a PyPlot object as PyPlot is not loaded by this package.
GXBeam.strain_recovery — Function
strain_recovery(F, M, nodes, elements, cache; gxbeam_order=true)Compute stresses and strains at each element in cross section.
Arguments
F::Vector(3): force at this cross section in x, y, z directionsM::Vector(3): moment at this cross section in x, y, z directionsnodes::Vector{Node{TF}}: all the nodes in the meshelements::Vector{MeshElement{TF}}: all the elements in the meshcache::SectionCache: needs to reuse data from the compliance solve (thus must initialize cache and pass it to both compliance and this function)
Keyword Arguments
gxbeam_order=true::Bool: if true,FandMare assumed to be in the local beam axis used by GXBeam (where the beam extends along the x-axis). This also returns beam stresses and strains in the axis order set by GXBeam (e.g. axial stresses would correspond to thexx` direction, or first index).
Returns
strain_b::Vector(6, ne): strains in beam coordinate system for each element. order: xx, yy, zz, xy, xz, yz Note: this order (as well as those below) corresponds to the local beam reference frame ifgxbeam_orderis set totrue.stress_b::Vector(6, ne): stresses in beam coordinate system for each element. order: xx, yy, zz, xy, xz, yzstrain_p::Vector(6, ne): strains in ply coordinate system for each element. order: 11, 22, 33, 12, 13, 23stress_p::Vector(6, ne): stresses in ply coordinate system for each element. order: 11, 22, 33, 12, 13, 23
GXBeam.plotsoln — Function
plotsoln(nodes, elements, soln, pyplot)plot stress/strain on mesh soln could be any vector that is of length # of elements, e.g., sigma_b[3, :] Need to pass in a PyPlot object as PyPlot is not loaded by this package.
GXBeam.tsai_wu — Function
tsai_wu(stress_p, elements)Tsai Wu failure criteria
Arguments
stress_p::vector(6, ne): stresses in ply coordinate systemelements::Vector{MeshElement{TF}}: all the elements in the mesh
Returns
failure::vector(ne): tsai-wu failure criteria for each element. fails if >= 1
Defining Point Masses
GXBeam.PointMass — Type
PointMass{T}Type which contains the aggregated inertial properties of one or more point masses which are rigidly attached to the center of an element.
Fields:
mass: Mass matrix corresponding to the point masses.
GXBeam.PointMass — Method
PointMass(m, p, I)Define a point mass given its mass m, offset p, and inertia matrix I
GXBeam.combine_masses — Function
combine_masses(masses)Combine the point masses in the iterable collection masses
Defining Distributed Loads
GXBeam.DistributedLoads — Type
DistributedLoads{T}Type which contains pre-integrated distributed forces and moments applied to a beam element.
Fields
- f1: Integrated non-follower distributed force corresponding to the start of the beam element.
- f2: Integrated non-follower distributed force corresponding to the end of the beam element.
- m1: Integrated non-follower distributed moment corresponding to the start of the beam element.
- m2: Integrated non-follower distributed moment corresponding to the end of the beam element.
- f1_follower: Integrated follower distributed force corresponding to the start of the beam element.
- f2_follower: Integrated follower distributed force corresponding to the end of the beam element.
- m1_follower: Integrated follower distributed moment corresponding to the start of the beam element.
- m2_follower: Integrated follower distributed moment corresponding to the end of the beam element.
GXBeam.DistributedLoads — Method
DistributedLoads(assembly, ielem; kwargs...)Pre-integrate distributed loads on a beam element for use in an analysis.
Arguments
assembly: Beam element assembly (of typeAssembly)ielem: Beam element index
Keyword Arguments
s1 = 0.0: Start of the beam element (used solely for integrating the distributed loads)s2 = 1.0: End of the beam element (used solely for integrating the distributed loads)method = (f, s1, s2) -> gauss_quadrature(f, s1, s2): Method which integrates function
f from s1 to s2. Defaults to the Gauss-Legendre quadrature with 4 points on each element.
fx = (s) -> 0.0: Distributed x-direction forcefy = (s) -> 0.0: Distributed y-direction forcefz = (s) -> 0.0: Distributed z-direction forcemx = (s) -> 0.0: Distributed x-direction momentmy = (s) -> 0.0: Distributed y-direction momentmz = (s) -> 0.0: Distributed z-direction momentfx_follower = (s) -> 0.0: Distributed x-direction follower forcefy_follower = (s) -> 0.0: Distributed y-direction follower forcefz_follower = (s) -> 0.0: Distributed z-direction follower forcemx_follower = (s) -> 0.0: Distributed x-direction follower momentmy_follower = (s) -> 0.0: Distributed y-direction follower momentmz_follower = (s) -> 0.0: Distributed z-direction follower moment
GXBeam.combine_loads — Function
combine_loads(loads)Combine the distributed loads in the iterable collection loads
Defining Prescribed Conditions
GXBeam.PrescribedConditions — Type
PrescribedConditions{T}Type which defines the prescribed displacements and loads at a point.
Fields:
pd: Flag for each degree of freedom indicating whether displacements are prescribedpl: Flag for each degree of freedom indicating whether loads are prescribedu: Linear displacementtheta: Angular displacementF: External forcesM: External momentsFf: Follower forcesMf: Follower moments
GXBeam.PrescribedConditions — Method
PrescribedConditions(; kwargs...)Define the prescribed conditions at a point. Individual prescribed conditions may be assigned as either a scalar parameter or as a function of time.
Prescribed Wiener-Milenkovic parameters must satisfy the following inequality: sqrt(thetax^2 + thetay^2 + theta_z^2) <= 4. Note that this restriction still allows all possible rotations to be represented.
Note that if displacements and loads corresponding to the same degree of freedom are prescribed at the same point, the global body-fixed acceleration corresponding to the same degree of freedom will be modified to attempt to satisfy both conditions.
Keyword Arguments
ux: Prescribed x-displacement (in the body frame)uy: Prescribed y-displacement (in the body frame)uz: Prescribed z-displacement (in the body frame)theta_x: Prescribed first Wiener-Milenkovic parametertheta_y: Prescribed second Wiener-Milenkovic parametertheta_z: Prescribed third Wiener-Milenkovic parameterFx: Prescribed x-direction forceFy: Prescribed y-direction forceFz: Prescribed z-direction forceMx: Prescribed x-direction momentMy: Prescribed y-direction momentMz: Prescribed z-direction momentFx_follower: Prescribed x-direction follower forceFy_follower: Prescribed y-direction follower forceFz_follower: Prescribed z-direction follower forceMx_follower: Prescribed x-direction follower momentMy_follower: Prescribed y-direction follower momentMz_follower: Prescribed z-direction follower moment
Pre-Initializing Memory for an Analysis
GXBeam.AbstractSystem — Type
AbstractSystemSupertype for types which contain the system state, residual vector, and jacobian matrix.
GXBeam.StaticSystem — Type
StaticSystem{TF, TV<:AbstractVector{TF}, TM<:AbstractMatrix{TF}} <: AbstractSystemContains the system state, residual vector, and jacobian matrix for a static system.
GXBeam.StaticSystem — Method
StaticSystem([TF=eltype(assembly),] assembly; kwargs...)Initialize an object of type StaticSystem.
Arguments:
TF:(optional) Floating point type, defaults to the floating point type ofassemblyassembly: Assembly of rigidly connected nonlinear beam elements
Keyword Arguments
force_scaling: Factor used to scale system forces/moments internally. If not specified, a suitable default will be chosen based on the entries of the beam element compliance matrices.
GXBeam.DynamicSystem — Type
DynamicSystem{TF, TV<:AbstractVector{TF}, TM<:AbstractMatrix{TF}} <: AbstractSystemContains the system state, residual vector, and jacobian matrix for a dynamic system.
GXBeam.DynamicSystem — Method
DynamicSystem([TF=eltype(assembly),] assembly; kwargs...)Initialize an object of type DynamicSystem.
Arguments:
TF:(optional) Floating point type, defaults to the floating point type ofassemblyassembly: Assembly of rigidly connected nonlinear beam elements
Keyword Arguments
force_scaling: Factor used to scale system forces/moments internally. If not specified, a suitable default will be chosen based on the entries of the beam element compliance matrices.
GXBeam.ExpandedSystem — Type
ExpandedSystem{TF, TV<:AbstractVector{TF}, TM<:AbstractMatrix{TF}} <: AbstractSystemContains the system state, residual vector, and jacobian matrix for a constant mass matrix system.
GXBeam.ExpandedSystem — Method
ExpandedSystem([TF=eltype(assembly),] assembly; kwargs...)Initialize an object of type ExpandedSystem.
Arguments:
TF:(optional) Floating point type, defaults to the floating point type ofassemblyassembly: Assembly of rigidly connected nonlinear beam elements
Keyword Arguments
force_scaling: Factor used to scale system forces/moments internally. If not specified, a suitable default will be chosen based on the entries of the beam element compliance matrices.
GXBeam.reset_state! — Function
reset_state!(system)Sets the state variables in system to zero.
GXBeam.set_state! — Function
set_state!([x,] system::StaticSystem, prescribed_conditions; kwargs...)Set the state variables in system (or in the vector x) to the provided values.
Keyword Arguments
u: Vector containing the linear displacement of each point.theta: Vector containing the angular displacement of each point.F: Vector containing the externally applied forces acting on each pointM: Vector containing the externally applied moments acting on each pointFi: Vector containing internal forces for each beam elementMi: Vector containing internal moments for each beam element
set_state!([x,] system::DynamicSystem, prescribed_conditions; kwargs...)Set the state variables in system (or in the vector x) to the provided values.
Keyword Arguments
u: Vector containing the linear displacement of each point.theta: Vector containing the angular displacement of each point.V: Vector containing the linear velocity of each point.OmegaVector containing the angular velocity of each pointF: Vector containing the externally applied forces acting on each pointM: Vector containing the externally applied moments acting on each pointFi: Vector containing internal forces for each beam element (in the deformed element frame)Mi: Vector containing internal moments for each beam element (in the deformed element frame)
set_state!([x,] system::ExpandedSystem, prescribed_conditions; kwargs...)Set the state variables in system (or in the vector x) to the provided values.
Keyword Arguments
u: Vector containing the linear displacement of each point.theta: Vector containing the angular displacement of each point.V: Vector containing the linear velocity of each point in the deformed point frameOmegaVector containing the angular velocity of each point in the deformed point frameF: Vector containing the externally applied forces acting on each pointM: Vector containing the externally applied moments acting on each pointF1: Vector containing resultant forces at the start of each beam element (in the deformed element frame)M1: Vector containing resultant moments at the start of each beam element (in the deformed element frame)F2: Vector containing resultant forces at the end of each beam element (in the deformed element frame)M2: Vector containing resultant moments at the end of each beam element (in the deformed element frame)V_e: Vector containing the linear velocity of each beam element in the deformed beam element reference frame.Omega_eVector containing the angular velocity of each beam element in the deformed beam element reference frame.
set_state!([x=system.x,] system, assembly, state; kwargs...)Set the state variables in x to the values in state
GXBeam.set_rate! — Function
set_rate!([x=system.dx,] system, assembly, state::AssemblyState; kwargs...)Set the state variable rates in dx to the values in state
GXBeam.set_linear_displacement! — Function
set_linear_displacement!([x,] system, prescribed_conditions, u, ipoint)Set the state variables in system (or in the vector x) corresponding to the linear deflection of point ipoint to the provided values.
GXBeam.set_angular_displacement! — Function
set_angular_displacement!([x,] system, prescribed_conditions, theta, ipoint)Set the state variables in system (or in the vector x) corresponding to the angular deflection of point ipoint to the provided values.
GXBeam.set_external_forces! — Function
set_external_forces!([x,] system, prescribed_conditions, F, ipoint)Set the state variables in system (or in the vector x) corresponding to the external forces applied at point ipoint to the provided values.
GXBeam.set_external_moments! — Function
set_external_moments!([x,] system, prescribed_conditions, M, ipoint)Set the state variables in system (or in the vector x) corresponding to the external moments applied at point ipoint to the provided values.
GXBeam.set_linear_velocity! — Function
set_linear_velocity!([x,] system, V, ipoint)Set the state variables in system (or in the vector x) corresponding to the linear velocity of point ipoint to the provided values.
GXBeam.set_angular_velocity! — Function
set_angular_velocity!([x,] system, Omega, ipoint)Set the state variables in system (or in the vector x) corresponding to the angular velocity of point ipoint to the provided values.
GXBeam.set_internal_forces! — Function
set_internal_forces!([x,] system::Union{StaticSystem,DynamicSystem}, Fi, ielem)Set the state variables in system (or in the vector x) corresponding to the internal forces of element ielem to the provided values.
GXBeam.set_internal_moments! — Function
set_internal_moments!([x,] system::Union{StaticSystem, DynamicSystem}, Mi, ielem)Set the state variables in system (or in the vector x) corresponding to the internal moments of element ielem to the provided values.
GXBeam.set_start_forces! — Function
set_start_forces!([x,] system, F1, ielem)Set the state variables in system (or in the vector x) corresponding to the resultant forces at the start of element ielem to the provided values.
GXBeam.set_start_moments! — Function
set_start_moments!([x,] system, M1, ielem)Set the state variables in system (or in the vector x) corresponding to the resultant moments at the start of element ielem to the provided values.
GXBeam.set_end_forces! — Function
set_end_forces!([x,] system, F2, ielem)Set the state variables in system (or in the vector x) corresponding to the resultant forces at the end of element ielem to the provided values.
GXBeam.set_end_moments! — Function
set_end_moments!([x,] system, M2, ielem)Set the state variables in system (or in the vector x) corresponding to the resultant moments at the end of element ielem to the provided values.
GXBeam.set_point_linear_velocity! — Function
set_point_linear_velocity!([x,] system::ExpandedSystem, V, ipoint)Set the state variables in system (or in the vector x) corresponding to the linear velocity of point ipoint to the provided values.
GXBeam.set_point_angular_velocity! — Function
set_point_angular_velocity!([x,] system::ExpandedSystem, Omega, ipoint)Set the state variables in system (or in the vector x) corresponding to the angular velocity of point ipoint to the provided values.
GXBeam.set_element_linear_velocity! — Function
set_element_linear_velocity!([x,] system::ExpandedSystem, V, ielem)Set the state variables in system (or in the vector x) corresponding to the linear velocity of beam element ielem to the provided values.
GXBeam.set_element_angular_velocity! — Function
set_element_angular_velocity!([x,] system::ExpandedSystem, Omega, ielem)Set the state variables in system (or in the vector x) corresponding to the angular velocity of element ielem to the provided values.
Performing an Analysis
GXBeam.static_analysis — Function
static_analysis(assembly; kwargs...)Perform a static analysis for the system of nonlinear beams contained in assembly. Return the resulting system, the post-processed solution, and a convergence flag indicating whether the iteration procedure converged.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.gravity = [0,0,0]: Gravity vector. If time varying, this input may be provided as a function of time.time = 0.0: Current time or vector of times corresponding to each step. May be used in conjunction with time varying prescribed conditions, distributed loads, and body frame motion to gradually increase displacements and loads.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyStatewhich contains the initial state variables. If not provided (or set tonothing), then the state variables stored insystem(which default to zeros) will be used as the initial state variables.linear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planeshow_trace = false: Flag indicating whether to display the solution progress.
Linear Analysis Keyword Arguments
update_linearization = false: Flag indicating whether to update the linearization state variables for a linear analysis with the instantaneous state variables. Iffalse, then the initial set of state variables will be used for the linearization.
Nonlinear Analysis Keyword Arguments (see NLsolve.jl)
method = :newton: Solution method for nonlinear systems of equationslinesearch = LineSearches.BackTracking(maxstep=1e6): Line search for solving nonlinear systems of equationsftol = 1e-9: Tolerance for solving the nonlinear system of equationsiterations = 1000: Iteration limit when solving nonlinear systems of equations
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses, andgravity. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
GXBeam.static_analysis! — Function
static_analysis!(system, assembly; kwargs...)Pre-allocated version of static_analysis.
GXBeam.steady_state_analysis — Function
steady_state_analysis(assembly; kwargs...)Perform a steady-state analysis for the system of nonlinear beams contained in assembly. Return the resulting system and a flag indicating whether the iteration procedure converged.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.linear_velocity = zeros(3): Prescribed linear velocity of the body frame. If time varying, this input may be provided as a function of time.angular_velocity = zeros(3): Prescribed angular velocity of the body frame. If time varying, this input may be provided as a function of time.linear_acceleration = zeros(3): Prescribed linear acceleration of the body frame. If time varying, this input may be provided as a function of time.angular_acceleration = zeros(3): Prescribed angular acceleration of the body frame. If time varying, this input may be provided as a function of time.gravity = [0,0,0]: Gravity vector in the body frame. If time varying, this input may be provided as a function of time.time = 0.0: Current time or vector of times corresponding to each step. May be used in conjunction with time varying prescribed conditions, distributed loads, and body frame motion to gradually increase displacements and loads.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyStatewhich contains the initial state variables. If not provided (or set tonothing), then the state variables stored insystem(which default to zeros) will be used as the initial state variables.structural_damping = false: Indicates whether to enable structural dampinglinear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planeshow_trace = false: Flag indicating whether to display the solution progress.
Linear Analysis Keyword Arguments
update_linearization = false: Flag indicating whether to update the linearization state variables for a linear analysis with the instantaneous state variables. Iffalse, then the initial set of state variables will be used for the linearization.
Nonlinear Analysis Keyword Arguments
method = :newton: Method (as defined in NLsolve) to solve nonlinear system of equationslinesearch = LineSearches.BackTracking(maxstep=1e6): Line search used to solve the nonlinear system of equationsftol = 1e-9: tolerance for solving the nonlinear system of equationsiterations = 1000: maximum iterations for solving the nonlinear system of equations=
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses,linear_velocity,angular_velocity,linear_acceleration,angular_acceleration, andgravity. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
GXBeam.steady_state_analysis! — Function
steady_state_analysis!(system, assembly; kwargs...)Pre-allocated version of steady_state_analysis.
GXBeam.eigenvalue_analysis — Function
eigenvalue_analysis(assembly; kwargs...)Compute the eigenvalues and eigenvectors of the system of nonlinear beams contained in assembly. Return the modified system, eigenvalues, eigenvectors, and a convergence flag indicating whether the corresponding steady-state analysis converged.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.linear_velocity = zeros(3): Prescribed linear velocity of the body frame. If time varying, this input may be provided as a function of time.angular_velocity = zeros(3): Prescribed angular velocity of the body frame. If time varying, this input may be provided as a function of time.linear_acceleration = zeros(3): Prescribed linear acceleration of the body frame. If time varying, this input may be provided as a function of time.angular_acceleration = zeros(3): Prescribed angular acceleration of the body frame. If time varying, this input may be provided as a function of time.gravity = [0,0,0]: Gravity vector in the inertial frame. If time varying, this input may be provided as a function of time.time = 0.0: Current time or vector of times corresponding to each step. May be used in conjunction with time varying prescribed conditions, distributed loads, and body frame motion to gradually increase displacements and loads.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyStatewhich contains the initial state variables. If not provided (or set tonothing), then the state variables stored insystem(which default to zeros) will be used as the initial state variables.structural_damping = false: Indicates whether to enable structural dampinglinear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planeshow_trace = false: Flag indicating whether to display the solution progress.
Linear Analysis Keyword Arguments
update_linearization = false: Flag indicating whether to update the linearization state variables for a linear analysis with the instantaneous state variables. Iffalse, then the initial set of state variables will be used for the linearization.
Nonlinear Analysis Keyword Arguments
method = :newton: Method (as defined in NLsolve) to solve nonlinear system of equationslinesearch = LineSearches.LineSearches.BackTracking(maxstep=1e6): Line search used to solve the nonlinear system of equationsftol = 1e-9: tolerance for solving the nonlinear system of equationsiterations = 1000: maximum iterations for solving the nonlinear system of equations
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses,linear_velocity,angular_velocity,linear_acceleration,angular_acceleration, andgravity. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
Eigenvalue Analysis Keyword Arguments
nev = 6: Number of eigenvalues to computesteady = reset_state && !linear: Flag indicating whether the steady state solution should be found prior to performing the eigenvalue analysis.left = false: Flag indicating whether to return left and right eigenvectors rather than just right eigenvectors.Uprev = nothing: Previous left eigenvector matrix. May be provided in order to reorder eigenvalues based on results from a previous iteration.
GXBeam.eigenvalue_analysis! — Function
eigenvalue_analysis!(system, assembly; kwargs...)Pre-allocated version of eigenvalue_analysis.
GXBeam.initial_condition_analysis — Function
initial_condition_analysis(assembly, t0; kwargs...)Perform an analysis to obtain a consistent set of initial conditions. Return the resulting system and a flag indicating whether the iteration procedure converged.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.linear_velocity = zeros(3): Initial linear velocity of the body frame.angular_velocity = zeros(3): Initial angular velocity of the body frame.linear_acceleration = zeros(3): Initial linear acceleration of the body frame.angular_acceleration = zeros(3): Initial angular acceleration of the body frame.gravity = [0,0,0]: Gravity vector in the inertial frame.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyStatewhich contains the initial state variables. If not provided (or set tonothing), then the state variables stored insystem(which default to zeros) will be used as the initial state variables.structural_damping = true: Indicates whether to enable structural dampinglinear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planesteady_state=false: Flag indicating whether to initialize by performing a steady state analysis.show_trace = false: Flag indicating whether to display the solution progress.
Initial Condition Analysis Keyword Arguments
u0 = fill(zeros(3), length(assembly.points)): Initial linear displacement of each point relative to the body frametheta0 = fill(zeros(3), length(assembly.points)): Initial angular displacement of each point relative to the body frame (using Wiener-Milenkovic Parameters)V0 = fill(zeros(3), length(assembly.points)): Initial linear velocity of each point relative to the body frameOmega0 = fill(zeros(3), length(assembly.points)): Initial angular velocity of each point relative to the body frameVdot0 = fill(zeros(3), length(assembly.points)): Initial linear acceleration of each point relative to the body frameOmegadot0 = fill(zeros(3), length(assembly.points)): Initial angular acceleration of each point relative to the body frame
Linear Analysis Keyword Arguments
update_linearization = false: Flag indicating whether to update the linearization state variables for a linear analysis with the instantaneous state variables. Iffalse, then the initial set of state variables will be used for the linearization.
Nonlinear Analysis Keyword Arguments
method = :newton: Method (as defined in NLsolve) to solve nonlinear system of equationslinesearch = LineSearches.BackTracking(maxstep=1e6): Line search used to solve the nonlinear system of equationsftol = 1e-9: tolerance for solving the nonlinear system of equationsiterations = 1000: maximum iterations for solving the nonlinear system of equations
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses,linear_velocity,angular_velocity,linear_acceleration,angular_acceleration,gravity,u0,theta0,V0,Omega0,Vdot0, andOmegadot0. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
GXBeam.initial_condition_analysis! — Function
initial_condition_analysis!(system, assembly, t0; kwargs...)Pre-allocated version of initial_condition_analysis.
GXBeam.time_domain_analysis — Function
time_domain_analysis(assembly, tvec; kwargs...)Perform a time-domain analysis for the system of nonlinear beams contained in assembly using the time vector tvec. Return the final system, a post-processed solution history, and a convergence flag indicating whether the iteration procedure converged for every time step.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.linear_velocity = zeros(3): Prescribed linear velocity of the body frame.angular_velocity = zeros(3): Prescribed angular velocity of the body frame.linear_acceleration = zeros(3): Initial linear acceleration of the body frame.angular_acceleration = zeros(3): Initial angular acceleration of the body frame.gravity = [0,0,0]: Gravity vector in the body frame. If time varying, this input may be provided as a function of time.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyState, which defines the initial states and state rates corresponding to the analysis. By default, this input is calculated using eithersteady_state_analysisorinitial_condition_analysis.steady_state = false: Flag indicating whether to compute the state variables corresponding to the keyword argumentinitial_stateusingsteady_state_analysis(rather thaninitial_condition_analysis).structural_damping = true: Flag indicating whether to enable structural dampinglinear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planeshow_trace = false: Flag indicating whether to display the solution progress.save = eachindex(tvec): Steps at which to save the time history
Initial Condition Analysis Arguments
u0 = fill(zeros(3), length(assembly.points)): Initial linear displacement of each point in the body frametheta0 = fill(zeros(3), length(assembly.points)): Initial angular displacement of each point in the body frame (using Wiener-Milenkovic Parameters)V0 = fill(zeros(3), length(assembly.points)): Initial linear velocity of each point in the body frame excluding contributions from body frame motionOmega0 = fill(zeros(3), length(assembly.points)): Initial angular velocity of each point in the body frame excluding contributions from body frame motionVdot0 = fill(zeros(3), length(assembly.points)): Initial linear acceleration of each point in the body frame excluding contributions from body frame motionOmegadot0 = fill(zeros(3), length(assembly.points)): Initial angular acceleration of each point in the body frame excluding contributions from body frame motion
Linear Analysis Keyword Arguments
update_linearization = false: Flag indicating whether to update the linearization state variables for a linear analysis with the instantaneous state variables. Iffalse, then the initial set of state variables will be used for the linearization.
Nonlinear Analysis Keyword Arguments
method = :newton: Method (as defined in NLsolve) to solve nonlinear system of equationslinesearch = LineSearches.BackTracking(maxstep=1e6): Line search used to solve nonlinear systems of equationsftol = 1e-9: tolerance for solving the nonlinear system of equationsiterations = 1000: maximum iterations for solving the nonlinear system of equations
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses,linear_velocity,angular_velocity,linear_acceleration,angular_acceleration,gravity,u0,theta0,V0,Omega0,Vdot0, andOmegadot0. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
GXBeam.time_domain_analysis! — Function
time_domain_analysis!(system, assembly, tvec; kwargs...)Pre-allocated version of time_domain_analysis.
Post-Processing
GXBeam.AssemblyState — Type
AssemblyState{TF, TP<:AbstractVector{PointState{TF}}, TE<:AbstractVector{ElementState{TF}}}Struct for storing state variables for the points and elements in an assembly.
Fields:
points::TP: Array ofPointStatefor each point in the assemblyelements::TE: Array ofElementStatefor each element in the assembly
GXBeam.PointState — Type
PointStateHolds the state variables for a point
Fields:
u: Linear displacementudot: Linear displacement ratetheta: Angular displacement (Wiener-Milenkovic parameters)thetadot: Angular displacement rateV: Linear velocityVdot: Linear velocity rateOmega: Angular velocityOmegadot: Angular velocity rateF: External forcesM: External moments
GXBeam.ElementState — Type
ElementStateHolds the state variables for an element
Fields:
u: Linear displacementudot: Linear displacement ratetheta: Angular displacement (Wiener-Milenkovic parameters)thetadot: Angular displacement rateV: Linear velocityVdot: Linear velocity rateOmega: Angular velocityOmegadot: Angular velocity rateFi: Internal forcesMi: Internal moments
GXBeam.AssemblyState — Method
AssemblyState(system, assembly; prescribed_conditions = Dict())
AssemblyState(x, system, assembly; prescribed_conditions = Dict())
AssemblyState(dx, x, system, assembly; prescribed_conditions = Dict())Post-process the system state given the state vector x and rate vector dx. Return an object of type AssemblyState that defines the state of the assembly for the time step.
If prescribed_conditions is not provided, all point state variables are assumed to be displacements/rotations, rather than their actual identities as used in the analysis.
GXBeam.extract_element_state — Function
extract_element_state(system, assembly, ielem; prescribed_conditions = Dict())
extract_element_state(x, system, assembly, ielem; prescribed_conditions = Dict())
extract_element_state(dx, x, system, assembly, ielem; prescribed_conditions = Dict())Return the state variables corresponding to element ielem (see ElementState) given the state vector x and rate vector dx.
GXBeam.extract_element_states — Function
extract_element_states(system, assembly, x = system.x, dx = system.dx;
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}())Return the state variables corresponding to each element (see ElementState) given the solution vector x.
GXBeam.extract_point_state — Function
extract_point_state(system, assembly, ipoint; prescribed_conditions = Dict())
extract_point_state(x, system, assembly, ipoint; prescribed_conditions = Dict())
extract_point_state(dx, x, system, assembly, ipoint; prescribed_conditions = Dict())Return the state variables corresponding to point ipoint (see PointState) given the state vector x and rate vector dx.
If prescribed_conditions is not provided, all point state variables are assumed to be displacements/rotations, rather than their actual identities as used in the analysis.
GXBeam.extract_point_states — Function
extract_point_states(system, assembly; prescribed_conditions = Dict())
extract_point_states(x, system, assembly; prescribed_conditions = Dict())
extract_point_states(dx, x, system, assembly; prescribed_conditions = Dict())Return the state variables corresponding to each point (see PointState) given the state vector x and rate vector dx.
If prescribed_conditions is not provided, all point state variables are assumed to be displacements/rotations, rather than their actual identities as used in the analysis.
GXBeam.linearize! — Function
linearize!(system, assembly; kwargs...)Return the state variables, jacobian matrix, and mass matrix of a linearized system using the current system state vector.
General Keyword Arguments
prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}(): A dictionary with keys corresponding to the points at which prescribed conditions are applied and values of typePrescribedConditionswhich describe the prescribed conditions at those points. If time varying, this input may be provided as a function of time.distributed_loads = Dict{Int,DistributedLoads{Float64}}(): A dictionary with keys corresponding to the elements to which distributed loads are applied and values of typeDistributedLoadswhich describe the distributed loads on those elements. If time varying, this input may be provided as a function of time.point_masses = Dict{Int,PointMass{Float64}}(): A dictionary with keys corresponding to the points to which point masses are attached and values of typePointMasswhich contain the properties of the attached point masses. If time varying, this input may be provided as a function of time.linear_velocity = zeros(3): Prescribed linear velocity of the body frame. If time varying, this input may be provided as a function of time.angular_velocity = zeros(3): Prescribed angular velocity of the body frame. If time varying, this input may be provided as a function of time.linear_acceleration = zeros(3): Prescribed linear acceleration of the body frame. If time varying, this input may be provided as a function of time.angular_acceleration = zeros(3): Prescribed angular acceleration of the body frame. If time varying, this input may be provided as a function of time.gravity = [0,0,0]: Gravity vector in the inertial frame. If time varying, this input may be provided as a function of time.time = 0.0: Current time or vector of times corresponding to each step. May be used in conjunction with time varying prescribed conditions, distributed loads, and body frame motion to gradually increase displacements and loads.
Control Flag Keyword Arguments
reset_state = true: Flag indicating whether the system state variables should be set to zero prior to performing this analysis.initial_state = nothing: Object of typeAssemblyStatewhich contains the initial state variables. If not provided (or set tonothing), then the state variables stored insystem(which default to zeros) will be used as the initial state variables.structural_damping = false: Indicates whether to enable structural dampinglinear = false: Flag indicating whether a linear analysis should be performed.two_dimensional = false: Flag indicating whether to constrain results to the x-y planeshow_trace = false: Flag indicating whether to display the solution progress.
Sensitivity Analysis Keyword Arguments
xpfunc = (x, p, t) -> (;): Similar topfunc, except that parameters can also be defined as a function of GXBeam's state variables. Using this function forces the system jacobian to be computed using automatic differentiation and switches the nonlinear solver to a Newton-Krylov solver (with linesearch).pfunc = (p, t) -> (;): Function which returns a named tuple with fields corresponding to updated versions of the argumentsassembly,prescribed_conditions,distributed_loads,point_masses,linear_velocity,angular_velocity,linear_acceleration,angular_acceleration, andgravity. Only fields contained in the resulting named tuple will be overwritten.p: Sensitivity parameters, as defined in conjunction with the keyword argumentpfunc. While not necessary, usingpfuncandpto define the arguments to this function allows automatic differentiation sensitivities to be computed more efficiently
GXBeam.solve_eigensystem — Function
solve_eigensystem(x, K, M, nev)Return the eigenvalues and eigenvectors of a linearized system.
GXBeam.left_eigenvectors — Function
left_eigenvectors(system, λ, V)
left_eigenvectors(K, M, λ, V)Compute the left eigenvector matrix U for the system using inverse power iteration given the eigenvalues λ and the corresponding right eigenvector matrix V.
The complex conjugate of each left eigenvector is stored in each row of the matrix U
Left and right eigenvectors satisfy the following M-orthogonality condition:
- u'Mv = 1 if u and v correspond to the same eigenvalue
- u'Mv = 0 if u and v correspond to different eigenvalues
This means that UMV = I
This function assumes that system has not been modified since the eigenvalues and right eigenvectors were computed.
GXBeam.correlate_eigenmodes — Function
correlate_eigenmodes(C)Return the permutation and the associated corruption index vector which associates eigenmodes from the current iteration with those of the previous iteration given the correlation matrix C.
The correlation matrix can take one of the following forms (in order of preference):
C = U_p*M*VC = U*M_p*V_pC = V_p'*VC = V'*V_p
where U is a matrix of conjugated left eigenvectors, M is the system mass matrix, V is a matrix of right eigenvectors, and ()_p indicates a variable from the previous iteration.
Note that the following two forms of the correlation matrix seem to be significantly inferior to their counterparts listed above: C = U*M*V_p and C = U_p*M_p*V. This is likely due to the way in which the left eigenvector matrix is calculated.
The corruption index is the largest magnitude in a given row of C that was not chosen divided by the magnitude of the chosen eigenmode. It is most meaningful when using one of the forms of the correlation matrix that uses left eigenvectors since correct eigenmodes will have magnitudes close to 1 and incorrect eigenmodes will have magnitudes close to 0.
If the new mode number is already assigned, the next highest unassigned mode number is used. In this case a corruption index higher than 1 will be returned, otherwise the values of the corruption index will always be bounded by 0 and 1.
See "New Mode Tracking Methods in Aeroelastic Analysis" by Eldred, Vankayya, and Anderson.
GXBeam.wiener_milenkovic — Function
wiener_milenkovic(c)Construct a Wiener-Milenkovic transformation matrix, given the three Wiener-Milenkovic parameters in c.
Note that the corresponding rotation matrix is the transpose of this transformation matrix.
GXBeam.rotate — Function
rotate(xyz, r, theta)Rotate the vectors in xyz about point r using the Wiener-Milenkovic parameters in theta.
GXBeam.rotate! — Function
rotate!(xyz, r, theta)Pre-allocated version of rotate
GXBeam.translate — Function
translate(xyz, u)Translate the points in xyz by the displacements in u.
GXBeam.translate! — Function
translate!(xyz, u)Pre-allocated version of translate
GXBeam.deform_cross_section — Function
deform_cross_section(xyz, r, u, theta)Rotate the points in xyz (of shape (3, :)) about point r using the Wiener-Milenkovic parameters in theta, then translate the points by the displacements in u.
GXBeam.deform_cross_section! — Function
deform_cross_section!(xyz, r, u, theta)Pre-allocated version of deform_cross_section
GXBeam.write_vtk — Function
write_vtk(name, assembly::Assembly; kwargs...)
write_vtk(name, assembly::Assembly, state::AssemblyState; kwargs...)
write_vtk(name, assembly::Assembly, history::Vector{<:AssemblyState}], dt;
kwargs...)Write the deformed geometry (and associated data) to a VTK file for visualization using ParaView.
The state argument may be omitted to write the original geometry to a VTK file without any associated data.
If the solution time history is provided, the time step must also be provided
Keyword Arguments
sections = nothing: Cross section geometry corresponding to each point, defined in a frame aligned with the body frame but centered around the corresponding point. Defined as an array with shape(3, ncross, np)wherencrossis the number of points in each cross section andnpis the number of points.scaling=1.0: Parameter to scale the deflections (only valid if state is provided)metadata=Dict(): Dictionary of metadata for the file(s)
write_vtk(name, assembly::Assembly, [state::AssemblyState, ]λ::Number,
eigenstate::AssemblyState; scaling=1.0, mode_scaling=1.0, cycles=1,
steps=100)Write a series of files corresponding to the elastic motion of the assembly about the deformed state encoded in state defined by the eigenvalue λ and the eigenvector encoded in eigenstate over the time period specified by time.
The steady-state deflections can be scaled with scaling and the eigenmode deflections can be scaled using mode_scaling.
The current time is encoded in the metadata tag "time"