Finite-element beam¶
DynaResp contains one beam model: a uniform, simply supported
Beam assembled from equal-length bending elements.
import numpy as np
import dynaresp as dr
beam = dr.Beam(
length=5.0,
material="steel",
section=("rectangular", 0.10, 0.02),
damping_ratio=0.01,
n_elements=20,
n_modes=6,
)
Each node has a transverse displacement and a rotation. The implementation assembles the element mass and stiffness matrices, applies the two simple supports, and keeps the requested number of mass-normalized modes. There are no alternate beam classes or boundary-condition hierarchy.
n_elements controls the internal mesh. It is independent of the physical
positions axis used by loads and sensors. Element indices start at zero, and
their physical boundaries are available as beam.element_edges.
The caller chooses the physical axis used by loads, mode shapes, and the simulation result:
time = np.arange(600) / 200
positions = np.linspace(0.0, beam.length, 101)
spec = dr.SimulationSpec(
system=beam,
load=dr.loads.TwoWheelLoad(
front_load=-4000,
rear_load=-3500,
speed=2.5,
wheel_spacing=1.25,
),
sensors=(dr.sensors.Accelerometer(position=2.5),),
time=time,
positions=positions,
)
result = dr.run_simulation(spec)
Optional local stiffness reduction is configured directly:
damaged = dr.Beam(
length=5.0,
material="steel",
section=("rectangular", 0.10, 0.02),
n_elements=20,
n_modes=6,
stiffness_reductions={6: 0.20, 7: 0.10},
)
Here, element 6 loses 20% of its bending stiffness and element 7 loses 10%. Reductions must be between zero and one, excluding one. This is an idealized element-property change, not a crack-mechanics model.