A base class for upscaling. More...

#include <UpscalerBase.hpp>

Inheritance diagram for Opm::UpscalerBase< Traits >:
Inheritance graph

Public Types

enum  { Dimension = GridType::dimension }
 
enum  BoundaryConditionType { Fixed = 0, Linear = 1, Periodic = 2 }
 
typedef Dune::CpGrid GridType
 
typedef GridInterfaceEuler
< GridType
GridInterface
 
typedef Traits::template
ResProp< Dimension >::Type 
ResProp
 
typedef ResProp::MutablePermTensor permtensor_t
 A type for the upscaled permeability. More...
 

Public Member Functions

 UpscalerBase ()
 Default constructor. More...
 
virtual ~UpscalerBase ()
 
void init (const Opm::parameter::ParameterGroup &param)
 Initializes the upscaler from parameters. More...
 
void init (Opm::DeckConstPtr deck, BoundaryConditionType bctype, double perm_threshold, double residual_tolerance=1e-8, int linsolver_verbosity=0, int linsolver_type=3, bool twodim_hack=false, int linsolver_maxit=0, double linsolver_prolongate_factor=1.0, int linsolver_smooth_steps=1)
 Initializes the upscaler from given arguments. More...
 
const GridTypegrid () const
 Access the grid. More...
 
void setBoundaryConditionType (BoundaryConditionType type)
 
void setPermeability (const int cell_index, const permtensor_t &k)
 
permtensor_t upscaleSinglePhase ()
 
double upscalePorosity () const
 
double upscaleNetPorosity () const
 
double upscaleNTG () const
 
double upscaleSWCR (const bool NTG) const
 
double upscaleSOWCR (const bool NTG) const
 

Protected Types

typedef GridInterface::CellIterator CellIter
 
typedef CellIter::FaceIterator FaceIter
 
typedef
BasicBoundaryConditions< true,
true > 
BCs
 
typedef Traits::template
FlowSolver< GridInterface, BCs >
::Type 
FlowSolver
 

Protected Member Functions

template<class FlowSol >
double computeAverageVelocity (const FlowSol &flow_solution, const int flow_dir, const int pdrop_dir) const
 
double computeDelta (const int flow_dir) const
 
template<class FluidInterface >
permtensor_t upscaleEffectivePerm (const FluidInterface &fluid)
 
virtual void initImpl (const Opm::parameter::ParameterGroup &param)
 
virtual void initFinal (const Opm::parameter::ParameterGroup &param)
 

Protected Attributes

BoundaryConditionType bctype_
 
bool twodim_hack_
 
double residual_tolerance_
 
int linsolver_maxit_
 
double linsolver_prolongate_factor_
 
int linsolver_verbosity_
 
int linsolver_type_
 
int linsolver_smooth_steps_
 
GridType grid_
 
GridInterface ginterf_
 
ResProp res_prop_
 
BCs bcond_
 
FlowSolver flow_solver_
 

Detailed Description

template<class Traits>
class Opm::UpscalerBase< Traits >

A base class for upscaling.

Author
Atgeirr F. Rasmussen atgei.nosp@m.rr@s.nosp@m.intef.nosp@m..no

Member Typedef Documentation

template<class Traits>
typedef BasicBoundaryConditions<true, true> Opm::UpscalerBase< Traits >::BCs
protected
template<class Traits>
typedef GridInterface::CellIterator Opm::UpscalerBase< Traits >::CellIter
protected
template<class Traits>
typedef CellIter::FaceIterator Opm::UpscalerBase< Traits >::FaceIter
protected
template<class Traits>
typedef Traits::template FlowSolver<GridInterface, BCs>::Type Opm::UpscalerBase< Traits >::FlowSolver
protected
template<class Traits>
typedef GridInterfaceEuler<GridType> Opm::UpscalerBase< Traits >::GridInterface
template<class Traits>
typedef Dune::CpGrid Opm::UpscalerBase< Traits >::GridType
template<class Traits>
typedef ResProp::MutablePermTensor Opm::UpscalerBase< Traits >::permtensor_t

A type for the upscaled permeability.

template<class Traits>
typedef Traits::template ResProp<Dimension>::Type Opm::UpscalerBase< Traits >::ResProp

Member Enumeration Documentation

template<class Traits>
anonymous enum
Enumerator
Dimension 
template<class Traits>
enum Opm::UpscalerBase::BoundaryConditionType
Enumerator
Fixed 
Linear 
Periodic 

Constructor & Destructor Documentation

template<class Traits >
Opm::UpscalerBase< Traits >::UpscalerBase ( )
inline

Default constructor.

template<class Traits>
virtual Opm::UpscalerBase< Traits >::~UpscalerBase ( )
inlinevirtual

Member Function Documentation

template<class Traits >
template<class FlowSol >
double Opm::UpscalerBase< Traits >::computeAverageVelocity ( const FlowSol &  flow_solution,
const int  flow_dir,
const int  pdrop_dir 
) const
protected
template<class Traits >
double Opm::UpscalerBase< Traits >::computeDelta ( const int  flow_dir) const
inlineprotected
template<class Traits >
const UpscalerBase< Traits >::GridType & Opm::UpscalerBase< Traits >::grid ( ) const
inline

Access the grid.

template<class Traits >
void Opm::UpscalerBase< Traits >::init ( const Opm::parameter::ParameterGroup &  param)
inline

Initializes the upscaler from parameters.

Referenced by Opm::SteadyStateUpscalerManager< Traits >::upscale().

template<class Traits >
void Opm::UpscalerBase< Traits >::init ( Opm::DeckConstPtr  deck,
BoundaryConditionType  bctype,
double  perm_threshold,
double  residual_tolerance = 1e-8,
int  linsolver_verbosity = 0,
int  linsolver_type = 3,
bool  twodim_hack = false,
int  linsolver_maxit = 0,
double  linsolver_prolongate_factor = 1.0,
int  linsolver_smooth_steps = 1 
)
inline

Initializes the upscaler from given arguments.

template<class Traits >
void Opm::UpscalerBase< Traits >::initFinal ( const Opm::parameter::ParameterGroup &  param)
inlineprotectedvirtual
template<class Traits >
void Opm::UpscalerBase< Traits >::initImpl ( const Opm::parameter::ParameterGroup &  param)
inlineprotectedvirtual
template<class Traits >
void Opm::UpscalerBase< Traits >::setBoundaryConditionType ( BoundaryConditionType  type)
inline

Set boundary condition type. This may not be used to swicth between Periodic and the other types, since the grid is modified for Periodic conditions.

template<class Traits >
void Opm::UpscalerBase< Traits >::setPermeability ( const int  cell_index,
const permtensor_t k 
)
inline

Set the permeability of a cell directly. This will override the permeability that was read from the eclipse file.

template<class Traits >
template<class FluidInterface >
UpscalerBase< Traits >::permtensor_t Opm::UpscalerBase< Traits >::upscaleEffectivePerm ( const FluidInterface &  fluid)
inlineprotected
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleNetPorosity ( ) const

Compute upscaled net porosity.

Returns
total pore volume (with NTG) of all cells divided by total volume.
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleNTG ( ) const

Compute upscaled NTG.

Returns
total net of all cells divided by total volume.
template<class Traits >
double Opm::UpscalerBase< Traits >::upscalePorosity ( ) const

Compute upscaled porosity.

Returns
total pore volume of all cells divided by total volume.
template<class Traits >
UpscalerBase< Traits >::permtensor_t Opm::UpscalerBase< Traits >::upscaleSinglePhase ( )
inline

Does a single-phase upscaling.

Returns
an upscaled permeability tensor.
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleSOWCR ( const bool  NTG) const

Compute upscaled SOWCR.

Returns
total irreducible oil volume divided by total pore volume
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleSWCR ( const bool  NTG) const

Compute upscaled SWCR.

Returns
total irreducible water volume divided by total pore volume

Member Data Documentation

template<class Traits>
BCs Opm::UpscalerBase< Traits >::bcond_
protected
template<class Traits>
BoundaryConditionType Opm::UpscalerBase< Traits >::bctype_
protected
template<class Traits>
FlowSolver Opm::UpscalerBase< Traits >::flow_solver_
protected
template<class Traits>
GridInterface Opm::UpscalerBase< Traits >::ginterf_
protected
template<class Traits>
GridType Opm::UpscalerBase< Traits >::grid_
protected
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_maxit_
protected
template<class Traits>
double Opm::UpscalerBase< Traits >::linsolver_prolongate_factor_
protected
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_smooth_steps_
protected
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_type_
protected
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_verbosity_
protected
template<class Traits>
ResProp Opm::UpscalerBase< Traits >::res_prop_
protected
template<class Traits>
double Opm::UpscalerBase< Traits >::residual_tolerance_
protected
template<class Traits>
bool Opm::UpscalerBase< Traits >::twodim_hack_
protected

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