CoolProp  6.6.0
An open-source fluid property and humid air property database
Classes | Functions
ODEIntegrators Namespace Reference

Classes

class  AbstractODEIntegrator
 The abstract class defining the interface for the integrator routines. More...
 

Functions

bool AdaptiveRK54 (AbstractODEIntegrator &ode, double tmin, double tmax, double hmin, double hmax, double eps_allowed, double step_relax)
 Use the adaptive Runge-Kutta integrator to integrate a system of differential equations. More...
 

Function Documentation

◆ AdaptiveRK54()

bool ODEIntegrators::AdaptiveRK54 ( AbstractODEIntegrator ode,
double  tmin,
double  tmax,
double  hmin,
double  hmax,
double  eps_allowed,
double  step_relax 
)

Use the adaptive Runge-Kutta integrator to integrate a system of differential equations.

Parameters
tminStarting value of the independent variable. t is in the closed range [tmin, tmax]
tmaxEnding value for the independent variable. t is in the closed range [tmin, tmax]
hminMinimum step size, something like 1e-5 usually is good. Don't make this too big or you may not be able to get a stable solution
hmaxMaximum step size
eps_allowedMaximum absolute error of any CV per step allowed. Don't make this parameter too big or you may not be able to get a stable solution. Also don't make it too small because then you are going to run into truncation error.
step_relaxThe relaxation factor that is used in the step resizing algorithm. Should be less than 1.0; you can play with this parameter to improve the adaptive resizing, but should not be necessary.

Definition at line 8 of file ODEIntegrators.cpp.