You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/examples/pendulum.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Pendulum--The "Hello World of multi-body dynamics"
2
-
This beginners tutorial will model a pendulum pivoted around the origin in the world frame. The world frame is a constant that lives inside the Multibody module, all multibody models are "grounded" in the same world, i.e., the `world` component must be included in all models.
2
+
This beginners tutorial will start by modeling a pendulum pivoted around the origin in the world frame. The world frame is a constant that lives inside the Multibody module, all multibody models are "grounded" in the same world, i.e., the `world` component must be included in all models.
3
3
4
4
To start, we load the required packages
5
5
```@example pendulum
@@ -12,11 +12,11 @@ We then access the world frame and time variable from the Multibody module
12
12
```@example pendulum
13
13
t = Multibody.t
14
14
world = Multibody.world
15
-
show(stdout, MIME"text/plain"(), world)
15
+
show(stdout, MIME"text/plain"(), world) # hide
16
16
nothing # hide
17
17
```
18
18
19
-
Unless otherwise specified, the world defaults to have a gravitational field pointing in the negative ``y`` direction and a gravitational acceleration of ``9.81``.
19
+
Unless otherwise specified, the world defaults to having a gravitational field pointing in the negative ``y`` direction and a gravitational acceleration of ``9.81`` (See [Bodies in space](@ref) for more options).
20
20
21
21
22
22
## Modeling the pendulum
@@ -50,12 +50,12 @@ Before we can simulate the system, we must perform model compilation using [`str
50
50
```@example pendulum
51
51
ssys = structural_simplify(IRSystem(model))
52
52
```
53
-
This results in a simplified model with the minimum required variables and equations to be able to simulate the system efficiently. This step rewrites all `connect` statements into the appropriate equations, and removes any redundant variables and equations.
53
+
This results in a simplified model with the minimum required variables and equations to be able to simulate the system efficiently. This step rewrites all `connect` statements into the appropriate equations, and removes any redundant variables and equations. To simulate the pendulum, we require two state variables, one for angle and one for angular velocity, we can see above that these state variables have indeed been chosen.
54
54
55
55
We are now ready to create an `ODEProblem` and simulate it. We use the `Rodas4` solver from OrdinaryDiffEq.jl, and pass a dictionary for the initial conditions. We specify only initial condition for some variables, for those variables where no initial condition is specified, the default initial condition defined the model will be used.
Copy file name to clipboardExpand all lines: docs/src/index.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,8 @@ The following animations give a quick overview of simple mechanisms that can be
159
159
160
160
- The torque variable in Multibody.jl is typically called `tau` rather than `t` to not conflict with the often used independent variable `t` used to denote time.
161
161
- Multibody.jl occasionally requires the user to specify which component should act as the root of the kinematic tree. This only occurs when bodies are connected directly to force components without a joint parallel to the force component.
162
-
- In Multibody.jl, the orientation object of a [`Frame`](@ref) is accessed using he function [`ori`](@ref).
162
+
- In Multibody.jl, the orientation object of a [`Frame`](@ref) is accessed using the function [`ori`](@ref).
163
+
- Quaternions in Multibody.jl follow the order ``[s, i, j, k]``, i.e., scalar/real part first.
Copy file name to clipboardExpand all lines: src/joints.jl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -673,7 +673,7 @@ Note, that bodies such as [`Body`](@ref), [`BodyShape`](@ref), have potential st
673
673
674
674
The state of the FreeMotion object consits of:
675
675
676
-
The relative position vector `r_rel_a` from the origin of `frame_a` to the origin of `frame_b`, resolved in `frame_a` and the relative velocity `v_rel_a` of the origin of `frame_b` with respect to the origin of `frame_a`, resolved in `frame_a (= der(r_rel_a))`.
676
+
The relative position vector `r_rel_a` from the origin of `frame_a` to the origin of `frame_b`, resolved in `frame_a` and the relative velocity `v_rel_a` of the origin of `frame_b` with respect to the origin of `frame_a`, resolved in `frame_a (= D(r_rel_a))`.
677
677
678
678
# Arguments
679
679
@@ -722,9 +722,9 @@ The relative position vector `r_rel_a` from the origin of `frame_a` to the origi
722
722
]
723
723
(v_rel_a(t)[1:3] = v_rel_a),
724
724
[
725
-
description ="= der(r_rel_a), i.e., velocity of origin of frame_b with respect to origin of frame_a, resolved in frame_a",
725
+
description ="= D(r_rel_a), i.e., velocity of origin of frame_b with respect to origin of frame_a, resolved in frame_a",
0 commit comments