Linear Mechanics

LowLevelFEM.CDMaccuracyAnalysisMethod
CDMaccuracyAnalysis(ωₘᵢₙ, ωₘₐₓ, Δ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 =ω² 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: CMK or CM+β₁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: Float64
  • n: Int64
  • α: Float64
  • β: Float64 of Vector{Float64}
  • ξ: Float64 of Vector{Float64}
  • show_β: Boolean
  • show_ξ: Boolean
  • xy: Tuple{Vector{Float64},Vector{Float64}}
source
LowLevelFEM.HHTMethod
HHT(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: SystemMatrix
  • M: SystemMatrix
  • f: VectorField
  • u0: VectorField
  • v0: VectorField
  • T: Float64
  • Δt: Float64
  • α: Float64
  • β: Float64
  • γ: Float64
  • δ: Float64
  • u: VectorField
  • v: VectorField
source
LowLevelFEM.HHTaccuracyAnalysisMethod
HHTaccuracyAnalysis(ωₘᵢₙ, ωₘₐₓ, Δ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 =ω² 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: Float64
  • n: Int64
  • α: Float64
  • β: Float64
  • γ: Float64
  • δ: Float64
  • xy: Tuple{Vector{Float64},Vector{Float64}}
source
LowLevelFEM.applyBoundaryConditions!Method
applyBoundaryConditions!(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: SystemMatrix
  • loadVec: VectorField
  • supports: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.applyBoundaryConditions!Method
applyBoundaryConditions!(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: SystemMatrix
  • loadVec: VectorField
  • supports: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.applyBoundaryConditions!Method
applyBoundaryConditions!(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: SystemMatrix
  • massMat: SystemMatrix
  • dampMat: SystemMatrix
  • loadVec: VectorField
  • supports: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.applyBoundaryConditions!Method
applyBoundaryConditions!(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: Problem
  • dispVec: VectorField
  • supports: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.applyBoundaryConditionsMethod
applyBoundaryConditions(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: SystemMatrix
  • loadVec: VectorField
  • supports: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.applyElasticSupport!Method
applyElasticSupport!(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: SystemMatrix
  • elastSupp: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.dampingMatrixMethod
dampingMatrix(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: SystemMatrix
  • M: 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])
source
LowLevelFEM.elasticSupportMatrixMethod
elasticSupportMatrix(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: Problem
  • elSupp: Vector{Tuple{String, Float64, Float64, Float64}}
  • elSuppMat: SystemMatrix
source
LowLevelFEM.initialDisplacement!Method
initialDisplacement!(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: String
  • ux: Float64
  • uy: Float64
  • uz: Float64
  • u0: VectorField
source
LowLevelFEM.initialDisplacementMethod
initialDisplacement(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: Problem
  • name: String
  • u0: VectorField
  • ux: Float64
  • uy: Float64
  • uz: Float64
source
LowLevelFEM.initialVelocity!Method
initialVelocity!(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: String
  • v0: VectorField
  • vx: Float64
  • vy: Float64
  • vz: Float64
source
LowLevelFEM.initialVelocityMethod
initialVelocity(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: Problem
  • name: String
  • vx: Float64
  • vy: Float64
  • vz: Float64
  • v0: VectorField
source
LowLevelFEM.largestEigenValueMethod
largestEigenValue(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: SystemMatrix
  • M: SystemMatrix
  • λₘᵢₙ: Float64
source
LowLevelFEM.largestPeriodTimeMethod
largestPeriodTime(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: SystemMatrix
  • M: SystemMatrix
  • Δt: Float64
source
LowLevelFEM.loadVectorMethod
loadVector(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: Problem
  • loads: Vector{Tuple{String, Float64, Float64, Float64}}
  • loadVec: VectorField
source
LowLevelFEM.massMatrixMethod
massMatrix(problem; lumped=...)

Solves the mass matrix of the problem. If lumped is true, computes the lumped mass matrix.

Returns: massMat

Types:

  • problem: Problem
  • lumped: Boolean
  • massMat: SystemMatrix

Examples

M = massMatrix(problem; lumped=true)
source
LowLevelFEM.nodalAcceleration!Method
nodalAcceleration!(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: String
  • a0: VectorField
  • ax: Float64
  • ay: Float64
  • az: Float64
source
LowLevelFEM.nodalForce!Method
nodalForce!(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: String
  • f0: VectorField
  • fx: Float64
  • fy: Float64
  • fz: Float64
source
LowLevelFEM.nonLinearStiffnessMatrixMethod
nonLinearStiffnessMatrix(problem, q)

Solves the nonlinear stiffness matrix of the problem. q is a displacement field.

Returns: stiffMat

Types:

  • problem: Problem
  • q: VectorField
  • stiffMat: SystemMatrix
source
LowLevelFEM.smallestEigenValueMethod
smallestEigenValue(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: SystemMatrix
  • M: SystemMatrix
  • λₘₐₓ: Float64
source
LowLevelFEM.smallestPeriodTimeMethod
smallestPeriodTime(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: SystemMatrix
  • M: SystemMatrix
  • Δt: Float64
source
LowLevelFEM.solveBucklingMethod
solveBuckling(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: Problem
  • loads: Vector{tuples}
  • constraints: Vector{tuples}
  • n: Int64
  • buckling: Eigen
source
LowLevelFEM.solveBucklingModesMethod
solveBucklingModes(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: SystemMatrix
  • Knl: SystemMatrix
  • n: Int64
  • modes: Eigen
source
LowLevelFEM.solveDisplacementMethod
solveDisplacement(problem, load, supp, elasticSupp)

Solves the displacement vector q of problem with loads load, supports supp and elastic supports elasticSupp.

Return: q

Types:

  • problem: Problem
  • load: Vector{Tuple}
  • supp: Vector{Tuple}
  • q: VectorField
source
LowLevelFEM.solveDisplacementMethod
solveDisplacement(problem, load, supp)

Solves the displacement vector q of problem with loads load and supports supp.

Return: q

Types:

  • problem: Problem
  • load: Vector{Tuple}
  • supp: Vector{Tuple}
  • q: VectorField
source
LowLevelFEM.solveDisplacementMethod
solveDisplacement(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: SystemMatrix
  • f: VectorField
  • q: VectorField
source
LowLevelFEM.solveEigenModesMethod
solveEigenModes(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: SystemMatrix
  • M: SystemMatrix
  • n: Int64
  • fₘᵢₙ: Float64
  • modes: Eigen
source
LowLevelFEM.solveModalAnalysisMethod
solveModalAnalysis(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: Problem
  • loads: Vector{tuples}
  • constraints: Vector{tuples}
  • n: Int64
  • modes: Eigen
source
LowLevelFEM.solveStrainMethod
solveStrain(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: VectorField
  • E: TensorField
source
LowLevelFEM.solveStressMethod
solveStress(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: VectorField
  • T: ScalarField
  • T₀: ScalarField
  • S: TensorField
source
LowLevelFEM.stiffnessMatrixMethod
stiffnessMatrix(problem)

Solves the stiffness matrix of the problem.

Returns: stiffMat

Types:

  • problem: Problem
  • stiffMat: SystemMatrix

Examples

K = stiffnessMatrix(problem)
source
  • 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