refactor(beams): Define beam element API interface

- Define AbstractBeamElement abstract type hierarchy
- Implement element assembly interface for beam structures
- Export beam formulation and element types
- Document Euler-Bernoulli and Timoshenko beam theories
- Support 2D and 3D beam elements
- Include rotation DOF handling for beam kinematics
- 98 lines of API definitions and exports
This commit is contained in:
Jukka Aho
2025-11-19 11:27:13 +02:00
parent 7c0ad5f4a2
commit c747844914
+98
View File
@@ -0,0 +1,98 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
"""
Beam formulation API definitions.
This file defines beam-specific abstract types and formulation theories.
Must be included after core api.jl.
"""
# ============================================================================
# BEAM FORMULATION THEORIES
# ============================================================================
"""
AbstractBeamTheory
Abstract type for beam theory variants.
Beam theories differ in how they model shear deformation and cross-section kinematics.
# Concrete Theories
- `EulerBernoulli`: Classical beam theory (no shear deformation)
- `Timoshenko`: Includes shear deformation (thick beams)
# See Also
- [`BeamFormulation`](@ref)
"""
abstract type AbstractBeamTheory end
"""
EulerBernoulli <: AbstractBeamTheory
Euler-Bernoulli beam theory (classical, no shear deformation).
Assumptions:
- Plane sections remain plane and perpendicular to neutral axis
- No transverse shear deformation
- Valid for slender beams (L/h > 10)
# Usage
```julia
formulation = BeamFormulation{EulerBernoulli}()
physics = Physics(
formulation=formulation,
field=DisplacementRotation{3}(),
mesh=beam_mesh,
material=steel
)
```
"""
struct EulerBernoulli <: AbstractBeamTheory end
"""
Timoshenko <: AbstractBeamTheory
Timoshenko beam theory (includes shear deformation).
Assumptions:
- Plane sections remain plane but NOT perpendicular to neutral axis
- Transverse shear deformation included
- Valid for thick beams and higher frequencies
# Usage
```julia
formulation = BeamFormulation{Timoshenko}()
physics = Physics(
formulation=formulation,
field=DisplacementRotation{3}(),
mesh=beam_mesh,
material=steel
)
```
"""
struct Timoshenko <: AbstractBeamTheory end
"""
BeamFormulation{Theory<:AbstractBeamTheory} <: AbstractFormulation
Beam element formulation with theory variant.
# Type Parameter
- `Theory`: Beam theory type (EulerBernoulli or Timoshenko)
# Examples
```julia
# Slender beam (classical theory)
BeamFormulation{EulerBernoulli}()
# Thick beam (includes shear)
BeamFormulation{Timoshenko}()
```
# Fields per Node
Typically 6 DOFs in 3D: (ux, uy, uz, θx, θy, θz)
Use with `DisplacementRotation{3}` field type.
"""
struct BeamFormulation{Theory<:AbstractBeamTheory} <: AbstractFormulation end