opm-upscaling
Loading...
Searching...
No Matches
Opm::UpscalerBase< Traits > Class Template Reference

A base class for upscaling. More...

#include <UpscalerBase.hpp>

Inheritance diagram for Opm::UpscalerBase< Traits >:
Opm::SteadyStateUpscaler< Traits > Opm::SteadyStateUpscalerImplicit< Traits >

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.

Public Member Functions

 UpscalerBase ()
 Default constructor.
void init (const Opm::ParameterGroup &param)
 Initializes the upscaler from parameters.
void init (const Opm::Deck &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, const double gravity=0.0)
 Initializes the upscaler from given arguments.
const GridType & grid () const
 Access the grid.
void setBoundaryConditionType (BoundaryConditionType type)
 Set boundary condition type.
void setPermeability (const int cell_index, const permtensor_t &k)
 Set the permeability of a cell directly.
permtensor_t upscaleSinglePhase ()
 Does a single-phase upscaling.
double upscalePorosity () const
 Compute upscaled porosity.
double upscaleNetPorosity () const
 Compute upscaled net porosity.
double upscaleNTG () const
 Compute upscaled NTG.
double upscaleSWCR (const bool NTG) const
 Compute upscaled SWCR.
double upscaleSOWCR (const bool NTG) const
 Compute upscaled SOWCR.

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::ParameterGroup &param)
virtual void initFinal (const Opm::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_
double gravity_
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 Function Documentation

◆ initImpl()

template<class Traits>
void Opm::UpscalerBase< Traits >::initImpl ( const Opm::ParameterGroup & param)
inlineprotectedvirtual

◆ setBoundaryConditionType()

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.

◆ setPermeability()

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.

◆ upscaleNetPorosity()

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.

◆ upscaleNTG()

template<class Traits>
double Opm::UpscalerBase< Traits >::upscaleNTG ( ) const

Compute upscaled NTG.

Returns
total net of all cells divided by total volume.

◆ upscalePorosity()

template<class Traits>
double Opm::UpscalerBase< Traits >::upscalePorosity ( ) const

Compute upscaled porosity.

Returns
total pore volume of all cells divided by total volume.

◆ upscaleSinglePhase()

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

Does a single-phase upscaling.

Returns
an upscaled permeability tensor.

◆ upscaleSOWCR()

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

◆ upscaleSWCR()

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

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