#include <CompressibleTpfa.hpp>

Public Member Functions

 CompressibleTpfa (const UnstructuredGrid &grid, const BlackoilPropertiesInterface &props, const RockCompressibility *rock_comp_props, const LinearSolverInterface &linsolver, const double residual_tol, const double change_tol, const int maxiter, const double *gravity, const Wells *wells)
 
virtual ~CompressibleTpfa ()
 Destructor. More...
 
void solve (const double dt, BlackoilState &state, WellState &well_state)
 
bool singularPressure () const
 After solve(), was the resulting pressure singular. Returns true if the pressure is singular in the following sense: if everything is incompressible and there are no pressure conditions, the absolute values of the pressure solution are arbitrary. (But the differences in pressure are significant.) More...
 

Protected Member Functions

void computeWellPotentials (const BlackoilState &state)
 

Protected Attributes

const UnstructuredGridgrid_
 
const BlackoilPropertiesInterfaceprops_
 
const RockCompressibilityrock_comp_props_
 
const LinearSolverInterfacelinsolver_
 
const double residual_tol_
 
const double change_tol_
 
const int maxiter_
 
const double * gravity_
 
const Wellswells_
 
std::vector< double > htrans_
 
std::vector< double > trans_
 
std::vector< int > allcells_
 
struct cfs_tpfa_res_datah_
 
std::vector< double > wellperf_wdp_
 
std::vector< double > initial_porevol_
 
std::vector< double > cell_A_
 
std::vector< double > cell_dA_
 
std::vector< double > cell_viscosity_
 
std::vector< double > cell_phasemob_
 
std::vector< double > cell_voldisc_
 
std::vector< double > face_A_
 
std::vector< double > face_phasemob_
 
std::vector< double > face_gravcap_
 
std::vector< double > wellperf_A_
 
std::vector< double > wellperf_phasemob_
 
std::vector< double > porevol_
 
std::vector< double > rock_comp_
 
std::vector< double > pressure_increment_
 
bool singular_
 

Detailed Description

Encapsulating a tpfa pressure solver for the compressible-fluid case. Supports gravity, wells 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.

Constructor & Destructor Documentation

Opm::CompressibleTpfa::CompressibleTpfa ( const UnstructuredGrid grid,
const BlackoilPropertiesInterface props,
const RockCompressibility rock_comp_props,
const LinearSolverInterface linsolver,
const double  residual_tol,
const double  change_tol,
const int  maxiter,
const double *  gravity,
const Wells wells 
)

Construct solver.

Parameters
[in]gridA 2d or 3d grid.
[in]propsRock and fluid properties.
[in]rock_comp_propsRock compressibility properties. May be null.
[in]linsolverLinear solver to use.
[in]residual_tolSolution accepted if inf-norm of residual is smaller.
[in]change_tolSolution accepted if inf-norm of change in pressure is smaller.
[in]maxiterMaximum acceptable number of iterations.
[in]gravityGravity vector. If non-null, the array should have D elements.
[in]wellsThe 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.
virtual Opm::CompressibleTpfa::~CompressibleTpfa ( )
virtual

Destructor.

Member Function Documentation

void Opm::CompressibleTpfa::computeWellPotentials ( const BlackoilState state)
protected
bool Opm::CompressibleTpfa::singularPressure ( ) const

After solve(), was the resulting pressure singular. Returns true if the pressure is singular in the following sense: if everything is incompressible and there are no pressure conditions, the absolute values of the pressure solution are arbitrary. (But the differences in pressure are significant.)

void Opm::CompressibleTpfa::solve ( const double  dt,
BlackoilState state,
WellState well_state 
)

Solve the pressure equation by Newton-Raphson scheme. May throw an exception if the number of iterations exceed maxiter (set in constructor).

Member Data Documentation

std::vector<int> Opm::CompressibleTpfa::allcells_
protected
std::vector<double> Opm::CompressibleTpfa::cell_A_
protected
std::vector<double> Opm::CompressibleTpfa::cell_dA_
protected
std::vector<double> Opm::CompressibleTpfa::cell_phasemob_
protected
std::vector<double> Opm::CompressibleTpfa::cell_viscosity_
protected
std::vector<double> Opm::CompressibleTpfa::cell_voldisc_
protected
const double Opm::CompressibleTpfa::change_tol_
protected
std::vector<double> Opm::CompressibleTpfa::face_A_
protected
std::vector<double> Opm::CompressibleTpfa::face_gravcap_
protected
std::vector<double> Opm::CompressibleTpfa::face_phasemob_
protected
const double* Opm::CompressibleTpfa::gravity_
protected
const UnstructuredGrid& Opm::CompressibleTpfa::grid_
protected
struct cfs_tpfa_res_data* Opm::CompressibleTpfa::h_
protected
std::vector<double> Opm::CompressibleTpfa::htrans_
protected
std::vector<double> Opm::CompressibleTpfa::initial_porevol_
protected
const LinearSolverInterface& Opm::CompressibleTpfa::linsolver_
protected
const int Opm::CompressibleTpfa::maxiter_
protected
std::vector<double> Opm::CompressibleTpfa::porevol_
protected
std::vector<double> Opm::CompressibleTpfa::pressure_increment_
protected
const BlackoilPropertiesInterface& Opm::CompressibleTpfa::props_
protected
const double Opm::CompressibleTpfa::residual_tol_
protected
std::vector<double> Opm::CompressibleTpfa::rock_comp_
protected
const RockCompressibility* Opm::CompressibleTpfa::rock_comp_props_
protected
bool Opm::CompressibleTpfa::singular_
protected
std::vector<double> Opm::CompressibleTpfa::trans_
protected
std::vector<double> Opm::CompressibleTpfa::wellperf_A_
protected
std::vector<double> Opm::CompressibleTpfa::wellperf_phasemob_
protected
std::vector<double> Opm::CompressibleTpfa::wellperf_wdp_
protected
const Wells* Opm::CompressibleTpfa::wells_
protected

The documentation for this class was generated from the following file: