LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Second-Order Differential Equation Solver

Are their any good Second-Order Differential Equation Solver VI's out there that anyone could recommend? I'm just looking for something pretty basic that I could modify. Thanks
0 Kudos
Message 1 of 5
(7,645 Views)
I believe there is a sample VI which does this, it is basic and can get confused!

Try this

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000877A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
0 Kudos
Message 2 of 5
(7,645 Views)
Select HELP | Find Examples

Enter Polynomial

I think this is what your after
0 Kudos
Message 3 of 5
(7,645 Views)
Hi Jay,

There is an example proram in Labview called Shooting Method.vi that solves a second-order differential equation using the shooting method. To find the example, go to Labview and select Help from the top menu. Then choose Find Examples.... Select the Search tab and type ODE. The Shooting Method.vi should be the last example listed.

I have also attached the program to this post. Note that this program requires either Labview Full or Professional Development Systems.

Thanks and best of luck!

Kileen Cheng
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(7,645 Views)

Diffrential Equation Solver is solved :-

Differential-Algebraic Equation (DAE) is a kind of differential equation in the fully implicit form:

                                                    (1)

Where y=(x,z)T. x are the differential variables and z are the algebraic variables.

DAE is different from Ordinary Differential Equation (ODE). Most DAE problems could be regarded as a combination of ODE and constraints. ODE is a special subset of DAE.

ODE:          

DAE:           

For example, a simple pendulum is a typical DAE problem and could be written in the DAE form.

Figure 1. Simple pendulum

                                                            (2)

As shown in Figure 1, l is the length of the massless rod. m is the mass of the bob and g is the acceleration of gravity, which is approximately 9.8 N/kg approximately. x,y are the coordinates of the bob. Vx, Vy are the velocities of the (x,y) coordinate components, and V'x, V'y are the accelerations.  is a Lagrange multiplier that represents the effect by the constraint. The equation (*) represents the constraint between the bob's coordinates and the length of the rod.

DAE is widely used in real-life applications and plays a prominent role in engineering, physics, and mathematics. DAE is especially useful in multi-body mechanics, circuit design, and simulation.

The DAE solver

The solver solves the general form of differential equations with an initial value (t0 ,y(0) , y'(0)):

                                                                                  (3)

Where  

 

 .

Most differential equations in application use this form or can easily be converted to this form by moving the right side of the equation to the left side.

Radau IIA, a collocation method of the Runge-Kutta family, which has 3 stages per step and a precision order of 5, is utilized. To get solution (t,y,y') at tout from the initial value, time [t0 , tout] is separated into many steps: t0 , t1 , t2 , ..., tout , where t1=t0+h1 , t2=t0+h1+h2 , ... , tout . hk is the k-th step size which is controlled by the solver such that the error satisfies the specified tolerance.

The DAE solver solves the equation (3) step by step. As mentioned before, each step is separated into different stages, as shown in Figure 2.

Figure 2. Solver strategy

Most DAE problems with initial conditions, stiff or non-stiff, index-1 or higher index up to 3, could be solved by using the DAE solver.

How to use this solver

To illustrate how to use this solver, take the previous simple pendulum problem as an example.

Define your problem and write user-defined function

You can easily convert the equations shown in (2) into the implicit form f(t,y,y')=0:

                
After the reformulation above, you could write your own VI for this problem.

New from template Res function(user).vit and fill in your own code as Figure 3.

Figure 3. Simple pendulum user-defined function

Initial value

Consistent initial value (t0 ,y(0) , y'(0))  should be provided to satisfy f(t,y,y')=0.

In the simple pendulum problem, the consistent initial condition is:

Notice that y'4 doesn’t appear in equation (4). In this case, you can give this differentiate variable a zero initial value.

Call DAE solver

After you finish the user-defined VI and determine what the initial condition (t0 ,y(0) , y'(0)) is, set up the simulation parameters according to the context help. Then call the DAE solver as shown in Figure 4.

Figure 4. Call the DAE solver

Show the results

Use the front panel to show the results by using different types of graph indicators. You also can create an animation to show the motion of your model.

The result of the simple pendulum is shown in Figure 5. 

Figure 5. Simple Pendulum result

Another simulation example is the multibody system called Andrews’ squeezer mechanism[1]. This simulation example was first promoted by Giles[2] and Manning[3], and later became a well-known test example for numerical DAE solvers. This example consists of 7 rigid bodies and a massless spring connected by frictionless joints, represented by white dots. A, B, C and O are fixed points, as shown in Figure 6. The motor at point O drives the system in plane motion. The math model of this system is a typical DAE because it contains not only differential equations to describe movements, but also algebraic equations to describe the constraints between joints.

For @nd Diffrential Euation Solver just see Systems of euation Solver

 

Amit28it

 

0 Kudos
Message 5 of 5
(6,836 Views)