Go to the documentation of this file.
78 odes_.jacobian(x0,
y0, dfdx_, dfdy_);
80 for (
label i=0; i<n_; i++)
82 for (
label j=0; j<n_; j++)
84 a_[i][j] = -dfdy_[i][j];
87 a_[i][i] += 1.0/(gamma*dx);
95 k1_[i] = dydx0[i] + dx*d1*dfdx_[i];
103 y[i] =
y0[i] + a21*k1_[i];
106 odes_.derivatives(x0 +
c2*dx,
y, dydx_);
110 k2_[i] = dydx_[i] + dx*d2*dfdx_[i] + c21*k1_[i]/dx;
118 y[i] =
y0[i] + b1*k1_[i] + b2*k2_[i];
119 err_[i] = e1*k1_[i] + e2*k2_[i];
122 return normalizeError(
y0,
y, err_);
Abstract base-class for ODE system solvers.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Rosenbrock12(const ODESystem &ode, const dictionary &dict)
Construct from ODE.
virtual scalar solve(const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const =0
Solve a single step dx and return the error.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
dimensionedScalar y0(const dimensionedScalar &ds)
An ODE solver for chemistry.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
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.
Abstract base class for the systems of ordinary differential equations.
dimensionedScalar sqrt(const dimensionedScalar &ds)
static const scalar gamma
scalar solve(const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const
Solve a single step dx and return the error.
defineTypeNameAndDebug(combustionModel, 0)