Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Projection

Introduction

When a differential system has a certain structure, it is advantageous if a numerical integration method preserves the structure. In certain situations it is useful to solve differential equations in which solutions are constrained. Projection methods work by taking a time step with a numerical integration method and then projecting the approximate solution onto the manifold on which the true solution evolves.

NDSolve includes a differential algebraic solver which may be appropriate and is described in more detail within Differential-Algebraic Equations.

Sometimes the form of the equations may not be reduced to the form required by a DAE solver. Furthermore so-called index reduction techniques can destroy certain structural properties, such as symplecticity, that the differential system may possess (see [HW96] and [H02]). An example that illustrates this can be found in the documentation for DAEs.

In such cases it is often possible to solve a differential system and then use a projective procedure to ensure that the constraints are conserved. This is the idea behind the method Projection.

If the differential system is Rho-reversible then a symmetric projection process can be advantageous (see [H00]). Symmetric projection is generally more costly than projection and has not yet been implemented in NDSolve.

Invariants

Consider a differential equation

where y may be a vector or a matrix.

Definition: A non-constant function I(y) is called an invariant of (-1) if  for all y.

This implies that every solution y(t) of (-1) satisfies I(y(t)) =  = Constant.

Synonymous with invariant, the terms first integral, conserved quantity, or constant of the motion are also common.

Manifolds

Given an  -dimensional submanifold of  with

Given a differential equation (-1) then  implies  for all  . This is a weaker assumption than invariance and g(y) is called a weak invariant (see [H02]).

Projection algorithm

Let  denote the solution from a one-step numerical integrator. Considering a constrained minimization problem leads to the following system (see [AP91], [HW96] and [H02]):

To save work  is approximated as  . Substituting the first relation into the second relation in (-1) leads to the following simplified Newton scheme for Lambda:

with  .

The first increment  is of size  so that (-1) usually converges quickly.

The added expense of using a higher order integration method can be offset by fewer Newton iterations in the projective step.

For the termination criterion in the method Projection, the option IterationSafetyFactor is combined with one Unit in the Last Place in the working precision used by NDSolve.

Examples

Load some utility packages.

In[1]:= 

Linear invariants

Define the a stiff system modeling a chemical reaction.

In[97]:= 

This system has a linear invariant.

In[99]:= 

Out[99]=

Linear invariants are generally conserved by numerical integrators (see [S86]), including the default NDSolve method, as can be observed in a plot of the error in the invariant.

In[100]:= 

Therefore in this example there is no need to use the method Projection.

Certain numerical methods preserve quadratic invariants exactly (see for example [C87]). The implicit midpoint rule, or one-stage Gauss implicit Runge-Kutta method, is one such method.

Harmonic oscillator

Define the Harmonic oscillator.

In[102]:= 

The Harmonic oscillator has the following invariant.

In[104]:= 

Out[104]=

Solve the system using the method ExplicitRungeKutta. The error in the invariant grows roughly linearly which is typical behavior for a dissipative method applied to a Hamiltonian system.

In[105]:= 

This also solves the system using the method ExplicitRungeKutta but it projects the solution at the end of each step. A plot of the error in the invariant shows that it is conserved up to roundoff.

In[107]:= 

Since the system is Hamiltonian (the invariant is the Hamiltonian), a symplectic integrator performs well on this problem giving a small bounded error.

In[109]:= 

Perturbed Kepler problem

This loads a Hamiltonian system known as the perturbed Kepler problem, sets the integration interval and the step size to take as well as defining the position variables in the Hamiltonian formalism.

In[17]:= 

Out[20]=

The system has two invariants which ar defined as H and L.

In[21]:= 

Out[21]=

An experiment now illustrates the importance of using all the available invariants in the projective process (see [H02] ). Consider the solutions obtained using:

The method ExplicitEuler.

The method Projection with ExplicitEuler, projecting onto the invariant L.

The method Projection with ExplicitEuler, projecting onto the invariant H.

The method Projection with ExplicitEuler, projecting onto both the invariants H and L.

In[24]:= 

In[26]:= 

In[28]:= 

In[30]:= 

It can be observed that only the solution with projection onto both invariants gives the correct qualitative behavior - for comparison, results using an efficient symplectic solver can be found in SymplecticPartitionedRungeKutta.

Lotka Volterra

An example of constraint projection for the Lotka-Volterra system is given within Numerical methods for solving the Lotka-Volterra equations.

Euler's equations

An example of constraint projection for Euler's equations is given within Rigid body solvers.

Option summary

Options of the method Projection.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: