Vertical oscillation under gravity. (a,d) We consider a vertical rod of mass mr clamped at the top and with a mass mp attached to the free end. Assuming that the rod is stiff enough (i.e. ), it oscillates due to gravity around the equilibrium position , where ΔL*=g(mp+mr/2)/k with a period with ξ≃3 for mp≫mr, and ξ≃π2/4 for mp≪mr. Therefore, the rod oscillates according to . (a–b) Case mp≫mr with mp=100 kg and mr=1 kg. (b) By increasing the stiffness E=107, 2×107, 3×107, 5×107, 108, 1010 Pa, the simulated oscillations (red lines) approach the analytical solution (dashed black line). (c) Convergence to the analytical solution in the norms (black), L1(ϵ) (blue) and L2(ϵ) (red) with ϵ=∥L(t)−LE(t)∥, where LE is the length numerically obtained as a function of E. (c–d) Case mp≪mr with mp=0 kg and mr=1 kg. (e) By increasing the stiffness E=104, 2×104, 3×104, 5×104, 105, 2×105, 109 Pa, the simulated oscillations approach the analytical solution. (f) Convergence to the analytical solution in the norms , L1(ϵ) and L2(ϵ) as a function of E. For all studies, we used the following settings: gravity g=9.81 m s−2, rod density ρ=103 kg m−3, shear modulus G=2E/3 Pa, shear/stretch matrix , bend/twist matrix , rest length , rest cross-sectional area , number of discretization elements n=100, timestep δt=T*/106, dissipation constant γ=0.