modal_chain
Undamped modes of a spring-mass chain with n degrees of freedom (fixed-fixed, fixed-free or free-free; uniform or per-element masses and stiffnesses): natural frequencies, mode shapes, participation factors and effective modal masses for base excitation.
One-sided Jacobi SVD of K^1/2-weighted incidence matrix; every result checked against K and M.
- Field
- Dynamics and control
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.05 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001uniform fixed-fixed n=5, k=1000 N/m, m=1 kg:
w_j= 2 √(k/m) sin(j π/(2(n+1))) (closed form); shape sin(i j π/(n+1)) givesm_eff,1 = 2m cot²(π/12)/(n+1),m_eff,2 = 0 by symmetry; rel 10⁻⁹passedomega_rad_per_s.0= 16.369154, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.4= 61.090513, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.0= 4.642734, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.1= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageeffective_mass_sum_kg5 ± 5 × 10⁻⁹5lockedunder 0.01 % of the tolerance usedrigid_body_modes= 00lockedexact matchchecks_ok= truetruelockedexact matchr0002uniform fixed-fixed n=50, k=1000 N/m, m=1 kg: lowest and highest of
w_j= 2 √(k/m) sin(j π/(2(n+1))) (closed form; rel 10⁻⁸ for 50x50 rounding)passedomega_rad_per_s.0= 1.947651, within 1.000000 × 10⁻⁸ relativereading not recorded on this pageomega_rad_per_s.49= 63.215557, within 1.000000 × 10⁻⁸ relativereading not recorded on this pageeffective_mass_sum_kg50 ± 5 × 10⁻⁸50lockedunder 0.01 % of the tolerance usedchecks_ok= truetruelockedexact matchr0003uniform fixed-free n=4, k=400 N/m, m=2 kg:
w_j= 2 √(k/m) sin((2j-1) π/(2(2n+1))) (closed form,w_2= √(200) exactly); shape sin(i π/(2n+1)) givesm_eff,1 = 7.1474305506 kg; rel 10⁻⁹passedomega_rad_per_s.0= 4.911512, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.1= 14.142136, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.2= 21.667009, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.3= 26.578521, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.0= 7.147431, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_sum_kg8 ± 8 × 10⁻⁹8lockedunder 0.01 % of the tolerance usedr0004two equal masses fixed-free (m=2 kg, k=800 N/m): w² = (3 -+ √5)/2 k/m (closed form); shape (1, golden ratio) gives
m_eff= m(1 ± 2/√5); rel 10⁻⁹passedomega_rad_per_s.0= 12.36068, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.1= 32.36068, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.0= 3.788854, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.1= 0.211146, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagemode_shapes.0.1= 1, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagemode_shapes.0.0= 0.618034, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0005per-element fixed-free, m=[2,1] kg, k=[300 (wall), 100] N/m: m₁ m₂ w⁴ - (m₁ k₂ + m₂(k₁+k₂)) w² + k₁ k₂ = 0 gives w² = 150 -+ √7500 (exact quadratic); rel 10⁻⁹passed
omega_rad_per_s.0= 7.962252, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.1= 15.38189, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_sum_kg3 ± 3 × 10⁻⁹3lockedunder 0.01 % of the tolerance usedr0006free-free m=[1,3] kg, k=300 N/m: one zero mode carrying the total mass, w = √(k(1/m₁+1/m₂)) = 20 rad/s (exact); zero mode abs 10⁻⁹ rad/spassed
rigid_body_modes= 11lockedexact matchomega_rad_per_s.0= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageomega_rad_per_s.1= 20, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.0= 4, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.1= 0, within 1.000000 × 10⁻⁹reading not recorded on this pager0007uniform free-free n=6, k=250 N/m, m=0.5 kg:
w_j= 2 √(k/m) sin(j π/(2n)), j=0..n-1 (closed form); one zero mode; rel 10⁻⁹passedrigid_body_modes= 11lockedexact matchomega_rad_per_s.0= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageomega_rad_per_s.1= 11.57474, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageomega_rad_per_s.5= 43.197516, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_kg.0= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageeffective_mass_sum_kg3 ± 3 × 10⁻⁹3lockedunder 0.01 % of the tolerance used
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
boundary | 1 | fixed_free | Ends of the chain. fixed_fixed: wall-m₁ ... mn-wall (n+1 springs); fixed_free: wall-m₁ ... m(n-1)-mn (n springs); free_free: m₁-m₂ ... m(n-1)-mn (n-1 springs). Base excitation moves every wall together. |
n | 1 | Number of masses. Leave out when masses_kg or stiffnesses_N_per_m is given (the list sets it); 3 when nothing sets it. | |
mass_kg | kg | 1.0 | Every mass, for a uniform chain (ignored when masses_kg is given). |
stiffness_N_per_m | N/m | 1000.0 | Every spring, for a uniform chain (ignored when stiffnesses_N_per_m is given). |
masses_kg | kg | [] | Per-element masses from the left end; empty means uniform mass_kg. |
stiffnesses_N_per_m | N/m | [] | Per-element springs from the left end, walls included (see boundary); empty means uniform stiffness_N_per_m. |
modes_listed | 1 | 10 | How many modes go in the 'modes' table and 'mode_shapes' (all modes are always in out/modes.csv and out/mode_shapes.csv). |
Readings
| Name | Unit | Meaning |
|---|---|---|
boundary | 1 | |
n_dof | 1 | |
n_springs | 1 | |
total_mass_kg | kg | |
omega_rad_per_s | rad/s | Natural circular frequencies, lowest first. |
frequency_Hz | Hz | |
period_s | s | null for a rigid-body mode. |
fundamental_omega_rad_per_s | rad/s | Lowest non-zero mode. |
fundamental_frequency_Hz | Hz | |
fundamental_period_s | s | |
fundamental_mass_fraction | 1 | |
highest_frequency_Hz | Hz | |
rigid_body_modes | 1 | |
effective_mass_kg | kg | (φ^T M 1)² / (φ^T M φ), influence vector all ones. |
effective_mass_fraction | 1 | |
cumulative_mass_fraction | 1 | |
effective_mass_sum_kg | kg | |
participation_factor | 1 | φ^T M 1 / φ^T M φ with the shape scaled to largest component 1. |
modes_for_90_pct_mass | 1 | |
rms_omega_rad_per_s | rad/s | |
geometric_mean_omega_rad_per_s | rad/s | |
mode_shapes | 1 | Per listed mode, the displacement of each mass, largest component 1. |
sign_changes | 1 | |
oscillation_ok | 1 | |
max_residual | 1 | |
orthogonality_error | 1 | |
trace_error | 1 | |
mass_sum_error | 1 | |
jacobi_sweeps | 1 | |
checks_ok | 1 | |
warnings | 1 | |
modes | 1 |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.