model Pendule "Le pendule" import SI = Modelica.SIunits; import Modelica.SIunits.Conversions.*; parameter SI.Length L = 0.5 "Longueur du pendule"; parameter SI.DampingCoefficient beta = 1 "Coefficient d'amortissement"; parameter SI.Mass m = 0.2 "Masse du pendule"; parameter SI.Angle theta0 = from_deg(75) "Angle initial du pendule"; constant SI.Acceleration g = 9.81 "Constante de gravitation terrestre"; SI.Angle theta "Angle du pendule"; SI.AngularVelocity theta_p "Vitesse angulaire"; SI.AngularAcceleration theta_pp "Acceleration angulaire"; SI.Torque tau "Couple de controle"; initial equation theta = theta0; equation theta_p = der(theta); theta_pp = der(theta_p); tau = 0; m*L^2*theta_pp+m*L*g*sin(theta)+beta*L^2*theta_p = tau; // equation non simplifiee ; le terme tau permet de considerer un couple moteur (nul si pendule libre) equation annotation (experiment(StopTime=5)); end Pendule;