Presentation is loading. Please wait.

Presentation is loading. Please wait.

The simple pendulum (Formulation as a differential-algebraic equation) Consider a small mass m attached to a light inelastic string of length l, with the.

Similar presentations


Presentation on theme: "The simple pendulum (Formulation as a differential-algebraic equation) Consider a small mass m attached to a light inelastic string of length l, with the."— Presentation transcript:

1 The simple pendulum (Formulation as a differential-algebraic equation) Consider a small mass m attached to a light inelastic string of length l, with the other end attached to the origin of coordinates, which can swing back and forth in a vertical plane. Let X, measured in a rightwards direction, and Y,measured in a downward direction, be the coordinates The motion of the pendulum is governed by the equations

2 The simple pendulum (Formulation as a differential-algebraic equation) Consider a small mass m attached to a light inelastic string of length l, with the other end attached to the origin of coordinates, which can swing back and forth in a vertical plane. Let X, measured in a rightwards direction, and Y,measured in a downward direction, be the coordinates The motion of the pendulum is governed by the equations initial values DAE

3 The simple pendulum (Formulation as a differential-algebraic equation) DAE Differentiate the first two equations and substitute into the third 2ed order equation

4 The simple pendulum (Formulation as a Hamiltonian problem) Differentiate the first two equations and substitute into the third 2ed order equation write the H as the ‘Hamiltonian’ Hamiltonian problem

5 The simple pendulum (Formulation as a differential-algebraic equation) DAE differentiate the last equation and use the first two differentiate and use various substitutions the first four equations together with any of the last four give identical solutions. Which of the possible formulations should be used? From the point of view of physical modelling, it seems to be essential to require that the length constraint should hold exactly. On the other hand, when it comes to numerical approximations to solutions, it is found that the use of this constraint in the problem description creates serious computational difficulties. It also seems desirable from a modelling point of view to insist that (y1y3+y2y4=0) should hold exactly, since this simply states that the direction of motion is tangential to the arc on which it is constrained to lie.

6 The simple pendulum (Formulation as a differential-algebraic equation) DAE differentiate the last equation and use the first two differentiate and use various substitutions The number of times that the algebraic equations of a DAE need to be differentiated in order to obtain differential equations for all of the algebraic variables is called the index of the DAE So our pendulum problem is an index 3 DAE Only four of the equations are differential equations. The last is an “algebraic” equation. Also, there is no equation with dy5/dx in it, so y5 is called an algebraic variable.

7 The simple pendulum (Formulation as a differential-algebraic equation) DAE The general scheme for a system of differential algebraic equations is The Y variables are the differential variables, while the Z variables are the algebraic variables. INITIAL CONDITIONS AND DRIFT In the general scheme, the constraints must hold at time t0 and all differentiated equations. Also all t. Numericalmethods do not necessarily preserve these properties even though they are preserved in the differential equations. This is known as drift. There are a number of ways of dealing with drift 1) Project current solution back to the constraints, either at every step, or occasionally. 2) Use a numericalmethod that explicitly respects the constraints 3) Modify the differential equation to make the constraint set stable

8 The simple pendulum (Formulation as a differential-algebraic equation) DAES AS STIFF DIFFERENTIAL EQUATIONS Differential algebraic equations can be treated as the limit of ordinary differential equations. The matrix function B(Y ) should be chosen to make the differential equation in Z stable, so that the solution for (2),Z(t), converges to the solution of (1) For epsilon small, these equations are stiff, so implicit methods are needed.

9 Newton–Raphson method Taking the limit as epsilon → 0 and recalling that B(Y ) is nonsingular,we get the equations This method will work for index 1 DAEs, but not in general for higher index DAEs. Implicit Euler method


Download ppt "The simple pendulum (Formulation as a differential-algebraic equation) Consider a small mass m attached to a light inelastic string of length l, with the."

Similar presentations


Ads by Google