mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not use Opm:: prefix when inside namespace Opm
This commit is contained in:
parent
6b02180ca3
commit
a4c0af09d9
@ -52,7 +52,7 @@ struct EbosTypeTag {
|
||||
// Set the problem class
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::EbosTypeTag> {
|
||||
using type = Opm::EbosProblem<TypeTag>;
|
||||
using type = EbosProblem<TypeTag>;
|
||||
};
|
||||
|
||||
// Enable experimental features for ebos: ebos is the research simulator of the OPM
|
||||
@ -66,7 +66,7 @@ struct EnableExperiments<TypeTag, TTag::EbosTypeTag> {
|
||||
// use flow's well model for now
|
||||
template<class TypeTag>
|
||||
struct EclWellModel<TypeTag, TTag::EbosTypeTag> {
|
||||
using type = Opm::BlackoilWellModel<TypeTag>;
|
||||
using type = BlackoilWellModel<TypeTag>;
|
||||
};
|
||||
|
||||
// currently, ebos uses the non-multisegment well model by default to avoid
|
||||
@ -103,7 +103,7 @@ struct UseVolumetricResidual<TypeTag, TTag::EbosTypeTag> {
|
||||
// by default use flow's aquifer model for now
|
||||
template<class TypeTag>
|
||||
struct EclAquiferModel<TypeTag, TTag::EbosTypeTag> {
|
||||
using type = Opm::BlackoilAquiferModel<TypeTag>;
|
||||
using type = BlackoilAquiferModel<TypeTag>;
|
||||
};
|
||||
|
||||
// use flow's linear solver backend for now
|
||||
@ -187,7 +187,7 @@ public:
|
||||
{
|
||||
ParentType::registerParameters();
|
||||
|
||||
Opm::BlackoilModelParametersEbos<TypeTag>::registerParameters();
|
||||
BlackoilModelParametersEbos<TypeTag>::registerParameters();
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableTerminalOutput, "Do *NOT* use!");
|
||||
EWOMS_HIDE_PARAM(TypeTag, DbhpMaxRel);
|
||||
EWOMS_HIDE_PARAM(TypeTag, DwellFractionMax);
|
||||
|
@ -39,11 +39,11 @@ bool ebosBlackOilDeckFileNameIsSet(int argc, char** argv)
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
Opm::setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
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>();
|
||||
|
||||
@ -58,11 +58,11 @@ std::string ebosBlackOilGetDeckFileName(int argc, char** argv)
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
Opm::setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
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).string();
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
@ -70,7 +70,7 @@ std::string ebosBlackOilGetDeckFileName(int argc, char** argv)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::unique_ptr<Opm::ParseContext> ebosBlackOilCreateParseContext(int argc, char** argv)
|
||||
std::unique_ptr<ParseContext> ebosBlackOilCreateParseContext(int argc, char** argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
@ -78,20 +78,20 @@ std::unique_ptr<Opm::ParseContext> ebosBlackOilCreateParseContext(int argc, char
|
||||
// use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of
|
||||
// the work
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
Opm::setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
std::unique_ptr<Opm::ParseContext> result = Vanguard::createParseContext();
|
||||
setupParameters_<ProblemTypeTag>(argc,
|
||||
const_cast<const char**>(argv),
|
||||
/*doRegistration=*/true,
|
||||
/*allowUnused=*/true,
|
||||
/*handleHelp=*/false);
|
||||
std::unique_ptr<ParseContext> result = Vanguard::createParseContext();
|
||||
Parameters::reset<ProblemTypeTag>();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void ebosBlackOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosBlackOilSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
@ -106,7 +106,7 @@ void ebosBlackOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosBlackOilMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,9 +48,9 @@ struct EnableBrine<TypeTag, TTag::EbosBrineTypeTag> {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosBrineSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosBrineSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag;
|
||||
@ -65,7 +65,7 @@ void ebosBrineSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosBrineMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,9 +48,9 @@ struct EnableEnergy<TypeTag, TTag::EbosEnergyTypeTag> {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosEnergySetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosEnergySetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosEnergyTypeTag;
|
||||
@ -65,7 +65,7 @@ void ebosEnergySetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosEnergyMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosEnergyTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,9 +48,9 @@ struct EnableExtbo<TypeTag, TTag::EbosExtboTypeTag> {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosExtboSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosExtboSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosExtboTypeTag;
|
||||
@ -65,7 +65,7 @@ void ebosExtboSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosExtboMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosExtboTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,9 +48,9 @@ struct EnableFoam<TypeTag, TTag::EbosFoamTypeTag> {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosFoamSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosFoamSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag;
|
||||
@ -65,7 +65,7 @@ void ebosFoamSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosFoamMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ public:
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosGasOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosGasOilSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasOilTypeTag;
|
||||
@ -80,7 +80,7 @@ void ebosGasOilSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosGasOilMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasOilTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,23 +53,23 @@ private:
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosGasWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosGasWaterSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasWaterTypeTag;
|
||||
@ -84,7 +84,7 @@ void ebosGasWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosGasWaterMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasWaterTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,23 +49,23 @@ private:
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosOilWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosOilWaterSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag;
|
||||
@ -80,7 +80,7 @@ void ebosOilWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosOilWaterMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,23 +54,23 @@ private:
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosOilWaterPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosOilWaterPolymerSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterPolymerTypeTag;
|
||||
@ -85,7 +85,7 @@ void ebosOilWaterPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosOilWaterPolymerMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterPolymerTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,9 +48,9 @@ struct EnablePolymer<TypeTag, TTag::EbosPolymerTypeTag> {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
void ebosPolymerSetDeck(std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<ParseContext> parseContext,
|
||||
std::unique_ptr<ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag;
|
||||
@ -65,7 +65,7 @@ void ebosPolymerSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
int ebosPolymerMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
return startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -150,8 +150,8 @@ public:
|
||||
{ }
|
||||
|
||||
|
||||
Opm::data::Aquifers aquiferData() const
|
||||
{ return Opm::data::Aquifers{}; }
|
||||
data::Aquifers aquiferData() const
|
||||
{ return data::Aquifers{}; }
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -252,20 +252,20 @@ public:
|
||||
* The input can either be the canonical deck file name or the name of the case
|
||||
* (i.e., without the .DATA extension)
|
||||
*/
|
||||
static Opm::filesystem::path canonicalDeckPath(const std::string& caseName)
|
||||
static filesystem::path canonicalDeckPath(const std::string& caseName)
|
||||
{
|
||||
const auto fileExists = [](const Opm::filesystem::path& f) -> bool
|
||||
const auto fileExists = [](const filesystem::path& f) -> bool
|
||||
{
|
||||
if (!Opm::filesystem::exists(f))
|
||||
if (!filesystem::exists(f))
|
||||
return false;
|
||||
|
||||
if (Opm::filesystem::is_regular_file(f))
|
||||
if (filesystem::is_regular_file(f))
|
||||
return true;
|
||||
|
||||
return Opm::filesystem::is_symlink(f) && Opm::filesystem::is_regular_file(Opm::filesystem::read_symlink(f));
|
||||
return filesystem::is_symlink(f) && filesystem::is_regular_file(filesystem::read_symlink(f));
|
||||
};
|
||||
|
||||
auto simcase = Opm::filesystem::path(caseName);
|
||||
auto simcase = filesystem::path(caseName);
|
||||
if (fileExists(simcase))
|
||||
return simcase;
|
||||
|
||||
@ -280,18 +280,18 @@ public:
|
||||
/*!
|
||||
* \brief Creates an Opm::parseContext object assuming that the parameters are ready.
|
||||
*/
|
||||
static std::unique_ptr<Opm::ParseContext> createParseContext()
|
||||
static std::unique_ptr<ParseContext> createParseContext()
|
||||
{
|
||||
typedef std::pair<std::string, Opm::InputError::Action> ParseModePair;
|
||||
typedef std::pair<std::string, InputError::Action> ParseModePair;
|
||||
typedef std::vector<ParseModePair> ParseModePairs;
|
||||
ParseModePairs tmp;
|
||||
tmp.emplace_back(Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE);
|
||||
tmp.emplace_back(Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN);
|
||||
tmp.emplace_back(Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN);
|
||||
tmp.emplace_back(Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN);
|
||||
tmp.emplace_back(Opm::ParseContext::PARSE_EXTRA_RECORDS, Opm::InputError::WARN);
|
||||
tmp.emplace_back(ParseContext::PARSE_RANDOM_SLASH, InputError::IGNORE);
|
||||
tmp.emplace_back(ParseContext::PARSE_MISSING_DIMS_KEYWORD, InputError::WARN);
|
||||
tmp.emplace_back(ParseContext::SUMMARY_UNKNOWN_WELL, InputError::WARN);
|
||||
tmp.emplace_back(ParseContext::SUMMARY_UNKNOWN_GROUP, InputError::WARN);
|
||||
tmp.emplace_back(ParseContext::PARSE_EXTRA_RECORDS, InputError::WARN);
|
||||
|
||||
auto parseContext = std::make_unique<Opm::ParseContext>(tmp);
|
||||
auto parseContext = std::make_unique<ParseContext>(tmp);
|
||||
|
||||
const std::string ignoredKeywords = EWOMS_GET_PARAM(TypeTag, std::string, IgnoreKeywords);
|
||||
if (ignoredKeywords.size() > 0) {
|
||||
@ -309,7 +309,7 @@ public:
|
||||
}
|
||||
|
||||
if (EWOMS_GET_PARAM(TypeTag, bool, EclStrictParsing))
|
||||
parseContext->update(Opm::InputError::DELAYED_EXIT1);
|
||||
parseContext->update(InputError::DELAYED_EXIT1);
|
||||
|
||||
return parseContext;
|
||||
}
|
||||
@ -331,13 +331,13 @@ public:
|
||||
/*!
|
||||
* \brief Set the Opm::ParseContext object which ought to be used for parsing the deck and creating the Opm::EclipseState object.
|
||||
*/
|
||||
static void setExternalParseContext(std::unique_ptr<Opm::ParseContext> parseContext)
|
||||
static void setExternalParseContext(std::unique_ptr<ParseContext> parseContext)
|
||||
{ externalParseContext_ = std::move(parseContext); }
|
||||
|
||||
/*!
|
||||
* \brief Set the Opm::ErrorGuard object which ought to be used for parsing the deck and creating the Opm::EclipseState object.
|
||||
*/
|
||||
static void setExternalErrorGuard(std::unique_ptr<Opm::ErrorGuard> errorGuard)
|
||||
static void setExternalErrorGuard(std::unique_ptr<ErrorGuard> errorGuard)
|
||||
{ externalErrorGuard_ = std::move(errorGuard); }
|
||||
|
||||
/*!
|
||||
@ -350,13 +350,13 @@ public:
|
||||
* management of these two objects, i.e., they are not allowed to be deleted as long
|
||||
* as the simulator vanguard object is alive.
|
||||
*/
|
||||
static void setExternalDeck(std::unique_ptr<Opm::Deck> deck)
|
||||
static void setExternalDeck(std::unique_ptr<Deck> deck)
|
||||
{ externalDeck_ = std::move(deck); externalDeckSet_ = true; }
|
||||
/*!
|
||||
* \brief Set the Opm::EclipseState object which ought to be used when the simulator
|
||||
* vanguard is instantiated.
|
||||
*/
|
||||
static void setExternalEclState(std::unique_ptr<Opm::EclipseState> eclState)
|
||||
static void setExternalEclState(std::unique_ptr<EclipseState> eclState)
|
||||
{ externalEclState_ = std::move(eclState); }
|
||||
|
||||
/*!
|
||||
@ -455,9 +455,9 @@ public:
|
||||
std::move(parseContext_), /* initFromRestart = */ false,
|
||||
/* checkDeck = */ enableExperiments, outputInterval);
|
||||
|
||||
this->summaryState_ = std::make_unique<Opm::SummaryState>( Opm::TimeService::from_time_t(this->eclSchedule_->getStartTime() ));
|
||||
this->udqState_ = std::make_unique<Opm::UDQState>( this->eclSchedule_->getUDQConfig(0).params().undefinedValue() );
|
||||
this->actionState_ = std::make_unique<Opm::Action::State>() ;
|
||||
this->summaryState_ = std::make_unique<SummaryState>( TimeService::from_time_t(this->eclSchedule_->getStartTime() ));
|
||||
this->udqState_ = std::make_unique<UDQState>( this->eclSchedule_->getUDQConfig(0).params().undefinedValue() );
|
||||
this->actionState_ = std::make_unique<Action::State>() ;
|
||||
|
||||
// Initialize parallelWells with all local wells
|
||||
const auto& schedule_wells = schedule().getWellsatEnd();
|
||||
@ -512,28 +512,28 @@ public:
|
||||
/*!
|
||||
* \brief Return a reference to the parsed ECL deck.
|
||||
*/
|
||||
const Opm::Deck& deck() const
|
||||
const Deck& deck() const
|
||||
{ return *deck_; }
|
||||
|
||||
Opm::Deck& deck()
|
||||
Deck& deck()
|
||||
{ return *deck_; }
|
||||
|
||||
/*!
|
||||
* \brief Return a reference to the internalized ECL deck.
|
||||
*/
|
||||
const Opm::EclipseState& eclState() const
|
||||
const EclipseState& eclState() const
|
||||
{ return *eclState_; }
|
||||
|
||||
Opm::EclipseState& eclState()
|
||||
EclipseState& eclState()
|
||||
{ return *eclState_; }
|
||||
|
||||
/*!
|
||||
* \brief Return a reference to the object that managages the ECL schedule.
|
||||
*/
|
||||
const Opm::Schedule& schedule() const
|
||||
const Schedule& schedule() const
|
||||
{ return *eclSchedule_; }
|
||||
|
||||
Opm::Schedule& schedule()
|
||||
Schedule& schedule()
|
||||
{ return *eclSchedule_; }
|
||||
|
||||
/*!
|
||||
@ -542,14 +542,14 @@ public:
|
||||
* The lifetime of this object is not managed by the vanguard, i.e., the object must
|
||||
* stay valid until after the vanguard gets destroyed.
|
||||
*/
|
||||
static void setExternalSchedule(std::unique_ptr<Opm::Schedule> schedule)
|
||||
static void setExternalSchedule(std::unique_ptr<Schedule> schedule)
|
||||
{ externalEclSchedule_ = std::move(schedule); }
|
||||
|
||||
/*!
|
||||
* \brief Return a reference to the object that determines which quantities ought to
|
||||
* be put into the ECL summary output.
|
||||
*/
|
||||
const Opm::SummaryConfig& summaryConfig() const
|
||||
const SummaryConfig& summaryConfig() const
|
||||
{ return *eclSummaryConfig_; }
|
||||
|
||||
/*!
|
||||
@ -558,7 +558,7 @@ public:
|
||||
* The lifetime of this object is not managed by the vanguard, i.e., the object must
|
||||
* stay valid until after the vanguard gets destroyed.
|
||||
*/
|
||||
static void setExternalSummaryConfig(std::unique_ptr<Opm::SummaryConfig> summaryConfig)
|
||||
static void setExternalSummaryConfig(std::unique_ptr<SummaryConfig> summaryConfig)
|
||||
{ externalEclSummaryConfig_ = std::move(summaryConfig); }
|
||||
|
||||
|
||||
@ -569,10 +569,10 @@ public:
|
||||
* computed, ready to use summary values. The values will typically be used by
|
||||
* the UDQ, WTEST and ACTIONX calculations.
|
||||
*/
|
||||
Opm::SummaryState& summaryState()
|
||||
SummaryState& summaryState()
|
||||
{ return *summaryState_; }
|
||||
|
||||
const Opm::SummaryState& summaryState() const
|
||||
const SummaryState& summaryState() const
|
||||
{ return *summaryState_; }
|
||||
|
||||
|
||||
@ -581,10 +581,10 @@ public:
|
||||
*
|
||||
* The ActionState keeps track of how many times the various actions have run.
|
||||
*/
|
||||
Opm::Action::State& actionState()
|
||||
Action::State& actionState()
|
||||
{ return *actionState_; }
|
||||
|
||||
const Opm::Action::State& actionState() const
|
||||
const Action::State& actionState() const
|
||||
{ return *actionState_; }
|
||||
|
||||
/*!
|
||||
@ -592,10 +592,10 @@ public:
|
||||
*
|
||||
* The UDQState keeps track of the result of UDQ evaluations.
|
||||
*/
|
||||
Opm::UDQState& udqState()
|
||||
UDQState& udqState()
|
||||
{ return *udqState_; }
|
||||
|
||||
const Opm::UDQState& udqState() const
|
||||
const UDQState& udqState() const
|
||||
{ return *udqState_; }
|
||||
|
||||
/*!
|
||||
@ -829,7 +829,7 @@ protected:
|
||||
const auto& schEndIt = this->schedule().end();
|
||||
for(; schIt != schEndIt; ++schIt) {
|
||||
const auto& oilVaporizationControl = schIt->oilvap();
|
||||
if(oilVaporizationControl.getType() == Opm::OilVaporizationProperties::OilVaporization::DRSDTCON) {
|
||||
if(oilVaporizationControl.getType() == OilVaporizationProperties::OilVaporization::DRSDTCON) {
|
||||
drsdtcon = true;
|
||||
break;
|
||||
}
|
||||
@ -868,9 +868,9 @@ private:
|
||||
outputDir = ioConfig.getOutputDir();
|
||||
|
||||
// ensure that the output directory exists and that it is a directory
|
||||
if (!Opm::filesystem::is_directory(outputDir)) {
|
||||
if (!filesystem::is_directory(outputDir)) {
|
||||
try {
|
||||
Opm::filesystem::create_directories(outputDir);
|
||||
filesystem::create_directories(outputDir);
|
||||
}
|
||||
catch (...) {
|
||||
throw std::runtime_error("Creation of output directory '"+outputDir+"' failed\n");
|
||||
@ -910,27 +910,27 @@ private:
|
||||
|
||||
static Scalar externalSetupTime_;
|
||||
|
||||
static std::unique_ptr<Opm::ParseContext> externalParseContext_;
|
||||
static std::unique_ptr<Opm::ErrorGuard> externalErrorGuard_;
|
||||
static std::unique_ptr<Opm::Deck> externalDeck_;
|
||||
static std::unique_ptr<ParseContext> externalParseContext_;
|
||||
static std::unique_ptr<ErrorGuard> externalErrorGuard_;
|
||||
static std::unique_ptr<Deck> externalDeck_;
|
||||
static bool externalDeckSet_;
|
||||
static std::unique_ptr<Opm::EclipseState> externalEclState_;
|
||||
static std::unique_ptr<Opm::Schedule> externalEclSchedule_;
|
||||
static std::unique_ptr<Opm::SummaryConfig> externalEclSummaryConfig_;
|
||||
static std::unique_ptr<EclipseState> externalEclState_;
|
||||
static std::unique_ptr<Schedule> externalEclSchedule_;
|
||||
static std::unique_ptr<SummaryConfig> externalEclSummaryConfig_;
|
||||
|
||||
std::unique_ptr<Opm::SummaryState> summaryState_;
|
||||
std::unique_ptr<Opm::Action::State> actionState_;
|
||||
std::unique_ptr<Opm::UDQState> udqState_;
|
||||
std::unique_ptr<SummaryState> summaryState_;
|
||||
std::unique_ptr<Action::State> actionState_;
|
||||
std::unique_ptr<UDQState> udqState_;
|
||||
|
||||
// these attributes point either to the internal or to the external version of the
|
||||
// parser objects.
|
||||
std::unique_ptr<Opm::ParseContext> parseContext_;
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard_;
|
||||
std::unique_ptr<Opm::Deck> deck_;
|
||||
std::unique_ptr<Opm::EclipseState> eclState_;
|
||||
std::unique_ptr<Opm::Schedule> eclSchedule_;
|
||||
std::unique_ptr<Opm::SummaryConfig> eclSummaryConfig_;
|
||||
std::shared_ptr<Opm::Python> python = std::make_shared<Opm::Python>();
|
||||
std::unique_ptr<ParseContext> parseContext_;
|
||||
std::unique_ptr<ErrorGuard> errorGuard_;
|
||||
std::unique_ptr<Deck> deck_;
|
||||
std::unique_ptr<EclipseState> eclState_;
|
||||
std::unique_ptr<Schedule> eclSchedule_;
|
||||
std::unique_ptr<SummaryConfig> eclSummaryConfig_;
|
||||
std::shared_ptr<Python> python = std::make_shared<Python>();
|
||||
|
||||
Dune::EdgeWeightMethod edgeWeightsMethod_;
|
||||
bool ownersFirst_;
|
||||
@ -971,25 +971,25 @@ template <class TypeTag>
|
||||
typename EclBaseVanguard<TypeTag>::Scalar EclBaseVanguard<TypeTag>::externalSetupTime_ = 0.0;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::ParseContext> EclBaseVanguard<TypeTag>::externalParseContext_ = nullptr;
|
||||
std::unique_ptr<ParseContext> EclBaseVanguard<TypeTag>::externalParseContext_ = nullptr;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::ErrorGuard> EclBaseVanguard<TypeTag>::externalErrorGuard_ = nullptr;
|
||||
std::unique_ptr<ErrorGuard> EclBaseVanguard<TypeTag>::externalErrorGuard_ = nullptr;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::Deck> EclBaseVanguard<TypeTag>::externalDeck_ = nullptr;
|
||||
std::unique_ptr<Deck> EclBaseVanguard<TypeTag>::externalDeck_ = nullptr;
|
||||
|
||||
template <class TypeTag>
|
||||
bool EclBaseVanguard<TypeTag>::externalDeckSet_ = false;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::EclipseState> EclBaseVanguard<TypeTag>::externalEclState_;
|
||||
std::unique_ptr<EclipseState> EclBaseVanguard<TypeTag>::externalEclState_;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::Schedule> EclBaseVanguard<TypeTag>::externalEclSchedule_ = nullptr;
|
||||
std::unique_ptr<Schedule> EclBaseVanguard<TypeTag>::externalEclSchedule_ = nullptr;
|
||||
|
||||
template <class TypeTag>
|
||||
std::unique_ptr<Opm::SummaryConfig> EclBaseVanguard<TypeTag>::externalEclSummaryConfig_ = nullptr;
|
||||
std::unique_ptr<SummaryConfig> EclBaseVanguard<TypeTag>::externalEclSummaryConfig_ = nullptr;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
@ -114,7 +114,7 @@ class EclTransExtensiveQuantities
|
||||
enum { enableExtbo = getPropValue<TypeTag, Properties::EnableExtbo>() };
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef MathToolbox<Evaluation> Toolbox;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
|
||||
typedef Dune::FieldVector<Evaluation, dimWorld> EvalDimVector;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
@ -211,7 +211,7 @@ protected:
|
||||
*/
|
||||
void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx)
|
||||
{
|
||||
Opm::Valgrind::SetUndefined(*this);
|
||||
Valgrind::SetUndefined(*this);
|
||||
|
||||
const auto& problem = elemCtx.problem();
|
||||
const auto& stencil = elemCtx.stencil(timeIdx);
|
||||
|
@ -195,7 +195,7 @@ public:
|
||||
tmpError2 *= dofVolume;
|
||||
}
|
||||
|
||||
this->error_ = Opm::max(std::abs(tmpError), this->error_);
|
||||
this->error_ = max(std::abs(tmpError), this->error_);
|
||||
|
||||
if (std::abs(tmpError) > this->tolerance_)
|
||||
cnvViolated = true;
|
||||
@ -232,14 +232,14 @@ public:
|
||||
// make sure that the error never grows beyond the maximum
|
||||
// allowed one
|
||||
if (this->error_ > newtonMaxError)
|
||||
throw Opm::NumericalIssue("Newton: Error "+std::to_string(double(this->error_))
|
||||
throw NumericalIssue("Newton: Error "+std::to_string(double(this->error_))
|
||||
+" is larger than maximum allowed error of "
|
||||
+std::to_string(double(newtonMaxError)));
|
||||
|
||||
// make sure that the error never grows beyond the maximum
|
||||
// allowed one
|
||||
if (errorSum_ > newtonMaxError)
|
||||
throw Opm::NumericalIssue("Newton: Sum of the error "+std::to_string(double(errorSum_))
|
||||
throw NumericalIssue("Newton: Sum of the error "+std::to_string(double(errorSum_))
|
||||
+" is larger than maximum allowed error of "
|
||||
+std::to_string(double(newtonMaxError)));
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -222,7 +222,7 @@ struct OutputMode {
|
||||
// Set the problem property
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = Opm::EclProblem<TypeTag>;
|
||||
using type = EclProblem<TypeTag>;
|
||||
};
|
||||
|
||||
// Select the element centered finite volume method as spatial discretization
|
||||
@ -245,13 +245,13 @@ private:
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::ThreePhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::oilPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
typedef ThreePhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::oilPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
|
||||
|
||||
public:
|
||||
typedef Opm::EclMaterialLawManager<Traits> EclMaterialLawManager;
|
||||
typedef ::Opm::EclMaterialLawManager<Traits> EclMaterialLawManager;
|
||||
|
||||
typedef typename EclMaterialLawManager::MaterialLaw type;
|
||||
};
|
||||
@ -265,7 +265,7 @@ private:
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::EclThermalLawManager<Scalar, FluidSystem> EclThermalLawManager;
|
||||
typedef ::Opm::EclThermalLawManager<Scalar, FluidSystem> EclThermalLawManager;
|
||||
|
||||
typedef typename EclThermalLawManager::SolidEnergyLaw type;
|
||||
};
|
||||
@ -279,7 +279,7 @@ private:
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::EclThermalLawManager<Scalar, FluidSystem> EclThermalLawManager;
|
||||
typedef ::Opm::EclThermalLawManager<Scalar, FluidSystem> EclThermalLawManager;
|
||||
|
||||
typedef typename EclThermalLawManager::ThermalConductionLaw type;
|
||||
};
|
||||
@ -294,16 +294,16 @@ private:
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
public:
|
||||
typedef Opm::EcfvStencil<Scalar,
|
||||
GridView,
|
||||
/*needIntegrationPos=*/false,
|
||||
/*needNormal=*/false> type;
|
||||
typedef EcfvStencil<Scalar,
|
||||
GridView,
|
||||
/*needIntegrationPos=*/false,
|
||||
/*needNormal=*/false> type;
|
||||
};
|
||||
|
||||
// by default use the dummy aquifer "model"
|
||||
template<class TypeTag>
|
||||
struct EclAquiferModel<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = Opm::EclBaseAquiferModel<TypeTag>;
|
||||
using type = EclBaseAquiferModel<TypeTag>;
|
||||
};
|
||||
|
||||
// use the built-in proof of concept well model by default
|
||||
@ -482,20 +482,20 @@ struct EnableStorageCache<TypeTag, TTag::EclBaseProblem> {
|
||||
// Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = Opm::EclTransFluxModule<TypeTag>;
|
||||
using type = EclTransFluxModule<TypeTag>;
|
||||
};
|
||||
|
||||
// Use the dummy gradient calculator in order not to do unnecessary work.
|
||||
template<class TypeTag>
|
||||
struct GradientCalculator<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = Opm::EclDummyGradientCalculator<TypeTag>;
|
||||
using type = EclDummyGradientCalculator<TypeTag>;
|
||||
};
|
||||
|
||||
// Use a custom Newton-Raphson method class for ebos in order to attain more
|
||||
// sophisticated update and error computation mechanisms
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = Opm::EclNewtonMethod<TypeTag>;
|
||||
using type = EclNewtonMethod<TypeTag>;
|
||||
};
|
||||
|
||||
// The frequency of writing restart (*.ers) files. This is the number of time steps
|
||||
@ -667,7 +667,7 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
|
||||
typedef typename EclEquilInitializer<TypeTag>::ScalarFluidState InitialFluidState;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef MathToolbox<Evaluation> Toolbox;
|
||||
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
|
||||
|
||||
typedef EclWriter<TypeTag> EclWriterType;
|
||||
@ -676,8 +676,8 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
|
||||
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
|
||||
|
||||
typedef Opm::UniformXTabulated2DFunction<Scalar> TabulatedTwoDFunction;
|
||||
typedef Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
typedef UniformXTabulated2DFunction<Scalar> TabulatedTwoDFunction;
|
||||
typedef Tabulated1DFunction<Scalar> TabulatedFunction;
|
||||
|
||||
struct RockParams {
|
||||
Scalar referencePressure;
|
||||
@ -851,7 +851,7 @@ public:
|
||||
restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor);
|
||||
maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions);
|
||||
|
||||
Opm::RelpermDiagnostics relpermDiagnostics;
|
||||
RelpermDiagnostics relpermDiagnostics;
|
||||
relpermDiagnostics.diagnosis(vanguard.eclState(), vanguard.cartesianIndexMapper());
|
||||
}
|
||||
|
||||
@ -1042,7 +1042,7 @@ public:
|
||||
const auto& schedule = simulator.vanguard().schedule();
|
||||
const auto& events = schedule[episodeIdx].events();
|
||||
|
||||
if (episodeIdx >= 0 && events.hasEvent(Opm::ScheduleEvents::GEO_MODIFIER)) {
|
||||
if (episodeIdx >= 0 && events.hasEvent(ScheduleEvents::GEO_MODIFIER)) {
|
||||
// bring the contents of the keywords to the current state of the SCHEDULE
|
||||
// section.
|
||||
//
|
||||
@ -1078,7 +1078,7 @@ public:
|
||||
|
||||
// react to TUNING changes
|
||||
bool tuningEvent = false;
|
||||
if (episodeIdx > 0 && enableTuning_ && events.hasEvent(Opm::ScheduleEvents::TUNING_CHANGE))
|
||||
if (episodeIdx > 0 && enableTuning_ && events.hasEvent(ScheduleEvents::TUNING_CHANGE))
|
||||
{
|
||||
const auto& tuning = schedule[episodeIdx].tuning();
|
||||
initialTimeStepSize_ = tuning.TSINIT;
|
||||
@ -1117,7 +1117,7 @@ public:
|
||||
if (enableExperiments && this->gridView().comm().rank() == 0 && episodeIdx >= 0) {
|
||||
std::ostringstream ss;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||
boost::posix_time::ptime date = boost::posix_time::from_time_t((this->simulator().startTime())) + boost::posix_time::milliseconds(static_cast<long long>(this->simulator().time() / Opm::prefix::milli));
|
||||
boost::posix_time::ptime date = boost::posix_time::from_time_t((this->simulator().startTime())) + boost::posix_time::milliseconds(static_cast<long long>(this->simulator().time() / prefix::milli));
|
||||
ss.imbue(std::locale(std::locale::classic(), facet));
|
||||
ss <<"\nTime step " << this->simulator().timeStepIndex() << ", stepsize "
|
||||
<< unit::convert::to(this->simulator().timeStepSize(), unit::day) << " days,"
|
||||
@ -1308,8 +1308,8 @@ public:
|
||||
|
||||
|
||||
std::unordered_map<std::string, double> fetchWellPI(int reportStep,
|
||||
const Opm::Action::ActionX& action,
|
||||
const Opm::Schedule& schedule,
|
||||
const Action::ActionX& action,
|
||||
const Schedule& schedule,
|
||||
const std::vector<std::string>& matching_wells) {
|
||||
|
||||
auto wellpi_wells = action.wellpi_wells(WellMatcher(schedule[reportStep].well_order(),
|
||||
@ -1356,16 +1356,16 @@ public:
|
||||
|
||||
void applyActions(int reportStep,
|
||||
double sim_time,
|
||||
Opm::EclipseState& ecl_state,
|
||||
Opm::Schedule& schedule,
|
||||
Opm::Action::State& actionState,
|
||||
Opm::SummaryState& summaryState) {
|
||||
EclipseState& ecl_state,
|
||||
Schedule& schedule,
|
||||
Action::State& actionState,
|
||||
SummaryState& summaryState) {
|
||||
const auto& actions = schedule[reportStep].actions();
|
||||
if (actions.empty())
|
||||
return;
|
||||
|
||||
Opm::Action::Context context( summaryState, schedule[reportStep].wlist_manager() );
|
||||
auto now = Opm::TimeStampUTC( schedule.getStartTime() ) + std::chrono::duration<double>(sim_time);
|
||||
Action::Context context( summaryState, schedule[reportStep].wlist_manager() );
|
||||
auto now = TimeStampUTC( schedule.getStartTime() ) + std::chrono::duration<double>(sim_time);
|
||||
std::string ts;
|
||||
{
|
||||
std::ostringstream os;
|
||||
@ -1381,7 +1381,7 @@ public:
|
||||
}
|
||||
|
||||
bool commit_wellstate = false;
|
||||
auto simTime = Opm::asTimeT(now);
|
||||
auto simTime = asTimeT(now);
|
||||
for (const auto& action : actions.pending(actionState, simTime)) {
|
||||
auto actionResult = action->eval(context);
|
||||
if (actionResult) {
|
||||
@ -1393,18 +1393,18 @@ public:
|
||||
wells_string += matching_wells.back();
|
||||
}
|
||||
std::string msg = "The action: " + action->name() + " evaluated to true at " + ts + " wells: " + wells_string;
|
||||
Opm::OpmLog::info(msg);
|
||||
OpmLog::info(msg);
|
||||
|
||||
const auto& wellpi = this->fetchWellPI(reportStep, *action, schedule, matching_wells);
|
||||
|
||||
auto affected_wells = schedule.applyAction(reportStep, Opm::TimeService::from_time_t(simTime), *action, actionResult, wellpi);
|
||||
auto affected_wells = schedule.applyAction(reportStep, TimeService::from_time_t(simTime), *action, actionResult, wellpi);
|
||||
actionState.add_run(*action, simTime);
|
||||
this->wellModel_.updateEclWells(reportStep, affected_wells);
|
||||
if (!affected_wells.empty())
|
||||
commit_wellstate = true;
|
||||
} else {
|
||||
std::string msg = "The action: " + action->name() + " evaluated to false at " + ts;
|
||||
Opm::OpmLog::info(msg);
|
||||
OpmLog::info(msg);
|
||||
}
|
||||
}
|
||||
/*
|
||||
@ -1961,8 +1961,8 @@ public:
|
||||
for (unsigned eqIdx = 0; eqIdx < numEq; ++ eqIdx) {
|
||||
rate[eqIdx] /= this->model().dofTotalVolume(globalDofIdx);
|
||||
|
||||
Opm::Valgrind::CheckDefined(rate[eqIdx]);
|
||||
assert(Opm::isfinite(rate[eqIdx]));
|
||||
Valgrind::CheckDefined(rate[eqIdx]);
|
||||
assert(isfinite(rate[eqIdx]));
|
||||
}
|
||||
|
||||
if (enableAquifers_)
|
||||
@ -2130,7 +2130,7 @@ public:
|
||||
const InitialFluidState& initialFluidState(unsigned globalDofIdx) const
|
||||
{ return initialFluidStates_[globalDofIdx]; }
|
||||
|
||||
const Opm::EclipseIO& eclIO() const
|
||||
const EclipseIO& eclIO() const
|
||||
{ return eclWriter_->eclIO(); }
|
||||
|
||||
bool vapparsActive() const
|
||||
@ -2138,7 +2138,7 @@ public:
|
||||
const auto& simulator = this->simulator();
|
||||
int episodeIdx = std::max(simulator.episodeIndex(), 0);
|
||||
const auto& oilVaporizationControl = simulator.vanguard().schedule()[episodeIdx].oilvap();
|
||||
return (oilVaporizationControl.getType() == Opm::OilVaporizationProperties::OilVaporization::VAPPARS);
|
||||
return (oilVaporizationControl.getType() == OilVaporizationProperties::OilVaporization::VAPPARS);
|
||||
}
|
||||
|
||||
bool nonTrivialBoundaryConditions() const
|
||||
@ -2200,12 +2200,12 @@ public:
|
||||
tableIdx = rockTableIdx_[elementIdx];
|
||||
|
||||
const auto& fs = intQuants.fluidState();
|
||||
LhsEval effectiveOilPressure = Opm::decay<LhsEval>(fs.pressure(oilPhaseIdx));
|
||||
LhsEval effectiveOilPressure = decay<LhsEval>(fs.pressure(oilPhaseIdx));
|
||||
if (!minOilPressure_.empty())
|
||||
// The pore space change is irreversible
|
||||
effectiveOilPressure =
|
||||
Opm::min(Opm::decay<LhsEval>(fs.pressure(oilPhaseIdx)),
|
||||
minOilPressure_[elementIdx]);
|
||||
min(decay<LhsEval>(fs.pressure(oilPhaseIdx)),
|
||||
minOilPressure_[elementIdx]);
|
||||
|
||||
if (!overburdenPressure_.empty())
|
||||
effectiveOilPressure -= overburdenPressure_[elementIdx];
|
||||
@ -2217,7 +2217,7 @@ public:
|
||||
|
||||
// water compaction
|
||||
assert(!rockCompPoroMultWc_.empty());
|
||||
LhsEval SwMax = Opm::max(Opm::decay<LhsEval>(fs.saturation(waterPhaseIdx)), maxWaterSaturation_[elementIdx]);
|
||||
LhsEval SwMax = max(decay<LhsEval>(fs.saturation(waterPhaseIdx)), maxWaterSaturation_[elementIdx]);
|
||||
LhsEval SwDeltaMax = SwMax - initialFluidStates_[elementIdx].saturation(waterPhaseIdx);
|
||||
|
||||
return rockCompPoroMultWc_[tableIdx].eval(effectiveOilPressure, SwDeltaMax, /*extrapolation=*/true);
|
||||
@ -2239,13 +2239,13 @@ public:
|
||||
tableIdx = rockTableIdx_[elementIdx];
|
||||
|
||||
const auto& fs = intQuants.fluidState();
|
||||
LhsEval effectiveOilPressure = Opm::decay<LhsEval>(fs.pressure(oilPhaseIdx));
|
||||
LhsEval effectiveOilPressure = decay<LhsEval>(fs.pressure(oilPhaseIdx));
|
||||
|
||||
if (!minOilPressure_.empty())
|
||||
// The pore space change is irreversible
|
||||
effectiveOilPressure =
|
||||
Opm::min(Opm::decay<LhsEval>(fs.pressure(oilPhaseIdx)),
|
||||
minOilPressure_[elementIdx]);
|
||||
min(decay<LhsEval>(fs.pressure(oilPhaseIdx)),
|
||||
minOilPressure_[elementIdx]);
|
||||
|
||||
if (overburdenPressure_.size() > 0)
|
||||
effectiveOilPressure -= overburdenPressure_[elementIdx];
|
||||
@ -2255,7 +2255,7 @@ public:
|
||||
|
||||
// water compaction
|
||||
assert(!rockCompTransMultWc_.empty());
|
||||
LhsEval SwMax = Opm::max(Opm::decay<LhsEval>(fs.saturation(waterPhaseIdx)), maxWaterSaturation_[elementIdx]);
|
||||
LhsEval SwMax = max(decay<LhsEval>(fs.saturation(waterPhaseIdx)), maxWaterSaturation_[elementIdx]);
|
||||
LhsEval SwDeltaMax = SwMax - initialFluidStates_[elementIdx].saturation(waterPhaseIdx);
|
||||
|
||||
return rockCompTransMultWc_[tableIdx].eval(effectiveOilPressure, SwDeltaMax, /*extrapolation=*/true);
|
||||
@ -2396,21 +2396,21 @@ private:
|
||||
Scalar distZ = vanguard.cellThickness(compressedDofIdx);
|
||||
const auto& iq = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||
const auto& fs = iq.fluidState();
|
||||
Scalar t = Opm::getValue(fs.temperature(FluidSystem::oilPhaseIdx));
|
||||
Scalar p = Opm::getValue(fs.pressure(FluidSystem::oilPhaseIdx));
|
||||
Scalar so = Opm::getValue(fs.saturation(FluidSystem::oilPhaseIdx));
|
||||
Scalar t = getValue(fs.temperature(FluidSystem::oilPhaseIdx));
|
||||
Scalar p = getValue(fs.pressure(FluidSystem::oilPhaseIdx));
|
||||
Scalar so = getValue(fs.saturation(FluidSystem::oilPhaseIdx));
|
||||
Scalar rssat = FluidSystem::oilPvt().saturatedGasDissolutionFactor(fs.pvtRegionIndex(),t,p);
|
||||
Scalar saturatedDensity = FluidSystem::oilPvt().saturatedInverseFormationVolumeFactor(fs.pvtRegionIndex(),t,p);
|
||||
Scalar rsZero = 0.0;
|
||||
Scalar pureDensity = FluidSystem::oilPvt().inverseFormationVolumeFactor(fs.pvtRegionIndex(),t,p,rsZero);
|
||||
Scalar deltaDensity = saturatedDensity-pureDensity;
|
||||
Scalar rs = Opm::getValue(fs.Rs());
|
||||
Scalar rs = getValue(fs.Rs());
|
||||
Scalar visc = FluidSystem::oilPvt().viscosity(fs.pvtRegionIndex(),t,p,rs);
|
||||
Scalar poro = Opm::getValue(iq.porosity());
|
||||
Scalar poro = getValue(iq.porosity());
|
||||
// Note that for so = 0 this gives no limits (inf) for the dissolution rate
|
||||
// Also we restrict the effect of convective mixing to positive density differences
|
||||
// i.e. we only allow for fingers moving downward
|
||||
convectiveDrs_[compressedDofIdx] = permz * rssat * Opm::max(0.0, deltaDensity) * g / ( so * visc * distZ * poro);
|
||||
convectiveDrs_[compressedDofIdx] = permz * rssat * max(0.0, deltaDensity) * g / ( so * visc * distZ * poro);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2436,9 +2436,9 @@ private:
|
||||
const auto& oilVaporizationControl = simulator.vanguard().schedule()[episodeIdx].oilvap();
|
||||
if (oilVaporizationControl.getOption(pvtRegionIdx) || fs.saturation(gasPhaseIdx) > freeGasMinSaturation_)
|
||||
lastRs_[compressedDofIdx] =
|
||||
Opm::BlackOil::template getRs_<FluidSystem,
|
||||
FluidState,
|
||||
Scalar>(fs, iq.pvtRegionIndex());
|
||||
BlackOil::template getRs_<FluidSystem,
|
||||
FluidState,
|
||||
Scalar>(fs, iq.pvtRegionIndex());
|
||||
else
|
||||
lastRs_[compressedDofIdx] = std::numeric_limits<Scalar>::infinity();
|
||||
}
|
||||
@ -2464,9 +2464,9 @@ private:
|
||||
typedef typename std::decay<decltype(fs)>::type FluidState;
|
||||
|
||||
lastRv_[compressedDofIdx] =
|
||||
Opm::BlackOil::template getRv_<FluidSystem,
|
||||
FluidState,
|
||||
Scalar>(fs, iq.pvtRegionIndex());
|
||||
BlackOil::template getRv_<FluidSystem,
|
||||
FluidState,
|
||||
Scalar>(fs, iq.pvtRegionIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2491,7 +2491,7 @@ private:
|
||||
const auto& iq = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||
const auto& fs = iq.fluidState();
|
||||
|
||||
Scalar So = Opm::decay<Scalar>(fs.saturation(oilPhaseIdx));
|
||||
Scalar So = decay<Scalar>(fs.saturation(oilPhaseIdx));
|
||||
|
||||
maxOilSaturation_[compressedDofIdx] = std::max(maxOilSaturation_[compressedDofIdx], So);
|
||||
}
|
||||
@ -2525,7 +2525,7 @@ private:
|
||||
const auto& iq = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||
const auto& fs = iq.fluidState();
|
||||
|
||||
Scalar Sw = Opm::decay<Scalar>(fs.saturation(waterPhaseIdx));
|
||||
Scalar Sw = decay<Scalar>(fs.saturation(waterPhaseIdx));
|
||||
maxWaterSaturation_[compressedDofIdx] = std::max(maxWaterSaturation_[compressedDofIdx], Sw);
|
||||
}
|
||||
|
||||
@ -2554,7 +2554,7 @@ private:
|
||||
|
||||
minOilPressure_[compressedDofIdx] =
|
||||
std::min(minOilPressure_[compressedDofIdx],
|
||||
Opm::getValue(fs.pressure(oilPhaseIdx)));
|
||||
getValue(fs.pressure(oilPhaseIdx)));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -2596,9 +2596,9 @@ private:
|
||||
if (overburdTables.size() != numRocktabTables)
|
||||
throw std::runtime_error(std::to_string(numRocktabTables) +" OVERBURD tables is expected, but " + std::to_string(overburdTables.size()) +" is provided");
|
||||
|
||||
std::vector<Opm::Tabulated1DFunction<Scalar>> overburdenTables(numRocktabTables);
|
||||
std::vector<Tabulated1DFunction<Scalar>> overburdenTables(numRocktabTables);
|
||||
for (size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
|
||||
const Opm::OverburdTable& overburdTable = overburdTables.template getTable<Opm::OverburdTable>(regionIdx);
|
||||
const OverburdTable& overburdTable = overburdTables.template getTable<OverburdTable>(regionIdx);
|
||||
overburdenTables[regionIdx].setXYContainers(overburdTable.getDepthColumn(),overburdTable.getOverburdenPressureColumn());
|
||||
}
|
||||
|
||||
@ -2647,7 +2647,7 @@ private:
|
||||
rockCompPoroMult_.resize(numRocktabTables);
|
||||
rockCompTransMult_.resize(numRocktabTables);
|
||||
for (size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
|
||||
const auto& rocktabTable = rocktabTables.template getTable<Opm::RocktabTable>(regionIdx);
|
||||
const auto& rocktabTable = rocktabTables.template getTable<RocktabTable>(regionIdx);
|
||||
const auto& pressureColumn = rocktabTable.getPressureColumn();
|
||||
const auto& poroColumn = rocktabTable.getPoreVolumeMultiplierColumn();
|
||||
const auto& transColumn = rocktabTable.getTransmissibilityMultiplierColumn();
|
||||
@ -2670,7 +2670,7 @@ private:
|
||||
//TODO check size match
|
||||
rockCompPoroMultWc_.resize(numRocktabTables, TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
|
||||
for (size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
|
||||
const Opm::RockwnodTable& rockwnodTable = rockwnodTables.template getTable<Opm::RockwnodTable>(regionIdx);
|
||||
const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
|
||||
const auto& rock2dTable = rock2dTables[regionIdx];
|
||||
|
||||
if (rockwnodTable.getSaturationColumn().size() != rock2dTable.sizeMultValues())
|
||||
@ -2688,7 +2688,7 @@ private:
|
||||
if (!rock2dtrTables.empty()) {
|
||||
rockCompTransMultWc_.resize(numRocktabTables, TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
|
||||
for (size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
|
||||
const Opm::RockwnodTable& rockwnodTable = rockwnodTables.template getTable<Opm::RockwnodTable>(regionIdx);
|
||||
const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
|
||||
const auto& rock2dtrTable = rock2dtrTables[regionIdx];
|
||||
|
||||
if (rockwnodTable.getSaturationColumn().size() != rock2dtrTable.sizeMultValues())
|
||||
@ -2816,7 +2816,7 @@ private:
|
||||
const auto& simulator = this->simulator();
|
||||
|
||||
// initial condition corresponds to hydrostatic conditions.
|
||||
typedef Opm::EclEquilInitializer<TypeTag> EquilInitializer;
|
||||
typedef EclEquilInitializer<TypeTag> EquilInitializer;
|
||||
EquilInitializer equilInitializer(simulator, *materialLawManager_);
|
||||
|
||||
size_t numElems = this->model().numGridDof();
|
||||
@ -2861,7 +2861,7 @@ private:
|
||||
const std::string msg {"Support of the RESTART for polymer molecular weight "
|
||||
"is not implemented yet. The polymer weight value will be "
|
||||
"zero when RESTART begins"};
|
||||
Opm::OpmLog::warning("NO_POLYMW_RESTART", msg);
|
||||
OpmLog::warning("NO_POLYMW_RESTART", msg);
|
||||
polymerMoleWeight_.resize(numElems, 0.0);
|
||||
}
|
||||
|
||||
@ -3077,8 +3077,8 @@ private:
|
||||
Dune::FieldVector<Scalar, numPhases> pc(0.0);
|
||||
const auto& matParams = materialLawParams(dofIdx);
|
||||
MaterialLaw::capillaryPressures(pc, matParams, dofFluidState);
|
||||
Opm::Valgrind::CheckDefined(oilPressure);
|
||||
Opm::Valgrind::CheckDefined(pc);
|
||||
Valgrind::CheckDefined(oilPressure);
|
||||
Valgrind::CheckDefined(pc);
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
if (!FluidSystem::phaseIsActive(phaseIdx))
|
||||
continue;
|
||||
@ -3185,7 +3185,7 @@ private:
|
||||
unsigned compressedDofIdx = elemCtx.globalSpaceIndex(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||
const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||
|
||||
maxPolymerAdsorption_[compressedDofIdx] = std::max(maxPolymerAdsorption_[compressedDofIdx] , Opm::scalarValue(intQuants.polymerAdsorption()));
|
||||
maxPolymerAdsorption_[compressedDofIdx] = std::max(maxPolymerAdsorption_[compressedDofIdx] , scalarValue(intQuants.polymerAdsorption()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3230,9 +3230,9 @@ private:
|
||||
|
||||
struct PffDofData_
|
||||
{
|
||||
Opm::ConditionalStorage<enableEnergy, Scalar> thermalHalfTransIn;
|
||||
Opm::ConditionalStorage<enableEnergy, Scalar> thermalHalfTransOut;
|
||||
Opm::ConditionalStorage<enableDiffusion, Scalar> diffusivity;
|
||||
ConditionalStorage<enableEnergy, Scalar> thermalHalfTransIn;
|
||||
ConditionalStorage<enableEnergy, Scalar> thermalHalfTransOut;
|
||||
ConditionalStorage<enableDiffusion, Scalar> diffusivity;
|
||||
Scalar transmissibility;
|
||||
};
|
||||
|
||||
@ -3436,10 +3436,10 @@ private:
|
||||
int reportStepIdx = std::max(episodeIdx, 0);
|
||||
const auto& events = simulator.vanguard().schedule()[reportStepIdx].events();
|
||||
bool wellEventOccured =
|
||||
events.hasEvent(Opm::ScheduleEvents::NEW_WELL)
|
||||
|| events.hasEvent(Opm::ScheduleEvents::PRODUCTION_UPDATE)
|
||||
|| events.hasEvent(Opm::ScheduleEvents::INJECTION_UPDATE)
|
||||
|| events.hasEvent(Opm::ScheduleEvents::WELL_STATUS_CHANGE);
|
||||
events.hasEvent(ScheduleEvents::NEW_WELL)
|
||||
|| events.hasEvent(ScheduleEvents::PRODUCTION_UPDATE)
|
||||
|| events.hasEvent(ScheduleEvents::INJECTION_UPDATE)
|
||||
|| events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE);
|
||||
if (episodeIdx >= 0 && wellEventOccured && maxTimeStepAfterWellEvent_ > 0)
|
||||
dtNext = std::min(dtNext, maxTimeStepAfterWellEvent_);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ private:
|
||||
const auto& vanguard = simulator_.vanguard();
|
||||
const auto& gridView = vanguard.gridView();
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef MathToolbox<Evaluation> Toolbox;
|
||||
// loop over the whole grid and compute the maximum gravity adjusted pressure
|
||||
// difference between two EQUIL regions.
|
||||
auto elemIt = gridView.template begin</*codim=*/ 0>();
|
||||
@ -238,7 +238,7 @@ private:
|
||||
// don't include connections with negligible flow
|
||||
const Evaluation& trans = simulator_.problem().transmissibility(elemCtx, i, j);
|
||||
Scalar faceArea = face.area();
|
||||
if (std::abs(faceArea*Opm::getValue(trans)) < 1e-18)
|
||||
if (std::abs(faceArea*getValue(trans)) < 1e-18)
|
||||
continue;
|
||||
|
||||
// determine the maximum difference of the pressure of any phase over the
|
||||
@ -277,7 +277,7 @@ private:
|
||||
const auto& gridView = vanguard.gridView();
|
||||
const auto& elementMapper = simulator_.model().elementMapper();
|
||||
const auto& eclState = simulator_.vanguard().eclState();
|
||||
const Opm::SimulationConfig& simConfig = eclState.getSimulationConfig();
|
||||
const SimulationConfig& simConfig = eclState.getSimulationConfig();
|
||||
const auto& thpres = simConfig.getThresholdPressure();
|
||||
|
||||
// set the threshold pressures for all EQUIL region boundaries which have a
|
||||
@ -338,11 +338,11 @@ private:
|
||||
|
||||
}
|
||||
|
||||
void extractThpresft_(const Opm::DeckKeyword& thpresftKeyword)
|
||||
void extractThpresft_(const DeckKeyword& thpresftKeyword)
|
||||
{
|
||||
// retrieve the faults collection.
|
||||
const Opm::EclipseState& eclState = simulator_.vanguard().eclState();
|
||||
const Opm::FaultCollection& faults = eclState.getFaults();
|
||||
const EclipseState& eclState = simulator_.vanguard().eclState();
|
||||
const FaultCollection& faults = eclState.getFaults();
|
||||
|
||||
// extract the multipliers from the deck keyword
|
||||
int numFaults = faults.size();
|
||||
@ -350,7 +350,7 @@ private:
|
||||
thpresftValues_.resize(numFaults, -1.0);
|
||||
cartElemFaultIdx_.resize(numCartesianElem, -1);
|
||||
for (size_t recordIdx = 0; recordIdx < thpresftKeyword.size(); ++ recordIdx) {
|
||||
const Opm::DeckRecord& record = thpresftKeyword.getRecord(recordIdx);
|
||||
const DeckRecord& record = thpresftKeyword.getRecord(recordIdx);
|
||||
|
||||
const std::string& faultName = record.getItem("FAULT_NAME").getTrimmedString(0);
|
||||
Scalar thpresValue = record.getItem("VALUE").getSIDouble(0);
|
||||
@ -361,7 +361,7 @@ private:
|
||||
continue;
|
||||
|
||||
thpresftValues_[faultIdx] = thpresValue;
|
||||
for (const Opm::FaultFace& face: fault)
|
||||
for (const FaultFace& face: fault)
|
||||
// "face" is a misnomer because the object describes a set of cell
|
||||
// indices, but we go with the conventions of the parser here...
|
||||
for (size_t cartElemIdx: face)
|
||||
|
@ -74,7 +74,7 @@ class EclTracerModel
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
using Indices = GetPropType<TypeTag, Properties::Indices>;
|
||||
|
||||
typedef Opm::DenseAd::Evaluation<Scalar,1> TracerEvaluation;
|
||||
typedef DenseAd::Evaluation<Scalar,1> TracerEvaluation;
|
||||
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
@ -332,19 +332,19 @@ protected:
|
||||
const auto& intQuants = elemCtx.intensiveQuantities(scvIdx, timeIdx);
|
||||
const auto& fs = intQuants.fluidState();
|
||||
Scalar phaseVolume =
|
||||
Opm::decay<Scalar>(fs.saturation(tracerPhaseIdx_[tracerIdx]))
|
||||
*Opm::decay<Scalar>(fs.invB(tracerPhaseIdx_[tracerIdx]))
|
||||
*Opm::decay<Scalar>(intQuants.porosity());
|
||||
decay<Scalar>(fs.saturation(tracerPhaseIdx_[tracerIdx]))
|
||||
*decay<Scalar>(fs.invB(tracerPhaseIdx_[tracerIdx]))
|
||||
*decay<Scalar>(intQuants.porosity());
|
||||
|
||||
// avoid singular matrix if no water is present.
|
||||
phaseVolume = Opm::max(phaseVolume, 1e-10);
|
||||
phaseVolume = max(phaseVolume, 1e-10);
|
||||
|
||||
if (std::is_same<LhsEval, Scalar>::value)
|
||||
tracerStorage = phaseVolume * tracerConcentrationInitial_[tracerIdx][globalDofIdx];
|
||||
else
|
||||
tracerStorage =
|
||||
phaseVolume
|
||||
* Opm::variable<LhsEval>(tracerConcentration_[tracerIdx][globalDofIdx][0], 0);
|
||||
* variable<LhsEval>(tracerConcentration_[tracerIdx][globalDofIdx][0], 0);
|
||||
}
|
||||
|
||||
// evaluate the tracerflux over one face
|
||||
@ -370,12 +370,12 @@ protected:
|
||||
const auto& fs = intQuants.fluidState();
|
||||
|
||||
Scalar A = scvf.area();
|
||||
Scalar v = Opm::decay<Scalar>(extQuants.volumeFlux(tracerPhaseIdx));
|
||||
Scalar b = Opm::decay<Scalar>(fs.invB(tracerPhaseIdx_[tracerIdx]));
|
||||
Scalar v = decay<Scalar>(extQuants.volumeFlux(tracerPhaseIdx));
|
||||
Scalar b = decay<Scalar>(fs.invB(tracerPhaseIdx_[tracerIdx]));
|
||||
Scalar c = tracerConcentration_[tracerIdx][globalUpIdx];
|
||||
|
||||
if (inIdx == upIdx)
|
||||
tracerFlux = A*v*b*Opm::variable<TracerEvaluation>(c, 0);
|
||||
tracerFlux = A*v*b*variable<TracerEvaluation>(c, 0);
|
||||
else
|
||||
tracerFlux = A*v*b*c;
|
||||
|
||||
@ -427,8 +427,8 @@ protected:
|
||||
|
||||
Scalar extrusionFactor =
|
||||
elemCtx.intensiveQuantities(/*dofIdx=*/ 0, /*timeIdx=*/0).extrusionFactor();
|
||||
Opm::Valgrind::CheckDefined(extrusionFactor);
|
||||
assert(Opm::isfinite(extrusionFactor));
|
||||
Valgrind::CheckDefined(extrusionFactor);
|
||||
assert(isfinite(extrusionFactor));
|
||||
assert(extrusionFactor > 0.0);
|
||||
Scalar scvVolume =
|
||||
elemCtx.stencil(/*timeIdx=*/0).subControlVolume(/*dofIdx=*/ 0).volume()
|
||||
@ -468,14 +468,14 @@ protected:
|
||||
const auto& wells = simulator_.vanguard().schedule().getWells(episodeIdx);
|
||||
for (const auto& well : wells) {
|
||||
|
||||
if (well.getStatus() == Opm::Well::Status::SHUT)
|
||||
if (well.getStatus() == Well::Status::SHUT)
|
||||
continue;
|
||||
|
||||
const double wtracer = well.getTracerProperties().getConcentration(tracerNames_[tracerIdx]);
|
||||
std::array<int, 3> cartesianCoordinate;
|
||||
for (auto& connection : well.getConnections()) {
|
||||
|
||||
if (connection.state() == Opm::Connection::State::SHUT)
|
||||
if (connection.state() == Connection::State::SHUT)
|
||||
continue;
|
||||
|
||||
cartesianCoordinate[0] = connection.getI();
|
||||
|
@ -195,10 +195,10 @@ public:
|
||||
std::vector<std::size_t> wbp_index_list;
|
||||
if (collectToIORank_.isIORank()) {
|
||||
const auto& schedule = simulator_.vanguard().schedule();
|
||||
eclIO_.reset(new Opm::EclipseIO(simulator_.vanguard().eclState(),
|
||||
Opm::UgGridHelpers::createEclipseGrid(globalGrid(), simulator_.vanguard().eclState().getInputGrid()),
|
||||
schedule,
|
||||
simulator_.vanguard().summaryConfig()));
|
||||
eclIO_.reset(new EclipseIO(simulator_.vanguard().eclState(),
|
||||
UgGridHelpers::createEclipseGrid(globalGrid(), simulator_.vanguard().eclState().getInputGrid()),
|
||||
schedule,
|
||||
simulator_.vanguard().summaryConfig()));
|
||||
|
||||
const auto& wbp_calculators = eclIO_->summary().wbp_calculators( schedule.size() - 1 );
|
||||
wbp_index_list = wbp_calculators.index_list();
|
||||
@ -225,7 +225,7 @@ public:
|
||||
~EclWriter()
|
||||
{ }
|
||||
|
||||
const Opm::EclipseIO& eclIO() const
|
||||
const EclipseIO& eclIO() const
|
||||
{
|
||||
assert(eclIO_);
|
||||
return *eclIO_;
|
||||
@ -242,8 +242,8 @@ public:
|
||||
std::map<std::string, std::vector<int> > integerVectors;
|
||||
if (collectToIORank_.isParallel())
|
||||
integerVectors.emplace("MPI_RANK", collectToIORank_.globalRanks());
|
||||
auto cartMap = Opm::cartesianToCompressed(globalGrid().size(0),
|
||||
Opm::UgGridHelpers::globalCell(globalGrid()));
|
||||
auto cartMap = cartesianToCompressed(globalGrid().size(0),
|
||||
UgGridHelpers::globalCell(globalGrid()));
|
||||
eclIO_->writeInitial(computeTrans_(cartMap), integerVectors, exportNncStructure_(cartMap));
|
||||
}
|
||||
}
|
||||
@ -380,7 +380,7 @@ public:
|
||||
|
||||
MPI_Bcast(buffer.data(), buffer_size, MPI_CHAR, collectToIORank_.ioRank, MPI_COMM_WORLD);
|
||||
if (!collectToIORank_.isIORank()) {
|
||||
Opm::SummaryState& st = summaryState();
|
||||
SummaryState& st = summaryState();
|
||||
st.deserialize(buffer);
|
||||
}
|
||||
#endif
|
||||
@ -400,7 +400,7 @@ public:
|
||||
auto localGroupAndNetworkData = simulator_.problem().wellModel()
|
||||
.groupAndNetworkData(reportStepNum, simulator_.vanguard().schedule());
|
||||
|
||||
Opm::data::Solution localCellData = {};
|
||||
data::Solution localCellData = {};
|
||||
if (! isSubStep) {
|
||||
this->eclOutputModule_->assignToSolution(localCellData);
|
||||
|
||||
@ -429,25 +429,25 @@ public:
|
||||
{
|
||||
bool enableHysteresis = simulator_.problem().materialLawManager()->enableHysteresis();
|
||||
bool enableSwatinit = simulator_.vanguard().eclState().fieldProps().has_double("SWATINIT");
|
||||
std::vector<Opm::RestartKey> solutionKeys{
|
||||
{"PRESSURE", Opm::UnitSystem::measure::pressure},
|
||||
{"SWAT", Opm::UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx))},
|
||||
{"SGAS", Opm::UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx))},
|
||||
{"TEMP" , Opm::UnitSystem::measure::temperature, enableEnergy},
|
||||
{"SSOLVENT" , Opm::UnitSystem::measure::identity, enableSolvent},
|
||||
{"RS", Opm::UnitSystem::measure::gas_oil_ratio, FluidSystem::enableDissolvedGas()},
|
||||
{"RV", Opm::UnitSystem::measure::oil_gas_ratio, FluidSystem::enableVaporizedOil()},
|
||||
{"SOMAX", Opm::UnitSystem::measure::identity, simulator_.problem().vapparsActive()},
|
||||
{"PCSWM_OW", Opm::UnitSystem::measure::identity, enableHysteresis},
|
||||
{"KRNSW_OW", Opm::UnitSystem::measure::identity, enableHysteresis},
|
||||
{"PCSWM_GO", Opm::UnitSystem::measure::identity, enableHysteresis},
|
||||
{"KRNSW_GO", Opm::UnitSystem::measure::identity, enableHysteresis},
|
||||
{"PPCW", Opm::UnitSystem::measure::pressure, enableSwatinit}
|
||||
std::vector<RestartKey> solutionKeys{
|
||||
{"PRESSURE", UnitSystem::measure::pressure},
|
||||
{"SWAT", UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx))},
|
||||
{"SGAS", UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx))},
|
||||
{"TEMP" , UnitSystem::measure::temperature, enableEnergy},
|
||||
{"SSOLVENT" , UnitSystem::measure::identity, enableSolvent},
|
||||
{"RS", UnitSystem::measure::gas_oil_ratio, FluidSystem::enableDissolvedGas()},
|
||||
{"RV", UnitSystem::measure::oil_gas_ratio, FluidSystem::enableVaporizedOil()},
|
||||
{"SOMAX", UnitSystem::measure::identity, simulator_.problem().vapparsActive()},
|
||||
{"PCSWM_OW", UnitSystem::measure::identity, enableHysteresis},
|
||||
{"KRNSW_OW", UnitSystem::measure::identity, enableHysteresis},
|
||||
{"PCSWM_GO", UnitSystem::measure::identity, enableHysteresis},
|
||||
{"KRNSW_GO", UnitSystem::measure::identity, enableHysteresis},
|
||||
{"PPCW", UnitSystem::measure::pressure, enableSwatinit}
|
||||
};
|
||||
|
||||
const auto& inputThpres = eclState().getSimulationConfig().getThresholdPressure();
|
||||
std::vector<Opm::RestartKey> extraKeys = {{"OPMEXTRA", Opm::UnitSystem::measure::identity, false},
|
||||
{"THRESHPR", Opm::UnitSystem::measure::pressure, inputThpres.active()}};
|
||||
std::vector<RestartKey> extraKeys = {{"OPMEXTRA", UnitSystem::measure::identity, false},
|
||||
{"THRESHPR", UnitSystem::measure::pressure, inputThpres.active()}};
|
||||
|
||||
// The episodeIndex is rewined one back before beginRestart is called
|
||||
// and can not be used here.
|
||||
@ -461,8 +461,8 @@ public:
|
||||
eclOutputModule_->allocBuffers(numElements, restartStepIdx, /*isSubStep=*/false, /*log=*/false, /*isRestart*/ true);
|
||||
|
||||
{
|
||||
Opm::SummaryState& summaryState = simulator_.vanguard().summaryState();
|
||||
Opm::Action::State& actionState = simulator_.vanguard().actionState();
|
||||
SummaryState& summaryState = simulator_.vanguard().summaryState();
|
||||
Action::State& actionState = simulator_.vanguard().actionState();
|
||||
auto restartValues = loadParallelRestart(eclIO_.get(), actionState, summaryState, solutionKeys, extraKeys,
|
||||
gridView.grid().comm());
|
||||
for (unsigned elemIdx = 0; elemIdx < numElements; ++elemIdx) {
|
||||
@ -500,15 +500,15 @@ private:
|
||||
static bool enableEclOutput_()
|
||||
{ return EWOMS_GET_PARAM(TypeTag, bool, EnableEclOutput); }
|
||||
|
||||
Opm::data::Solution computeTrans_(const std::unordered_map<int,int>& cartesianToActive) const
|
||||
data::Solution computeTrans_(const std::unordered_map<int,int>& cartesianToActive) const
|
||||
{
|
||||
const auto& cartMapper = simulator_.vanguard().equilCartesianIndexMapper();
|
||||
const auto& cartDims = cartMapper.cartesianDimensions();
|
||||
const int globalSize = cartDims[0]*cartDims[1]*cartDims[2];
|
||||
|
||||
Opm::data::CellData tranx = {Opm::UnitSystem::measure::transmissibility, std::vector<double>(globalSize), Opm::data::TargetType::INIT};
|
||||
Opm::data::CellData trany = {Opm::UnitSystem::measure::transmissibility, std::vector<double>(globalSize), Opm::data::TargetType::INIT};
|
||||
Opm::data::CellData tranz = {Opm::UnitSystem::measure::transmissibility, std::vector<double>(globalSize), Opm::data::TargetType::INIT};
|
||||
data::CellData tranx = {UnitSystem::measure::transmissibility, std::vector<double>(globalSize), data::TargetType::INIT};
|
||||
data::CellData trany = {UnitSystem::measure::transmissibility, std::vector<double>(globalSize), data::TargetType::INIT};
|
||||
data::CellData tranz = {UnitSystem::measure::transmissibility, std::vector<double>(globalSize), data::TargetType::INIT};
|
||||
|
||||
for (size_t i = 0; i < tranx.data.size(); ++i) {
|
||||
tranx.data[0] = 0.0;
|
||||
@ -592,7 +592,7 @@ private:
|
||||
std::size_t ny = eclState().getInputGrid().getNY();
|
||||
auto nncData = eclState().getInputNNC().input();
|
||||
const auto& unitSystem = simulator_.vanguard().eclState().getDeckUnitSystem();
|
||||
std::vector<Opm::NNCdata> outputNnc;
|
||||
std::vector<NNCdata> outputNnc;
|
||||
std::size_t index = 0;
|
||||
|
||||
for( const auto& entry : nncData ) {
|
||||
@ -602,7 +602,7 @@ private:
|
||||
auto cellDiff = entry.cell2 - entry.cell1;
|
||||
|
||||
if (cellDiff != 1 && cellDiff != nx && cellDiff != nx*ny) {
|
||||
auto tt = unitSystem.from_si(Opm::UnitSystem::measure::transmissibility, entry.trans);
|
||||
auto tt = unitSystem.from_si(UnitSystem::measure::transmissibility, entry.trans);
|
||||
// Eclipse ignores NNCs (with EDITNNC applied) that are small. Seems like the threshold is 1.0e-6
|
||||
if ( tt >= 1.0e-6 )
|
||||
outputNnc.emplace_back(entry.cell1, entry.cell2, entry.trans);
|
||||
@ -667,7 +667,7 @@ private:
|
||||
// We need to check whether an NNC for this face was also specified
|
||||
// via the NNC keyword in the deck (i.e. in the first origNncSize entries.
|
||||
auto t = globalTrans->transmissibility(c1, c2);
|
||||
auto candidate = std::lower_bound(nncData.begin(), nncData.end(), Opm::NNCdata(cc1, cc2, 0.0));
|
||||
auto candidate = std::lower_bound(nncData.begin(), nncData.end(), NNCdata(cc1, cc2, 0.0));
|
||||
|
||||
while ( candidate != nncData.end() && candidate->cell1 == cc1
|
||||
&& candidate->cell2 == cc2) {
|
||||
@ -677,7 +677,7 @@ private:
|
||||
// eclipse ignores NNCs with zero transmissibility (different threshold than for NNC
|
||||
// with corresponding EDITNNC above). In addition we do set small transmissibilties
|
||||
// to zero when setting up the simulator. These will be ignored here, too.
|
||||
auto tt = unitSystem.from_si(Opm::UnitSystem::measure::transmissibility, std::abs(t));
|
||||
auto tt = unitSystem.from_si(UnitSystem::measure::transmissibility, std::abs(t));
|
||||
if ( tt > 1e-12 )
|
||||
outputNnc.push_back({cc1, cc2, t});
|
||||
}
|
||||
@ -689,24 +689,24 @@ private:
|
||||
struct EclWriteTasklet
|
||||
: public TaskletInterface
|
||||
{
|
||||
Opm::Action::State actionState_;
|
||||
Opm::SummaryState summaryState_;
|
||||
Opm::UDQState udqState_;
|
||||
Opm::EclipseIO& eclIO_;
|
||||
Action::State actionState_;
|
||||
SummaryState summaryState_;
|
||||
UDQState udqState_;
|
||||
EclipseIO& eclIO_;
|
||||
int reportStepNum_;
|
||||
bool isSubStep_;
|
||||
double secondsElapsed_;
|
||||
Opm::RestartValue restartValue_;
|
||||
RestartValue restartValue_;
|
||||
bool writeDoublePrecision_;
|
||||
|
||||
explicit EclWriteTasklet(const Opm::Action::State& actionState,
|
||||
const Opm::SummaryState& summaryState,
|
||||
const Opm::UDQState& udqState,
|
||||
Opm::EclipseIO& eclIO,
|
||||
explicit EclWriteTasklet(const Action::State& actionState,
|
||||
const SummaryState& summaryState,
|
||||
const UDQState& udqState,
|
||||
EclipseIO& eclIO,
|
||||
int reportStepNum,
|
||||
bool isSubStep,
|
||||
double secondsElapsed,
|
||||
Opm::RestartValue restartValue,
|
||||
RestartValue restartValue,
|
||||
bool writeDoublePrecision)
|
||||
: actionState_(actionState)
|
||||
, summaryState_(summaryState)
|
||||
@ -733,19 +733,19 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
const Opm::EclipseState& eclState() const
|
||||
const EclipseState& eclState() const
|
||||
{ return simulator_.vanguard().eclState(); }
|
||||
|
||||
Opm::SummaryState& summaryState()
|
||||
SummaryState& summaryState()
|
||||
{ return simulator_.vanguard().summaryState(); }
|
||||
|
||||
Opm::Action::State& actionState()
|
||||
Action::State& actionState()
|
||||
{ return simulator_.vanguard().actionState(); }
|
||||
|
||||
Opm::UDQState& udqState()
|
||||
UDQState& udqState()
|
||||
{ return simulator_.vanguard().udqState(); }
|
||||
|
||||
const Opm::Schedule& schedule() const
|
||||
const Schedule& schedule() const
|
||||
{ return simulator_.vanguard().schedule(); }
|
||||
|
||||
void prepareLocalCellData(const bool isSubStep,
|
||||
@ -782,7 +782,7 @@ private:
|
||||
const Scalar nextStepSize = simulator_.problem().nextTimeStepSize();
|
||||
const auto isParallel = this->collectToIORank_.isParallel();
|
||||
|
||||
Opm::RestartValue restartValue {
|
||||
RestartValue restartValue {
|
||||
isParallel ? this->collectToIORank_.globalCellData()
|
||||
: std::move(localCellData),
|
||||
|
||||
@ -794,7 +794,7 @@ private:
|
||||
};
|
||||
|
||||
if (simulator_.vanguard().eclState().getSimulationConfig().useThresholdPressure()) {
|
||||
restartValue.addExtra("THRESHPR", Opm::UnitSystem::measure::pressure,
|
||||
restartValue.addExtra("THRESHPR", UnitSystem::measure::pressure,
|
||||
simulator_.problem().thresholdPressure().data());
|
||||
}
|
||||
|
||||
@ -823,7 +823,7 @@ private:
|
||||
Simulator& simulator_;
|
||||
CollectDataToIORankType collectToIORank_;
|
||||
std::unique_ptr<EclOutputBlackOilModule<TypeTag>> eclOutputModule_;
|
||||
std::unique_ptr<Opm::EclipseIO> eclIO_;
|
||||
std::unique_ptr<EclipseIO> eclIO_;
|
||||
std::unique_ptr<TaskletRunner> taskletRunner_;
|
||||
Scalar restartTimeStepSize_;
|
||||
};
|
||||
|
@ -91,7 +91,7 @@ static inline int startEbos(int argc, char **argv)
|
||||
|
||||
// Call the main function. Parameters are already registered
|
||||
// They should not be registered again
|
||||
return Opm::start<TypeTag>(argc, argv, /*registerParams=*/false);
|
||||
return start<TypeTag>(argc, argv, /*registerParams=*/false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ namespace Opm {
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
|
||||
typedef Opm::VtkMultiWriter<GridView, vtkFormat> VtkMultiWriter;
|
||||
typedef ::Opm::VtkMultiWriter<GridView, vtkFormat> VtkMultiWriter;
|
||||
|
||||
|
||||
typedef typename ParentType::ScalarBuffer ScalarBuffer;
|
||||
|
@ -35,7 +35,7 @@ void flowEbosBlackoilSetDeck(double setupTime, std::unique_ptr<Deck> deck,
|
||||
|
||||
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
|
||||
std::unique_ptr<Opm::FlowMainEbos<Properties::TTag::EclFlowProblem>>
|
||||
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
|
||||
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -73,7 +73,7 @@ int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowBrineProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowBrineProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -72,7 +72,7 @@ int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowEnergyProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowEnergyProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -72,7 +72,7 @@ int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowExtboProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowExtboProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -73,7 +73,7 @@ int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowFoamProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowFoamProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -51,14 +51,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -84,7 +84,7 @@ int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -92,7 +92,7 @@ int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles)
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowGasOilProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowGasOilProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles} ;
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -54,14 +54,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -87,7 +87,7 @@ int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFile
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -95,7 +95,7 @@ int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFile
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowGasWaterProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowGasWaterProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles} ;
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -51,14 +51,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -83,7 +83,7 @@ int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFile
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -91,7 +91,7 @@ int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFile
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowOilWaterProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowOilWaterProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -54,14 +54,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -86,7 +86,7 @@ int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outpu
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -94,7 +94,7 @@ int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outpu
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowOilWaterBrineProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowOilWaterBrineProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -54,14 +54,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::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> type;
|
||||
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> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -86,7 +86,7 @@ int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool out
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -94,7 +94,7 @@ int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool out
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowOilWaterPolymerProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowOilWaterPolymerProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -60,14 +60,14 @@ private:
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::BlackOilTwoPhaseIndices<0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
|
||||
typedef BlackOilTwoPhaseIndices<0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
|
||||
};
|
||||
}}
|
||||
|
||||
@ -85,7 +85,7 @@ int flowEbosOilWaterPolymerInjectivityMain(int argc, char** argv, bool outputCou
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
@ -93,7 +93,7 @@ int flowEbosOilWaterPolymerInjectivityMain(int argc, char** argv, bool outputCou
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowOilWaterPolymerInjectivityProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowOilWaterPolymerInjectivityProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -72,7 +72,7 @@ int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowPolymerProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowPolymerProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// initialize MPI, finalize is done automatically on exit
|
||||
#if HAVE_DUNE_FEM
|
||||
@ -73,7 +73,7 @@ int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles
|
||||
Dune::MPIHelper::instance(argc, argv).rank();
|
||||
#endif
|
||||
|
||||
Opm::FlowMainEbos<Properties::TTag::EclFlowSolventProblem>
|
||||
FlowMainEbos<Properties::TTag::EclFlowSolventProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ PhaseUsage phaseUsage(const Phases& phases)
|
||||
return pu;
|
||||
}
|
||||
|
||||
PhaseUsage phaseUsageFromDeck(const Opm::EclipseState& eclipseState)
|
||||
PhaseUsage phaseUsageFromDeck(const EclipseState& eclipseState)
|
||||
{
|
||||
const auto& phases = eclipseState.runspec().phases();
|
||||
|
||||
@ -153,7 +153,7 @@ PhaseUsage phaseUsageFromDeck(const Opm::EclipseState& eclipseState)
|
||||
|
||||
/// Looks at presence of WATER, OIL and GAS keywords in deck
|
||||
/// to determine active phases.
|
||||
PhaseUsage phaseUsageFromDeck(const Opm::Deck& deck)
|
||||
PhaseUsage phaseUsageFromDeck(const Deck& deck)
|
||||
{
|
||||
Runspec runspec( deck );
|
||||
const auto& phases = runspec.phases();
|
||||
|
@ -34,11 +34,11 @@ namespace Opm
|
||||
|
||||
/// Looks at presence of WATER, OIL and GAS keywords in state object
|
||||
/// to determine active phases.
|
||||
PhaseUsage phaseUsageFromDeck(const Opm::EclipseState& eclipseState);
|
||||
PhaseUsage phaseUsageFromDeck(const EclipseState& eclipseState);
|
||||
|
||||
/// Looks at presence of WATER, OIL and GAS keywords in deck
|
||||
/// to determine active phases.
|
||||
PhaseUsage phaseUsageFromDeck(const Opm::Deck& deck);
|
||||
PhaseUsage phaseUsageFromDeck(const Deck& deck);
|
||||
}
|
||||
|
||||
#endif // OPM_PHASEUSAGEFROMDECK_HEADER_INCLUDED
|
||||
|
@ -98,7 +98,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::satFamilyCheck_(const Opm::EclipseState& eclState)
|
||||
void RelpermDiagnostics::satFamilyCheck_(const EclipseState& eclState)
|
||||
{
|
||||
const PhaseUsage pu = phaseUsageFromDeck(eclState);
|
||||
|
||||
@ -237,7 +237,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::swofTableCheck_(const Opm::SwofTable& swofTables,
|
||||
void RelpermDiagnostics::swofTableCheck_(const SwofTable& swofTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sw = swofTables.getSwColumn();
|
||||
@ -272,7 +272,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sgofTableCheck_(const Opm::SgofTable& sgofTables,
|
||||
void RelpermDiagnostics::sgofTableCheck_(const SgofTable& sgofTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sg = sgofTables.getSgColumn();
|
||||
@ -307,7 +307,7 @@ namespace Opm{
|
||||
//TODO check if run with water.
|
||||
}
|
||||
|
||||
void RelpermDiagnostics::slgofTableCheck_(const Opm::SlgofTable& slgofTables,
|
||||
void RelpermDiagnostics::slgofTableCheck_(const SlgofTable& slgofTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sl = slgofTables.getSlColumn();
|
||||
@ -344,7 +344,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::swfnTableCheck_(const Opm::SwfnTable& swfnTables,
|
||||
void RelpermDiagnostics::swfnTableCheck_(const SwfnTable& swfnTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sw = swfnTables.getSwColumn();
|
||||
@ -372,7 +372,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sgfnTableCheck_(const Opm::SgfnTable& sgfnTables,
|
||||
void RelpermDiagnostics::sgfnTableCheck_(const SgfnTable& sgfnTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sg = sgfnTables.getSgColumn();
|
||||
@ -399,7 +399,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sof3TableCheck_(const Opm::Sof3Table& sof3Tables,
|
||||
void RelpermDiagnostics::sof3TableCheck_(const Sof3Table& sof3Tables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& so = sof3Tables.getSoColumn();
|
||||
@ -444,7 +444,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sof2TableCheck_(const Opm::Sof2Table& sof2Tables,
|
||||
void RelpermDiagnostics::sof2TableCheck_(const Sof2Table& sof2Tables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& so = sof2Tables.getSoColumn();
|
||||
@ -472,7 +472,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sgwfnTableCheck_(const Opm::SgwfnTable& sgwfnTables,
|
||||
void RelpermDiagnostics::sgwfnTableCheck_(const SgwfnTable& sgwfnTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sg = sgwfnTables.getSgColumn();
|
||||
@ -509,7 +509,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sgcwmisTableCheck_(const Opm::SgcwmisTable& sgcwmisTables,
|
||||
void RelpermDiagnostics::sgcwmisTableCheck_(const SgcwmisTable& sgcwmisTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sw = sgcwmisTables.getWaterSaturationColumn();
|
||||
@ -532,7 +532,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::sorwmisTableCheck_(const Opm::SorwmisTable& sorwmisTables,
|
||||
void RelpermDiagnostics::sorwmisTableCheck_(const SorwmisTable& sorwmisTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& sw = sorwmisTables.getWaterSaturationColumn();
|
||||
@ -554,7 +554,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::ssfnTableCheck_(const Opm::SsfnTable& ssfnTables,
|
||||
void RelpermDiagnostics::ssfnTableCheck_(const SsfnTable& ssfnTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& frac = ssfnTables.getSolventFractionColumn();
|
||||
@ -585,7 +585,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::miscTableCheck_(const Opm::MiscTable& miscTables,
|
||||
void RelpermDiagnostics::miscTableCheck_(const MiscTable& miscTables,
|
||||
const int miscnumIdx)
|
||||
{
|
||||
const auto& frac = miscTables.getSolventFractionColumn();
|
||||
@ -609,7 +609,7 @@ namespace Opm{
|
||||
|
||||
|
||||
|
||||
void RelpermDiagnostics::msfnTableCheck_(const Opm::MsfnTable& msfnTables,
|
||||
void RelpermDiagnostics::msfnTableCheck_(const MsfnTable& msfnTables,
|
||||
const int satnumIdx)
|
||||
{
|
||||
const auto& frac = msfnTables.getGasPhaseFractionColumn();
|
||||
@ -730,7 +730,7 @@ namespace Opm{
|
||||
}
|
||||
|
||||
template <class CartesianIndexMapper>
|
||||
void RelpermDiagnostics::diagnosis(const Opm::EclipseState& eclState,
|
||||
void RelpermDiagnostics::diagnosis(const EclipseState& eclState,
|
||||
const CartesianIndexMapper& cartesianIndexMapper)
|
||||
{
|
||||
OpmLog::info("\n===============Saturation Functions Diagnostics===============\n");
|
||||
|
@ -73,8 +73,8 @@ namespace Opm {
|
||||
|
||||
SaturationFunctionFamily satFamily_;
|
||||
|
||||
std::vector<Opm::EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
|
||||
std::vector<Opm::EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
|
||||
std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
|
||||
std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
|
||||
|
||||
|
||||
///Check the phase that used.
|
||||
@ -95,32 +95,32 @@ namespace Opm {
|
||||
const CartesianIndexMapper& cartesianIndexMapper);
|
||||
|
||||
///For every table, need to deal with case by case.
|
||||
void swofTableCheck_(const Opm::SwofTable& swofTables,
|
||||
void swofTableCheck_(const SwofTable& swofTables,
|
||||
const int satnumIdx);
|
||||
void sgofTableCheck_(const Opm::SgofTable& sgofTables,
|
||||
void sgofTableCheck_(const SgofTable& sgofTables,
|
||||
const int satnumIdx);
|
||||
void slgofTableCheck_(const Opm::SlgofTable& slgofTables,
|
||||
void slgofTableCheck_(const SlgofTable& slgofTables,
|
||||
const int satnumIdx);
|
||||
void swfnTableCheck_(const Opm::SwfnTable& swfnTables,
|
||||
void swfnTableCheck_(const SwfnTable& swfnTables,
|
||||
const int satnumIdx);
|
||||
void sgfnTableCheck_(const Opm::SgfnTable& sgfnTables,
|
||||
void sgfnTableCheck_(const SgfnTable& sgfnTables,
|
||||
const int satnumIdx);
|
||||
void sof3TableCheck_(const Opm::Sof3Table& sof3Tables,
|
||||
void sof3TableCheck_(const Sof3Table& sof3Tables,
|
||||
const int satnumIdx);
|
||||
void sof2TableCheck_(const Opm::Sof2Table& sof2Tables,
|
||||
void sof2TableCheck_(const Sof2Table& sof2Tables,
|
||||
const int satnumIdx);
|
||||
void sgwfnTableCheck_(const Opm::SgwfnTable& sgwfnTables,
|
||||
void sgwfnTableCheck_(const SgwfnTable& sgwfnTables,
|
||||
const int satnumIdx);
|
||||
///Tables for solvent model
|
||||
void sgcwmisTableCheck_(const Opm::SgcwmisTable& sgcwmisTables,
|
||||
void sgcwmisTableCheck_(const SgcwmisTable& sgcwmisTables,
|
||||
const int satnumIdx);
|
||||
void sorwmisTableCheck_(const Opm::SorwmisTable& sorwmisTables,
|
||||
void sorwmisTableCheck_(const SorwmisTable& sorwmisTables,
|
||||
const int satnumIdx);
|
||||
void ssfnTableCheck_(const Opm::SsfnTable& ssfnTables,
|
||||
void ssfnTableCheck_(const SsfnTable& ssfnTables,
|
||||
const int satnumIdx);
|
||||
void miscTableCheck_(const Opm::MiscTable& miscTables,
|
||||
void miscTableCheck_(const MiscTable& miscTables,
|
||||
const int miscnumIdx);
|
||||
void msfnTableCheck_(const Opm::MsfnTable& msfnTables,
|
||||
void msfnTableCheck_(const MsfnTable& msfnTables,
|
||||
const int satnumIdx);
|
||||
};
|
||||
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
comm.sum(&this->fluxValue_, 1);
|
||||
}
|
||||
|
||||
Opm::data::AquiferData aquiferData() const
|
||||
data::AquiferData aquiferData() const
|
||||
{
|
||||
data::AquiferData data;
|
||||
data.aquiferID = this->aquiferID;
|
||||
@ -82,7 +82,7 @@ public:
|
||||
}
|
||||
data.volume = this->W_flux_.value();
|
||||
data.initPressure = this->pa0_;
|
||||
data.type = Opm::data::AquiferType::CarterTracy;
|
||||
data.type = data::AquiferType::CarterTracy;
|
||||
|
||||
data.aquCT = std::make_shared<data::CarterTracyData>();
|
||||
data.aquCT->dimensionless_time = this->dimensionless_time_;
|
||||
@ -113,17 +113,17 @@ protected:
|
||||
{
|
||||
// We use the opm-common numeric linear interpolator
|
||||
this->dimensionless_pressure_ =
|
||||
Opm::linearInterpolation(this->aquct_data_.td,
|
||||
this->aquct_data_.pi,
|
||||
this->dimensionless_time_);
|
||||
linearInterpolation(this->aquct_data_.td,
|
||||
this->aquct_data_.pi,
|
||||
this->dimensionless_time_);
|
||||
|
||||
const auto PItd =
|
||||
Opm::linearInterpolation(this->aquct_data_.td,
|
||||
this->aquct_data_.pi, td_plus_dt);
|
||||
linearInterpolation(this->aquct_data_.td,
|
||||
this->aquct_data_.pi, td_plus_dt);
|
||||
|
||||
const auto PItdprime =
|
||||
Opm::linearInterpolationDerivative(this->aquct_data_.td,
|
||||
this->aquct_data_.pi, td_plus_dt);
|
||||
linearInterpolationDerivative(this->aquct_data_.td,
|
||||
this->aquct_data_.pi, td_plus_dt);
|
||||
|
||||
return std::make_pair(PItd, PItdprime);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
aquifer_pressure_ = aquiferPressure();
|
||||
}
|
||||
|
||||
Opm::data::AquiferData aquiferData() const
|
||||
data::AquiferData aquiferData() const
|
||||
{
|
||||
// TODO: how to unify the two functions?
|
||||
data::AquiferData data;
|
||||
@ -80,7 +80,7 @@ public:
|
||||
}
|
||||
data.volume = this->W_flux_.value();
|
||||
data.initPressure = this->pa0_;
|
||||
data.type = Opm::data::AquiferType::Fetkovich;
|
||||
data.type = data::AquiferType::Fetkovich;
|
||||
// Not handling std::shared_ptr<FetkovichData> aquFet for now,
|
||||
// because we do not need it yet
|
||||
return data;
|
||||
|
@ -61,13 +61,13 @@ public:
|
||||
|
||||
typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;
|
||||
|
||||
typedef Opm::BlackOilFluidState<Eval,
|
||||
FluidSystem,
|
||||
enableTemperature,
|
||||
enableEnergy,
|
||||
BlackoilIndices::gasEnabled,
|
||||
enableBrine,
|
||||
BlackoilIndices::numPhases>
|
||||
typedef BlackOilFluidState<Eval,
|
||||
FluidSystem,
|
||||
enableTemperature,
|
||||
enableEnergy,
|
||||
BlackoilIndices::gasEnabled,
|
||||
enableBrine,
|
||||
BlackoilIndices::numPhases>
|
||||
FluidState;
|
||||
|
||||
static const auto waterCompIdx = FluidSystem::waterCompIdx;
|
||||
@ -126,7 +126,7 @@ public:
|
||||
|
||||
elemCtx.updateIntensiveQuantities(0);
|
||||
const auto& iq = elemCtx.intensiveQuantities(0, 0);
|
||||
pressure_previous_[idx] = Opm::getValue(iq.fluidState().pressure(waterPhaseIdx));
|
||||
pressure_previous_[idx] = getValue(iq.fluidState().pressure(waterPhaseIdx));
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ protected:
|
||||
this->faceArea_connected_.resize(this->size(), 0.0);
|
||||
|
||||
// Translate the C face tag into the enum used by opm-parser's TransMult class
|
||||
Opm::FaceDir::DirEnum faceDirection;
|
||||
FaceDir::DirEnum faceDirection;
|
||||
|
||||
// denom_face_areas is the sum of the areas connected to an aquifer
|
||||
Scalar denom_face_areas = 0.;
|
||||
@ -278,22 +278,22 @@ protected:
|
||||
int insideFaceIdx = intersection.indexInInside();
|
||||
switch (insideFaceIdx) {
|
||||
case 0:
|
||||
faceDirection = Opm::FaceDir::XMinus;
|
||||
faceDirection = FaceDir::XMinus;
|
||||
break;
|
||||
case 1:
|
||||
faceDirection = Opm::FaceDir::XPlus;
|
||||
faceDirection = FaceDir::XPlus;
|
||||
break;
|
||||
case 2:
|
||||
faceDirection = Opm::FaceDir::YMinus;
|
||||
faceDirection = FaceDir::YMinus;
|
||||
break;
|
||||
case 3:
|
||||
faceDirection = Opm::FaceDir::YPlus;
|
||||
faceDirection = FaceDir::YPlus;
|
||||
break;
|
||||
case 4:
|
||||
faceDirection = Opm::FaceDir::ZMinus;
|
||||
faceDirection = FaceDir::ZMinus;
|
||||
break;
|
||||
case 5:
|
||||
faceDirection = Opm::FaceDir::ZPlus;
|
||||
faceDirection = FaceDir::ZPlus;
|
||||
break;
|
||||
default:
|
||||
OPM_THROW(std::logic_error,
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
static const int numEq = BlackoilIndices::numEq;
|
||||
|
||||
using Eval = DenseAd::Evaluation<double, numEq>;
|
||||
using Toolbox = Opm::MathToolbox<Eval>;
|
||||
using Toolbox = MathToolbox<Eval>;
|
||||
|
||||
// Constructor
|
||||
AquiferNumerical(const SingleNumericalAquifer& aquifer,
|
||||
@ -84,7 +84,7 @@ public:
|
||||
this->cumulative_flux_ += this->flux_rate_ * this->ebos_simulator_.timeStepSize();
|
||||
}
|
||||
|
||||
Opm::data::AquiferData aquiferData() const
|
||||
data::AquiferData aquiferData() const
|
||||
{
|
||||
data::AquiferData data;
|
||||
data.aquiferID = this->id_;
|
||||
@ -92,7 +92,7 @@ public:
|
||||
data.pressure = this->pressure_;
|
||||
data.fluxRate = this->flux_rate_;
|
||||
data.volume = this->cumulative_flux_;
|
||||
data.type = Opm::data::AquiferType::Numerical;
|
||||
data.type = data::AquiferType::Numerical;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
void endTimeStep();
|
||||
void endEpisode();
|
||||
|
||||
Opm::data::Aquifers aquiferData() const;
|
||||
data::Aquifers aquiferData() const;
|
||||
|
||||
template <class Restarter>
|
||||
void serialize(Restarter& res);
|
||||
|
@ -204,7 +204,7 @@ BlackoilAquiferModel<TypeTag>::init()
|
||||
const auto& num_aquifers = aquifer.numericalAquifers().aquifers();
|
||||
const auto& ugrid = simulator_.vanguard().grid();
|
||||
const int number_of_cells = simulator_.gridView().size(0);
|
||||
const int* global_cell = Opm::UgGridHelpers::globalCell(ugrid);
|
||||
const int* global_cell = UgGridHelpers::globalCell(ugrid);
|
||||
const std::unordered_map<int, int> cartesian_to_compressed = cartesianToCompressed(number_of_cells,
|
||||
global_cell);
|
||||
for ([[maybe_unused]]const auto& [id, aqu] : num_aquifers) {
|
||||
@ -234,25 +234,25 @@ BlackoilAquiferModel<TypeTag>::aquiferNumericalActive() const
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
Opm::data::Aquifers BlackoilAquiferModel<TypeTag>::aquiferData() const {
|
||||
Opm::data::Aquifers data;
|
||||
data::Aquifers BlackoilAquiferModel<TypeTag>::aquiferData() const {
|
||||
data::Aquifers data;
|
||||
if (this->aquiferCarterTracyActive()) {
|
||||
for (const auto& aqu : aquifers_CarterTracy) {
|
||||
Opm::data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data[aqu_data.aquiferID] = aqu_data;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->aquiferFetkovichActive()) {
|
||||
for (const auto& aqu : aquifers_Fetkovich) {
|
||||
Opm::data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data[aqu_data.aquiferID] = aqu_data;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->aquiferNumericalActive()) {
|
||||
for (const auto& aqu : this->aquifers_numerical) {
|
||||
Opm::data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data[aqu_data.aquiferID] = aqu_data;
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ struct UseVolumetricResidual<TypeTag, TTag::EclFlowProblem> {
|
||||
|
||||
template<class TypeTag>
|
||||
struct EclAquiferModel<TypeTag, TTag::EclFlowProblem> {
|
||||
using type = Opm::BlackoilAquiferModel<TypeTag>;
|
||||
using type = BlackoilAquiferModel<TypeTag>;
|
||||
};
|
||||
|
||||
// disable all extensions supported by black oil model. this should not really be
|
||||
@ -128,7 +128,7 @@ struct EnableBrine<TypeTag, TTag::EclFlowProblem> {
|
||||
|
||||
template<class TypeTag>
|
||||
struct EclWellModel<TypeTag, TTag::EclFlowProblem> {
|
||||
using type = Opm::BlackoilWellModel<TypeTag>;
|
||||
using type = BlackoilWellModel<TypeTag>;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::EclFlowProblem> {
|
||||
@ -316,9 +316,9 @@ namespace Opm {
|
||||
|
||||
// Throw if any NaN or too large residual found.
|
||||
if (severity == ConvergenceReport::Severity::NotANumber) {
|
||||
OPM_THROW(Opm::NumericalIssue, "NaN residual found!");
|
||||
OPM_THROW(NumericalIssue, "NaN residual found!");
|
||||
} else if (severity == ConvergenceReport::Severity::TooLarge) {
|
||||
OPM_THROW(Opm::NumericalIssue, "Too large residual found!");
|
||||
OPM_THROW(NumericalIssue, "Too large residual found!");
|
||||
}
|
||||
}
|
||||
report.update_time += perfTimer.stop();
|
||||
|
@ -93,7 +93,7 @@ namespace Opm
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
typedef Opm::SimulatorFullyImplicitBlackoilEbos<TypeTag> Simulator;
|
||||
typedef SimulatorFullyImplicitBlackoilEbos<TypeTag> Simulator;
|
||||
|
||||
FlowMainEbos(int argc, char **argv, bool output_cout, bool output_files )
|
||||
: argc_{argc}, argv_{argv},
|
||||
@ -127,7 +127,7 @@ namespace Opm
|
||||
Simulator::registerParameters();
|
||||
|
||||
// register the parameters inherited from ebos
|
||||
Opm::registerAllParameters_<TypeTag>(/*finalizeRegistration=*/false);
|
||||
registerAllParameters_<TypeTag>(/*finalizeRegistration=*/false);
|
||||
|
||||
// hide the parameters unused by flow. TODO: this is a pain to maintain
|
||||
EWOMS_HIDE_PARAM(TypeTag, EnableGravity);
|
||||
@ -219,14 +219,14 @@ namespace Opm
|
||||
#endif
|
||||
|
||||
// read in the command line parameters
|
||||
int status = Opm::setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), /*doRegistration=*/false, /*allowUnused=*/true, /*handleHelp=*/(mpiRank==0));
|
||||
int status = ::Opm::setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), /*doRegistration=*/false, /*allowUnused=*/true, /*handleHelp=*/(mpiRank==0));
|
||||
if (status == 0) {
|
||||
|
||||
// deal with unknown parameters.
|
||||
|
||||
int unknownKeyWords = 0;
|
||||
if (mpiRank == 0) {
|
||||
unknownKeyWords = Opm::Parameters::printUnused<TypeTag>(std::cerr);
|
||||
unknownKeyWords = Parameters::printUnused<TypeTag>(std::cerr);
|
||||
}
|
||||
#if HAVE_MPI
|
||||
int globalUnknownKeyWords;
|
||||
@ -258,13 +258,13 @@ namespace Opm
|
||||
if (EWOMS_GET_PARAM(TypeTag, int, PrintProperties) == 1) {
|
||||
doExit = true;
|
||||
if (mpiRank == 0)
|
||||
Opm::Properties::printValues<TypeTag>();
|
||||
Properties::printValues<TypeTag>();
|
||||
}
|
||||
|
||||
if (EWOMS_GET_PARAM(TypeTag, int, PrintParameters) == 1) {
|
||||
doExit = true;
|
||||
if (mpiRank == 0)
|
||||
Opm::Parameters::printValues<TypeTag>();
|
||||
Parameters::printValues<TypeTag>();
|
||||
}
|
||||
|
||||
if (doExit)
|
||||
@ -384,7 +384,7 @@ namespace Opm
|
||||
ss << "Simulation started on " << tmstr << " hrs\n";
|
||||
|
||||
ss << "Parameters used by Flow:\n";
|
||||
Opm::Parameters::printValues<TypeTag>(ss);
|
||||
Parameters::printValues<TypeTag>(ss);
|
||||
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
@ -475,7 +475,7 @@ namespace Opm
|
||||
return;
|
||||
}
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = ::Opm::filesystem;
|
||||
const std::string& output_dir = eclState().getIOConfig().getOutputDir();
|
||||
fs::path output_path(output_dir);
|
||||
fs::path deck_filename(EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName));
|
||||
@ -587,7 +587,7 @@ namespace Opm
|
||||
report.reportFullyImplicit(ss);
|
||||
OpmLog::info(ss.str());
|
||||
const std::string dir = eclState().getIOConfig().getOutputDir();
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = ::Opm::filesystem;
|
||||
fs::path output_dir(dir);
|
||||
{
|
||||
std::string filename = eclState().getIOConfig().getBaseName() + ".INFOSTEP";
|
||||
@ -615,7 +615,7 @@ namespace Opm
|
||||
|
||||
// This allows a user to catch typos and misunderstandings in the
|
||||
// use of simulator parameters.
|
||||
if (Opm::Parameters::printUnused<TypeTag>(oss)) {
|
||||
if (Parameters::printUnused<TypeTag>(oss)) {
|
||||
std::cout << "----------------- Unrecognized parameters: -----------------\n";
|
||||
std::cout << oss.str();
|
||||
std::cout << "----------------------------------------------------------------" << std::endl;
|
||||
|
@ -94,14 +94,14 @@ namespace Opm {
|
||||
{
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
# if HAVE_DUNE_FEM
|
||||
Dune::Fem::MPIManager::initialize(argc, argv);
|
||||
# else
|
||||
Dune::MPIHelper::instance(argc, argv);
|
||||
# endif
|
||||
Opm::FlowMainEbos<TypeTag> mainfunc(argc, argv, outputCout, outputFiles);
|
||||
FlowMainEbos<TypeTag> mainfunc(argc, argv, outputCout, outputFiles);
|
||||
return mainfunc.execute();
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ namespace Opm
|
||||
class Main
|
||||
{
|
||||
private:
|
||||
using FlowMainEbosType = Opm::FlowMainEbos<Opm::Properties::TTag::EclFlowProblem>;
|
||||
using FlowMainEbosType = FlowMainEbos<Properties::TTag::EclFlowProblem>;
|
||||
|
||||
public:
|
||||
Main(int argc, char** argv) : argc_(argc), argv_(argv) { }
|
||||
@ -137,10 +137,10 @@ namespace Opm
|
||||
|
||||
Main(int argc,
|
||||
char** argv,
|
||||
std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::EclipseState> eclipseState,
|
||||
std::unique_ptr<Opm::Schedule> schedule,
|
||||
std::unique_ptr<Opm::SummaryConfig> summaryConfig)
|
||||
std::unique_ptr<Deck> deck,
|
||||
std::unique_ptr<EclipseState> eclipseState,
|
||||
std::unique_ptr<Schedule> schedule,
|
||||
std::unique_ptr<SummaryConfig> summaryConfig)
|
||||
: argc_(argc)
|
||||
, argv_(argv)
|
||||
, deck_(std::move(deck))
|
||||
@ -181,13 +181,13 @@ namespace Opm
|
||||
if (initialize_<Properties::TTag::FlowEarlyBird>(exitCode)) {
|
||||
// TODO: check that this deck really represents a blackoil
|
||||
// case. E.g. check that number of phases == 3
|
||||
Opm::flowEbosBlackoilSetDeck(
|
||||
flowEbosBlackoilSetDeck(
|
||||
setupTime_,
|
||||
std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosBlackoilMainInit(
|
||||
return flowEbosBlackoilMainInit(
|
||||
argc_, argv_, outputCout_, outputFiles_);
|
||||
} else {
|
||||
//NOTE: exitCode was set by initialize_() above;
|
||||
@ -209,23 +209,23 @@ namespace Opm
|
||||
// Twophase cases
|
||||
else if( phases.size() == 2 ) {
|
||||
// oil-gas
|
||||
if (phases.active( Opm::Phase::OIL ) && phases.active( Opm::Phase::GAS )) {
|
||||
Opm::flowEbosGasOilSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_),
|
||||
std::move(schedule_), std::move(summaryConfig_));
|
||||
return Opm::flowEbosGasOilMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
if (phases.active( Phase::OIL ) && phases.active( Phase::GAS )) {
|
||||
flowEbosGasOilSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_),
|
||||
std::move(schedule_), std::move(summaryConfig_));
|
||||
return flowEbosGasOilMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
// oil-water
|
||||
else if ( phases.active( Opm::Phase::OIL ) && phases.active( Opm::Phase::WATER ) ) {
|
||||
Opm::flowEbosOilWaterSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_), std::move(schedule_), std::move(summaryConfig_));
|
||||
return Opm::flowEbosOilWaterMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
else if ( phases.active( Phase::OIL ) && phases.active( Phase::WATER ) ) {
|
||||
flowEbosOilWaterSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_), std::move(schedule_), std::move(summaryConfig_));
|
||||
return flowEbosOilWaterMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
// gas-water
|
||||
else if ( phases.active( Opm::Phase::GAS ) && phases.active( Opm::Phase::WATER ) ) {
|
||||
else if ( phases.active( Phase::GAS ) && phases.active( Phase::WATER ) ) {
|
||||
if (outputCout_)
|
||||
std::cerr << "Gas-water systems are not yet supported" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
Opm::flowEbosGasWaterSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_), std::move(schedule_), std::move(summaryConfig_));
|
||||
return Opm::flowEbosGasWaterMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosGasWaterSetDeck(setupTime_, std::move(deck_), std::move(eclipseState_), std::move(schedule_), std::move(summaryConfig_));
|
||||
return flowEbosGasWaterMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
else {
|
||||
if (outputCout_)
|
||||
@ -234,8 +234,8 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
// Polymer case
|
||||
else if ( phases.active( Opm::Phase::POLYMER ) ) {
|
||||
if ( !phases.active( Opm::Phase::WATER) ) {
|
||||
else if ( phases.active( Phase::POLYMER ) ) {
|
||||
if ( !phases.active( Phase::WATER) ) {
|
||||
if (outputCout_)
|
||||
std::cerr << "No valid configuration is found for polymer simulation, valid options include "
|
||||
<< "oilwater + polymer and blackoil + polymer" << std::endl;
|
||||
@ -244,88 +244,88 @@ namespace Opm
|
||||
|
||||
// Need to track the polymer molecular weight
|
||||
// for the injectivity study
|
||||
if ( phases.active( Opm::Phase::POLYMW ) ) {
|
||||
if ( phases.active( Phase::POLYMW ) ) {
|
||||
// only oil water two phase for now
|
||||
assert( phases.size() == 4);
|
||||
return Opm::flowEbosOilWaterPolymerInjectivityMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
return flowEbosOilWaterPolymerInjectivityMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
|
||||
if ( phases.size() == 3 ) { // oil water polymer case
|
||||
Opm::flowEbosOilWaterPolymerSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosOilWaterPolymerMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosOilWaterPolymerSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosOilWaterPolymerMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
} else {
|
||||
Opm::flowEbosPolymerSetDeck(setupTime_, std::move(deck_),
|
||||
flowEbosPolymerSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosPolymerMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
return flowEbosPolymerMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
}
|
||||
// Foam case
|
||||
else if ( phases.active( Opm::Phase::FOAM ) ) {
|
||||
Opm::flowEbosFoamSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosFoamMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
else if ( phases.active( Phase::FOAM ) ) {
|
||||
flowEbosFoamSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosFoamMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
// Brine case
|
||||
else if ( phases.active( Opm::Phase::BRINE ) ) {
|
||||
if ( !phases.active( Opm::Phase::WATER) ) {
|
||||
else if ( phases.active( Phase::BRINE ) ) {
|
||||
if ( !phases.active( Phase::WATER) ) {
|
||||
if (outputCout_)
|
||||
std::cerr << "No valid configuration is found for brine simulation, valid options include "
|
||||
<< "oilwater + brine and blackoil + brine" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if ( phases.size() == 3 ) { // oil water brine case
|
||||
Opm::flowEbosOilWaterBrineSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosOilWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosOilWaterBrineSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosOilWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
} else {
|
||||
Opm::flowEbosBrineSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosBrineMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosBrineSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosBrineMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
}
|
||||
// Solvent case
|
||||
else if ( phases.active( Opm::Phase::SOLVENT ) ) {
|
||||
Opm::flowEbosSolventSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
else if ( phases.active( Phase::SOLVENT ) ) {
|
||||
flowEbosSolventSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
// Extended BO case
|
||||
else if ( phases.active( Opm::Phase::ZFRACTION ) ) {
|
||||
Opm::flowEbosExtboSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosExtboMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
else if ( phases.active( Phase::ZFRACTION ) ) {
|
||||
flowEbosExtboSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosExtboMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
// Energy case
|
||||
else if (eclipseState_->getSimulationConfig().isThermal()) {
|
||||
Opm::flowEbosEnergySetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosEnergySetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
#endif // FLOW_BLACKOIL_ONLY
|
||||
// Blackoil case
|
||||
else if( phases.size() == 3 ) {
|
||||
Opm::flowEbosBlackoilSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosBlackoilSetDeck(setupTime_, std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
else {
|
||||
if (outputCout_)
|
||||
@ -337,11 +337,11 @@ namespace Opm
|
||||
template <class TypeTag>
|
||||
int dispatchStatic_()
|
||||
{
|
||||
Opm::flowEbosSetDeck<TypeTag>(std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return Opm::flowEbosMain<TypeTag>(argc_, argv_, outputCout_, outputFiles_);
|
||||
flowEbosSetDeck<TypeTag>(std::move(deck_),
|
||||
std::move(eclipseState_),
|
||||
std::move(schedule_),
|
||||
std::move(summaryConfig_));
|
||||
return flowEbosMain<TypeTag>(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
|
||||
/// \brief Initialize
|
||||
@ -370,7 +370,7 @@ namespace Opm
|
||||
|
||||
// we always want to use the default locale, and thus spare us the trouble
|
||||
// with incorrect locale settings.
|
||||
Opm::resetLocale();
|
||||
resetLocale();
|
||||
|
||||
// this is a work-around for a catch 22: we do not know what code path to use without
|
||||
// parsing the deck, but we don't know the deck without having access to the
|
||||
@ -382,7 +382,7 @@ namespace Opm
|
||||
using PreProblem = GetPropType<PreTypeTag, Properties::Problem>;
|
||||
|
||||
PreProblem::setBriefDescription("Flow, an advanced reservoir simulator for ECL-decks provided by the Open Porous Media project.");
|
||||
int status = Opm::FlowMainEbos<PreTypeTag>::setupParameters_(argc_, argv_);
|
||||
int status = FlowMainEbos<PreTypeTag>::setupParameters_(argc_, argv_);
|
||||
if (status != 0) {
|
||||
// if setupParameters_ returns a value smaller than 0, there was no error, but
|
||||
// the program should abort. This is the case e.g. for the --help and the
|
||||
@ -427,11 +427,11 @@ namespace Opm
|
||||
return false;
|
||||
}
|
||||
if (outputCout_) {
|
||||
Opm::FlowMainEbos<PreTypeTag>::printBanner();
|
||||
FlowMainEbos<PreTypeTag>::printBanner();
|
||||
}
|
||||
// Create Deck and EclipseState.
|
||||
try {
|
||||
auto python = std::make_shared<Opm::Python>();
|
||||
auto python = std::make_shared<Python>();
|
||||
const bool init_from_restart_file = !EWOMS_GET_PARAM(PreTypeTag, bool, SchedRestart);
|
||||
if (outputDir.empty())
|
||||
outputDir = EWOMS_GET_PARAM(PreTypeTag, std::string, OutputDir);
|
||||
@ -441,15 +441,15 @@ namespace Opm
|
||||
EWOMS_GET_PARAM(PreTypeTag, std::string, OutputMode),
|
||||
outputCout_, "STDOUT_LOGGER");
|
||||
auto parseContext =
|
||||
std::make_unique<Opm::ParseContext>(std::vector<std::pair<std::string , InputError::Action>>
|
||||
{{Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE},
|
||||
{Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN},
|
||||
{Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN},
|
||||
{Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN}});
|
||||
std::make_unique<ParseContext>(std::vector<std::pair<std::string , InputError::Action>>
|
||||
{{ParseContext::PARSE_RANDOM_SLASH, InputError::IGNORE},
|
||||
{ParseContext::PARSE_MISSING_DIMS_KEYWORD, InputError::WARN},
|
||||
{ParseContext::SUMMARY_UNKNOWN_WELL, InputError::WARN},
|
||||
{ParseContext::SUMMARY_UNKNOWN_GROUP, InputError::WARN}});
|
||||
if (EWOMS_GET_PARAM(PreTypeTag, bool, EclStrictParsing))
|
||||
parseContext->update(Opm::InputError::DELAYED_EXIT1);
|
||||
parseContext->update(InputError::DELAYED_EXIT1);
|
||||
|
||||
Opm::FlowMainEbos<PreTypeTag>::printPRTHeader(outputCout_);
|
||||
FlowMainEbos<PreTypeTag>::printPRTHeader(outputCout_);
|
||||
|
||||
if (outputCout_) {
|
||||
OpmLog::info("Reading deck file '" + deckFilename + "'");
|
||||
@ -484,8 +484,8 @@ namespace Opm
|
||||
return true;
|
||||
}
|
||||
|
||||
Opm::filesystem::path simulationCaseName_( const std::string& casename ) {
|
||||
namespace fs = Opm::filesystem;
|
||||
filesystem::path simulationCaseName_( const std::string& casename ) {
|
||||
namespace fs = ::Opm::filesystem;
|
||||
|
||||
const auto exists = []( const fs::path& f ) -> bool {
|
||||
if( !fs::exists( f ) ) return false;
|
||||
@ -523,7 +523,7 @@ namespace Opm
|
||||
for ( int i = 1; i < argc; ++i )
|
||||
{
|
||||
if (std::strcmp(argv[i], "--version") == 0) {
|
||||
std::cout << "flow " << Opm::moduleVersionName() << std::endl;
|
||||
std::cout << "flow " << moduleVersionName() << std::endl;
|
||||
std::exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
@ -538,10 +538,10 @@ namespace Opm
|
||||
std::string deckFilename_;
|
||||
std::string flowProgName_;
|
||||
char *saveArgs_[2];
|
||||
std::unique_ptr<Opm::Deck> deck_;
|
||||
std::unique_ptr<Opm::EclipseState> eclipseState_;
|
||||
std::unique_ptr<Opm::Schedule> schedule_;
|
||||
std::unique_ptr<Opm::SummaryConfig> summaryConfig_;
|
||||
std::unique_ptr<Deck> deck_;
|
||||
std::unique_ptr<EclipseState> eclipseState_;
|
||||
std::unique_ptr<Schedule> schedule_;
|
||||
std::unique_ptr<SummaryConfig> summaryConfig_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -220,7 +220,7 @@ namespace Opm {
|
||||
failureReport_ = report;
|
||||
|
||||
std::string msg = "Solver convergence failure - Failed to complete a time step within " + std::to_string(maxIter()) + " iterations.";
|
||||
OPM_THROW_NOLOG(Opm::TooManyIterations, msg);
|
||||
OPM_THROW_NOLOG(TooManyIterations, msg);
|
||||
}
|
||||
|
||||
// Do model-specific post-step actions.
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||
|
||||
typedef AdaptiveTimeSteppingEbos<TypeTag> TimeStepper;
|
||||
typedef Opm::BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
|
||||
typedef WellStateFullyImplicitBlackoil WellState;
|
||||
typedef BlackoilModelEbos<TypeTag> Model;
|
||||
@ -157,15 +157,15 @@ public:
|
||||
ebosSimulator_.setEpisodeIndex(-1);
|
||||
|
||||
// Create timers and file for writing timing info.
|
||||
solverTimer_ = std::make_unique<Opm::time::StopWatch>();
|
||||
totalTimer_ = std::make_unique<Opm::time::StopWatch>();
|
||||
solverTimer_ = std::make_unique<time::StopWatch>();
|
||||
totalTimer_ = std::make_unique<time::StopWatch>();
|
||||
totalTimer_->start();
|
||||
|
||||
// adaptive time stepping
|
||||
bool enableAdaptive = EWOMS_GET_PARAM(TypeTag, bool, EnableAdaptiveTimeStepping);
|
||||
bool enableTUNING = EWOMS_GET_PARAM(TypeTag, bool, EnableTuning);
|
||||
if (enableAdaptive) {
|
||||
const Opm::UnitSystem& unitSystem = this->ebosSimulator_.vanguard().eclState().getUnits();
|
||||
const UnitSystem& unitSystem = this->ebosSimulator_.vanguard().eclState().getUnits();
|
||||
if (enableTUNING) {
|
||||
adaptiveTimeStepping_ = std::make_unique<TimeStepper>(schedule()[timer.currentStepNum()].tuning(),
|
||||
unitSystem, terminalOutput_);
|
||||
@ -383,8 +383,8 @@ protected:
|
||||
bool terminalOutput_;
|
||||
|
||||
SimulatorReport report_;
|
||||
std::unique_ptr<Opm::time::StopWatch> solverTimer_;
|
||||
std::unique_ptr<Opm::time::StopWatch> totalTimer_;
|
||||
std::unique_ptr<time::StopWatch> solverTimer_;
|
||||
std::unique_ptr<time::StopWatch> totalTimer_;
|
||||
std::unique_ptr<TimeStepper> adaptiveTimeStepping_;
|
||||
};
|
||||
|
||||
|
@ -190,7 +190,7 @@ struct LinearSolverIgnoreConvergenceFailure<TypeTag, TTag::FlowIstlSolverParams>
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
using type = Opm::ISTLSolverEbos<TypeTag>;
|
||||
using type = ISTLSolverEbos<TypeTag>;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct PreconditionerAddWellContributions<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
@ -252,7 +252,7 @@ namespace Opm
|
||||
int linear_solver_restart_;
|
||||
int linear_solver_verbosity_;
|
||||
int ilu_fillin_level_;
|
||||
Opm::MILU_VARIANT ilu_milu_;
|
||||
MILU_VARIANT ilu_milu_;
|
||||
bool ilu_redblack_;
|
||||
bool ilu_reorder_sphere_;
|
||||
bool newton_use_gmres_;
|
||||
|
@ -58,10 +58,10 @@ struct SparseMatrixAdapter<TypeTag, TTag::FlowIstlSolver>
|
||||
private:
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
typedef Opm::MatrixBlock<Scalar, numEq, numEq> Block;
|
||||
typedef MatrixBlock<Scalar, numEq, numEq> Block;
|
||||
|
||||
public:
|
||||
typedef typename Opm::Linear::IstlSparseMatrixAdapter<Block> type;
|
||||
typedef typename Linear::IstlSparseMatrixAdapter<Block> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
@ -241,10 +241,10 @@ namespace Opm
|
||||
const int verbosity = prm_.get<int>("verbosity", 0);
|
||||
const bool write_matrix = verbosity > 10;
|
||||
if (write_matrix) {
|
||||
Opm::Helper::writeSystem(simulator_, //simulator is only used to get names
|
||||
getMatrix(),
|
||||
*rhs_,
|
||||
comm_.get());
|
||||
Helper::writeSystem(simulator_, //simulator is only used to get names
|
||||
getMatrix(),
|
||||
*rhs_,
|
||||
comm_.get());
|
||||
}
|
||||
|
||||
// Solve system.
|
||||
@ -428,7 +428,7 @@ namespace Opm
|
||||
if (weightsType == "quasiimpes") {
|
||||
// weighs will be created as default in the solver
|
||||
weightsCalculator = [this, transpose, pressureIndex]() {
|
||||
return Opm::Amg::getQuasiImpesWeights<Matrix, Vector>(this->getMatrix(), pressureIndex, transpose);
|
||||
return Amg::getQuasiImpesWeights<Matrix, Vector>(this->getMatrix(), pressureIndex, transpose);
|
||||
};
|
||||
} else if (weightsType == "trueimpes") {
|
||||
weightsCalculator = [this, pressureIndex]() {
|
||||
@ -451,9 +451,9 @@ namespace Opm
|
||||
{
|
||||
Vector weights(rhs_->size());
|
||||
ElementContext elemCtx(simulator_);
|
||||
Opm::Amg::getTrueImpesWeights(pressureVarIndex, weights, simulator_.vanguard().gridView(),
|
||||
elemCtx, simulator_.model(),
|
||||
ThreadManager::threadId());
|
||||
Amg::getTrueImpesWeights(pressureVarIndex, weights, simulator_.vanguard().gridView(),
|
||||
elemCtx, simulator_.model(),
|
||||
ThreadManager::threadId());
|
||||
return weights;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace Helper
|
||||
} else if (!dir.empty() && dir.back() != '/') {
|
||||
dir += "/";
|
||||
}
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = ::Opm::filesystem;
|
||||
fs::path output_dir(dir);
|
||||
fs::path subdir("reports");
|
||||
output_dir = output_dir / subdir;
|
||||
|
@ -66,7 +66,7 @@ namespace Amg
|
||||
if (transpose) {
|
||||
diag_block.solve(bweights, rhs);
|
||||
} else {
|
||||
auto diag_block_transpose = Opm::Details::transposeDenseMatrix(diag_block);
|
||||
auto diag_block_transpose = Details::transposeDenseMatrix(diag_block);
|
||||
diag_block_transpose.solve(bweights, rhs);
|
||||
}
|
||||
double abs_max = *std::max_element(
|
||||
|
@ -41,7 +41,7 @@ setupPropertyTree(FlowLinearSolverParameters p) // Note: copying the parameters
|
||||
// Get configuration from file.
|
||||
if (conf.size() > 5 && conf.substr(conf.size() - 5, 5) == ".json") { // the ends_with() method is not available until C++20
|
||||
#if BOOST_VERSION / 100 % 1000 > 48
|
||||
if ( !Opm::filesystem::exists(conf) ) {
|
||||
if ( !filesystem::exists(conf) ) {
|
||||
OPM_THROW(std::invalid_argument, "JSON file " << conf << " does not exist.");
|
||||
}
|
||||
try {
|
||||
|
@ -409,21 +409,21 @@ namespace Opm {
|
||||
OpmLog::debug("Overall linear iterations used: " + std::to_string(substepReport.total_linear_iterations));
|
||||
}
|
||||
}
|
||||
catch (const Opm::TooManyIterations& e) {
|
||||
catch (const TooManyIterations& e) {
|
||||
substepReport = solver.failureReport();
|
||||
causeOfFailure = "Solver convergence failure - Iteration limit reached";
|
||||
|
||||
logException_(e, solverVerbose_);
|
||||
// since linearIterations is < 0 this will restart the solver
|
||||
}
|
||||
catch (const Opm::LinearSolverProblem& e) {
|
||||
catch (const LinearSolverProblem& e) {
|
||||
substepReport = solver.failureReport();
|
||||
causeOfFailure = "Linear solver convergence failure";
|
||||
|
||||
logException_(e, solverVerbose_);
|
||||
// since linearIterations is < 0 this will restart the solver
|
||||
}
|
||||
catch (const Opm::NumericalIssue& e) {
|
||||
catch (const NumericalIssue& e) {
|
||||
substepReport = solver.failureReport();
|
||||
causeOfFailure = "Solver convergence failure - Numerical problem encountered";
|
||||
|
||||
@ -496,7 +496,7 @@ namespace Opm {
|
||||
if (fipnum) {
|
||||
solver.computeFluidInPlace(*fipnum);
|
||||
}
|
||||
Opm::time::StopWatch perfTimer;
|
||||
time::StopWatch perfTimer;
|
||||
perfTimer.start();
|
||||
|
||||
ebosProblem.writeOutput();
|
||||
@ -522,7 +522,7 @@ namespace Opm {
|
||||
if (solverVerbose_) {
|
||||
OpmLog::error(msg);
|
||||
}
|
||||
OPM_THROW_NOLOG(Opm::NumericalIssue, msg);
|
||||
OPM_THROW_NOLOG(NumericalIssue, msg);
|
||||
}
|
||||
|
||||
// The new, chopped timestep.
|
||||
@ -538,7 +538,7 @@ namespace Opm {
|
||||
if (solverVerbose_) {
|
||||
OpmLog::error(msg);
|
||||
}
|
||||
OPM_THROW_NOLOG(Opm::NumericalIssue, msg);
|
||||
OPM_THROW_NOLOG(NumericalIssue, msg);
|
||||
}
|
||||
|
||||
// Define utility function for chopping timestep.
|
||||
|
@ -34,7 +34,7 @@ namespace Opm
|
||||
namespace detail
|
||||
{
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = ::Opm::filesystem;
|
||||
|
||||
/// \brief A functor that merges multiple files of a parallel run to one file.
|
||||
///
|
||||
|
@ -52,9 +52,9 @@ FileOutputMode setupLogging(int mpi_rank_, const std::string& deck_filename, con
|
||||
/// \brief Reads the deck and creates all necessary objects if needed
|
||||
///
|
||||
/// If pointers already contains objects then they are used otherwise they are created and can be used outside later.
|
||||
void readDeck(int rank, std::string& deckFilename, std::unique_ptr<Opm::Deck>& deck, std::unique_ptr<Opm::EclipseState>& eclipseState,
|
||||
std::unique_ptr<Opm::Schedule>& schedule, std::unique_ptr<Opm::SummaryConfig>& summaryConfig,
|
||||
std::unique_ptr<ErrorGuard> errorGuard, std::shared_ptr<Opm::Python>& python, std::unique_ptr<ParseContext> parseContext,
|
||||
void readDeck(int rank, std::string& deckFilename, std::unique_ptr<Deck>& deck, std::unique_ptr<EclipseState>& eclipseState,
|
||||
std::unique_ptr<Schedule>& schedule, std::unique_ptr<SummaryConfig>& summaryConfig,
|
||||
std::unique_ptr<ErrorGuard> errorGuard, std::shared_ptr<Python>& python, std::unique_ptr<ParseContext> parseContext,
|
||||
bool initFromRestart, bool checkDeck, const std::optional<int>& outputInterval);
|
||||
} // end namespace Opm
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace Opm {
|
||||
|
||||
/// Class for handling the blackoil well model.
|
||||
template<typename TypeTag>
|
||||
class BlackoilWellModel : public Opm::BaseAuxiliaryModule<TypeTag>
|
||||
class BlackoilWellModel : public BaseAuxiliaryModule<TypeTag>
|
||||
{
|
||||
public:
|
||||
// --------- Types ---------
|
||||
@ -106,10 +106,10 @@ namespace Opm {
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
||||
|
||||
typedef typename Opm::BaseAuxiliaryModule<TypeTag>::NeighborSet NeighborSet;
|
||||
using GasLiftSingleWell = Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GasLiftStage2 = Opm::GasLiftStage2<TypeTag>;
|
||||
using GLiftWellState = Opm::GasLiftWellState<TypeTag>;
|
||||
typedef typename BaseAuxiliaryModule<TypeTag>::NeighborSet NeighborSet;
|
||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GasLiftStage2 = ::Opm::GasLiftStage2<TypeTag>;
|
||||
using GLiftWellState = ::Opm::GasLiftWellState<TypeTag>;
|
||||
using GLiftWellStateMap =
|
||||
std::map<std::string,std::unique_ptr<GLiftWellState>>;
|
||||
using GLiftOptWells =
|
||||
@ -130,7 +130,7 @@ namespace Opm {
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar, numEq, numEq > MatrixBlockType;
|
||||
|
||||
typedef Opm::BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
|
||||
// For the conversion between the surface volume rate and resrevoir voidage rate
|
||||
using RateConverterType = RateConverter::
|
||||
@ -217,8 +217,8 @@ namespace Opm {
|
||||
|
||||
void initFromRestartFile(const RestartValue& restartValues);
|
||||
|
||||
Opm::data::GroupAndNetworkValues
|
||||
groupAndNetworkData(const int reportStepIdx, const Opm::Schedule& sched) const
|
||||
data::GroupAndNetworkValues
|
||||
groupAndNetworkData(const int reportStepIdx, const Schedule& sched) const
|
||||
{
|
||||
auto grp_nwrk_values = ::Opm::data::GroupAndNetworkValues{};
|
||||
|
||||
@ -337,9 +337,9 @@ namespace Opm {
|
||||
return this->active_wgstate_.group_state;
|
||||
}
|
||||
|
||||
Opm::data::Wells wellData() const
|
||||
data::Wells wellData() const
|
||||
{
|
||||
auto wsrpt = this->wellState().report(Opm::UgGridHelpers::globalCell(grid()),
|
||||
auto wsrpt = this->wellState().report(UgGridHelpers::globalCell(grid()),
|
||||
[this](const int well_ndex) -> bool
|
||||
{
|
||||
return this->wasDynamicallyShutThisTimeStep(well_ndex);
|
||||
@ -400,12 +400,12 @@ namespace Opm {
|
||||
// twice at the beginning of the time step
|
||||
/// Calculating the explict quantities used in the well calculation. By explicit, we mean they are cacluated
|
||||
/// at the beginning of the time step and no derivatives are included in these quantities
|
||||
void calculateExplicitQuantities(Opm::DeferredLogger& deferred_logger) const;
|
||||
void calculateExplicitQuantities(DeferredLogger& deferred_logger) const;
|
||||
// some preparation work, mostly related to group control and RESV,
|
||||
// at the beginning of each time step (Not report step)
|
||||
void prepareTimeStep(Opm::DeferredLogger& deferred_logger);
|
||||
void prepareTimeStep(DeferredLogger& deferred_logger);
|
||||
void initPrimaryVariablesEvaluation() const;
|
||||
void updateWellControls(Opm::DeferredLogger& deferred_logger, const bool checkGroupControls);
|
||||
void updateWellControls(DeferredLogger& deferred_logger, const bool checkGroupControls);
|
||||
WellInterfacePtr getWell(const std::string& well_name) const;
|
||||
protected:
|
||||
Simulator& ebosSimulator_;
|
||||
@ -451,7 +451,7 @@ namespace Opm {
|
||||
createTypedWellPointer(const int wellID,
|
||||
const int time_step) const;
|
||||
|
||||
WellInterfacePtr createWellForWellTest(const std::string& well_name, const int report_step, Opm::DeferredLogger& deferred_logger) const;
|
||||
WellInterfacePtr createWellForWellTest(const std::string& well_name, const int report_step, DeferredLogger& deferred_logger) const;
|
||||
|
||||
|
||||
const ModelParameters param_;
|
||||
@ -497,7 +497,7 @@ namespace Opm {
|
||||
|
||||
void gliftDebug(
|
||||
const std::string &msg,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
/// \brief Get the wells of our partition that are not shut.
|
||||
/// \param timeStepIdx The index of the time step.
|
||||
@ -528,7 +528,7 @@ namespace Opm {
|
||||
void updateNetworkPressures();
|
||||
|
||||
// setting the well_solutions_ based on well_state.
|
||||
void updatePrimaryVariables(Opm::DeferredLogger& deferred_logger);
|
||||
void updatePrimaryVariables(DeferredLogger& deferred_logger);
|
||||
|
||||
void setupCartesianToCompressed_(const int* global_cell, int local_num__cells);
|
||||
|
||||
@ -538,7 +538,7 @@ namespace Opm {
|
||||
void updateAverageFormationFactor();
|
||||
|
||||
// Calculating well potentials for each well
|
||||
void computeWellPotentials(std::vector<double>& well_potentials, const int reportStepIdx, Opm::DeferredLogger& deferred_logger);
|
||||
void computeWellPotentials(std::vector<double>& well_potentials, const int reportStepIdx, DeferredLogger& deferred_logger);
|
||||
|
||||
const std::vector<double>& wellPerfEfficiencyFactors() const;
|
||||
|
||||
@ -558,13 +558,13 @@ namespace Opm {
|
||||
|
||||
int reportStepIndex() const;
|
||||
|
||||
void assembleWellEq(const double dt, Opm::DeferredLogger& deferred_logger);
|
||||
void assembleWellEq(const double dt, DeferredLogger& deferred_logger);
|
||||
|
||||
void maybeDoGasLiftOptimize(Opm::DeferredLogger& deferred_logger);
|
||||
void maybeDoGasLiftOptimize(DeferredLogger& deferred_logger);
|
||||
|
||||
void gliftDebugShowALQ(Opm::DeferredLogger& deferred_logger);
|
||||
void gliftDebugShowALQ(DeferredLogger& deferred_logger);
|
||||
|
||||
void gasLiftOptimizationStage2(Opm::DeferredLogger& deferred_logger,
|
||||
void gasLiftOptimizationStage2(DeferredLogger& deferred_logger,
|
||||
GLiftProdWells &prod_wells, GLiftOptWells &glift_wells,
|
||||
GLiftWellStateMap &map);
|
||||
|
||||
@ -583,7 +583,7 @@ namespace Opm {
|
||||
/// upate the wellTestState related to economic limits
|
||||
void updateWellTestState(const double& simulationTime, WellTestState& wellTestState) const;
|
||||
|
||||
void wellTesting(const int timeStepIdx, const double simulationTime, Opm::DeferredLogger& deferred_logger);
|
||||
void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger& deferred_logger);
|
||||
|
||||
// convert well data from opm-common to well state from opm-core
|
||||
void loadRestartData( const data::Wells& wells,
|
||||
@ -597,19 +597,19 @@ namespace Opm {
|
||||
|
||||
const Well& getWellEcl(const std::string& well_name) const;
|
||||
|
||||
void updateGroupIndividualControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
void updateGroupIndividualControl(const Group& group, Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
bool checkGroupConstraints(const Group& group, Opm::DeferredLogger& deferred_logger) const;
|
||||
Group::ProductionCMode checkGroupProductionConstraints(const Group& group, Opm::DeferredLogger& deferred_logger) const;
|
||||
void updateGroupIndividualControls(DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
void updateGroupIndividualControl(const Group& group, DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
bool checkGroupConstraints(const Group& group, DeferredLogger& deferred_logger) const;
|
||||
Group::ProductionCMode checkGroupProductionConstraints(const Group& group, DeferredLogger& deferred_logger) const;
|
||||
Group::InjectionCMode checkGroupInjectionConstraints(const Group& group, const Phase& phase) const;
|
||||
void checkGconsaleLimits(const Group& group, WellState& well_state, Opm::DeferredLogger& deferred_logger );
|
||||
void checkGconsaleLimits(const Group& group, WellState& well_state, DeferredLogger& deferred_logger );
|
||||
|
||||
void updateGroupHigherControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
void checkGroupHigherConstraints(const Group& group, Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
void updateGroupHigherControls(DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
void checkGroupHigherConstraints(const Group& group, DeferredLogger& deferred_logger, std::set<std::string>& switched_groups);
|
||||
|
||||
void actionOnBrokenConstraints(const Group& group, const Group::ExceedAction& exceed_action, const Group::ProductionCMode& newControl, Opm::DeferredLogger& deferred_logger);
|
||||
void actionOnBrokenConstraints(const Group& group, const Group::ExceedAction& exceed_action, const Group::ProductionCMode& newControl, DeferredLogger& deferred_logger);
|
||||
|
||||
void actionOnBrokenConstraints(const Group& group, const Group::InjectionCMode& newControl, const Phase& topUpPhase, Opm::DeferredLogger& deferred_logger);
|
||||
void actionOnBrokenConstraints(const Group& group, const Group::InjectionCMode& newControl, const Phase& topUpPhase, DeferredLogger& deferred_logger);
|
||||
|
||||
void updateWsolvent(const Group& group, const Schedule& schedule, const int reportStepIdx, const WellStateFullyImplicitBlackoil& wellState);
|
||||
|
||||
|
@ -54,8 +54,8 @@ namespace Opm {
|
||||
// Set up cartesian mapping.
|
||||
{
|
||||
const auto& grid = this->ebosSimulator_.vanguard().grid();
|
||||
const auto& cartDims = Opm::UgGridHelpers::cartDims(grid);
|
||||
setupCartesianToCompressed_(Opm::UgGridHelpers::globalCell(grid),
|
||||
const auto& cartDims = UgGridHelpers::cartDims(grid);
|
||||
setupCartesianToCompressed_(UgGridHelpers::globalCell(grid),
|
||||
cartDims[0] * cartDims[1] * cartDims[2]);
|
||||
|
||||
auto& parallel_wells = ebosSimulator.vanguard().parallelWells();
|
||||
@ -260,7 +260,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
beginReportStep(const int timeStepIdx)
|
||||
{
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
report_step_starts_ = true;
|
||||
|
||||
const Grid& grid = ebosSimulator_.vanguard().grid();
|
||||
@ -316,7 +316,7 @@ namespace Opm {
|
||||
updatePerforationIntensiveQuantities();
|
||||
updateAverageFormationFactor();
|
||||
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
|
||||
this->resetWGState();
|
||||
updateAndCommunicateGroupData();
|
||||
@ -457,7 +457,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::gliftDebug(
|
||||
const std::string &msg, Opm::DeferredLogger &deferred_logger) const
|
||||
const std::string &msg, DeferredLogger &deferred_logger) const
|
||||
{
|
||||
if (this->glift_debug) {
|
||||
const std::string message = fmt::format(
|
||||
@ -470,7 +470,7 @@ namespace Opm {
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::wellTesting(const int timeStepIdx,
|
||||
const double simulationTime,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
const auto& wtest_config = schedule()[timeStepIdx].wtest_config();
|
||||
if (wtest_config.size() != 0) { // there is a WTEST request
|
||||
@ -545,7 +545,7 @@ namespace Opm {
|
||||
report_step_starts_ = false;
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
for (const auto& well : well_container_) {
|
||||
if (getPropValue<TypeTag, Properties::EnablePolymerMW>() && well->isInjector()) {
|
||||
well->updateWaterThroughput(dt, this->wellState());
|
||||
@ -574,7 +574,7 @@ namespace Opm {
|
||||
|
||||
this->commitWGState();
|
||||
|
||||
Opm::DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
if (terminal_output_) {
|
||||
global_deferredLogger.logMessages();
|
||||
}
|
||||
@ -640,7 +640,7 @@ namespace Opm {
|
||||
const int nw = wells_ecl_.size();
|
||||
if (nw > 0) {
|
||||
const auto phaseUsage = phaseUsageFromDeck(eclState());
|
||||
const size_t numCells = Opm::UgGridHelpers::numCells(grid());
|
||||
const size_t numCells = UgGridHelpers::numCells(grid());
|
||||
const bool handle_ms_well = (param_.use_multisegment_well_ && anyMSWellOpenLocal());
|
||||
this->wellState().resize(wells_ecl_, local_parallel_well_info_, schedule(), handle_ms_well, numCells, well_perf_data_, summaryState); // Resize for restart step
|
||||
loadRestartData(restartValues.wells, restartValues.grp_nwrk, phaseUsage, handle_ms_well, this->wellState());
|
||||
@ -784,7 +784,7 @@ namespace Opm {
|
||||
{
|
||||
std::vector<WellInterfacePtr> well_container;
|
||||
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
|
||||
const int nw = numLocalWells();
|
||||
|
||||
@ -903,7 +903,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
// Collect log messages and print.
|
||||
Opm::DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
if (terminal_output_) {
|
||||
global_deferredLogger.logMessages();
|
||||
}
|
||||
@ -996,7 +996,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
createWellForWellTest(const std::string& well_name,
|
||||
const int report_step,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// Finding the location of the well in wells_ecl
|
||||
const int nw_wells_ecl = wells_ecl_.size();
|
||||
@ -1025,7 +1025,7 @@ namespace Opm {
|
||||
const double dt)
|
||||
{
|
||||
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
if (this->glift_debug) {
|
||||
const std::string msg = fmt::format(
|
||||
"assemble() : iteration {}" , iterationIdx);
|
||||
@ -1084,7 +1084,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
maybeDoGasLiftOptimize(Opm::DeferredLogger& deferred_logger)
|
||||
maybeDoGasLiftOptimize(DeferredLogger& deferred_logger)
|
||||
{
|
||||
this->wellState().enableGliftOptimization();
|
||||
GLiftOptWells glift_wells;
|
||||
@ -1111,7 +1111,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
gasLiftOptimizationStage2(Opm::DeferredLogger& deferred_logger,
|
||||
gasLiftOptimizationStage2(DeferredLogger& deferred_logger,
|
||||
GLiftProdWells &prod_wells, GLiftOptWells &glift_wells,
|
||||
GLiftWellStateMap &glift_well_state_map)
|
||||
{
|
||||
@ -1124,7 +1124,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
gliftDebugShowALQ(Opm::DeferredLogger& deferred_logger)
|
||||
gliftDebugShowALQ(DeferredLogger& deferred_logger)
|
||||
{
|
||||
for (auto& well : this->well_container_) {
|
||||
if (well->isProducer()) {
|
||||
@ -1139,7 +1139,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
assembleWellEq(const double dt, Opm::DeferredLogger& deferred_logger)
|
||||
assembleWellEq(const double dt, DeferredLogger& deferred_logger)
|
||||
{
|
||||
for (auto& well : well_container_) {
|
||||
well->assembleWellEq(ebosSimulator_, dt, this->wellState(), this->groupState(), deferred_logger);
|
||||
@ -1247,7 +1247,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
recoverWellSolutionAndUpdateWellState(const BVector& x)
|
||||
{
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
auto exc_type = ExceptionType::NONE;
|
||||
std::string exc_msg;
|
||||
try {
|
||||
@ -1332,7 +1332,7 @@ namespace Opm {
|
||||
getWellConvergence(const std::vector<Scalar>& B_avg, bool checkGroupConvergence) const
|
||||
{
|
||||
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
// Get global (from all processes) convergence report.
|
||||
ConvergenceReport local_report;
|
||||
for (const auto& well : well_container_) {
|
||||
@ -1340,7 +1340,7 @@ namespace Opm {
|
||||
local_report += well->getWellConvergence(this->wellState(), B_avg, local_deferredLogger);
|
||||
}
|
||||
}
|
||||
Opm::DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
if (terminal_output_) {
|
||||
global_deferredLogger.logMessages();
|
||||
}
|
||||
@ -1374,7 +1374,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
calculateExplicitQuantities(Opm::DeferredLogger& deferred_logger) const
|
||||
calculateExplicitQuantities(DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// TODO: checking isOperable() ?
|
||||
for (auto& well : well_container_) {
|
||||
@ -1389,7 +1389,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updateWellControls(Opm::DeferredLogger& deferred_logger, const bool checkGroupControls)
|
||||
updateWellControls(DeferredLogger& deferred_logger, const bool checkGroupControls)
|
||||
{
|
||||
// Even if there are no wells active locally, we cannot
|
||||
// return as the DeferredLogger uses global communication.
|
||||
@ -1533,7 +1533,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updateWellTestState(const double& simulationTime, WellTestState& wellTestState) const
|
||||
{
|
||||
Opm::DeferredLogger local_deferredLogger;
|
||||
DeferredLogger local_deferredLogger;
|
||||
for (const auto& well : well_container_) {
|
||||
const auto wasClosed = wellTestState.hasWellClosed(well->name());
|
||||
|
||||
@ -1544,7 +1544,7 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
Opm::DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
DeferredLogger global_deferredLogger = gatherDeferredLogger(local_deferredLogger);
|
||||
if (terminal_output_) {
|
||||
global_deferredLogger.logMessages();
|
||||
}
|
||||
@ -1555,7 +1555,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
computeWellPotentials(std::vector<double>& well_potentials, const int reportStepIdx, Opm::DeferredLogger& deferred_logger)
|
||||
computeWellPotentials(std::vector<double>& well_potentials, const int reportStepIdx, DeferredLogger& deferred_logger)
|
||||
{
|
||||
// number of wells and phases
|
||||
const int nw = numLocalWells();
|
||||
@ -1564,7 +1564,7 @@ namespace Opm {
|
||||
|
||||
auto well_state = this->wellState();
|
||||
|
||||
const Opm::SummaryConfig& summaryConfig = ebosSimulator_.vanguard().summaryConfig();
|
||||
const SummaryConfig& summaryConfig = ebosSimulator_.vanguard().summaryConfig();
|
||||
const bool write_restart_file = ebosSimulator_.vanguard().schedule().write_rst_file(reportStepIdx);
|
||||
auto exc_type = ExceptionType::NONE;
|
||||
std::string exc_msg;
|
||||
@ -1673,7 +1673,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
prepareTimeStep(Opm::DeferredLogger& deferred_logger)
|
||||
prepareTimeStep(DeferredLogger& deferred_logger)
|
||||
{
|
||||
auto exc_type = ExceptionType::NONE;
|
||||
std::string exc_msg;
|
||||
@ -1833,7 +1833,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updatePrimaryVariables(Opm::DeferredLogger& deferred_logger)
|
||||
updatePrimaryVariables(DeferredLogger& deferred_logger)
|
||||
{
|
||||
for (const auto& well : well_container_) {
|
||||
well->updatePrimaryVariables(this->wellState(), deferred_logger);
|
||||
@ -1894,7 +1894,7 @@ namespace Opm {
|
||||
|
||||
depth_.resize(numCells);
|
||||
for (unsigned cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
depth_[cellIdx] = Opm::UgGridHelpers::cellCenterDepth( grid, cellIdx );
|
||||
depth_[cellIdx] = UgGridHelpers::cellCenterDepth( grid, cellIdx );
|
||||
}
|
||||
}
|
||||
|
||||
@ -2009,7 +2009,7 @@ namespace Opm {
|
||||
const int segment_index = segment_set.segmentNumberToIndex(segment.first);
|
||||
|
||||
// recovering segment rates and pressure from the restart values
|
||||
const auto pres_idx = Opm::data::SegmentPressures::Value::Pressure;
|
||||
const auto pres_idx = data::SegmentPressures::Value::Pressure;
|
||||
well_state.segPress()[top_segment_index + segment_index] = segment.second.pressures[pres_idx];
|
||||
|
||||
const auto& segment_rates = segment.second.rates;
|
||||
@ -2101,7 +2101,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updateGroupIndividualControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
updateGroupIndividualControls(DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
{
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
|
||||
@ -2121,7 +2121,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updateGroupIndividualControl(const Group& group, Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups) {
|
||||
updateGroupIndividualControl(const Group& group, DeferredLogger& deferred_logger, std::set<std::string>& switched_groups) {
|
||||
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
const bool skip = switched_groups.count(group.name());
|
||||
@ -2160,7 +2160,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
bool
|
||||
BlackoilWellModel<TypeTag>::
|
||||
checkGroupConstraints(const Group& group, Opm::DeferredLogger& deferred_logger) const {
|
||||
checkGroupConstraints(const Group& group, DeferredLogger& deferred_logger) const {
|
||||
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
if (group.isInjectionGroup()) {
|
||||
@ -2196,7 +2196,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
Group::ProductionCMode
|
||||
BlackoilWellModel<TypeTag>::
|
||||
checkGroupProductionConstraints(const Group& group, Opm::DeferredLogger& deferred_logger) const {
|
||||
checkGroupProductionConstraints(const Group& group, DeferredLogger& deferred_logger) const {
|
||||
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
||||
@ -2405,7 +2405,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
checkGconsaleLimits(const Group& group, WellState& well_state, Opm::DeferredLogger& deferred_logger)
|
||||
checkGconsaleLimits(const Group& group, WellState& well_state, DeferredLogger& deferred_logger)
|
||||
{
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
// call recursively down the group hiearchy
|
||||
@ -2525,7 +2525,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
actionOnBrokenConstraints(const Group& group, const Group::ExceedAction& exceed_action, const Group::ProductionCMode& newControl, Opm::DeferredLogger& deferred_logger) {
|
||||
actionOnBrokenConstraints(const Group& group, const Group::ExceedAction& exceed_action, const Group::ProductionCMode& newControl, DeferredLogger& deferred_logger) {
|
||||
|
||||
const Group::ProductionCMode oldControl = this->groupState().production_control(group.name());
|
||||
|
||||
@ -2578,7 +2578,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
actionOnBrokenConstraints(const Group& group, const Group::InjectionCMode& newControl, const Phase& controlPhase, Opm::DeferredLogger& deferred_logger) {
|
||||
actionOnBrokenConstraints(const Group& group, const Group::InjectionCMode& newControl, const Phase& controlPhase, DeferredLogger& deferred_logger) {
|
||||
auto oldControl = this->groupState().injection_control(group.name(), controlPhase);
|
||||
|
||||
std::ostringstream ss;
|
||||
@ -2601,7 +2601,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
updateGroupHigherControls(Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
updateGroupHigherControls(DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
{
|
||||
const int reportStepIdx = ebosSimulator_.episodeIndex();
|
||||
const Group& fieldGroup = schedule().getGroup("FIELD", reportStepIdx);
|
||||
@ -2612,7 +2612,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
checkGroupHigherConstraints(const Group& group, Opm::DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
checkGroupHigherConstraints(const Group& group, DeferredLogger& deferred_logger, std::set<std::string>& switched_groups)
|
||||
{
|
||||
// Set up coefficients for RESV <-> surface rate conversion.
|
||||
// Use the pvtRegionIdx from the top cell of the first well.
|
||||
@ -3138,8 +3138,8 @@ namespace Opm {
|
||||
gr[gname].production = this->getGuideRateValues(group);
|
||||
}
|
||||
|
||||
if (this->guideRate_->has(gname, Opm::Phase::WATER)
|
||||
|| this->guideRate_->has(gname, Opm::Phase::GAS)) {
|
||||
if (this->guideRate_->has(gname, Phase::WATER)
|
||||
|| this->guideRate_->has(gname, Phase::GAS)) {
|
||||
gr[gname].injection = this->getGuideRateInjectionGroupValues(group);
|
||||
}
|
||||
|
||||
@ -3234,13 +3234,13 @@ namespace Opm {
|
||||
assert (this->guideRate_ != nullptr);
|
||||
|
||||
const auto& gname = group.name();
|
||||
if (this->guideRate_->has(gname, Opm::Phase::GAS)) {
|
||||
if (this->guideRate_->has(gname, Phase::GAS)) {
|
||||
grval.set(data::GuideRateValue::Item::Gas,
|
||||
this->guideRate_->get(gname, Opm::Phase::GAS));
|
||||
this->guideRate_->get(gname, Phase::GAS));
|
||||
}
|
||||
if (this->guideRate_->has(gname, Opm::Phase::WATER)) {
|
||||
if (this->guideRate_->has(gname, Phase::WATER)) {
|
||||
grval.set(data::GuideRateValue::Item::Water,
|
||||
this->guideRate_->get(gname, Opm::Phase::WATER));
|
||||
this->guideRate_->get(gname, Phase::WATER));
|
||||
}
|
||||
return grval;
|
||||
}
|
||||
|
@ -59,9 +59,9 @@ namespace Opm
|
||||
class GasLiftStage2 {
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
using WellState = WellStateFullyImplicitBlackoil;
|
||||
using BlackoilWellModel = Opm::BlackoilWellModel<TypeTag>;
|
||||
using GasLiftSingleWell = Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GLiftWellState = Opm::GasLiftWellState<TypeTag>;
|
||||
using BlackoilWellModel = ::Opm::BlackoilWellModel<TypeTag>;
|
||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GLiftWellState = ::Opm::GasLiftWellState<TypeTag>;
|
||||
using GLiftOptWells = typename BlackoilWellModel::GLiftOptWells;
|
||||
using GLiftProdWells = typename BlackoilWellModel::GLiftProdWells;
|
||||
using GLiftWellStateMap = typename BlackoilWellModel::GLiftWellStateMap;
|
||||
@ -98,26 +98,26 @@ namespace Opm
|
||||
void displayWarning_(const std::string &msg, const std::string &group_name);
|
||||
void displayWarning_(const std::string &msg);
|
||||
std::tuple<double, double, double> getCurrentGroupRates_(
|
||||
const Opm::Group &group);
|
||||
const Group &group);
|
||||
std::array<double,3> getCurrentGroupRatesRecursive_(
|
||||
const Opm::Group &group);
|
||||
const Group &group);
|
||||
std::tuple<double, double, double> getCurrentWellRates_(
|
||||
const std::string &well_name, const std::string &group_name);
|
||||
std::vector<GasLiftSingleWell *> getGroupGliftWells_(
|
||||
const Opm::Group &group);
|
||||
const Group &group);
|
||||
void getGroupGliftWellsRecursive_(
|
||||
const Opm::Group &group, std::vector<GasLiftSingleWell *> &wells);
|
||||
const Group &group, std::vector<GasLiftSingleWell *> &wells);
|
||||
std::pair<double, double> getStdWellRates_(const WellInterface<TypeTag> &well);
|
||||
void optimizeGroup_(const Opm::Group &group);
|
||||
void optimizeGroupsRecursive_(const Opm::Group &group);
|
||||
void optimizeGroup_(const Group &group);
|
||||
void optimizeGroupsRecursive_(const Group &group);
|
||||
void recalculateGradientAndUpdateData_(
|
||||
GradPairItr &grad_itr, bool increase,
|
||||
std::vector<GradPair> &grads, std::vector<GradPair> &other_grads);
|
||||
void redistributeALQ_(
|
||||
std::vector<GasLiftSingleWell *> &wells, const Opm::Group &group,
|
||||
std::vector<GasLiftSingleWell *> &wells, const Group &group,
|
||||
std::vector<GradPair> &inc_grads, std::vector<GradPair> &dec_grads);
|
||||
void removeSurplusALQ_(
|
||||
const Opm::Group &group,
|
||||
const Group &group,
|
||||
std::vector<GradPair> &inc_grads, std::vector<GradPair> &dec_grads);
|
||||
void saveGrad_(GradMap &map, const std::string &name, GradInfo &grad);
|
||||
void saveDecGrad_(const std::string &name, GradInfo &grad);
|
||||
@ -152,13 +152,13 @@ namespace Opm
|
||||
int nonlinear_iteration_idx_;
|
||||
|
||||
struct OptimizeState {
|
||||
OptimizeState( GasLiftStage2 &parent_, const Opm::Group &group_ ) :
|
||||
OptimizeState( GasLiftStage2 &parent_, const Group &group_ ) :
|
||||
parent{parent_},
|
||||
group{group_},
|
||||
it{0}
|
||||
{}
|
||||
GasLiftStage2 &parent;
|
||||
const Opm::Group &group;
|
||||
const Group &group;
|
||||
int it;
|
||||
|
||||
using GradInfo = typename GasLiftStage2::GradInfo;
|
||||
@ -184,7 +184,7 @@ namespace Opm
|
||||
};
|
||||
|
||||
struct SurplusState {
|
||||
SurplusState( GasLiftStage2 &parent_, const Opm::Group &group_,
|
||||
SurplusState( GasLiftStage2 &parent_, const Group &group_,
|
||||
double oil_rate_, double gas_rate_, double alq_, double min_eco_grad_,
|
||||
double oil_target_, double gas_target_,
|
||||
std::optional<double> max_glift_) :
|
||||
@ -200,7 +200,7 @@ namespace Opm
|
||||
it{0}
|
||||
{}
|
||||
GasLiftStage2 &parent;
|
||||
const Opm::Group &group;
|
||||
const Group &group;
|
||||
double oil_rate;
|
||||
double gas_rate;
|
||||
double alq;
|
||||
|
@ -283,7 +283,7 @@ displayDebugMessage_(const std::string &msg, const std::string &group_name)
|
||||
template<typename TypeTag>
|
||||
std::tuple<double, double, double>
|
||||
GasLiftStage2<TypeTag>::
|
||||
getCurrentGroupRates_(const Opm::Group &group)
|
||||
getCurrentGroupRates_(const Group &group)
|
||||
{
|
||||
auto rates = getCurrentGroupRatesRecursive_(group);
|
||||
const auto& comm = ebos_simulator_.vanguard().grid().comm();
|
||||
@ -302,7 +302,7 @@ getCurrentGroupRates_(const Opm::Group &group)
|
||||
|
||||
template<typename TypeTag>
|
||||
std::array <double, 3> GasLiftStage2<TypeTag>::
|
||||
getCurrentGroupRatesRecursive_(const Opm::Group &group)
|
||||
getCurrentGroupRatesRecursive_(const Group &group)
|
||||
{
|
||||
double oil_rate = 0.0;
|
||||
double gas_rate = 0.0;
|
||||
@ -440,7 +440,7 @@ getStdWellRates_(const WellInterface<TypeTag> &well)
|
||||
template<typename TypeTag>
|
||||
std::vector<GasLiftSingleWell<TypeTag> *>
|
||||
GasLiftStage2<TypeTag>::
|
||||
getGroupGliftWells_(const Opm::Group &group)
|
||||
getGroupGliftWells_(const Group &group)
|
||||
{
|
||||
std::vector<GasLiftSingleWell *> wells;
|
||||
getGroupGliftWellsRecursive_(group, wells);
|
||||
@ -450,7 +450,7 @@ getGroupGliftWells_(const Opm::Group &group)
|
||||
template<typename TypeTag>
|
||||
void
|
||||
GasLiftStage2<TypeTag>::
|
||||
getGroupGliftWellsRecursive_(const Opm::Group &group,
|
||||
getGroupGliftWellsRecursive_(const Group &group,
|
||||
std::vector<GasLiftSingleWell *> &wells)
|
||||
{
|
||||
for (const std::string& group_name : group.groups()) {
|
||||
@ -471,7 +471,7 @@ getGroupGliftWellsRecursive_(const Opm::Group &group,
|
||||
template<typename TypeTag>
|
||||
void
|
||||
GasLiftStage2<TypeTag>::
|
||||
optimizeGroup_(const Opm::Group &group)
|
||||
optimizeGroup_(const Group &group)
|
||||
{
|
||||
const auto &gl_group = this->glo_.group(group.name());
|
||||
const auto &max_glift = gl_group.max_lift_gas();
|
||||
@ -494,7 +494,7 @@ optimizeGroup_(const Opm::Group &group)
|
||||
template<typename TypeTag>
|
||||
void
|
||||
GasLiftStage2<TypeTag>::
|
||||
optimizeGroupsRecursive_(const Opm::Group &group)
|
||||
optimizeGroupsRecursive_(const Group &group)
|
||||
{
|
||||
for (const std::string& group_name : group.groups()) {
|
||||
if(!this->schedule_.back().groups.has(group_name))
|
||||
@ -597,7 +597,7 @@ recalculateGradientAndUpdateData_(
|
||||
template<typename TypeTag>
|
||||
void
|
||||
GasLiftStage2<TypeTag>::
|
||||
redistributeALQ_(std::vector<GasLiftSingleWell *> &wells, const Opm::Group &group,
|
||||
redistributeALQ_(std::vector<GasLiftSingleWell *> &wells, const Group &group,
|
||||
std::vector<GradPair> &inc_grads, std::vector<GradPair> &dec_grads)
|
||||
{
|
||||
OptimizeState state {*this, group};
|
||||
@ -652,7 +652,7 @@ redistributeALQ_(std::vector<GasLiftSingleWell *> &wells, const Opm::Group &gro
|
||||
template<typename TypeTag>
|
||||
void
|
||||
GasLiftStage2<TypeTag>::
|
||||
removeSurplusALQ_(const Opm::Group &group,
|
||||
removeSurplusALQ_(const Group &group,
|
||||
std::vector<GradPair> &inc_grads, std::vector<GradPair> &dec_grads)
|
||||
{
|
||||
if (dec_grads.size() == 0) {
|
||||
|
@ -68,7 +68,7 @@ namespace mswellhelpers
|
||||
if (std::isinf(y[i_block][i_elem]) || std::isnan(y[i_block][i_elem]) ) {
|
||||
const std::string msg{"nan or inf value found after UMFPack solve due to singular matrix"};
|
||||
OpmLog::debug(msg);
|
||||
OPM_THROW_NOLOG(Opm::NumericalIssue, msg);
|
||||
OPM_THROW_NOLOG(NumericalIssue, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ namespace mswellhelpers
|
||||
// obtain y = D^-1 * x with a BICSSTAB iterative solver
|
||||
template <typename MatrixType, typename VectorType>
|
||||
VectorType
|
||||
invDX(const MatrixType& D, VectorType x, Opm::DeferredLogger& deferred_logger)
|
||||
invDX(const MatrixType& D, VectorType x, DeferredLogger& deferred_logger)
|
||||
{
|
||||
// the function will change the value of x, so we should not use reference of x here.
|
||||
|
||||
@ -160,7 +160,7 @@ namespace mswellhelpers
|
||||
linsolver.apply(y, x, res);
|
||||
|
||||
if ( !res.converged ) {
|
||||
OPM_DEFLOG_THROW(Opm::NumericalIssue, "the invDX did not converge ", deferred_logger);
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "the invDX did not converge ", deferred_logger);
|
||||
}
|
||||
|
||||
return y;
|
||||
@ -172,7 +172,7 @@ namespace mswellhelpers
|
||||
template <typename ValueType>
|
||||
inline ValueType haalandFormular(const ValueType& re, const double diameter, const double roughness)
|
||||
{
|
||||
const ValueType value = -3.6 * Opm::log10(6.9 / re + std::pow(roughness / (3.7 * diameter), 10. / 9.) );
|
||||
const ValueType value = -3.6 * log10(6.9 / re + std::pow(roughness / (3.7 * diameter), 10. / 9.) );
|
||||
|
||||
// sqrt(1/f) should be non-positive
|
||||
assert(value >= 0.0);
|
||||
@ -190,7 +190,7 @@ namespace mswellhelpers
|
||||
|
||||
ValueType f = 0.;
|
||||
// Reynolds number
|
||||
const ValueType re = Opm::abs( diameter * w / (area * mu));
|
||||
const ValueType re = abs( diameter * w / (area * mu));
|
||||
|
||||
if ( re == 0.0 ) {
|
||||
// make sure it is because the mass rate is zero
|
||||
@ -265,7 +265,7 @@ namespace mswellhelpers
|
||||
const double max_visco_ratio)
|
||||
{
|
||||
const ValueType temp_value = 1. / (1. - (0.8415 / 0.7480 * water_liquid_fraction) );
|
||||
const ValueType viscosity_ratio = Opm::pow(temp_value, 2.5);
|
||||
const ValueType viscosity_ratio = pow(temp_value, 2.5);
|
||||
|
||||
if (viscosity_ratio <= max_visco_ratio) {
|
||||
return oil_viscosity * viscosity_ratio;
|
||||
@ -284,7 +284,7 @@ namespace mswellhelpers
|
||||
const double max_visco_ratio)
|
||||
{
|
||||
const ValueType temp_value = 1. / (1. - (0.6019 / 0.6410) * (1. - water_liquid_fraction) );
|
||||
const ValueType viscosity_ratio = Opm::pow(temp_value, 2.5);
|
||||
const ValueType viscosity_ratio = pow(temp_value, 2.5);
|
||||
|
||||
if (viscosity_ratio <= max_visco_ratio) {
|
||||
return water_viscosity * viscosity_ratio;
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
class DeferredLogger;
|
||||
|
||||
template<typename TypeTag>
|
||||
class MultisegmentWell: public WellInterface<TypeTag>
|
||||
@ -139,15 +140,15 @@ namespace Opm
|
||||
const double dt,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger) override;
|
||||
DeferredLogger& deferred_logger) override;
|
||||
|
||||
/// updating the well state based the current control mode
|
||||
void updateWellStateWithTarget(const Simulator& ebos_simulator,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
/// check whether the well equations get converged for this well
|
||||
virtual ConvergenceReport getWellConvergence(const WellState& well_state, const std::vector<double>& B_avg, Opm::DeferredLogger& deferred_logger, const bool relax_tolerance = false) const override;
|
||||
virtual ConvergenceReport getWellConvergence(const WellState& well_state, const std::vector<double>& B_avg, DeferredLogger& deferred_logger, const bool relax_tolerance = false) const override;
|
||||
|
||||
/// Ax = Ax - C D^-1 B x
|
||||
virtual void apply(const BVector& x, BVector& Ax) const override;
|
||||
@ -163,21 +164,21 @@ namespace Opm
|
||||
/// xw to update Well State
|
||||
virtual void recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger) const override;
|
||||
DeferredLogger& deferred_logger) const override;
|
||||
|
||||
/// computing the well potentials for group control
|
||||
virtual void computeWellPotentials(const Simulator& ebosSimulator,
|
||||
const WellState& well_state,
|
||||
std::vector<double>& well_potentials,
|
||||
Opm::DeferredLogger& deferred_logger) override;
|
||||
DeferredLogger& deferred_logger) override;
|
||||
|
||||
virtual void updatePrimaryVariables(const WellState& well_state, Opm::DeferredLogger& deferred_logger) const override;
|
||||
virtual void updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_logger) const override;
|
||||
|
||||
virtual void solveEqAndUpdateWellState(WellState& well_state, Opm::DeferredLogger& deferred_logger) override; // const?
|
||||
virtual void solveEqAndUpdateWellState(WellState& well_state, DeferredLogger& deferred_logger) override; // const?
|
||||
|
||||
virtual void calculateExplicitQuantities(const Simulator& ebosSimulator,
|
||||
const WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger) override; // should be const?
|
||||
DeferredLogger& deferred_logger) override; // should be const?
|
||||
|
||||
virtual void updateProductivityIndex(const Simulator& ebosSimulator,
|
||||
const WellProdIndexCalculator& wellPICalc,
|
||||
@ -345,7 +346,7 @@ namespace Opm
|
||||
// updating the well_state based on well solution dwells
|
||||
void updateWellState(const BVectorWell& dwells,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger,
|
||||
DeferredLogger& deferred_logger,
|
||||
const double relaxation_factor=1.0) const;
|
||||
|
||||
|
||||
@ -380,13 +381,13 @@ namespace Opm
|
||||
EvalWell& perf_press,
|
||||
double& perf_dis_gas_rate,
|
||||
double& perf_vap_oil_rate,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
// convert a Eval from reservoir to contain the derivative related to wells
|
||||
EvalWell extendEval(const Eval& in) const;
|
||||
|
||||
double calculateThpFromBhp(const std::vector<double>& rates, const double bhp, Opm::DeferredLogger& deferred_logger) const;
|
||||
void updateThp(WellState& well_state, Opm::DeferredLogger& deferred_logger) const;
|
||||
double calculateThpFromBhp(const std::vector<double>& rates, const double bhp, DeferredLogger& deferred_logger) const;
|
||||
void updateThp(WellState& well_state, DeferredLogger& deferred_logger) const;
|
||||
|
||||
// compute the fluid properties, such as densities, viscosities, and so on, in the segments
|
||||
// They will be treated implicitly, so they need to be of Evaluation type
|
||||
@ -407,24 +408,24 @@ namespace Opm
|
||||
|
||||
void computeWellRatesAtBhpLimit(const Simulator& ebosSimulator,
|
||||
std::vector<double>& well_flux,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
void computeWellRatesWithBhp(const Simulator& ebosSimulator,
|
||||
const Scalar bhp,
|
||||
std::vector<double>& well_flux,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
std::vector<double>
|
||||
computeWellPotentialWithTHP(const Simulator& ebos_simulator,
|
||||
Opm::DeferredLogger& deferred_logger) const;
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
void assembleControlEq(const WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
const Opm::Schedule& schedule,
|
||||
const Schedule& schedule,
|
||||
const SummaryState& summaryState,
|
||||
const Well::InjectionControls& inj_controls,
|
||||
const Well::ProductionControls& prod_controls,
|
||||
Opm::DeferredLogger& deferred_logger);
|
||||
DeferredLogger& deferred_logger);
|
||||
|
||||
void assemblePressureEq(const int seg, const UnitSystem& unit_system,
|
||||
WellState& well_state, DeferredLogger& deferred_logger) const;
|
||||
@ -442,7 +443,7 @@ namespace Opm
|
||||
// handling the overshooting and undershooting of the fractions
|
||||
void processFractions(const int seg) const;
|
||||
|
||||
void updateWellStateFromPrimaryVariables(WellState& well_state, Opm::DeferredLogger& deferred_logger) const;
|
||||
void updateWellStateFromPrimaryVariables(WellState& well_state, DeferredLogger& deferred_logger) const;
|
||||
|
||||
virtual double getRefDensity() const override;
|
||||
|
||||
@ -456,7 +457,7 @@ namespace Opm
|
||||
const Well::ProductionControls& prod_controls,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger) override;
|
||||
DeferredLogger& deferred_logger) override;
|
||||
|
||||
virtual void assembleWellEqWithoutIteration(const Simulator& ebosSimulator,
|
||||
const double dt,
|
||||
@ -464,7 +465,7 @@ namespace Opm
|
||||
const Well::ProductionControls& prod_controls,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger) override;
|
||||
DeferredLogger& deferred_logger) override;
|
||||
|
||||
virtual void updateWaterThroughput(const double dt, WellState& well_state) const override;
|
||||
|
||||
@ -524,13 +525,13 @@ namespace Opm
|
||||
WellState& well_state, DeferredLogger& deferred_logger) const;
|
||||
|
||||
// check whether the well is operable under BHP limit with current reservoir condition
|
||||
virtual void checkOperabilityUnderBHPLimitProducer(const WellState& well_state, const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger) override;
|
||||
virtual void checkOperabilityUnderBHPLimitProducer(const WellState& well_state, const Simulator& ebos_simulator, DeferredLogger& deferred_logger) override;
|
||||
|
||||
// check whether the well is operable under THP limit with current reservoir condition
|
||||
virtual void checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, const WellState& well_state, Opm::DeferredLogger& deferred_logger) override;
|
||||
virtual void checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, const WellState& well_state, DeferredLogger& deferred_logger) override;
|
||||
|
||||
// updating the inflow based on the current reservoir condition
|
||||
virtual void updateIPR(const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger) const override;
|
||||
virtual void updateIPR(const Simulator& ebos_simulator, DeferredLogger& deferred_logger) const override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -264,7 +264,7 @@ namespace Opm
|
||||
const double dt,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
|
||||
checkWellOperability(ebosSimulator, well_state, deferred_logger);
|
||||
@ -289,7 +289,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
updateWellStateWithTarget(const Simulator& ebos_simulator,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
Base::updateWellStateWithTarget(ebos_simulator, well_state, deferred_logger);
|
||||
// scale segment rates based on the wellRates
|
||||
@ -359,7 +359,7 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
ConvergenceReport
|
||||
MultisegmentWell<TypeTag>::
|
||||
getWellConvergence(const WellState& well_state, const std::vector<double>& B_avg, Opm::DeferredLogger& deferred_logger, const bool relax_tolerance) const
|
||||
getWellConvergence(const WellState& well_state, const std::vector<double>& B_avg, DeferredLogger& deferred_logger, const bool relax_tolerance) const
|
||||
{
|
||||
assert(int(B_avg.size()) == num_components_);
|
||||
|
||||
@ -542,7 +542,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
if (!this->isOperable() && !this->wellIsStopped()) return;
|
||||
|
||||
@ -561,7 +561,7 @@ namespace Opm
|
||||
computeWellPotentials(const Simulator& ebosSimulator,
|
||||
const WellState& well_state,
|
||||
std::vector<double>& well_potentials,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
const int np = number_of_phases_;
|
||||
well_potentials.resize(np, 0.0);
|
||||
@ -575,12 +575,12 @@ namespace Opm
|
||||
/* {
|
||||
bool pressure_controlled_well = false;
|
||||
if (this->isInjector()) {
|
||||
const Opm::Well::InjectorCMode& current = well_state.currentInjectionControls()[index_of_well_];
|
||||
const Well::InjectorCMode& current = well_state.currentInjectionControls()[index_of_well_];
|
||||
if (current == Well::InjectorCMode::BHP || current == Well::InjectorCMode::THP) {
|
||||
pressure_controlled_well = true;
|
||||
}
|
||||
} else {
|
||||
const Opm::Well::ProducerCMode& current = well_state.currentProductionControls()[index_of_well_];
|
||||
const Well::ProducerCMode& current = well_state.currentProductionControls()[index_of_well_];
|
||||
if (current == Well::ProducerCMode::BHP || current == Well::ProducerCMode::THP) {
|
||||
pressure_controlled_well = true;
|
||||
}
|
||||
@ -614,7 +614,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
computeWellRatesAtBhpLimit(const Simulator& ebosSimulator,
|
||||
std::vector<double>& well_flux,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
if (well_ecl_.isInjector()) {
|
||||
const auto controls = well_ecl_.injectionControls(ebosSimulator.vanguard().summaryState());
|
||||
@ -633,7 +633,7 @@ namespace Opm
|
||||
computeWellRatesWithBhp(const Simulator& ebosSimulator,
|
||||
const Scalar bhp,
|
||||
std::vector<double>& well_flux,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// creating a copy of the well itself, to avoid messing up the explicit informations
|
||||
// during this copy, the only information not copied properly is the well controls
|
||||
@ -695,7 +695,7 @@ namespace Opm
|
||||
std::vector<double>
|
||||
MultisegmentWell<TypeTag>::
|
||||
computeWellPotentialWithTHP(const Simulator& ebos_simulator,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
std::vector<double> potentials(number_of_phases_, 0.0);
|
||||
const auto& summary_state = ebos_simulator.vanguard().summaryState();
|
||||
@ -743,7 +743,7 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
updatePrimaryVariables(const WellState& well_state, Opm::DeferredLogger& /* deferred_logger */) const
|
||||
updatePrimaryVariables(const WellState& well_state, DeferredLogger& /* deferred_logger */) const
|
||||
{
|
||||
// TODO: to test using rate conversion coefficients to see if it will be better than
|
||||
// this default one
|
||||
@ -837,7 +837,7 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
solveEqAndUpdateWellState(WellState& well_state, Opm::DeferredLogger& deferred_logger)
|
||||
solveEqAndUpdateWellState(WellState& well_state, DeferredLogger& deferred_logger)
|
||||
{
|
||||
if (!this->isOperable() && !this->wellIsStopped()) return;
|
||||
|
||||
@ -930,7 +930,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
updateWellState(const BVectorWell& dwells,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger,
|
||||
DeferredLogger& deferred_logger,
|
||||
const double relaxation_factor) const
|
||||
{
|
||||
if (!this->isOperable() && !this->wellIsStopped()) return;
|
||||
@ -991,7 +991,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
calculateExplicitQuantities(const Simulator& ebosSimulator,
|
||||
const WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
updatePrimaryVariables(well_state, deferred_logger);
|
||||
initPrimaryVariablesEvaluation();
|
||||
@ -1256,7 +1256,7 @@ namespace Opm
|
||||
EvalWell& perf_press,
|
||||
double& perf_dis_gas_rate,
|
||||
double& perf_vap_oil_rate,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
|
||||
{
|
||||
std::vector<EvalWell> cmix_s(num_components_, 0.0);
|
||||
@ -1347,7 +1347,7 @@ namespace Opm
|
||||
const EvalWell d = 1.0 - rv * rs;
|
||||
|
||||
if (d.value() == 0.0) {
|
||||
OPM_DEFLOG_THROW(Opm::NumericalIssue, "Zero d value obtained for well " << name() << " during flux calcuation"
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "Zero d value obtained for well " << name() << " during flux calcuation"
|
||||
<< " with rs " << rs << " and rv " << rv, deferred_logger);
|
||||
}
|
||||
|
||||
@ -1783,11 +1783,11 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
assembleControlEq(const WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
const Opm::Schedule& schedule,
|
||||
const Schedule& schedule,
|
||||
const SummaryState& summaryState,
|
||||
const Well::InjectionControls& inj_controls,
|
||||
const Well::ProductionControls& prod_controls,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
|
||||
EvalWell control_eq(0.0);
|
||||
@ -1864,7 +1864,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
updateThp(WellState& well_state, Opm::DeferredLogger& deferred_logger) const
|
||||
updateThp(WellState& well_state, DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// When there is no vaild VFP table provided, we set the thp to be zero.
|
||||
if (!this->isVFPActive(deferred_logger) || this->wellIsStopped()) {
|
||||
@ -1875,7 +1875,7 @@ namespace Opm
|
||||
// the well is under other control types, we calculate the thp based on bhp and rates
|
||||
std::vector<double> rates(3, 0.0);
|
||||
|
||||
const Opm::PhaseUsage& pu = phaseUsage();
|
||||
const PhaseUsage& pu = phaseUsage();
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
rates[ Water ] = well_state.wellRates()[index_of_well_ * number_of_phases_ + pu.phase_pos[ Water ] ];
|
||||
}
|
||||
@ -1899,7 +1899,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
calculateThpFromBhp(const std::vector<double>& rates,
|
||||
const double bhp,
|
||||
Opm::DeferredLogger& deferred_logger) const
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
assert(int(rates.size()) == 3); // the vfp related only supports three phases now.
|
||||
|
||||
@ -2163,7 +2163,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
checkOperabilityUnderBHPLimitProducer(const WellState& /*well_state*/, const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger)
|
||||
checkOperabilityUnderBHPLimitProducer(const WellState& /*well_state*/, const Simulator& ebos_simulator, DeferredLogger& deferred_logger)
|
||||
{
|
||||
const auto& summaryState = ebos_simulator.vanguard().summaryState();
|
||||
const double bhp_limit = Base::mostStrictBhpFromBhpLimits(summaryState);
|
||||
@ -2216,7 +2216,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
updateIPR(const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger) const
|
||||
updateIPR(const Simulator& ebos_simulator, DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// TODO: not handling solvent related here for now
|
||||
|
||||
@ -2324,7 +2324,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, const WellState& /*well_state*/, Opm::DeferredLogger& deferred_logger)
|
||||
checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, const WellState& /*well_state*/, DeferredLogger& deferred_logger)
|
||||
{
|
||||
const auto& summaryState = ebos_simulator.vanguard().summaryState();
|
||||
const auto obtain_bhp = computeBhpAtThpLimitProd(ebos_simulator, summaryState, deferred_logger);
|
||||
@ -2364,7 +2364,7 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
updateWellStateFromPrimaryVariables(WellState& well_state, Opm::DeferredLogger& deferred_logger) const
|
||||
updateWellStateFromPrimaryVariables(WellState& well_state, DeferredLogger& deferred_logger) const
|
||||
{
|
||||
const PhaseUsage& pu = phaseUsage();
|
||||
assert( FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) );
|
||||
@ -2455,7 +2455,7 @@ namespace Opm
|
||||
const Well::ProductionControls& prod_controls,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
if (!this->isOperable() && !this->wellIsStopped()) return true;
|
||||
|
||||
@ -2574,7 +2574,7 @@ namespace Opm
|
||||
const Well::ProductionControls& prod_controls,
|
||||
WellState& well_state,
|
||||
const GroupState& group_state,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
|
||||
if (!this->isOperable() && !this->wellIsStopped()) return;
|
||||
@ -2726,7 +2726,7 @@ namespace Opm
|
||||
// the fourth dequation, the pressure drop equation
|
||||
if (seg == 0) { // top segment, pressure equation is the control equation
|
||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||
const Opm::Schedule& schedule = ebosSimulator.vanguard().schedule();
|
||||
const Schedule& schedule = ebosSimulator.vanguard().schedule();
|
||||
assembleControlEq(well_state, group_state, schedule, summaryState, inj_controls, prod_controls, deferred_logger);
|
||||
} else {
|
||||
const UnitSystem& unit_system = ebosSimulator.vanguard().eclState().getDeckUnitSystem();
|
||||
@ -2935,7 +2935,7 @@ namespace Opm
|
||||
<< ", rv " << rv << " and pressure " << seg_pressure
|
||||
<< " obtaining d " << d;
|
||||
OpmLog::debug(sstr.str());
|
||||
OPM_THROW_NOLOG(Opm::NumericalIssue, sstr.str());
|
||||
OPM_THROW_NOLOG(NumericalIssue, sstr.str());
|
||||
}
|
||||
|
||||
if (rs > 0.0) { // rs > 0.0?
|
||||
@ -2981,7 +2981,7 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
if (std::isnan(residual) || std::isinf(residual)) {
|
||||
OPM_DEFLOG_THROW(Opm::NumericalIssue, "nan or inf value for residal get for well " << name()
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "nan or inf value for residal get for well " << name()
|
||||
<< " segment " << seg << " eq_idx " << eq_idx, deferred_logger);
|
||||
}
|
||||
|
||||
@ -2995,7 +2995,7 @@ namespace Opm
|
||||
{
|
||||
const double control_residual = std::abs(resWell_[0][numWellEq - 1]);
|
||||
if (std::isnan(control_residual) || std::isinf(control_residual)) {
|
||||
OPM_DEFLOG_THROW(Opm::NumericalIssue, "nan or inf value for control residal get for well " << name(), deferred_logger);
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "nan or inf value for control residal get for well " << name(), deferred_logger);
|
||||
}
|
||||
residuals[numWellEq] = control_residual;
|
||||
}
|
||||
@ -3090,7 +3090,7 @@ namespace Opm
|
||||
const int well_index = index_of_well_;
|
||||
if (this->isInjector() )
|
||||
{
|
||||
const Opm::Well::InjectorCMode& current = well_state.currentInjectionControls()[well_index];
|
||||
const Well::InjectorCMode& current = well_state.currentInjectionControls()[well_index];
|
||||
switch(current) {
|
||||
case Well::InjectorCMode::THP:
|
||||
control_tolerance = param_.tolerance_pressure_ms_wells_;
|
||||
@ -3157,7 +3157,7 @@ namespace Opm
|
||||
const int well_index = index_of_well_;
|
||||
if (this->isInjector() )
|
||||
{
|
||||
const Opm::Well::InjectorCMode& current = well_state.currentInjectionControls()[well_index];
|
||||
const Well::InjectorCMode& current = well_state.currentInjectionControls()[well_index];
|
||||
switch(current) {
|
||||
case Well::InjectorCMode::THP:
|
||||
ctrltype = CR::WellFailure::Type::ControlTHP;
|
||||
@ -3892,7 +3892,7 @@ namespace Opm
|
||||
const auto volume_rate_icd = this->segment_mass_rates_[seg] * aicd.scalingFactor() / mixture_density;
|
||||
const double sign = volume_rate_icd <= 0. ? 1.0 : -1.0;
|
||||
// convert 1 unit volume rate
|
||||
using M = Opm::UnitSystem::measure;
|
||||
using M = UnitSystem::measure;
|
||||
const double unit_volume_rate = unit_system.to_si(M::geometric_volume_rate, 1.);
|
||||
|
||||
// TODO: we did not consider the maximum allowed rate here
|
||||
@ -4049,7 +4049,7 @@ namespace Opm
|
||||
phase_pos = pu.phase_pos[Water];
|
||||
}
|
||||
else {
|
||||
OPM_DEFLOG_THROW(Opm::NotImplemented,
|
||||
OPM_DEFLOG_THROW(NotImplemented,
|
||||
"Unsupported Injector Type ("
|
||||
<< static_cast<int>(preferred_phase)
|
||||
<< ") for well " << this->name()
|
||||
|
@ -31,7 +31,7 @@ namespace Opm
|
||||
{
|
||||
template<class TypeTag>
|
||||
class WellConnectionAuxiliaryModule
|
||||
: public Opm::BaseAuxiliaryModule<TypeTag>
|
||||
: public BaseAuxiliaryModule<TypeTag>
|
||||
{
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
||||
@ -39,7 +39,7 @@ class WellConnectionAuxiliaryModule
|
||||
public:
|
||||
|
||||
using NeighborSet = typename
|
||||
Opm::BaseAuxiliaryModule<TypeTag>::NeighborSet;
|
||||
::Opm::BaseAuxiliaryModule<TypeTag>::NeighborSet;
|
||||
|
||||
WellConnectionAuxiliaryModule(const Schedule& schedule,
|
||||
const Dune::CpGrid& grid)
|
||||
|
Loading…
Reference in New Issue
Block a user