Linear Mechanics
LowLevelFEM.CDMaccuracyAnalysis
— MethodCDMaccuracyAnalysis(ωₘᵢₙ, ωₘₐₓ, Δt, type; n=100, α=..., ξ=..., β=..., show_β=..., show_ξ=...)
Gives some functions (graphs) for accuracy analysis of the CDM method. ωₘᵢₙ
and ωₘₐₓ
are the square root of smallest and largest eigenvalues of the Kϕ=ω²Mϕ eigenvalue problem, Δt
is the time step size. type
is one of the following values:
:SR
: spectral radius:PDR
: physical damping ratio:ADR
: algorithmic damping ratio:PE
: period error
For details see [3]. n
is the number of points in the graph. The damping matrix is assembled in the following ways: C=αM+βK or C=αM+β₁K+β₂KM⁻¹K+β₃KM⁻¹KM⁻¹K+⋅⋅⋅. The latter corresponds to the damping characteristic characterized by a power series consisting of powers of the natural frequencies with odd exponents. ξᵢ (ξ
in the argument list) are the values of the individual members of the series corresponding to the ωₘₐₓ value. βᵢ (β
in the argument list) are the coefficients of the series. (see [4]) Either ξ
or β
must be specified. ξ
or β
are scalars or vectors. If show_β
or show_ξ
is true
, the corresponding β
or ξ
values will be sent to the output. Returns a tuple of x and y values of the graph. (Can be plotted with plot(xy)
)
Return: xy
Types:
ωₘᵢₙ
: Float64ωₘₐₓ
: Float64Δt
: Float64n
: Int64α
: Float64β
: Float64 of Vector{Float64}ξ
: Float64 of Vector{Float64}show_β
: Booleanshow_ξ
: Booleanxy
: Tuple{Vector{Float64},Vector{Float64}}
LowLevelFEM.HHT
— MethodHHT(K, M, f, u0, v0, T, Δt; α=..., δ=..., γ=..., β=...)
Solves a transient dynamic problem using HHT-α method[1] (implicit). K
is the stiffness Matrix, M
is the mass matrix, f
is the load vector, u0
is the initial displacement, v0
is the initial velocity, T
is the upper bound of the time intervall (lower bound is zero) and Δt
is the time step size. Returns the displacement vectors and velocity vectors in each time step arranged in the columns of the two matrices u
and v
and a vector t
of the time instants used. For the meaning of α
, β
and γ
see [1]. If δ
is given, γ=0.5+δ and β=0.25⋅(0.5+γ)².
Return: u
, v
Types:
K
: SystemMatrixM
: SystemMatrixf
: VectorFieldu0
: VectorFieldv0
: VectorFieldT
: Float64Δt
: Float64α
: Float64β
: Float64γ
: Float64δ
: Float64u
: VectorFieldv
: VectorField
LowLevelFEM.HHTaccuracyAnalysis
— MethodHHTaccuracyAnalysis(ωₘᵢₙ, ωₘₐₓ, Δt, type; n=100, α=0.0, δ=0.0, γ=0.5 + δ, β=0.25 * (0.5 + γ)^2)
Gives some functions (graphs) for accuracy analysis of the HHT-α method[1]. ωₘᵢₙ
and ωₘₐₓ
are the square root of smallest and largest eigenvalues of the Kϕ=ω²Mϕ eigenvalue problem, Δt
is the time step size. type
is one of the following values:
:SR
: spectral radius:ADR
: algorithmic damping ratio:PE
: period error
For details see [2] and [3]. n
is the number of points in the graph. For the meaning of α
, β
and γ
see [1]. If δ
is given, γ=0.5+δ and β=0.25⋅(0.5+γ)². Returns a tuple of x and y values of the graph. (Can be plotted with plot(xy)
)
Return: xy
Types:
ωₘᵢₙ
: Float64ωₘₐₓ
: Float64Δt
: Float64n
: Int64α
: Float64β
: Float64γ
: Float64δ
: Float64xy
: Tuple{Vector{Float64},Vector{Float64}}
LowLevelFEM.applyBoundaryConditions!
— MethodapplyBoundaryConditions!(stiffMat, loadVec, supports)
Applies displacement boundary conditions supports
on a stiffness matrix stiffMat
and load vector loadVec
. Mesh details are in problem
. supports
is a tuple of name
of physical group and prescribed displacements ux
, uy
and uz
.
Returns: nothing
Types:
stiffMat
: SystemMatrixloadVec
: VectorFieldsupports
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.applyBoundaryConditions!
— MethodapplyBoundaryConditions!(heatCondMat, heatCapMat, heatFluxVec, supports)
Applies boundary conditions supports
on a heat conduction matrix heatCondMat
, heat capacity matrix heatCapMat
and heat flux vector heatFluxVec
. Mesh details are in problem
. supports
is a tuple of name
of physical group and prescribed temperature T
.
Returns: nothing
Types:
stiffMat
: SystemMatrixloadVec
: VectorFieldsupports
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.applyBoundaryConditions!
— MethodapplyBoundaryConditions!(stiffMat, massMat, dampMat, loadVec, supports)
Applies displacement boundary conditions supports
on a stiffness matrix stiffMat
, mass matrix massMat
, damping matrix dampMat
and load vector loadVec
. Mesh details are in problem
. supports
is a tuple of name
of physical group and prescribed displacements ux
, uy
and uz
.
Returns: nothing
Types:
stiffMat
: SystemMatrixmassMat
: SystemMatrixdampMat
: SystemMatrixloadVec
: VectorFieldsupports
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.applyBoundaryConditions!
— MethodapplyBoundaryConditions!(dispVec, supports)
Applies displacement boundary conditions supports
on a displacement vector dispVec
. Mesh details are in problem
. supports
is a tuple of name
of physical group and prescribed displacements ux
, uy
and uz
.
Returns: nothing
Types:
problem
: ProblemdispVec
: VectorFieldsupports
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.applyBoundaryConditions
— MethodapplyBoundaryConditions(stiffMat, loadVec, supports)
Applies displacement boundary conditions supports
on a stiffness matrix stiffMat
and load vector loadVec
. Mesh details are in problem
. supports
is a tuple of name
of physical group and prescribed displacements ux
, uy
and uz
. Creates a new stiffness matrix and load vector.
Returns: stiffMat
, loadVec
Types:
stiffMat
: SystemMatrixloadVec
: VectorFieldsupports
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.applyElasticSupport!
— MethodapplyElasticSupport!(stiffMat, elastSupp)
Applies elastic support boundary conditions elastSupp
on a stiffness matrix stiffMat
. Mesh details are in problem
. elastSupp
is a tuple of name
of physical group and prescribed kx
, ky
and kz
stiffnesses.
Returns: nothing
Types:
stiffMat
: SystemMatrixelastSupp
: Vector{Tuple{String, Float64, Float64, Float64}}
LowLevelFEM.dampingMatrix
— MethoddampingMatrix(K, M, ωₘₐₓ; α=0.0, ξ=..., β=...)
Generates the damping matrix for proportional damping. C = αM + βK, or C = αM + β₁K + β₂KM⁻¹K + β₃KM⁻¹KM⁻¹K + ⋯. The latter corresponds to a damping characteristic given by a power series in the natural frequencies with odd exponents. ξᵢ (ξ
in the arguments) are the values of the individual terms of the series at ωₘₐₓ. βᵢ (β
in the arguments) are the coefficients of the series. Either ξ
or β
must be specified; each may be a scalar or a vector. K
is the stiffness matrix, M
is the mass matrix, and ωₘₐₓ
is the largest natural frequency.
Returns: dampingMatrix
Types:
K
: SystemMatrixM
: SystemMatrixωₘₐₓ
: Float64α
: Float64ξ
: Float64 or Vector{Float64}β
: Float64 or Vector{Float64}dampingMatrix
: SystemMatrix
Examples
K = stiffnessMatrix(problem)
M = massMatrix(problem; lumped=true)
ωmax = 2π * 1000
C = dampingMatrix(K, M, ωmax; α=0.0, ξ=[0.02, 0.02])
LowLevelFEM.elasticSupportMatrix
— MethodelasticSupportMatrix(problem, elSupp)
Solves the elastic support matrix of the problem
. elSupp
is a vector of elastic supports defined in function elasticSupport
. With the displacementent vector q
in hand the reaction force vector fR
arising from the elastic support can be solved. (fR = heatConvMat * q
)
Return: elSuppMat
Types:
problem
: ProblemelSupp
: Vector{Tuple{String, Float64, Float64, Float64}}elSuppMat
: SystemMatrix
LowLevelFEM.initialDisplacement!
— MethodinitialDisplacement!(name, u0; ux=..., uy=..., uz=...)
Changes the displacement values to ux
, uy
and uz
(depending on the dimension of the problem
) at nodes belonging to physical group name
. Original values are in displacement vector u0
.
Return: u0
Types:
name
: Stringux
: Float64uy
: Float64uz
: Float64u0
: VectorField
LowLevelFEM.initialDisplacement
— MethodinitialDisplacement(problem, name; ux=..., uy=..., uz=...)
Sets the displacement values ux
, uy
and uz
(depending on the dimension of the problem
) at nodes belonging to physical group name
. Returns the initial displacement vector u0
.
Return: u0
Types:
problem
: Problemname
: Stringu0
: VectorFieldux
: Float64uy
: Float64uz
: Float64
LowLevelFEM.initialVelocity!
— MethodinitialVelocity!(name, v0; vx=..., vy=..., vz=...)
Changes the velocity values vx
, vy
and vz
(depending on the dimension of the problem
) at nodes belonging to physical group name
. Original values are in velocity vector v0
.
Returns: nothing
Types:
name
: Stringv0
: VectorFieldvx
: Float64vy
: Float64vz
: Float64
LowLevelFEM.initialVelocity
— MethodinitialVelocity(problem, name; vx=..., vy=..., vz=...)
Sets the velocity values vx
, vy
and vz
(depending on the dimension of the problem
) at nodes belonging to physical group name
. Returns the initial velocity vector v0
.
Return: v0
Types:
problem
: Problemname
: Stringvx
: Float64vy
: Float64vz
: Float64v0
: VectorField
LowLevelFEM.largestEigenValue
— MethodlargestEigenValue(K, M)
Solves the smallest eigenvalue for a transient problem given by stiffness (heat conduction) matrix K
and the mass (heat capacity) matrix M
(C
).
Return: λₘᵢₙ
Types:
K
: SystemMatrixM
: SystemMatrixλₘᵢₙ
: Float64
LowLevelFEM.largestPeriodTime
— MethodlargestPeriodTime(K, M)
Solves the largest period of time for a dynamic problem given by stiffness matrix K
and the mass matrix M
.
Return: Δt
Types:
K
: SystemMatrixM
: SystemMatrixΔt
: Float64
LowLevelFEM.loadVector
— MethodloadVector(problem, loads)
Solves a load vector of problem
. loads
is a tuple of name of physical group name
, coordinates fx
, fy
and fz
of the intensity of distributed force. It can solve traction or body force depending on the problem.
- In case of 2D problems and Point physical group means concentrated force.
- In case of 2D problems and Line physical group means surface force.
- In case of 2D problems and Surface physical group means body force.
- In case of 3D problems and Point physical group means concentrated force.
- In case of 3D problems and Line physical group means edge force.
- In case of 3D problems and Surface physical group means surface force.
- In case of 3D problems and Volume physical group means body force.
Return: loadVec
Types:
problem
: Problemloads
: Vector{Tuple{String, Float64, Float64, Float64}}loadVec
: VectorField
LowLevelFEM.massMatrix
— MethodmassMatrix(problem; lumped=...)
Solves the mass matrix of the problem
. If lumped
is true, computes the lumped mass matrix.
Returns: massMat
Types:
problem
: Problemlumped
: BooleanmassMat
: SystemMatrix
Examples
M = massMatrix(problem; lumped=true)
LowLevelFEM.nodalAcceleration!
— MethodnodalAcceleration!(name, a0; ax=..., ay=..., az=...)
Changes the acceleration values ax
, ay
and az
(depending on the dimension of the problem
) at nodes belonging to physical group name
. Original values are in acceleration vector a0
.
Returns: nothing
Types:
name
: Stringa0
: VectorFieldax
: Float64ay
: Float64az
: Float64
LowLevelFEM.nodalForce!
— MethodnodalForce!(name, f0; fx=..., fy=..., fz=...)
Changes the force values fx
, fy
and fz
(depending on the dimension of the problem) at nodes belonging to physical group name
. Original values are in load vector f0
.
Returns: nothing
Types:
name
: Stringf0
: VectorFieldfx
: Float64fy
: Float64fz
: Float64
LowLevelFEM.nonLinearStiffnessMatrix
— MethodnonLinearStiffnessMatrix(problem, q)
Solves the nonlinear stiffness matrix of the problem
. q
is a displacement field.
Returns: stiffMat
Types:
problem
: Problemq
: VectorFieldstiffMat
: SystemMatrix
LowLevelFEM.smallestEigenValue
— MethodsmallestEigenValue(K, M)
Solves the largest eigenvalue for a transient problem given by stiffness (heat conduction) matrix K
and the mass (heat capacity) matrix M
(C
).
Return: λₘₐₓ
Types:
K
: SystemMatrixM
: SystemMatrixλₘₐₓ
: Float64
LowLevelFEM.smallestPeriodTime
— MethodsmallestPeriodTime(K, M)
Solves the smallest period of time for a dynamic problem given by stiffness matrix K
and the mass matrix M
.
Return: Δt
Types:
K
: SystemMatrixM
: SystemMatrixΔt
: Float64
LowLevelFEM.solveBuckling
— MethodsolveBuckling(problem, loads, constraints; n=6)
Solves the multipliers for the first n
critical forces and the corresponding buckling shapes for the instability of the problem
, when loads
and constraints
are applied. Result can be presented by showBucklingResults
function. loads
and constraints
can be defined by load
and displacementConstraint
functions, respectively.
Return: buckling
Types:
problem
: Problemloads
: Vector{tuples}constraints
: Vector{tuples}n
: Int64buckling
: Eigen
LowLevelFEM.solveBucklingModes
— MethodsolveBucklingModes(K, Knl; n=6)
Solves the critical force multipliers and buckling mode shapes of a problem given by stiffness matrix K
and the nonlinear stiffness matrix Knl
. n
is the number of buckling modes to solve. Returns the struct of critical forces and buckling modes. Results can be presented by showBucklingResults
function.
Return: modes
Types:
K
: SystemMatrixKnl
: SystemMatrixn
: Int64modes
: Eigen
LowLevelFEM.solveDisplacement
— MethodsolveDisplacement(problem, load, supp, elasticSupp)
Solves the displacement vector q
of problem
with loads load
, supports supp
and elastic supports elasticSupp
.
Return: q
Types:
problem
: Problemload
: Vector{Tuple}supp
: Vector{Tuple}q
: VectorField
LowLevelFEM.solveDisplacement
— MethodsolveDisplacement(problem, load, supp)
Solves the displacement vector q
of problem
with loads load
and supports supp
.
Return: q
Types:
problem
: Problemload
: Vector{Tuple}supp
: Vector{Tuple}q
: VectorField
LowLevelFEM.solveDisplacement
— MethodsolveDisplacement(K, q)
Solves the equation K*q=f for the displacement vector q
. K
is the stiffness Matrix, q
is the load vector.
Return: q
Types:
K
: SystemMatrixf
: VectorFieldq
: VectorField
LowLevelFEM.solveEigenModes
— MethodsolveEigenModes(K, M; n=6, fₘᵢₙ=1.01)
Solves the eigen frequencies and mode shapes of a problem given by stiffness matrix K
and the mass matrix M
. n
is the number of eigenfrequencies to solve, and solves the eigenfrequencies greater than fₘᵢₙ
. Returns the struct of eigenfrequencies and eigen modes. Results can be presented by showModalResults
function.
Return: modes
Types:
K
: SystemMatrixM
: SystemMatrixn
: Int64fₘᵢₙ
: Float64modes
: Eigen
LowLevelFEM.solveModalAnalysis
— MethodsolveModalAnalysis(problem; constraints=[]; loads=[], n=6)
Solves the first n
eigenfrequencies and the corresponding mode shapes for the problem
, when loads
and constraints
are applied. loads
and contraints
are optional. Result can be presented by showModalResults
function. loads
and constraints
can be defined by load
and displacementConstraint
functions, respectively. If loads
are given, it solves the eigenfrequencies of a prestressed structure.
Return: modes
Types:
problem
: Problemloads
: Vector{tuples}constraints
: Vector{tuples}n
: Int64modes
: Eigen
LowLevelFEM.solveStrain
— MethodsolveStrain(q; DoFResults=false)
Solves the strain field E
from displacement vector q
. Strain field is given per elements, so it usually contains jumps at the boundaries of elements. Details of mesh is available in problem
. If DoFResults
is true, E
is a matrix with nodal results. In this case showDoFResults
can be used to show the results (otherwise showStrainResults
or showElementResults
).
Return: E
Types:
q
: VectorFieldE
: TensorField
LowLevelFEM.solveStress
— MethodsolveStress(q; T=..., T₀=..., DoFResults=false)
Solves the stress field S
from displacement vector q
. Stress field is given per elements, so it usually contains jumps at the boundary of elements. Details of mesh is available in problem
. If DoFResults
is true, S
is a matrix with nodal results. In this case showDoFResults
can be used to show the results (otherwise showStressResults
or showElementResults
). If the T
temperature field (and T₀
initial temperature field if it differs from zero) is given, the function solves also the thermal stresses.
Return: S
Types:
q
: VectorFieldT
: ScalarFieldT₀
: ScalarFieldS
: TensorField
LowLevelFEM.stiffnessMatrix
— MethodstiffnessMatrix(problem)
Solves the stiffness matrix of the problem
.
Returns: stiffMat
Types:
problem
: ProblemstiffMat
: SystemMatrix
Examples
K = stiffnessMatrix(problem)
- 4Serfőző, D., Pere, B.: An effective reduction method with Caughey damping for spurious oscillations in dynamic problems, Meccanica, https://doi.org/10.1007/s11012-025-02036-9
- 1Hilber, Hans M., Thomas JR Hughes, and Robert L. Taylor. Improved numerical dissipation for time integration algorithms in structural dynamics. Earthquake Engineering & Structural Dynamics 5.3 (1977): 283-292.
- 2Belytschko, Ted, and Thomas JR, Hughes: Computational methods for transient analysis, North-Holland, (1983).
- 3Serfőző, D., Pere, B.: A method to accurately define arbitrary algorithmic damping character as viscous damping. Arch Appl Mech 93, 3581–3595 (2023). https://doi.org/10.1007/s00419-023-02454-9