modelLargeAmplitudePendulum
Pendulum with pi/2 Amplitude and Period from Elliptic Integral
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example involves a pendulum with pi/2 (=theta0) amplitude. A mass (m,Icm) is suspended a distance L from a pivot. From the conservation of total (kinetic + potential) energy, one finds (parallel-axis theorem: I=Icm+mL2):dtheta/dt = sqrt[(2mgL/I)(cos(theta) - cos(theta0))]
After differentiating and doing some algebra, one arrives at the following DE:

d2theta/dt2 + (mgL/I) sin(theta) = 0
The period can be found by integrating the dt/dtheta expression above, performing a change of integration variable, and using a trig half-angle formula. The result is a complete elliptic integral, K(k):
T = 4 sqrt(I/mgL) K(sin(theta0/2))
Plotting the period, T, as a function of starting angle (assuming dtheta/dt=0 at theta0):

Near theta0=0, one finds the solution (T0~2s) for the small-angle approximation: sin(theta) ~ theta.
The period of the swinging-body simulation is found to match the calculation of the period from the max angle:

Keep in mind that this acts as a check for the former, not the latter.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Mechanics.MultiBody.World | world | ||
| Modelica.Mechanics.MultiBody.Joints.Revolute | revolute | ||
| Modelica.Mechanics.MultiBody.Parts.Body | body | ||
| Modelica.Mechanics.MultiBody.Sensors.RelativeAngles | theta | ||
| GNU_ScientificLibrary.Blocks.specfunc.ElliptInt_K | elliptInt_K | ||
| Modelica.Blocks.Math.Gain | half | ||
| Modelica.Blocks.Math.Sin | sin | ||
| Modelica.Blocks.Sources.Constant | const | ||
| Modelica.Blocks.Math.Product | period | ||
| Modelica.Blocks.Math.Abs | abs1 | ||
| LargeAmplitudePendulum.BodyParams | bodyParams | ||
| Modelica.Blocks.Math.Add | add | ||
| Modelica.Blocks.Sources.Constant | halfpi |
Contents
| Name | Description |
|---|---|