SteadyStateUpscalerImplicit.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_STEADYSTATEUPSCALERIMPLICIT_HEADER
37#define OPM_STEADYSTATEUPSCALERIMPLICIT_HEADER
38
42#include <opm/grid/common/GridAdapter.hpp>
43
44namespace Opm
45{
50 template <class Traits>
52 {
53 public:
54 // ------- Typedefs and enums -------
55
61
62 // ------- Methods -------
63
66
78 std::pair<permtensor_t, permtensor_t> upscaleSteadyState(const int flow_direction,
79 const std::vector<double>& initial_saturation,
80 const double boundary_saturation,
81 const double pressure_drop,
82 const permtensor_t& upscaled_perm,bool& success);
83
87 const std::vector<double>& lastSaturationState() const;
88
92 double lastSaturationUpscaled() const;
93
95 void initSatLimits(std::vector<double>& s) const;
96
97 void setToCapillaryLimit(double average_s, std::vector<double>& s) const;
98
99
100 protected:
101 // ------- Typedefs -------
103
104 // ------- Methods -------
105 template <class FlowSol>
106 void computeInOutFlows(std::pair<double, double>& water_inout,
107 std::pair<double, double>& oil_inout,
108 const FlowSol& flow_solution,
109 const std::vector<double>& saturations) const;
111 void initImpl(const Opm::ParameterGroup& param) override;
112
113 // ------- Data members -------
114 std::vector<double> last_saturation_state_;
129 GridAdapter grid_adapter_;
130 };
131
132} // namespace Opm
133
135
136
137#endif // OPM_STEADYSTATEUPSCALERIMPLICIT_HEADER
A class for doing steady state upscaling.
Definition: SteadyStateUpscalerImplicit.hpp:52
void initImpl(const Opm::ParameterGroup &param) override
Override from superclass.
Definition: SteadyStateUpscalerImplicit_impl.hpp:78
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: SteadyStateUpscalerImplicit_impl.hpp:453
Traits::template TransportSolver< GridInterface, typenameSuper::BCs >::Type TransportSolver
Definition: SteadyStateUpscalerImplicit.hpp:102
double dt_sat_tol_
Definition: SteadyStateUpscalerImplicit.hpp:126
void initSatLimits(std::vector< double > &s) const
Ensure saturations are not outside table.
Definition: SteadyStateUpscalerImplicit_impl.hpp:416
TransportSolver transport_solver_
Definition: SteadyStateUpscalerImplicit.hpp:128
double sat_change_year_
Definition: SteadyStateUpscalerImplicit.hpp:123
Super::permtensor_t permtensor_t
Definition: SteadyStateUpscalerImplicit.hpp:57
double relperm_threshold_
Definition: SteadyStateUpscalerImplicit.hpp:121
bool output_ecl_
Definition: SteadyStateUpscalerImplicit.hpp:117
double init_stepsize_
Definition: SteadyStateUpscalerImplicit.hpp:120
UpscalerBase< Traits > Super
Definition: SteadyStateUpscalerImplicit.hpp:56
double lastSaturationUpscaled() const
Definition: SteadyStateUpscalerImplicit_impl.hpp:400
bool use_maxdiff_
Definition: SteadyStateUpscalerImplicit.hpp:127
bool output_vtk_
Definition: SteadyStateUpscalerImplicit.hpp:116
int simulation_steps_
Definition: SteadyStateUpscalerImplicit.hpp:119
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)
Definition: SteadyStateUpscalerImplicit_impl.hpp:175
UpscalerBase< Traits >::GridType GridType
Definition: SteadyStateUpscalerImplicit.hpp:59
double max_stepsize_
Definition: SteadyStateUpscalerImplicit.hpp:125
@ Dimension
Definition: SteadyStateUpscalerImplicit.hpp:60
GridAdapter grid_adapter_
Definition: SteadyStateUpscalerImplicit.hpp:129
UpscalerBase< Traits >::GridInterface GridInterface
Definition: SteadyStateUpscalerImplicit.hpp:58
bool print_inoutflows_
Definition: SteadyStateUpscalerImplicit.hpp:118
int max_it_
Definition: SteadyStateUpscalerImplicit.hpp:124
void setToCapillaryLimit(double average_s, std::vector< double > &s) const
Definition: SteadyStateUpscalerImplicit_impl.hpp:427
SteadyStateUpscalerImplicit()
Default constructor.
Definition: SteadyStateUpscalerImplicit_impl.hpp:56
double maximum_mobility_contrast_
Definition: SteadyStateUpscalerImplicit.hpp:122
std::vector< double > last_saturation_state_
Definition: SteadyStateUpscalerImplicit.hpp:114
bool use_gravity_
Definition: SteadyStateUpscalerImplicit.hpp:115
const std::vector< double > & lastSaturationState() const
Definition: SteadyStateUpscalerImplicit_impl.hpp:391
A base class for upscaling.
Definition: UpscalerBase.hpp:56
ResProp::MutablePermTensor permtensor_t
A type for the upscaled permeability.
Definition: UpscalerBase.hpp:66
Dune::CpGrid GridType
Definition: UpscalerBase.hpp:60
Definition: ImplicitAssembly.hpp:43