Opm::SteadyStateUpscaler< Traits > Class Template Reference

A class for doing steady state upscaling. More...

#include <SteadyStateUpscaler.hpp>

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

Public Types

enum  { Dimension = UpscalerBase<Traits>::Dimension }
 
typedef UpscalerBase< Traits > Super
 
typedef Super::permtensor_t permtensor_t
 
typedef UpscalerBase< Traits >
::GridInterface 
GridInterface
 
enum  { Dimension = GridType::dimension }
 
enum  BoundaryConditionType { Fixed = 0, Linear = 1, Periodic = 2 }
 
typedef Dune::CpGrid GridType
 
typedef Traits::template
ResProp< Dimension >::Type 
ResProp
 

Public Member Functions

 SteadyStateUpscaler ()
 Default constructor. More...
 
std::pair< permtensor_t,
permtensor_t
upscaleSteadyState (const int flow_direction, const std::vector< double > &initial_saturation, const double boundary_saturation, const double pressure_drop, const permtensor_t &upscaled_perm)
 
const std::vector< double > & lastSaturationState () const
 
double lastSaturationUpscaled () const
 
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 Traits::template
TransportSolver< GridInterface,
typename Super::BCs >::Type 
TransportSolver
 
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 >
void computeInOutFlows (std::pair< double, double > &water_inout, std::pair< double, double > &oil_inout, const FlowSol &flow_solution, const std::vector< double > &saturations) const
 
virtual void initImpl (const Opm::parameter::ParameterGroup &param)
 Override from superclass. More...
 
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 initFinal (const Opm::parameter::ParameterGroup &param)
 

Protected Attributes

std::vector< double > last_saturation_state_
 
bool use_gravity_
 
bool output_vtk_
 
bool print_inoutflows_
 
int simulation_steps_
 
double stepsize_
 
double relperm_threshold_
 
double maximum_mobility_contrast_
 
double sat_change_threshold_
 
TransportSolver transport_solver_
 
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::SteadyStateUpscaler< Traits >

A class for doing steady state 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
protectedinherited
template<class Traits>
typedef GridInterface::CellIterator Opm::UpscalerBase< Traits >::CellIter
protectedinherited
template<class Traits>
typedef CellIter::FaceIterator Opm::UpscalerBase< Traits >::FaceIter
protectedinherited
template<class Traits>
typedef Traits::template FlowSolver<GridInterface, BCs>::Type Opm::UpscalerBase< Traits >::FlowSolver
protectedinherited
template<class Traits >
typedef UpscalerBase<Traits>::GridInterface Opm::SteadyStateUpscaler< Traits >::GridInterface
template<class Traits>
typedef Dune::CpGrid Opm::UpscalerBase< Traits >::GridType
inherited
template<class Traits >
typedef Super::permtensor_t Opm::SteadyStateUpscaler< Traits >::permtensor_t
template<class Traits>
typedef Traits::template ResProp<Dimension>::Type Opm::UpscalerBase< Traits >::ResProp
inherited
template<class Traits >
typedef UpscalerBase<Traits> Opm::SteadyStateUpscaler< Traits >::Super
template<class Traits >
typedef Traits::template TransportSolver<GridInterface, typename Super::BCs>::Type Opm::SteadyStateUpscaler< Traits >::TransportSolver
protected

Member Enumeration Documentation

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

Constructor & Destructor Documentation

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

Default constructor.

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
protectedinherited
template<class Traits >
double Opm::UpscalerBase< Traits >::computeDelta ( const int  flow_dir) const
inlineprotectedinherited
template<class Traits >
template<class FlowSol >
void Opm::SteadyStateUpscaler< Traits >::computeInOutFlows ( std::pair< double, double > &  water_inout,
std::pair< double, double > &  oil_inout,
const FlowSol &  flow_solution,
const std::vector< double > &  saturations 
) const
protected

References Opm::calc_frac_flow().

template<class Traits >
const UpscalerBase< Traits >::GridType & Opm::UpscalerBase< Traits >::grid ( ) const
inlineinherited

Access the grid.

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

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 
)
inlineinherited

Initializes the upscaler from given arguments.

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

Override from superclass.

Reimplemented from Opm::UpscalerBase< Traits >.

template<class Traits >
const std::vector< double > & Opm::SteadyStateUpscaler< Traits >::lastSaturationState ( ) const
inline

Accessor for the steady state saturation field. This is empty until upscaleSteadyState() is called, at which point it will contain the last computed (steady) saturation state.

template<class Traits >
double Opm::SteadyStateUpscaler< Traits >::lastSaturationUpscaled ( ) const

Computes the upscaled saturation corresponding to the saturation field returned by lastSaturationState(). Does this by computing total saturated volume divided by total pore volume.

template<class Traits >
void Opm::UpscalerBase< Traits >::setBoundaryConditionType ( BoundaryConditionType  type)
inlineinherited

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 
)
inlineinherited

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)
inlineprotectedinherited
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleNetPorosity ( ) const
inherited

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
inherited

Compute upscaled NTG.

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

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 ( )
inlineinherited

Does a single-phase upscaling.

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

Compute upscaled SOWCR.

Returns
total irreducible oil volume divided by total pore volume
template<class Traits >
std::pair< typename SteadyStateUpscaler< Traits >::permtensor_t, typename SteadyStateUpscaler< Traits >::permtensor_t > Opm::SteadyStateUpscaler< Traits >::upscaleSteadyState ( const int  flow_direction,
const std::vector< double > &  initial_saturation,
const double  boundary_saturation,
const double  pressure_drop,
const permtensor_t upscaled_perm 
)
inline

Does a steady-state upscaling.

Parameters
flow_directionThe cardinal direction in which to impose a pressure gradient for the purpose of converging to steady state.
initial_saturationthe initial saturation profile for the steady-state computation. The vector must have size equal to the number of cells in the grid.
boundary_saturationthe saturation of fluid flowing in across the boundary, only needed for nonperiodic upscaling.
pressure_dropthe pressure drop in Pascal over the domain.
upscaled_permtypically the output of upscaleSinglePhase().
Returns
the upscaled relative permeability matrices of both phases. The relative permeability matrix, call it k, is such that if K_w is the phase permeability and K the absolute permeability, K_w = k*K.
template<class Traits >
double Opm::UpscalerBase< Traits >::upscaleSWCR ( const bool  NTG) const
inherited

Compute upscaled SWCR.

Returns
total irreducible water volume divided by total pore volume

Member Data Documentation

template<class Traits>
BCs Opm::UpscalerBase< Traits >::bcond_
protectedinherited
template<class Traits>
BoundaryConditionType Opm::UpscalerBase< Traits >::bctype_
protectedinherited
template<class Traits>
FlowSolver Opm::UpscalerBase< Traits >::flow_solver_
protectedinherited
template<class Traits>
GridInterface Opm::UpscalerBase< Traits >::ginterf_
protectedinherited
template<class Traits>
GridType Opm::UpscalerBase< Traits >::grid_
protectedinherited
template<class Traits >
std::vector<double> Opm::SteadyStateUpscaler< Traits >::last_saturation_state_
protected
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_maxit_
protectedinherited
template<class Traits>
double Opm::UpscalerBase< Traits >::linsolver_prolongate_factor_
protectedinherited
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_smooth_steps_
protectedinherited
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_type_
protectedinherited
template<class Traits>
int Opm::UpscalerBase< Traits >::linsolver_verbosity_
protectedinherited
template<class Traits >
double Opm::SteadyStateUpscaler< Traits >::maximum_mobility_contrast_
protected
template<class Traits >
bool Opm::SteadyStateUpscaler< Traits >::output_vtk_
protected
template<class Traits >
bool Opm::SteadyStateUpscaler< Traits >::print_inoutflows_
protected
template<class Traits >
double Opm::SteadyStateUpscaler< Traits >::relperm_threshold_
protected
template<class Traits>
ResProp Opm::UpscalerBase< Traits >::res_prop_
protectedinherited
template<class Traits>
double Opm::UpscalerBase< Traits >::residual_tolerance_
protectedinherited
template<class Traits >
double Opm::SteadyStateUpscaler< Traits >::sat_change_threshold_
protected
template<class Traits >
int Opm::SteadyStateUpscaler< Traits >::simulation_steps_
protected
template<class Traits >
double Opm::SteadyStateUpscaler< Traits >::stepsize_
protected
template<class Traits >
TransportSolver Opm::SteadyStateUpscaler< Traits >::transport_solver_
protected
template<class Traits>
bool Opm::UpscalerBase< Traits >::twodim_hack_
protectedinherited
template<class Traits >
bool Opm::SteadyStateUpscaler< Traits >::use_gravity_
protected

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