User Manual 4.0 Numerical ordinary differential equations

De Wiki
Révision de 19 février 2018 à 09:52 par Admin (discussion | contributions)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
Aller à : navigation, rechercher


Introduction

Scope

This library can compute solutions for ordinary differential equations, as numerical approximations. The problems are usually in the form of : Compute an estimate of y(t) from t=t0 to t=t1, knowing the derivative y'=f(t,y), and y(t0)=y0.

The library can also handle multiple discrete events detection based on the results of the ongoing estimation, which can be used to dynamically alter the conditions of the problem being solved, or even stop the integration (for instance : when the function y reaches an expected value, the value of t at this point being the information needed, there is no need to go on).

Javadoc

Integrators

The ODE integrators are provided in the following packages :

|=Library|=Javadoc |Patrius|Package fr.cnes.sirius.patrius.math.ode |Patrius|Package fr.cnes.sirius.patrius.math.ode.nonstiff |Patrius|Package fr.cnes.sirius.patrius.math.ode.sampling

Event handling

The events are managed in the following package :

|=Library|=Javadoc |Patrius|Package fr.cnes.sirius.patrius.math.ode.events

Links

None as of now.

Useful Documents

A general purpose explanation of this section can be found here :

http:~~/~~/en.wikipedia.org/wiki/Numerical_ordinary_differential_equations

Package Overview

Integrators :

Integrators2.PNG

Events package :

PATRIMOINESIRIUSSUMDiagEvents.png

Features Description

Integrators

The integrators providedinclude :

  • the Classical Runge Kutta integrator,
  • the Dormand Prince 8(5, 3) integrator and
  • the Gragg Bulirsch Stoer integrator.
  • the 6^^th^^ order Runge-Kutta integretor.

The ODE package documentation can be found here .

Events

Event handling during an integrator run is a core functionality of the math package, therefore this is already well-documented in the Javadoc (please see the relevant section). This here is a short summary of how event handling works.

How to monitor events

      • create an EventHandler implementation**

You need to create an EventHandler implementation for the event you want to trace. The most important method here is the g() method : double g(double t, double[] y) throws EventException; This method (which takes as input a solution of the integration problem at a given "time" t) should be designed so thatwhen the event occurs, the sign of the method changes. It should also be continuous. The other methods of the interface are :

    • int eventOccurred(double t,
                 double[] y,
                 boolean increasing, boolean forward)
throws EventException;

This method is called when an event happens. It should return :

double[] y) throws EventException