39 RKF45::c4 = 12.0/13.0,
44 RKF45::a31 = 3.0/32.0,
45 RKF45::a32 = 9.0/32.0,
46 RKF45::a41 = 1932.0/2197.0,
47 RKF45::a42 = -7200.0/2197.0,
48 RKF45::a43 = 7296.0/2197.0,
49 RKF45::a51 = 439.0/216.0,
51 RKF45::a53 = 3680.0/513.0,
52 RKF45::a54 = -845.0/4104.0,
53 RKF45::a61 = -8.0/27.0,
55 RKF45::a63 = -3544.0/2565.0,
56 RKF45::a64 = 1859.0/4104.0,
57 RKF45::a65 = -11.0/40.0,
59 RKF45::b1 = 16.0/135.0,
60 RKF45::b3 = 6656.0/12825.0,
61 RKF45::b4 = 28561.0/56430.0,
62 RKF45::b5 = -9.0/50.0,
65 RKF45::e1 = 25.0/216.0 - RKF45::b1,
66 RKF45::e3 = 1408.0/2565.0 - RKF45::b3,
67 RKF45::e4 = 2197.0/4104.0 - RKF45::b4,
68 RKF45::e5 = -1.0/5.0 - RKF45::b5,
69 RKF45::e6 = -RKF45::b6;
126 yTemp_[i] = y0[i] + a21*dx*dydx0[i];
133 yTemp_[i] = y0[i] + dx*(a31*dydx0[i] + a32*k2_[i]);
140 yTemp_[i] = y0[i] + dx*(a41*dydx0[i] + a42*k2_[i] + a43*k3_[i]);
148 + dx*(a51*dydx0[i] + a52*k2_[i] + a53*k3_[i] + a54*k4_[i]);
157 *(a61*dydx0[i] + a62*k2_[i] + a63*k3_[i] + a64*k4_[i] + a65*k5_[i]);
167 *(b1*dydx0[i] + b3*k3_[i] + b4*k4_[i] + b5*k5_[i] + b6*k6_[i]);
176 *(e1*dydx0[i] + e3*k3_[i] + e4*k4_[i] + e5*k5_[i] + e6*k6_[i]);
virtual scalar solve(const scalar x0, const scalarField &y0, const label li, const scalarField &dydx0, const scalar dx, scalarField &y) const
Solve a single step dx and return the error.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Abstract base class for the systems of ordinary differential equations.
virtual bool resize()=0
Resize the ODE solver.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void derivatives(const scalar x, const scalarField &y, const label li, scalarField &dydx) const =0
Calculate the derivatives in dydx.
RKF45(const ODESystem &ode, const dictionary &dict)
Construct from ODESystem.
An ODE solver for chemistry.
scalar normaliseError(const scalarField &y0, const scalarField &y, const scalarField &err) const
Return the normalised scalar error.
Macros for easy insertion into run-time selection tables.
bool resize(const label n)
Resize the ODE solver.
const ODESystem & odes_
Reference to ODESystem.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Abstract base-class for ODE system solvers.
static void resizeField(UList< Type > &f, const label n)
virtual bool resize()
Resize the ODE solver.
virtual scalar solve(const scalar x0, const scalarField &y0, const label li, const scalarField &dydx0, const scalar dx, scalarField &y) const =0
Solve a single step dx and return the error.
label n_
Size of the ODESystem (adjustable)