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

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

#include <SteadyStateUpscalerImplicit.hpp>

Inheritance diagram for Opm::SteadyStateUpscalerImplicit< 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
typedef UpscalerBase< Traits >::GridType GridType
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

 SteadyStateUpscalerImplicit ()
 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, bool &success)
 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().
void initSatLimits (std::vector< double > &s) const
 Ensure saturations are not outside table.
void setToCapillaryLimit (double average_s, std::vector< double > &s) const
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
void initImpl (const Opm::ParameterGroup &param) override
 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 initFinal (const Opm::ParameterGroup &param)

Protected Attributes

std::vector< double > last_saturation_state_
bool use_gravity_
bool output_vtk_
bool output_ecl_
bool print_inoutflows_
int simulation_steps_
double init_stepsize_
double relperm_threshold_
double maximum_mobility_contrast_
double sat_change_year_
int max_it_
double max_stepsize_
double dt_sat_tol_
bool use_maxdiff_
TransportSolver transport_solver_
GridAdapter grid_adapter_
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::SteadyStateUpscalerImplicit< 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

◆ initImpl()

template<class Traits>
void Opm::SteadyStateUpscalerImplicit< Traits >::initImpl ( const Opm::ParameterGroup & param)
inlineoverrideprotectedvirtual

Override from superclass.

Reimplemented from Opm::UpscalerBase< Traits >.

◆ lastSaturationState()

template<class Traits>
const std::vector< double > & Opm::SteadyStateUpscalerImplicit< 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::SteadyStateUpscalerImplicit< 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 SteadyStateUpscalerImplicit< Traits >::permtensor_t, typename SteadyStateUpscalerImplicit< Traits >::permtensor_t > Opm::SteadyStateUpscalerImplicit< 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,
bool & success )
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().
[out]successTrue if upscaling was successful
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: