2012-03-29 04:06:05 -05:00
|
|
|
/*
|
|
|
|
Copyright 2012 SINTEF ICT, Applied Mathematics.
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPM_INITSTATE_HEADER_INCLUDED
|
|
|
|
#define OPM_INITSTATE_HEADER_INCLUDED
|
|
|
|
|
2014-04-17 05:04:31 -05:00
|
|
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
2014-04-09 17:51:28 -05:00
|
|
|
|
2012-03-29 04:06:05 -05:00
|
|
|
struct UnstructuredGrid;
|
|
|
|
|
|
|
|
namespace Opm
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace parameter { class ParameterGroup; }
|
|
|
|
class IncompPropertiesInterface;
|
2012-05-16 04:37:31 -05:00
|
|
|
class BlackoilPropertiesInterface;
|
2012-03-29 04:06:05 -05:00
|
|
|
|
2013-03-22 05:09:38 -05:00
|
|
|
/// \file
|
2013-07-28 06:34:13 -05:00
|
|
|
///
|
2013-03-22 05:09:38 -05:00
|
|
|
/// Functions for initializing a reservoir state.
|
|
|
|
|
2012-05-16 04:37:31 -05:00
|
|
|
/// Initialize a two-phase state from parameters.
|
2012-03-29 04:06:05 -05:00
|
|
|
/// The following parameters are accepted (defaults):
|
2013-03-22 05:09:38 -05:00
|
|
|
/// - convection_testcase (false) -- Water in the 'left' part of the grid.
|
|
|
|
/// - ref_pressure (100) -- Initial pressure in bar for all cells
|
2012-03-29 04:09:13 -05:00
|
|
|
/// (if convection_testcase is true),
|
|
|
|
/// or pressure at woc depth.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// - segregation_testcase (false) -- Water above the woc instead of below.
|
|
|
|
/// - water_oil_contact (none) -- Depth of water-oil contact (woc).
|
|
|
|
/// - init_saturation (none) -- Initial water saturation for all cells.
|
|
|
|
///
|
2012-03-29 04:09:13 -05:00
|
|
|
/// If convection_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised to a constant value
|
|
|
|
/// ('ref_pressure').
|
|
|
|
/// If segregation_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised hydrostatically.
|
|
|
|
/// Otherwise we have 3 cases:
|
2013-03-22 05:09:38 -05:00
|
|
|
/// 1. If 'water_oil_contact' is given, saturation is initialised
|
2012-03-29 04:09:13 -05:00
|
|
|
/// accordingly.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// 2. If 'water_oil_contact' is not given, but 'init_saturation'
|
2012-03-29 04:09:13 -05:00
|
|
|
/// is given, water saturation is set to that value everywhere.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// 3. If neither are given, water saturation is set to minimum.
|
|
|
|
///
|
2012-03-29 04:09:13 -05:00
|
|
|
/// In all three cases, pressure is initialised hydrostatically.
|
|
|
|
/// In case 2) and 3), the depth of the first cell is used as reference depth.
|
2012-03-29 04:06:05 -05:00
|
|
|
template <class State>
|
2012-05-16 05:33:42 -05:00
|
|
|
void initStateBasic(const UnstructuredGrid& grid,
|
|
|
|
const IncompPropertiesInterface& props,
|
|
|
|
const parameter::ParameterGroup& param,
|
|
|
|
const double gravity,
|
|
|
|
State& state);
|
2012-03-29 04:06:05 -05:00
|
|
|
|
2014-02-17 06:23:01 -06:00
|
|
|
/// Initialize a two-phase state from parameters.
|
|
|
|
/// The following parameters are accepted (defaults):
|
|
|
|
/// - convection_testcase (false) -- Water in the 'left' part of the grid.
|
|
|
|
/// - ref_pressure (100) -- Initial pressure in bar for all cells
|
|
|
|
/// (if convection_testcase is true),
|
|
|
|
/// or pressure at woc depth.
|
|
|
|
/// - segregation_testcase (false) -- Water above the woc instead of below.
|
|
|
|
/// - water_oil_contact (none) -- Depth of water-oil contact (woc).
|
|
|
|
/// - init_saturation (none) -- Initial water saturation for all cells.
|
|
|
|
///
|
|
|
|
/// If convection_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised to a constant value
|
|
|
|
/// ('ref_pressure').
|
|
|
|
/// If segregation_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised hydrostatically.
|
|
|
|
/// Otherwise we have 3 cases:
|
|
|
|
/// 1. If 'water_oil_contact' is given, saturation is initialised
|
|
|
|
/// accordingly.
|
|
|
|
/// 2. If 'water_oil_contact' is not given, but 'init_saturation'
|
|
|
|
/// is given, water saturation is set to that value everywhere.
|
|
|
|
/// 3. If neither are given, water saturation is set to minimum.
|
|
|
|
///
|
|
|
|
/// In all three cases, pressure is initialised hydrostatically.
|
|
|
|
/// In case 2) and 3), the depth of the first cell is used as reference depth.
|
|
|
|
template <class FaceCells, class CCI, class FCI, class State>
|
|
|
|
void initStateBasic(int number_of_cells,
|
|
|
|
const int* global_cell,
|
|
|
|
const int* cartdims,
|
|
|
|
int number_of_faces,
|
|
|
|
FaceCells face_cells,
|
|
|
|
FCI begin_face_centroids,
|
|
|
|
CCI begin_cell_centroids,
|
|
|
|
int dimensions,
|
|
|
|
const IncompPropertiesInterface& props,
|
|
|
|
const parameter::ParameterGroup& param,
|
|
|
|
const double gravity,
|
|
|
|
State& state);
|
|
|
|
|
2012-05-16 05:54:48 -05:00
|
|
|
/// Initialize a blackoil state from parameters.
|
|
|
|
/// The following parameters are accepted (defaults):
|
2013-03-22 05:09:38 -05:00
|
|
|
/// - convection_testcase (false) -- Water in the 'left' part of the grid.
|
|
|
|
/// - ref_pressure (100) -- Initial pressure in bar for all cells
|
2012-05-16 05:54:48 -05:00
|
|
|
/// (if convection_testcase is true),
|
|
|
|
/// or pressure at woc depth.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// - water_oil_contact (none) -- Depth of water-oil contact (woc).
|
2012-05-16 05:54:48 -05:00
|
|
|
/// If convection_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised to a constant value
|
|
|
|
/// ('ref_pressure').
|
|
|
|
/// Otherwise we have 2 cases:
|
2013-03-22 05:09:38 -05:00
|
|
|
/// 1. If 'water_oil_contact' is given, saturation is initialised
|
2012-05-16 05:54:48 -05:00
|
|
|
/// accordingly.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// 2. Water saturation is set to minimum.
|
2012-05-16 05:54:48 -05:00
|
|
|
/// In both cases, pressure is initialised hydrostatically.
|
2013-03-22 05:09:38 -05:00
|
|
|
/// In case 2., the depth of the first cell is used as reference depth.
|
2012-05-16 05:54:48 -05:00
|
|
|
template <class State>
|
|
|
|
void initStateBasic(const UnstructuredGrid& grid,
|
|
|
|
const BlackoilPropertiesInterface& props,
|
|
|
|
const parameter::ParameterGroup& param,
|
|
|
|
const double gravity,
|
|
|
|
State& state);
|
|
|
|
|
2014-02-17 06:23:01 -06:00
|
|
|
/// Initialize a blackoil state from parameters.
|
|
|
|
/// The following parameters are accepted (defaults):
|
|
|
|
/// - convection_testcase (false) -- Water in the 'left' part of the grid.
|
|
|
|
/// - ref_pressure (100) -- Initial pressure in bar for all cells
|
|
|
|
/// (if convection_testcase is true),
|
|
|
|
/// or pressure at woc depth.
|
|
|
|
/// - water_oil_contact (none) -- Depth of water-oil contact (woc).
|
|
|
|
/// If convection_testcase is true, the saturation is initialised
|
|
|
|
/// as indicated, and pressure is initialised to a constant value
|
|
|
|
/// ('ref_pressure').
|
|
|
|
/// Otherwise we have 2 cases:
|
|
|
|
/// 1. If 'water_oil_contact' is given, saturation is initialised
|
|
|
|
/// accordingly.
|
|
|
|
/// 2. Water saturation is set to minimum.
|
|
|
|
/// In both cases, pressure is initialised hydrostatically.
|
|
|
|
/// In case 2., the depth of the first cell is used as reference depth.
|
|
|
|
template <class FaceCells, class FCI, class CCI, class State>
|
|
|
|
void initStateBasic(int number_of_cells,
|
|
|
|
const int* global_cell,
|
|
|
|
const int* cartdims,
|
|
|
|
int number_of_faces,
|
|
|
|
FaceCells face_cells,
|
|
|
|
FCI begin_face_centroids,
|
|
|
|
CCI begin_cell_centroids,
|
|
|
|
int dimensions,
|
|
|
|
const BlackoilPropertiesInterface& props,
|
|
|
|
const parameter::ParameterGroup& param,
|
|
|
|
const double gravity,
|
|
|
|
State& state);
|
|
|
|
|
2012-05-16 04:37:31 -05:00
|
|
|
/// Initialize a two-phase state from input deck.
|
2012-03-29 04:06:05 -05:00
|
|
|
/// If EQUIL is present:
|
|
|
|
/// - saturation is set according to the water-oil contact,
|
|
|
|
/// - pressure is set to hydrostatic equilibrium.
|
|
|
|
/// Otherwise:
|
|
|
|
/// - saturation is set according to SWAT,
|
|
|
|
/// - pressure is set according to PRESSURE.
|
2012-05-16 04:37:31 -05:00
|
|
|
template <class Props, class State>
|
|
|
|
void initStateFromDeck(const UnstructuredGrid& grid,
|
|
|
|
const Props& props,
|
2014-04-26 05:03:07 -05:00
|
|
|
Opm::DeckConstPtr deck,
|
2014-02-17 06:23:01 -06:00
|
|
|
const double gravity,
|
|
|
|
State& state);
|
|
|
|
|
2012-05-21 07:03:56 -05:00
|
|
|
/// Initialize a two-phase water-oil blackoil state from input deck.
|
|
|
|
/// If EQUIL is present:
|
|
|
|
/// - saturation is set according to the water-oil contact,
|
|
|
|
/// - pressure is set to hydrostatic equilibrium.
|
|
|
|
/// Otherwise:
|
|
|
|
/// - saturation is set according to SWAT,
|
|
|
|
/// - pressure is set according to PRESSURE.
|
|
|
|
/// In addition, this function sets surfacevol.
|
|
|
|
template <class Props, class State>
|
|
|
|
void initBlackoilStateFromDeck(const UnstructuredGrid& grid,
|
|
|
|
const Props& props,
|
2014-04-26 05:03:07 -05:00
|
|
|
Opm::DeckConstPtr deck,
|
2014-02-17 06:23:01 -06:00
|
|
|
const double gravity,
|
|
|
|
State& state);
|
2014-04-09 17:51:28 -05:00
|
|
|
/// Initialize a blackoil state from input deck.
|
|
|
|
template <class FaceCells, class FCI, class CCI, class Props, class State>
|
|
|
|
void initBlackoilStateFromDeck(int number_of_cells,
|
|
|
|
const int* global_cell,
|
|
|
|
int number_of_faces,
|
|
|
|
FaceCells face_cells,
|
|
|
|
FCI begin_face_centroids,
|
|
|
|
CCI begin_cell_centroids,
|
|
|
|
int dimensions,
|
|
|
|
const Props& props,
|
2014-04-26 05:03:07 -05:00
|
|
|
Opm::DeckConstPtr deck,
|
2014-04-09 17:51:28 -05:00
|
|
|
const double gravity,
|
|
|
|
State& state);
|
2012-03-29 04:06:05 -05:00
|
|
|
} // namespace Opm
|
|
|
|
|
2013-03-18 06:47:23 -05:00
|
|
|
#include <opm/core/simulator/initState_impl.hpp>
|
2012-03-29 04:06:05 -05:00
|
|
|
|
|
|
|
#endif // OPM_INITSTATE_HEADER_INCLUDED
|