Implements a reordering transport solver for incompressible two-phase flow. More...
#include <TransportSolverTwophaseReorder.hpp>
Classes | |
struct | GravityResidual |
struct | Residual |
Public Member Functions | |
TransportSolverTwophaseReorder (const UnstructuredGrid &grid, const Opm::IncompPropertiesInterface &props, const double *gravity, const double tol, const int maxit) | |
Construct solver. More... | |
virtual void | solve (const double *porevolume, const double *source, const double dt, TwophaseState &state) |
Solve for saturation at next timestep. More... | |
void | solveGravity (const double *porevolume, const double dt, TwophaseState &state) |
Solve for gravity segregation. More... | |
const std::vector< int > & | getReorderIterations () const |
![]() | |
virtual | ~TransportSolverTwophaseInterface () |
Virtual destructor to enable inheritance. | |
Implements a reordering transport solver for incompressible two-phase flow.
Opm::TransportSolverTwophaseReorder::TransportSolverTwophaseReorder | ( | const UnstructuredGrid & | grid, |
const Opm::IncompPropertiesInterface & | props, | ||
const double * | gravity, | ||
const double | tol, | ||
const int | maxit | ||
) |
Construct solver.
[in] | grid | A 2d or 3d grid. |
[in] | props | Rock and fluid properties. |
[in] | gravity | Gravity vector (null for no gravity). |
[in] | tol | Tolerance used in the solver. |
[in] | maxit | Maximum number of non-linear iterations used. |
|
virtual |
Solve for saturation at next timestep.
Note that this only performs advection by total velocity, and no gravity segregation.
[in] | porevolume | Array of pore volumes. |
[in] | source | Transport source term. For interpretation see Opm::computeTransportSource(). |
[in] | dt | Time step. |
[in,out] | state | Reservoir state. Calling solve() will read state.faceflux() and read and write state.saturation(). |
Implements Opm::TransportSolverTwophaseInterface.
void Opm::TransportSolverTwophaseReorder::solveGravity | ( | const double * | porevolume, |
const double | dt, | ||
TwophaseState & | state | ||
) |
Solve for gravity segregation.
This uses a column-wise nonlinear Gauss-Seidel approach. It assumes that the grid can be divided into vertical columns that do not interact with each other (for gravity segregation).
[in] | porevolume | Array of pore volumes. |
[in] | dt | Time step. |
[in,out] | state | Reservoir state. Calling solveGravity() will read state.faceflux() and read and write state.saturation(). |