Simulator state for a blackoil simulator. More...

#include <BlackoilState.hpp>

Inheritance diagram for Opm::BlackoilState:
Inheritance graph

Public Types

enum  ExtremalSat { MinSat, MaxSat }
 

Public Member Functions

virtual void init (const UnstructuredGrid &grid, int num_phases)
 
virtual void init (int number_of_cells, int number_of_faces, int num_phases)
 
void setFirstSat (const std::vector< int > &cells, const Opm::BlackoilPropertiesInterface &props, ExtremalSat es)
 
virtual bool equals (const SimulatorState &other, double epsilon=1e-8) const
 
std::vector< double > & surfacevol ()
 
std::vector< double > & gasoilratio ()
 
std::vector< double > & rv ()
 
const std::vector< double > & surfacevol () const
 
const std::vector< double > & gasoilratio () const
 
const std::vector< double > & rv () const
 
int numPhases () const
 
int numCells () const
 
int numFaces () const
 
std::vector< double > & pressure ()
 
const std::vector< double > & pressure () const
 
std::vector< double > & temperature ()
 
const std::vector< double > & temperature () const
 
std::vector< double > & facepressure ()
 
const std::vector< double > & facepressure () const
 
std::vector< double > & faceflux ()
 
const std::vector< double > & faceflux () const
 
std::vector< double > & saturation ()
 
const std::vector< double > & saturation () const
 
std::vector< std::vector
< double > > & 
cellData ()
 
const std::vector< std::vector
< double > > & 
cellData () const
 
std::vector< std::vector
< double > > & 
faceData ()
 
const std::vector< std::vector
< double > > & 
faceData () const
 
const std::vector< std::string > & cellDataNames () const
 
const std::vector< std::string > & faceDataNames () const
 
size_t registerCellData (const std::string &name, const int components, const double initialValue=0.0)
 
size_t registerFaceData (const std::string &name, const int components, const double initialValue=0.0)
 

Protected Member Functions

template<typename Props >
void setFirstSat (const std::vector< int > &cells, const Props &props, ExtremalSat es)
 

Static Protected Member Functions

static bool vectorApproxEqual (const std::vector< double > &v1, const std::vector< double > &v2, double epsilon)
 

Static Protected Attributes

static const int pressureId_ = 0
 pressure per cell. More...
 
static const int temperatureId_ = 1
 temperature per cell. More...
 
static const int saturationId_ = 2
 The saturation of each phase per cell. More...
 
static const int facePressureId_ = 0
 pressure per face. More...
 
static const int faceFluxId_ = 1
 The fluxes at the faces. More...
 

Detailed Description

Simulator state for a blackoil simulator.

Member Enumeration Documentation

Enumerator
MinSat 
MaxSat 

Member Function Documentation

std::vector< std::vector<double> >& Opm::SimulatorState::cellData ( )
inlineinherited

Referenced by gasoilratio(), rv(), and surfacevol().

const std::vector< std::vector<double> >& Opm::SimulatorState::cellData ( ) const
inlineinherited
const std::vector< std::string >& Opm::SimulatorState::cellDataNames ( ) const
inlineinherited
virtual bool Opm::BlackoilState::equals ( const SimulatorState other,
double  epsilon = 1e-8 
) const
virtual

Compare this state with another, to see if they are different only within a small margin.

Reimplemented from Opm::SimulatorState.

std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( )
inlineinherited
const std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( ) const
inlineinherited
const std::vector< std::string >& Opm::SimulatorState::faceDataNames ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::faceflux ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::faceflux ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::facepressure ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::facepressure ( ) const
inlineinherited
std::vector<double>& Opm::BlackoilState::gasoilratio ( )
inline
const std::vector<double>& Opm::BlackoilState::gasoilratio ( ) const
inline
virtual void Opm::BlackoilState::init ( const UnstructuredGrid grid,
int  num_phases 
)
virtual

Reimplemented from Opm::SimulatorState.

virtual void Opm::BlackoilState::init ( int  number_of_cells,
int  number_of_faces,
int  num_phases 
)
virtual

Reimplemented from Opm::SimulatorState.

int Opm::SimulatorState::numCells ( ) const
inlineinherited
int Opm::SimulatorState::numFaces ( ) const
inlineinherited
int Opm::SimulatorState::numPhases ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::pressure ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::pressure ( ) const
inlineinherited
size_t Opm::SimulatorState::registerCellData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
inherited
size_t Opm::SimulatorState::registerFaceData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
inherited
std::vector<double>& Opm::BlackoilState::rv ( )
inline
const std::vector<double>& Opm::BlackoilState::rv ( ) const
inline
std::vector<double>& Opm::SimulatorState::saturation ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::saturation ( ) const
inlineinherited
void Opm::BlackoilState::setFirstSat ( const std::vector< int > &  cells,
const Opm::BlackoilPropertiesInterface props,
ExtremalSat  es 
)

Set the first saturation to either its min or max value in the indicated cells. The second saturation value s2 is set to (1.0 - s1) for each cell. Any further saturation values are unchanged.

template<typename Props >
void Opm::SimulatorState::setFirstSat ( const std::vector< int > &  cells,
const Props &  props,
ExtremalSat  es 
)
protectedinherited

Initialize the first saturation to maximum value. This method should be considered deprecated. Avoid to use it!

Template Parameters
PropsFluid and rock properties that pertain to this kind of simulation. Currently, only Blackoil- and IncompPropertiesInterface are supported.

Referenced by Opm::TwophaseState::setFirstSat().

std::vector<double>& Opm::BlackoilState::surfacevol ( )
inline
const std::vector<double>& Opm::BlackoilState::surfacevol ( ) const
inline
std::vector<double>& Opm::SimulatorState::temperature ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::temperature ( ) const
inlineinherited
static bool Opm::SimulatorState::vectorApproxEqual ( const std::vector< double > &  v1,
const std::vector< double > &  v2,
double  epsilon 
)
staticprotectedinherited

Check if two vectors are equal within a margin.

Parameters
epsilonRelative difference that is tolerated for the vectors to still be considered equal.
Returns
True if every element is within the margin, false if there is at least one that is not.

Member Data Documentation

const int Opm::SimulatorState::faceFluxId_ = 1
staticprotectedinherited

The fluxes at the faces.

Referenced by Opm::SimulatorState::faceflux().

const int Opm::SimulatorState::facePressureId_ = 0
staticprotectedinherited

pressure per face.

Referenced by Opm::SimulatorState::facepressure().

const int Opm::SimulatorState::pressureId_ = 0
staticprotectedinherited

pressure per cell.

Referenced by Opm::SimulatorState::pressure().

const int Opm::SimulatorState::saturationId_ = 2
staticprotectedinherited

The saturation of each phase per cell.

Referenced by Opm::SimulatorState::saturation().

const int Opm::SimulatorState::temperatureId_ = 1
staticprotectedinherited

temperature per cell.

Referenced by Opm::SimulatorState::temperature().


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