Skip to content

Commit

Permalink
Merge pull request #3257 from ArnoStrouwen/docs7
Browse files Browse the repository at this point in the history
add Lagrangian explanation to DAE reduction tutorial.
  • Loading branch information
ChrisRackauckas authored Dec 4, 2024
2 parents 1f669d9 + c11e76a commit 22be186
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/examples/modelingtoolkitize_index_reduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ In this tutorial, we will look at the pendulum system:
\end{aligned}
```

These equations can be derived using the [Lagrangian equation of the first kind.](https://en.wikipedia.org/wiki/Lagrangian_mechanics#Lagrangian)
Specifically, for a pendulum with unit mass and length $L$, which thus has
kinetic energy $\frac{1}{2}(v_x^2 + v_y^2)$,
potential energy $gy$,
and holonomic constraint $x^2 + y^2 - L^2 = 0$.
The Lagrange multiplier related to this constraint is equal to half of $T$,
and represents the tension in the rope of the pendulum.

As a good DifferentialEquations.jl user, one would follow
[the mass matrix DAE tutorial](https://docs.sciml.ai/DiffEqDocs/stable/tutorials/dae_example/#Mass-Matrix-Differential-Algebraic-Equations-(DAEs))
to arrive at code for simulating the model:
Expand Down

0 comments on commit 22be186

Please sign in to comment.