Go to the documentation of this file.
41 rodas23::d1 = 1.0/2.0,
42 rodas23::d2 = 3.0/2.0,
50 rodas23::c43 = -8.0/3.0,
51 rodas23::gamma = 1.0/2.0;
109 odes_.jacobian(x0,
y0, dfdx_, dfdy_);
111 for (label i=0; i<n_; i++)
113 for (label j=0; j<n_; j++)
115 a_(i, j) = -dfdy_(i, j);
118 a_(i, i) += 1.0/(
gamma*dx);
126 k1_[i] = dydx0[i] + dx*d1*dfdx_[i];
134 k2_[i] = dydx0[i] + dx*d2*dfdx_[i] + c21*k1_[i]/dx;
143 y[i] =
y0[i] + dy_[i];
146 odes_.derivatives(x0 + dx,
y, dydx_);
150 k3_[i] = dydx_[i] + (c31*k1_[i] + c32*k2_[i])/dx;
159 y[i] =
y0[i] + dy_[i];
162 odes_.derivatives(x0 + dx,
y, dydx_);
166 err_[i] = dydx_[i] + (c41*k1_[i] + c42*k2_[i] + c43*k3_[i])/dx;
173 y[i] =
y0[i] + dy_[i] + err_[i];
176 return normalizeError(
y0,
y, err_);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Abstract base-class for ODE system solvers.
virtual scalar solve(const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const =0
rodas23(const ODESystem &ode, const dictionary &dict)
Generic templated field type.
dimensionedScalar y0(const dimensionedScalar &ds)
An ODE solver for chemistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static void resizeField(UList< Type > &f, const label n)
Macros for easy insertion into run-time selection tables.
void LUBacksubstitute(const scalarSquareMatrix &luMmatrix, const labelList &pivotIndices, List< Type > &source)
virtual scalar solve(const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
void resizeMatrix(scalarSquareMatrix &m) const
Abstract base class for the systems of ordinary differential equations.
bool resize(const label n)
defineTypeNameAndDebug(combustionModel, 0)