Encapsulating a tpfa pressure solver for the compressible-fluid case with polymer. More...
#include <CompressibleTpfaPolymer.hpp>
Public Member Functions | |
CompressibleTpfaPolymer (const UnstructuredGrid &grid, const BlackoilPropertiesInterface &props, const RockCompressibility *rock_comp_props, const PolymerProperties &poly_props, const LinearSolverInterface &linsolver, const double residual_tol, const double change_tol, const int maxiter, const double *gravity, const Wells *wells) | |
Construct solver, possibly with rock compressibility. More... | |
void | solve (const double dt, PolymerBlackoilState &state, WellState &well_state) |
Solve the pressure equation. More... | |
Encapsulating a tpfa pressure solver for the compressible-fluid case with polymer.
Supports gravity, wells controlled by bhp or reservoir rates, boundary conditions and simple sources as driving forces. Below we use the shortcuts D for the number of dimensions, N for the number of cells and F for the number of faces.
Opm::CompressibleTpfaPolymer::CompressibleTpfaPolymer | ( | const UnstructuredGrid & | grid, |
const BlackoilPropertiesInterface & | props, | ||
const RockCompressibility * | rock_comp_props, | ||
const PolymerProperties & | poly_props, | ||
const LinearSolverInterface & | linsolver, | ||
const double | residual_tol, | ||
const double | change_tol, | ||
const int | maxiter, | ||
const double * | gravity, | ||
const Wells * | wells | ||
) |
Construct solver, possibly with rock compressibility.
Construct solver.
[in] | grid | A 2d or 3d grid. |
[in] | props | Rock and fluid properties. |
[in] | rock_comp_props | Rock compressibility properties. May be null. |
[in] | poly_props | Polymer properties. |
[in] | linsolver | Linear solver to use. |
[in] | residual_tol | Solution accepted if inf-norm of residual is smaller. |
[in] | change_tol | Solution accepted if inf-norm of change in pressure is smaller. |
[in] | maxiter | Maximum acceptable number of iterations. |
[in] | gravity | Gravity vector. If non-null, the array should have D elements. |
[in] | wells | The wells argument. Will be used in solution, is ignored if NULL. Note: this class observes the well object, and makes the assumption that the well topology and completions does not change during the run. However, controls (only) are allowed to change. |
[in] | grid | A 2d or 3d grid. |
[in] | props | Rock and fluid properties. |
[in] | linsolver | Linear solver to use. |
[in] | residual_tol | Solution accepted if inf-norm of residual is smaller. |
[in] | change_tol | Solution accepted if inf-norm of change in pressure is smaller. |
[in] | maxiter | Maximum acceptable number of iterations. |
[in] | gravity | Gravity vector. If non-null, the array should have D elements. |
[in] | wells | The wells argument. Will be used in solution, is ignored if NULL. Note: this class observes the well object, and makes the assumption that the well topology and completions does not change during the run. However, controls (only) are allowed to change. |
void Opm::CompressibleTpfaPolymer::solve | ( | const double | dt, |
PolymerBlackoilState & | state, | ||
WellState & | well_state | ||
) |
Solve the pressure equation.
The nonlinear equations ares solved by a Newton-Raphson scheme. May throw an exception if the number of iterations exceed maxiter (set in constructor).