Benchmark solution ===================== Calculation method used for the reference solution -------------------------------------------------------- During a free flight phase, the equation of motion is written :math:`m\ddot{x}+{k}_{\mathrm{rappel}}x={F}_{\mathrm{ext}}(t)`. Given the sine form of :math:`{F}_{\mathrm{ext}}(t)`, this equation has an analytical solution. We can calculate numerically, with as much precision as we want, the moment :math:`{t}_{\text{in}}` of entry into the contact, verifying :math:`x({t}_{\text{in}})={\mathrm{jeu}}_{\mathrm{choc}}`. We are then in a contact phase, whose equation is :math:`m\ddot{x}+{c}_{\mathrm{choc}}\dot{x}+({k}_{\mathrm{rappel}}+{k}_{\mathrm{choc}})x={F}_{\mathrm{ext}}(t)`. There is also an analytical solution. With the boundary conditions resulting from the instant of contact, it is possible to numerically calculate the instant :math:`{t}_{\text{out}}` of exit from the contact. By proceeding in this way iteratively, the complete solution of the problem is obtained. Note: the analytical formulas are not given here. The files containing the formulas and allowing the complete solution to be calculated are attached to the command file. Benchmark results ---------------------- We test the energy balance, the adequacy between contact forces and kinematics, as well as kinematics. For the energy balance, we calculate the kinetic :math:`{E}_{i}^{\mathrm{cin}}=\frac{1}{2}m\dot{x}{}_{i}^{2}`, potential :math:`{E}_{i}^{\mathit{pot}}\mathrm{=}\frac{1}{2}{k}_{\mathit{rappel}}{x}_{i}^{2}`, shock energies :math:`{E}_{i}^{\mathit{choc}}\mathrm{=}\frac{1}{2}{k}_{\mathit{choc}}{p}_{i}^{2}` (:math:`p` is the penetration; this expression is only valid if there is no shock absorption), injected by the external force :math:`{E}_{i}^{\mathrm{inj}}=\sum _{j=1}^{i}{f}_{j}^{\mathrm{ext}}\dot{x}{}_{j+\delta \frac{1}{2}}\Delta t` (with :math:`\delta =1` for the Euler diagram, :math:`\delta =0` for the diagram of centered differences), are calculated. We get total energy :math:`{E}_{i}^{\mathit{tot}}\mathrm{=}{E}_{i}^{\mathit{cin}}+{E}_{i}^{\mathit{pot}}+{E}_{i}^{\mathit{choc}}`. Finally, the global error on the energy balance is calculated by :math:`{\mathit{erreur}}_{\mathit{globale}}^{\mathit{énergie}}\mathrm{=}\sqrt{\frac{\mathrm{\sum }_{i}{({E}_{i}^{\mathit{tot}}\mathrm{-}{E}_{i}^{\mathit{inj}})}^{2}}{\mathrm{\sum }_{i}{({E}_{i}^{\mathit{inj}})}^{2}}}`, which is ideally equal to 0. For the adequacy between contact forces and kinematics, we calculate the quantity :math:`{\mathit{erreur}}_{\mathit{globale}}^{\mathit{force}}\mathrm{=}\sqrt{\frac{\mathrm{\sum }_{i}{({F}_{i}^{\mathit{choc}}\mathrm{-}{k}_{\mathit{choc}}{p}_{i})}^{2}}{\mathrm{\sum }_{i}{({k}_{\mathit{choc}}{p}_{i})}^{2}}}`, which is ideally equal to 0. For kinematics, the calculated contact entry and exit times are compared to the analytical times. Uncertainty about the solution --------------------------- The solution is analytic in pieces. The contact entry and exit times are determined numerically to the nearest :math:`{10}^{-9}s`.