My Project
Loading...
Searching...
No Matches
Opm::SteadyStateUpscaler< Traits > Class Template Reference

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

#include <SteadyStateUpscaler.hpp>

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

Public Types

enum  { Dimension = UpscalerBase<Traits>::Dimension }
 
typedef UpscalerBase< Traits > Super
 
typedef Super::permtensor_t permtensor_t
 
typedef UpscalerBase< Traits >::GridInterface GridInterface
 
- Public Types inherited from Opm::UpscalerBase< Traits >
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

 SteadyStateUpscaler ()
 Default constructor.
 
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)
 Does a steady-state upscaling.
 
const std::vector< double > & lastSaturationState () const
 Accessor for the steady state saturation field.
 
double lastSaturationUpscaled () const
 Computes the upscaled saturation corresponding to the saturation field returned by lastSaturationState().
 
- Public Member Functions inherited from Opm::UpscalerBase< Traits >
 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 Traits::template TransportSolver< GridInterface, typenameSuper::BCs >::Type TransportSolver
 
- Protected Types inherited from Opm::UpscalerBase< Traits >
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.
 
- Protected Member Functions inherited from Opm::UpscalerBase< Traits >
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

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_
 
- Protected Attributes inherited from Opm::UpscalerBase< Traits >
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::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 Function Documentation

◆ lastSaturationState()

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.

◆ lastSaturationUpscaled()

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.

◆ upscaleSteadyState()

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.

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