41 rodas34::d2 = -0.1043,
43 rodas34::d4 = -0.3620000000000023e-01,
44 rodas34::a21 = 0.1544e1,
45 rodas34::a31 = 0.9466785280815826,
46 rodas34::a32 = 0.2557011698983284,
47 rodas34::a41 = 0.3314825187068521e1,
48 rodas34::a42 = 0.2896124015972201e1,
49 rodas34::a43 = 0.9986419139977817,
50 rodas34::a51 = 0.1221224509226641e1,
51 rodas34::a52 = 0.6019134481288629e1,
52 rodas34::a53 = 0.1253708332932087e2,
53 rodas34::a54 = -0.6878860361058950,
54 rodas34::c21 = -0.56688e1,
55 rodas34::c31 = -0.2430093356833875e1,
56 rodas34::c32 = -0.2063599157091915,
57 rodas34::c41 = -0.1073529058151375,
58 rodas34::c42 = -0.9594562251023355e1,
59 rodas34::c43 = -0.2047028614809616e2,
60 rodas34::c51 = 0.7496443313967647e1,
61 rodas34::c52 = -0.1024680431464352e2,
62 rodas34::c53 = -0.3399990352819905e2,
63 rodas34::c54 = 0.1170890893206160e2,
64 rodas34::c61 = 0.8083246795921522e1,
65 rodas34::c62 = -0.7981132988064893e1,
66 rodas34::c63 = -0.3152159432874371e2,
67 rodas34::c64 = 0.1631930543123136e2,
68 rodas34::c65 = -0.6058818238834054e1,
69 rodas34::gamma = 0.25;
113 resizeField(pivotIndices_);
134 odes_.jacobian(x0,
y0, li, dfdx_, dfdy_);
136 for (
label i=0; i<n_; i++)
138 for (
label j=0; j<n_; j++)
140 a_(i, j) = -dfdy_(i, j);
143 a_(i, i) += 1.0/(gamma*dx);
151 k1_[i] = dydx0[i] + dx*d1*dfdx_[i];
159 y[i] =
y0[i] + a21*k1_[i];
162 odes_.derivatives(x0 +
c2*dx,
y, li, dydx_);
166 k2_[i] = dydx_[i] + dx*d2*dfdx_[i] + c21*k1_[i]/dx;
174 y[i] =
y0[i] + a31*k1_[i] + a32*k2_[i];
177 odes_.derivatives(x0 + c3*dx,
y, li, dydx_);
181 k3_[i] = dydx_[i] + dx*d3*dfdx_[i] + (c31*k1_[i] + c32*k2_[i])/dx;
189 y[i] =
y0[i] + a41*k1_[i] + a42*k2_[i] + a43*k3_[i];
192 odes_.derivatives(x0 + c4*dx,
y, li, dydx_);
196 k4_[i] = dydx_[i] + dx*d4*dfdx_[i]
197 + (c41*k1_[i] + c42*k2_[i] + c43*k3_[i])/dx;
205 dy_[i] = a51*k1_[i] + a52*k2_[i] + a53*k3_[i] + a54*k4_[i];
206 y[i] =
y0[i] + dy_[i];
209 odes_.derivatives(x0 + dx,
y, li, dydx_);
214 + (c51*k1_[i] + c52*k2_[i] + c53*k3_[i] + c54*k4_[i])/dx;
223 y[i] =
y0[i] + dy_[i];
226 odes_.derivatives(x0 + dx,
y, li, dydx_);
231 + (c61*k1_[i] + c62*k2_[i] + c63*k3_[i] + c64*k4_[i] + c65*k5_[i])/dx;
238 y[i] =
y0[i] + dy_[i] + err_[i];
241 return normaliseError(
y0,
y, err_);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Abstract base-class for ODE system solvers.
virtual bool resize()=0
Resize the ODE solver.
Abstract base class for the systems of ordinary differential equations.
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.
bool resize(const label n)
Resize the ODE solver.
A list of keyword definitions, which are a keyword followed by any number of values (e....
An ODE solver for chemistry.
L-stable, stiffly-accurate embedded Rosenbrock ODE solver of order (3)4.
rodas34(const ODESystem &ode, const dictionary &dict)
Construct from ODESystem.
virtual bool resize()
Resize the ODE solver.
virtual void solve(scalar &x, scalarField &y, const label li, scalar &dxTry) const
Inherit solve from ODESolver.
const dimensionedScalar c2
Second radiation constant: default SI units: [m K].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
dimensionedScalar y0(const dimensionedScalar &ds)
void LUBacksubstitute(const scalarSquareMatrix &luMmatrix, const labelList &pivotIndices, List< Type > &source)
LU back-substitution with given source, returning the solution.
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
defineTypeNameAndDebug(combustionModel, 0)