From 35c21dc27c787bce18bc481167265c7ff656cbab Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Sat, 28 Oct 2023 16:55:12 +0200 Subject: [PATCH] nicer headlines --- docs/src/examples/spring_damper_system.md | 2 +- docs/src/examples/spring_mass_system.md | 2 +- docs/src/examples/three_springs.md | 4 +++- src/forces.jl | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/src/examples/spring_damper_system.md b/docs/src/examples/spring_damper_system.md index 07b0c5e4..6c16aa5d 100644 --- a/docs/src/examples/spring_damper_system.md +++ b/docs/src/examples/spring_damper_system.md @@ -77,7 +77,7 @@ This example has two parallel spring-mass parts, the first body (`body1`) is att In this example we used separate springs and dampers, see also the component [`SpringDamperParallel`](@ref) which combines the two in one component. -## Render +## 3D animation Multibody.jl supports automatic 3D rendering of mechanisms, we use this feature to illustrate the result of the simulation below: ```@example spring_damper_system diff --git a/docs/src/examples/spring_mass_system.md b/docs/src/examples/spring_mass_system.md index da6e9a17..f7f6815e 100644 --- a/docs/src/examples/spring_mass_system.md +++ b/docs/src/examples/spring_mass_system.md @@ -58,7 +58,7 @@ Plots.plot(sol, idxs = [body1.r_0[2], body2.r_0[2]]) ``` The plot indicates that the two systems behave identically. -## Render +## 3D animation Multibody.jl supports automatic 3D rendering of mechanisms, we use this feature to illustrate the result of the simulation below: ```@example spring_mass_system diff --git a/docs/src/examples/three_springs.md b/docs/src/examples/three_springs.md index 7a999a94..bf257f48 100644 --- a/docs/src/examples/three_springs.md +++ b/docs/src/examples/three_springs.md @@ -3,6 +3,8 @@ This example mirrors that of the [modelica three-springs](https://doc.modelica.o ![three springs](https://doc.modelica.org/Modelica%203.2.3/Resources/Images/Mechanics/MultiBody/Examples/Elementary/ThreeSprings.png) +![animation](three_springs.gif) + The example connects three springs together in a single point. The springs are all massless and do normally not have any state variables, but we can insist on one of the springs being stateful, in this case, we must tell the lower spring component to act as root by setting `fixedRotationAtFrame_a = fixedRotationAtFrame_b = true`. ```@example spring_mass_system @@ -47,7 +49,7 @@ sol = solve(prob, Rodas4(), u0=prob.u0 .+ 1e-1*randn(length(prob.u0))) Plots.plot(sol, idxs = [body1.r_0...]) ``` -## Render +## 3D animation Multibody.jl supports automatic 3D rendering of mechanisms, we use this feature to illustrate the result of the simulation below: ```@example spring_mass_system diff --git a/src/forces.jl b/src/forces.jl index b41e53d8..79553766 100644 --- a/src/forces.jl +++ b/src/forces.jl @@ -377,7 +377,7 @@ end Linear spring and linear damper in parallel acting as line force between `frame_a` and `frame_b`. A force `f` is exerted on the origin of `frame_b` and with opposite sign on the origin of `frame_a` along the line from the origin of `frame_a` to the origin of `frame_b` according to the equation: ```math -f = c (s - s_unstretched) + d*D(s) +f = c (s - s_{unstretched}) + d\cdot D(s) ``` where `c`, `s_unstretched` and `d` are parameters, `s` is the distance between the origin of `frame_a` and the origin of `frame_b` and `D(s)` is the time derivative of `s`. """