Opm::RelPermUpscaleHelper Class Reference

Helper class for relperm upscaling applications. More...

#include <RelPermUtils.hpp>

Public Member Functions

 RelPermUpscaleHelper (int mpi_rank, std::map< std::string, std::string > &options_)
 Default constructor. More...
 
void collectResults ()
 Collect results from all MPI nodes. More...
 
std::vector< std::vector
< double > > 
getRelPerm (int phase) const
 Calculate relperm values from phase permeabilities. More...
 
void upscaleSinglePhasePermeability ()
 Upscale single phase permeability. More...
 
void sanityCheckInput (Opm::DeckConstPtr deck, double minPerm, double maxPerm, double minPoro)
 Do sanity checks for input file. More...
 
void checkCriticalSaturations ()
 Check that input relperm curevs specify critical saturations. More...
 
void setupBoundaryConditions ()
 Setup requested boundary conditions. More...
 
double tesselateGrid (Opm::DeckConstPtr deck)
 Tesselate grid. More...
 
void calculateCellPressureGradients (const std::array< int, 3 > &res)
 Find cell center pressure gradient for every cell. More...
 
void calculateMinMaxCapillaryPressure ()
 Calculate minimum and maximum capillary pressures. More...
 
void upscaleCapillaryPressure ()
 Upscale capillary pressure. More...
 
std::tuple< double, double > upscalePermeability (int mpi_rank)
 Upscale permeabilities. More...
 

Public Attributes

bool isMaster
 Whether this is the master MPI node or not. More...
 
bool doEclipseCheck
 Whether to check that input relperm curves include relperm at critical saturation points. More...
 
bool anisotropic_input
 Whether input eclipse file has diagonal anisotrophy. More...
 
int points
 Number of saturation points to upscale for. More...
 
int tensorElementCount
 Number of independent elements in resulting tensor. More...
 
bool upscaleBothPhases
 Whether to upscale both phases. More...
 
std::vector< double > WaterSaturation
 Re-upscaled water saturation for the computed pressure points. More...
 
SinglePhaseUpscaler::permtensor_t permTensor
 Tensor of upscaled results. More...
 
std::vector< int > satnums
 Cell satnums. More...
 
std::vector
< MonotCubicInterpolator > 
InvJfunctions
 
std::array< std::array
< std::vector
< MonotCubicInterpolator >, 2 >, 3 > 
Krfunctions
 Relperm-curves for each (component->phase->stone type) More...
 
SinglePhaseUpscaler::BoundaryConditionType boundaryCondition
 Boundary conditions to use. More...
 
std::vector
< MonotCubicInterpolator > 
SwPcfunctions
 Holds Sw(Pc) for each rocktype. More...
 
std::string saturationstring
 Fluid system type. More...
 
size_t tesselatedCells
 Number of "active" cells (Sintef interpretation of "active") More...
 
double volume
 Total volume. More...
 
double poreVolume
 Total pore volume. More...
 
std::vector< double > pressurePoints
 Vector of capillary pressure points between Swor and Swir. More...
 

Detailed Description

Helper class for relperm upscaling applications.

Constructor & Destructor Documentation

Opm::RelPermUpscaleHelper::RelPermUpscaleHelper ( int  mpi_rank,
std::map< std::string, std::string > &  options_ 
)

Default constructor.

Parameters
[in]mpi_rankRank of this process (for parallel simulations).
[in]optionsOptions structure.

Uses the following options: fluids

Member Function Documentation

void Opm::RelPermUpscaleHelper::calculateCellPressureGradients ( const std::array< int, 3 > &  res)

Find cell center pressure gradient for every cell.

Parameters
[in]resThe number of cells in each direction.

Uses the following options: gravity, waterDensity, oilDensity

void Opm::RelPermUpscaleHelper::calculateMinMaxCapillaryPressure ( )

Calculate minimum and maximum capillary pressures.

Uses the following options: maxPermContrast, minPerm, gravity, linsolver_tolerance

void Opm::RelPermUpscaleHelper::checkCriticalSaturations ( )

Check that input relperm curevs specify critical saturations.

void Opm::RelPermUpscaleHelper::collectResults ( )

Collect results from all MPI nodes.

std::vector<std::vector<double> > Opm::RelPermUpscaleHelper::getRelPerm ( int  phase) const

Calculate relperm values from phase permeabilities.

Parameters
[in]phaseThe phase to calculate values for (0-indexed).
Returns
The phase permeability tensor values.

First index is voigt index, second index is pressure point.

void Opm::RelPermUpscaleHelper::sanityCheckInput ( Opm::DeckConstPtr  deck,
double  minPerm,
double  maxPerm,
double  minPoro 
)

Do sanity checks for input file.

Parameters
[in]deckThe deck to sanity check.
[in]minPermMinimum permeability.
[in]maxPermMaximum permeability.
[in]minPoroMinimum porosity.

Throws error string.

void Opm::RelPermUpscaleHelper::setupBoundaryConditions ( )

Setup requested boundary conditions.

Uses the following options: bc

double Opm::RelPermUpscaleHelper::tesselateGrid ( Opm::DeckConstPtr  deck)

Tesselate grid.

Parameters
[in]deckThe grid to tesselate.
[in]optionsOption structure.

Uses the following options: linsolver_tolerance, linsolver_verbosity, linsolver_type, linsolver_max_iterations, linsolver_smooth_steps, linsolver_prolongate_factor, minPerm

Returns
Time used for tesselation.
void Opm::RelPermUpscaleHelper::upscaleCapillaryPressure ( )

Upscale capillary pressure.

Uses the following options: saturationThreshold

std::tuple<double,double> Opm::RelPermUpscaleHelper::upscalePermeability ( int  mpi_rank)

Upscale permeabilities.

Parameters
[in]mpi_rankMPI rank of this process.

Uses the following options: minPerm, maxPermContrast

Returns
Tuple with (total time, time per point).
void Opm::RelPermUpscaleHelper::upscaleSinglePhasePermeability ( )

Upscale single phase permeability.

Member Data Documentation

bool Opm::RelPermUpscaleHelper::anisotropic_input

Whether input eclipse file has diagonal anisotrophy.

SinglePhaseUpscaler::BoundaryConditionType Opm::RelPermUpscaleHelper::boundaryCondition

Boundary conditions to use.

bool Opm::RelPermUpscaleHelper::doEclipseCheck

Whether to check that input relperm curves include relperm at critical saturation points.

std::vector<MonotCubicInterpolator> Opm::RelPermUpscaleHelper::InvJfunctions

Inverse of the loaded J-functions.

bool Opm::RelPermUpscaleHelper::isMaster

Whether this is the master MPI node or not.

std::array<std::array<std::vector<MonotCubicInterpolator>,2>,3> Opm::RelPermUpscaleHelper::Krfunctions

Relperm-curves for each (component->phase->stone type)

SinglePhaseUpscaler::permtensor_t Opm::RelPermUpscaleHelper::permTensor

Tensor of upscaled results.

int Opm::RelPermUpscaleHelper::points

Number of saturation points to upscale for.

double Opm::RelPermUpscaleHelper::poreVolume

Total pore volume.

std::vector<double> Opm::RelPermUpscaleHelper::pressurePoints

Vector of capillary pressure points between Swor and Swir.

std::vector<int> Opm::RelPermUpscaleHelper::satnums

Cell satnums.

std::string Opm::RelPermUpscaleHelper::saturationstring

Fluid system type.

std::vector<MonotCubicInterpolator> Opm::RelPermUpscaleHelper::SwPcfunctions

Holds Sw(Pc) for each rocktype.

int Opm::RelPermUpscaleHelper::tensorElementCount

Number of independent elements in resulting tensor.

size_t Opm::RelPermUpscaleHelper::tesselatedCells

Number of "active" cells (Sintef interpretation of "active")

bool Opm::RelPermUpscaleHelper::upscaleBothPhases

Whether to upscale both phases.

double Opm::RelPermUpscaleHelper::volume

Total volume.

std::vector<double> Opm::RelPermUpscaleHelper::WaterSaturation

Re-upscaled water saturation for the computed pressure points.


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