SteadyStateUpscaler.hpp
Go to the documentation of this file.
1 //===========================================================================
2 //
3 // File: SteadyStateUpscaler.hpp
4 //
5 // Created: Fri Aug 28 14:01:19 2009
6 //
7 // Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
8 // Bård Skaflestad <bard.skaflestad@sintef.no>
9 //
10 // $Date$
11 //
12 // $Revision$
13 //
14 //===========================================================================
15 
16 /*
17  Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
18  Copyright 2009, 2010 Statoil ASA.
19 
20  This file is part of The Open Reservoir Simulator Project (OpenRS).
21 
22  OpenRS is free software: you can redistribute it and/or modify
23  it under the terms of the GNU General Public License as published by
24  the Free Software Foundation, either version 3 of the License, or
25  (at your option) any later version.
26 
27  OpenRS is distributed in the hope that it will be useful,
28  but WITHOUT ANY WARRANTY; without even the implied warranty of
29  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  GNU General Public License for more details.
31 
32  You should have received a copy of the GNU General Public License
33  along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
34 */
35 
36 #ifndef OPM_STEADYSTATEUPSCALER_HEADER
37 #define OPM_STEADYSTATEUPSCALER_HEADER
38 
40 #include <opm/porsol/euler/EulerUpstream.hpp>
41 #include <opm/porsol/euler/ImplicitCapillarity.hpp>
42 #include <array>
43 
44 namespace Opm
45 {
50  template <class Traits>
51  class SteadyStateUpscaler : public UpscalerBase<Traits>
52  {
53  public:
54  // ------- Typedefs and enums -------
55 
60 
61  // ------- Methods -------
62 
65 
77  std::pair<permtensor_t, permtensor_t> upscaleSteadyState(const int flow_direction,
78  const std::vector<double>& initial_saturation,
79  const double boundary_saturation,
80  const double pressure_drop,
81  const permtensor_t& upscaled_perm);
82 
86  const std::vector<double>& lastSaturationState() const;
87 
91  double lastSaturationUpscaled() const;
92 
93  protected:
94  // ------- Typedefs -------
96 
97  // ------- Methods -------
98  template <class FlowSol>
99  void computeInOutFlows(std::pair<double, double>& water_inout,
100  std::pair<double, double>& oil_inout,
101  const FlowSol& flow_solution,
102  const std::vector<double>& saturations) const;
104  virtual void initImpl(const Opm::parameter::ParameterGroup& param);
105 
106 
107  // ------- Data members -------
108  std::vector<double> last_saturation_state_;
113  double stepsize_;
117  TransportSolver transport_solver_;
118  };
119 
120 } // namespace Opm
121 
123 
124 
125 #endif // OPM_STEADYSTATEUPSCALER_HEADER
SteadyStateUpscaler()
Default constructor.
Definition: SteadyStateUpscaler_impl.hpp:54
bool output_vtk_
Definition: SteadyStateUpscaler.hpp:110
std::vector< double > last_saturation_state_
Definition: SteadyStateUpscaler.hpp:108
int simulation_steps_
Definition: SteadyStateUpscaler.hpp:112
Definition: applier.hpp:18
const std::vector< double > & lastSaturationState() const
Definition: SteadyStateUpscaler_impl.hpp:293
bool use_gravity_
Definition: SteadyStateUpscaler.hpp:109
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)
Definition: SteadyStateUpscaler_impl.hpp:133
ResProp::MutablePermTensor permtensor_t
A type for the upscaled permeability.
Definition: UpscalerBase.hpp:63
Traits::template TransportSolver< GridInterface, typename Super::BCs >::Type TransportSolver
Definition: SteadyStateUpscaler.hpp:95
A base class for upscaling.
Definition: UpscalerBase.hpp:52
bool print_inoutflows_
Definition: SteadyStateUpscaler.hpp:111
virtual void initImpl(const Opm::parameter::ParameterGroup &param)
Override from superclass.
Definition: SteadyStateUpscaler_impl.hpp:71
A class for doing steady state upscaling.
Definition: SteadyStateUpscaler.hpp:51
Definition: SteadyStateUpscaler.hpp:59
GridInterfaceEuler< GridType > GridInterface
Definition: UpscalerBase.hpp:59
UpscalerBase< Traits > Super
Definition: SteadyStateUpscaler.hpp:56
TransportSolver transport_solver_
Definition: SteadyStateUpscaler.hpp:117
double maximum_mobility_contrast_
Definition: SteadyStateUpscaler.hpp:115
void computeInOutFlows(std::pair< double, double > &water_inout, std::pair< double, double > &oil_inout, const FlowSol &flow_solution, const std::vector< double > &saturations) const
Definition: SteadyStateUpscaler_impl.hpp:347
double lastSaturationUpscaled() const
Definition: SteadyStateUpscaler_impl.hpp:302
double relperm_threshold_
Definition: SteadyStateUpscaler.hpp:114
double sat_change_threshold_
Definition: SteadyStateUpscaler.hpp:116
UpscalerBase< Traits >::GridInterface GridInterface
Definition: SteadyStateUpscaler.hpp:58
double stepsize_
Definition: SteadyStateUpscaler.hpp:113
Super::permtensor_t permtensor_t
Definition: SteadyStateUpscaler.hpp:57