Simple Pendulum¶
The objective here is to obtain an alternative relation of dimensionless quantities that represents the pendulum’s period T as a function of the the other quantities depicted in the figure below.
We start by importing the necessary classes from nodimo:
[2]:
from nodimo import Quantity, Model
Next, we define the quantities that compose the problem. Note the arguments used:
The arguments
M,LandTrepresent the dimensions Mass, Length and Time, respectivelyThe Period
Tis the dependent quantity, hence the argumentdependent=TrueThe quantities
Landgare used as scaling parameters, therefore the argumentscaling=True
[3]:
T = Quantity('T', M=0, L=0, T=1, dependent=True) # Period
L = Quantity('L', M=0, L=1, T=0, scaling=True) # Length
m = Quantity('m', M=1, L=0, T=0) # Mass
g = Quantity('g', M=0, L=1, T=-2, scaling=True) # Gravity
t0 = Quantity('theta_0') # Initial angle
Finally, the dimensionless model is defined. Note that, in the output of the cell, nodimo detects that the quantity m can not be part of the model, because the dimension M is not common among the group of quantities.
[4]:
model = Model(T, L, m, g, t0)
NodimoWarning: Dimensionally irrelevant quantities (m)
The dimensional and dimensionless relations can be displayed by:
[5]:
model.show()
As you can see, the dimensional expression provides a relationship between 4 quantities, while the dimensionless one has 2 effective quantities. This is one the main advantages of building dimensionless relations.