mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove ebos
This commit is contained in:
parent
16eafcca04
commit
39a94863a0
@ -22,9 +22,6 @@ option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
|
||||
set( USE_OPENMP_DEFAULT OFF ) # Use of OpenMP is considered experimental
|
||||
option(BUILD_FLOW "Build the production oriented flow simulator?" ON)
|
||||
option(BUILD_FLOW_VARIANTS "Build the variants for flow by default?" OFF)
|
||||
option(BUILD_EBOS "Build the research oriented ebos simulator?" ON)
|
||||
option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF)
|
||||
option(BUILD_EBOS_DEBUG_EXTENSIONS "Build the ebos variants which are purely for debugging by default?" OFF)
|
||||
option(BUILD_FLOW_POLY_GRID "Build flow blackoil with polyhedral grid" OFF)
|
||||
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
|
||||
option(OPM_ENABLE_PYTHON_TESTS "Enable tests for the python bindings?" ON)
|
||||
@ -346,8 +343,9 @@ set_property(TARGET moduleVersion PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
# but this is not exposed in a super-build.
|
||||
add_dependencies(moduleVersion opmsimulators)
|
||||
|
||||
set(COMMON_MODELS brine energy extbo foam gasoil gaswater oilwater oilwater_polymer polymer solvent)
|
||||
set(FLOW_MODELS blackoil oilwater_brine oilwater_polymer_injectivity micp)
|
||||
set(FLOW_MODELS blackoil brine energy extbo foam gasoil gaswater
|
||||
oilwater oilwater_brine oilwater_polymer
|
||||
oilwater_polymer_injectivity micp polymer solvent)
|
||||
set(FLOW_VARIANT_MODELS brine_energy onephase onephase_energy)
|
||||
|
||||
set(FLOW_TGTS)
|
||||
@ -392,7 +390,6 @@ opm_add_test(flow
|
||||
$<TARGET_OBJECTS:moduleVersion>
|
||||
)
|
||||
|
||||
# the production oriented general-purpose ECL simulator
|
||||
opm_add_test(flow_poly
|
||||
ONLY_COMPILE
|
||||
ALWAYS_ENABLE
|
||||
@ -405,7 +402,6 @@ opm_add_test(flow_poly
|
||||
$<TARGET_OBJECTS:moduleVersion>)
|
||||
target_compile_definitions(flow_poly PRIVATE USE_POLYHEDRALGRID)
|
||||
|
||||
# the production oriented general-purpose ECL simulator
|
||||
opm_add_test(flow_distribute_z
|
||||
ONLY_COMPILE
|
||||
ALWAYS_ENABLE
|
||||
@ -439,74 +435,6 @@ if (BUILD_FLOW)
|
||||
PASS_REGULAR_EXPRESSION "${${project}_LABEL}")
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_EBOS)
|
||||
set(EBOS_DEFAULT_ENABLE_IF "FALSE")
|
||||
else()
|
||||
set(EBOS_DEFAULT_ENABLE_IF "TRUE")
|
||||
endif()
|
||||
|
||||
# the research oriented general-purpose ECL simulator ("ebos" == &ecl
|
||||
# &black-&oil &simulator)
|
||||
set(MEBOS_TARGETS "")
|
||||
foreach(OBJ ${COMMON_MODELS} blackoil)
|
||||
add_library(ebos_lib${OBJ} OBJECT EXCLUDE_FROM_ALL ebos/ebos_${OBJ}.cc)
|
||||
if(TARGET fmt::fmt)
|
||||
target_link_libraries(ebos_lib${OBJ} fmt::fmt)
|
||||
endif()
|
||||
list(APPEND MEBOS_TARGETS $<TARGET_OBJECTS:ebos_lib${OBJ}>)
|
||||
endforeach()
|
||||
|
||||
opm_add_test(ebos
|
||||
ONLY_COMPILE
|
||||
DEFAULT_ENABLE_IF ${EBOS_DEFAULT_ENABLE_IF}
|
||||
ALWAYS_ENABLE
|
||||
EXE_NAME ebos
|
||||
LIBRARIES opmsimulators
|
||||
SOURCES ebos/ebos_main.cc $<TARGET_OBJECTS:ebos_libblackoil>)
|
||||
|
||||
if (BUILD_EBOS)
|
||||
install(TARGETS ebos DESTINATION bin)
|
||||
opm_add_bash_completion(ebos)
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_EBOS_EXTENSIONS)
|
||||
set(EBOS_EXTENSIONS_DEFAULT_ENABLE_IF "FALSE")
|
||||
else()
|
||||
set(EBOS_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE")
|
||||
endif()
|
||||
|
||||
foreach(OBJ ${COMMON_MODELS})
|
||||
opm_add_test(ebos_${OBJ}
|
||||
ONLY_COMPILE
|
||||
DEFAULT_ENABLE_IF ${EBOS_EXTENSIONS_DEFAULT_ENABLE_IF}
|
||||
SOURCES ebos/ebos_${OBJ}_main.cc $<TARGET_OBJECTS:ebos_lib${OBJ}>
|
||||
EXE_NAME ebos_${OBJ}
|
||||
LIBRARIES opmsimulators)
|
||||
endforeach()
|
||||
|
||||
opm_add_test(mebos
|
||||
ONLY_COMPILE
|
||||
DEFAULT_ENABLE_IF ${EBOS_EXTENSIONS_DEFAULT_ENABLE_IF}
|
||||
SOURCES ebos/mebos_main.cc
|
||||
${MEBOS_TARGETS}
|
||||
EXE_NAME mebos
|
||||
LIBRARIES opmsimulators)
|
||||
|
||||
if (NOT BUILD_EBOS_DEBUG_EXTENSIONS)
|
||||
set(EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF "FALSE")
|
||||
else()
|
||||
set(EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE")
|
||||
endif()
|
||||
|
||||
if (BUILD_EBOS_EXTENSIONS)
|
||||
foreach(TGT ${COMMON_MODELS})
|
||||
install(TARGETS ebos_${TGT} DESTINATION bin)
|
||||
opm_add_bash_completion(ebos_${TGT})
|
||||
endforeach()
|
||||
install(TARGETS mebos DESTINATION bin)
|
||||
opm_add_bash_completion(mebos)
|
||||
endif()
|
||||
|
||||
if (OPM_ENABLE_PYTHON)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
@ -1,114 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm {
|
||||
|
||||
bool ebosBlackOilDeckFileNameIsSet(int argc, char** argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
bool result = EWOMS_PARAM_IS_SET(ProblemTypeTag, std::string, EclDeckFileName);
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string ebosBlackOilGetDeckFileName(int argc, char** argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
std::string rawDeckFileName = EWOMS_GET_PARAM(ProblemTypeTag, std::string, EclDeckFileName);
|
||||
std::string result = Vanguard::canonicalDeckPath(rawDeckFileName);
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::unique_ptr<ParseContext> ebosBlackOilCreateParseContext(int argc, char** argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
const std::string ignoredKeywords = EWOMS_GET_PARAM(ProblemTypeTag, std::string, IgnoreKeywords);
|
||||
bool eclStrictParsing = EWOMS_GET_PARAM(ProblemTypeTag, bool, EclStrictParsing);
|
||||
std::unique_ptr<ParseContext> result = Vanguard::createParseContext(ignoredKeywords, eclStrictParsing);
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void ebosBlackOilSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosBlackOilMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the oil-water variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_BLACK_OIL_HH
|
||||
#define EBOS_BLACK_OIL_HH
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
bool ebosBlackOilDeckFileNameIsSet(int argc, char** argv);
|
||||
std::string ebosBlackOilGetDeckFileName(int argc, char** argv);
|
||||
std::unique_ptr<Opm::ParseContext> ebosBlackOilCreateParseContext(int argc, char** argv);
|
||||
|
||||
void ebosBlackOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosBlackOilMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosBrineTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the brine extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnableBrine<TypeTag, TTag::EbosBrineTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosBrineSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosBrineMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the brine variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_BRINE_HH
|
||||
#define EBOS_BRINE_HH
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosBrineSetDeck(Opm::Deck* deck,
|
||||
Opm::ParseContext* parseContext,
|
||||
Opm::ErrorGuard* errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosBrineMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone brine variant of ebos.
|
||||
*
|
||||
* This only calls the ebosBrineMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_brine.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosBrineMain(argc, argv);
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosEnergyTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the energy extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::EbosEnergyTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosEnergySetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosEnergyTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosEnergyMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosEnergyTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the thermal variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_ENERGY_HH
|
||||
#define EBOS_ENERGY_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosEnergySetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosEnergyMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone thermal variant of ebos.
|
||||
*
|
||||
* This only calls the ebosThermalMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_energy.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosEnergyMain(argc, argv);
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosExtboTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the polymer extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnableExtbo<TypeTag, TTag::EbosExtboTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosExtboSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosExtboTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosExtboMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosExtboTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the solvent variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_EXTBO_HH
|
||||
#define EBOS_EXTBO_HH
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosExtboSetDeck(Opm::Deck* deck,
|
||||
Opm::ParseContext* parseContext,
|
||||
Opm::ErrorGuard* errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosExtboMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone solvent variant of ebos.
|
||||
*
|
||||
* This only calls the ebosExtboMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_extbo.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosExtboMain(argc, argv);
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosFoamTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the foam extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnableFoam<TypeTag, TTag::EbosFoamTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosFoamSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosFoamMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the foam variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_FOAM_HH
|
||||
#define EBOS_FOAM_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosFoamSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosFoamMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone foam variant of ebos.
|
||||
*
|
||||
* This only calls the ebosFoamMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_foam.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosFoamMain(argc, argv);
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosGasOilTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
//! The indices indices which only enable oil and water
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EbosGasOilTypeTag>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::waterCompIdx,
|
||||
getPropValue<TypeTag, Properties::EnableMICP>()> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosGasOilSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasOilTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosGasOilMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasOilTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the gas-oil variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_GAS_OIL_HH
|
||||
#define EBOS_GAS_OIL_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosGasOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosGasOilMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone gas-oil variant of ebos.
|
||||
*
|
||||
* This only calls the ebosGasOilMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_gasoil.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosGasOilMain(argc, argv);
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone gas-oil variant of ebos.
|
||||
*
|
||||
* This only calls the ebosGasWaterMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_gaswater.hh"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosGasWaterTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
//! The indices indices which only enable oil and water
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EbosGasWaterTypeTag>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::oilCompIdx,
|
||||
getPropValue<TypeTag, Properties::EnableMICP>()> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosGasWaterSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasWaterTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosGasWaterMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasWaterTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the gas-water variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_GAS_WATER_HH
|
||||
#define EBOS_GAS_WATER_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosGasWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosGasWaterMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone gas-oil variant of ebos.
|
||||
*
|
||||
* This only calls the ebosGasWaterMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_gaswater.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosGasWaterMain(argc, argv);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone black-oil variant of ebos.
|
||||
*
|
||||
* This only calls the ebosBlackOilMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_blackoil.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosBlackOilMain(argc, argv);
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosOilWaterTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
//! The indices indices which only enable oil and water
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EbosOilWaterTypeTag>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::gasCompIdx,
|
||||
getPropValue<TypeTag, Properties::EnableMICP>()> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosOilWaterSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosOilWaterMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the oil-water variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_OIL_WATER_HH
|
||||
#define EBOS_OIL_WATER_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosOilWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosOilWaterMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone oil-water variant of ebos.
|
||||
*
|
||||
* This only calls the ebosOilWaterMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_oilwater.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosOilWaterMain(argc, argv);
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosOilWaterPolymerTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the polymer extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnablePolymer<TypeTag, TTag::EbosOilWaterPolymerTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
//! The indices indices which only enable oil and water
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EbosOilWaterPolymerTypeTag>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::gasCompIdx,
|
||||
getPropValue<TypeTag, Properties::EnableMICP>()> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosOilWaterPolymerSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterPolymerTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosOilWaterPolymerMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterPolymerTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the oil-water variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_OIL_WATER_POLYMER_HH
|
||||
#define EBOS_OIL_WATER_POLYMER_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosOilWaterPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosOilWaterPolymerMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone oil-water plus polymer variant of ebos.
|
||||
*
|
||||
* This only calls the ebosOilWaterPolymerMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_oilwater_polymer.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosOilWaterPolymerMain(argc, argv);
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosPolymerTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the polymer extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnablePolymer<TypeTag, TTag::EbosPolymerTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosPolymerSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosPolymerMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the polymer variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_POLYMER_HH
|
||||
#define EBOS_POLYMER_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ParseContext;
|
||||
class ErrorGuard;
|
||||
|
||||
void ebosPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosPolymerMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone polymer variant of ebos.
|
||||
*
|
||||
* This only calls the ebosPolymerMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_polymer.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosPolymerMain(argc, argv);
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief A general-purpose simulator for ECL decks using the black-oil model.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosSolventTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
// enable the solvent extension of the black oil model
|
||||
template<class TypeTag>
|
||||
struct EnableSolvent<TypeTag, TTag::EbosSolventTypeTag> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosSolventSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosSolventTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosSolventMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosSolventTypeTag;
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The function prototypes required to start the solvent variant of ebos
|
||||
*/
|
||||
#ifndef EBOS_SOLVENT_HH
|
||||
#define EBOS_SOLVENT_HH
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ErrorGuard;
|
||||
class ParseContext;
|
||||
|
||||
void ebosSolventSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime);
|
||||
|
||||
int ebosSolventMain(int argc, char** argv);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main function for the stand alone solvent variant of ebos.
|
||||
*
|
||||
* This only calls the ebosSolventMain() function.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_solvent.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosSolventMain(argc, argv);
|
||||
}
|
@ -1,324 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief The main file of mebos, an multiplexed-version of ebos, the general-purpose
|
||||
* black-oil simulator for ECL decks for research purposes.
|
||||
*
|
||||
* Just like 'flow', it does not require to select the simulator binary to run a deck
|
||||
* that uses certain options like twophase, solvent, polymer or thermal in advance.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include "ebos_blackoil.hh"
|
||||
#include "ebos_oilwater.hh"
|
||||
#include "ebos_oilwater_polymer.hh"
|
||||
#include "ebos_gasoil.hh"
|
||||
#include "ebos_gaswater.hh"
|
||||
#include "ebos_energy.hh"
|
||||
#include "ebos_solvent.hh"
|
||||
#include "ebos_polymer.hh"
|
||||
#include "ebos_foam.hh"
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
#include <dune/common/timer.hh>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Dune::Timer externalSetupTimer;
|
||||
externalSetupTimer.start();
|
||||
|
||||
if (!Opm::ebosBlackOilDeckFileNameIsSet(argc, argv))
|
||||
// no deck was specified, e.g., --help. use the black oil variant to figure out
|
||||
// what exactly should be done
|
||||
return Opm::ebosBlackOilMain(argc, argv);
|
||||
|
||||
std::string deckFileName =
|
||||
Opm::ebosBlackOilGetDeckFileName(argc, argv);
|
||||
|
||||
std::unique_ptr<Opm::ParseContext> parseContext
|
||||
= Opm::ebosBlackOilCreateParseContext(argc, argv);
|
||||
auto errorGuard = std::make_unique<Opm::ErrorGuard>();
|
||||
|
||||
// deal with parallel runs
|
||||
int myRank = Dune::MPIHelper::instance(argc, argv).rank();
|
||||
|
||||
Opm::Parser parser;
|
||||
// parse the deck file
|
||||
if (myRank == 0)
|
||||
std::cout << "Parsing deck file \"" << deckFileName << "\"" << std::endl;
|
||||
auto deck = std::make_unique<Opm::Deck>(parser.parseFile(deckFileName, *parseContext, *errorGuard));
|
||||
|
||||
// TODO: check which variant ought to be used
|
||||
bool waterActive = deck->hasKeyword("WATER");
|
||||
bool gasActive = deck->hasKeyword("GAS");
|
||||
bool oilActive = deck->hasKeyword("OIL");
|
||||
bool solventActive = deck->hasKeyword("SOLVENT");
|
||||
bool polymerActive = deck->hasKeyword("POLYMER");
|
||||
bool foamActive = deck->hasKeyword("FOAM");
|
||||
bool thermalActive = deck->hasKeyword("THERMAL") || deck->hasKeyword("TEMP");
|
||||
|
||||
std::stringstream notSupportedErrorStream;
|
||||
notSupportedErrorStream << "deck not supported by mebos, you might want to use a specialized binary. Active options:\n"
|
||||
<< " water: " << waterActive << "\n"
|
||||
<< " gas: " << gasActive << "\n"
|
||||
<< " oil: " << oilActive << "\n"
|
||||
<< " solvent: " << solventActive << "\n"
|
||||
<< " polymer: " << polymerActive << "\n"
|
||||
<< " foam: " << foamActive << "\n"
|
||||
<< " thermal/temperature: " << thermalActive << "\n";
|
||||
|
||||
int numBlackOilPhases = (waterActive?1:0) + (gasActive?1:0) + (oilActive?1:0);
|
||||
if (numBlackOilPhases == 0) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "no black-oil phase (water, gas or oil) specified.\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
else if (numBlackOilPhases == 1) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "single-phase simulations are unsupported\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
else if (numBlackOilPhases == 2) {
|
||||
if (solventActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining twophase and solvent is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (polymerActive && oilActive && waterActive) {
|
||||
if (myRank == 0)
|
||||
std::cout << "Using oil-water-polymer mode" << std::endl;
|
||||
Opm::ebosOilWaterPolymerSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosOilWaterPolymerMain(argc, argv);
|
||||
}
|
||||
|
||||
if (polymerActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining twophase and polymer is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (foamActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining twophase and foam is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (thermalActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining twophase and energy conservation is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (oilActive && waterActive) {
|
||||
if (myRank == 0)
|
||||
std::cout << "Using oil-water mode" << std::endl;
|
||||
Opm::ebosOilWaterSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosOilWaterMain(argc, argv);
|
||||
}
|
||||
else if (oilActive && gasActive) {
|
||||
// run ebos_gasoil
|
||||
if (myRank == 0)
|
||||
std::cout << "Using gas-oil mode" << std::endl;
|
||||
Opm::ebosGasOilSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosGasOilMain(argc, argv);
|
||||
}
|
||||
else if (waterActive && gasActive) {
|
||||
// run ebos_gaswater
|
||||
if (myRank == 0)
|
||||
std::cout << "Using gas-water mode" << std::endl;
|
||||
Opm::ebosGasWaterSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosGasWaterMain(argc, argv);
|
||||
}
|
||||
}
|
||||
else if (foamActive) {
|
||||
if (solventActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining foam and solvent is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (polymerActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining foam and polymer is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (thermalActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining foam and and energy conservation is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
// run ebos_foam
|
||||
if (myRank == 0)
|
||||
std::cout << "Using foam mode" << std::endl;
|
||||
Opm::ebosFoamSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosFoamMain(argc, argv);
|
||||
}
|
||||
else if (polymerActive) {
|
||||
if (solventActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining polymer and solvent is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (foamActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining polymer and foam is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (thermalActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining polymer and and energy conservation is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
// run ebos_polymer
|
||||
if (myRank == 0)
|
||||
std::cout << "Using polymer mode" << std::endl;
|
||||
Opm::ebosPolymerSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosPolymerMain(argc, argv);
|
||||
}
|
||||
else if (solventActive) {
|
||||
if (polymerActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining solvent and polymer is not supported\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (foamActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining solvent and foam is not supported\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (thermalActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining solvent and and energy conservation is not supported\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
// run ebos_solvent
|
||||
if (myRank == 0)
|
||||
std::cout << "Using solvent mode" << std::endl;
|
||||
Opm::ebosSolventSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosSolventMain(argc, argv);
|
||||
}
|
||||
else if (thermalActive) {
|
||||
if (solventActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining thermal and solvent is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (polymerActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining thermal and polymer is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (foamActive) {
|
||||
notSupportedErrorStream << "\n"
|
||||
<< "combining thermal and foam is not supported by the multiplexed simulator\n";
|
||||
std::cerr << notSupportedErrorStream.str() << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
// run ebos_thermal
|
||||
if (myRank == 0)
|
||||
std::cout << "Using thermal mode" << std::endl;
|
||||
Opm::ebosEnergySetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosEnergyMain(argc, argv);
|
||||
}
|
||||
else {
|
||||
if (myRank == 0)
|
||||
std::cout << "Using blackoil mode" << std::endl;
|
||||
Opm::ebosBlackOilSetDeck(std::move(deck),
|
||||
std::move(parseContext),
|
||||
std::move(errorGuard),
|
||||
externalSetupTimer.elapsed());
|
||||
return Opm::ebosBlackOilMain(argc, argv);
|
||||
}
|
||||
|
||||
if (myRank == 0)
|
||||
// this is supposed to be unreachable. this should not happen!
|
||||
std::cerr << "Oops: something went wrong when deciding which simulator ought to be used" << std::endl;
|
||||
std::abort();
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
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 2 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/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \brief Provides convenience routines to bring up the simulation at runtime.
|
||||
*/
|
||||
#ifndef EWOMS_STARTEBOS_HH
|
||||
#define EWOMS_STARTEBOS_HH
|
||||
|
||||
#include "ebos.hh"
|
||||
#include <opm/models/utils/start.hh>
|
||||
|
||||
#if HAVE_MPI
|
||||
#include <mpi.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ECL_INPUT
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/OpmLog/EclipsePRTLog.hpp>
|
||||
#include <opm/common/OpmLog/LogUtil.hpp>
|
||||
#endif
|
||||
|
||||
#include <opm/common/utility/String.hpp>
|
||||
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
//! \cond SKIP_THIS
|
||||
|
||||
namespace Opm {
|
||||
|
||||
//! \endcond
|
||||
|
||||
/*!
|
||||
* \ingroup Common
|
||||
*
|
||||
* \brief Wrapper around the main function that set up the OPM
|
||||
* logging (.PRT, .DBG) for ebos.
|
||||
*
|
||||
* \tparam TypeTag The type tag of the problem which needs to be solved
|
||||
*
|
||||
* \param argc The number of command line arguments
|
||||
* \param argv The array of the command line arguments
|
||||
*/
|
||||
template <class TypeTag>
|
||||
static inline int startEbos(int argc, char **argv)
|
||||
{
|
||||
|
||||
int myRank = 0;
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
myRank = Dune::Fem::MPIManager::rank();
|
||||
#else
|
||||
myRank = Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
int paramStatus = setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), /*registerParams=*/true);
|
||||
if (paramStatus == 1)
|
||||
return 1;
|
||||
if (paramStatus == 2)
|
||||
return 0;
|
||||
|
||||
bool outputCout = false;
|
||||
if (myRank == 0)
|
||||
outputCout = EWOMS_GET_PARAM(TypeTag, bool, EnableTerminalOutput);
|
||||
|
||||
std::string deckFilename = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
|
||||
setupLogging(myRank,
|
||||
deckFilename,
|
||||
EWOMS_GET_PARAM(TypeTag, std::string, OutputDir),
|
||||
EWOMS_GET_PARAM(TypeTag, std::string, OutputMode),
|
||||
outputCout, "STDOUT_LOGGER");
|
||||
|
||||
// Call the main function. Parameters are already registered
|
||||
// They should not be registered again
|
||||
return start<TypeTag>(argc, argv, /*registerParams=*/false);
|
||||
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user