mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
flow: account for external setup costs
This commit is contained in:
parent
b471b89890
commit
777fd61342
@ -114,6 +114,9 @@ namespace detail
|
|||||||
// ----------------- Main program -----------------
|
// ----------------- Main program -----------------
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
Dune::Timer externalSetupTimer;
|
||||||
|
externalSetupTimer.start();
|
||||||
|
|
||||||
detail::handleVersionCmdLine(argc, argv);
|
detail::handleVersionCmdLine(argc, argv);
|
||||||
// MPI setup.
|
// MPI setup.
|
||||||
#if HAVE_DUNE_FEM
|
#if HAVE_DUNE_FEM
|
||||||
@ -221,13 +224,13 @@ int main(int argc, char** argv)
|
|||||||
// oil-gas
|
// oil-gas
|
||||||
if (phases.active( Opm::Phase::GAS ))
|
if (phases.active( Opm::Phase::GAS ))
|
||||||
{
|
{
|
||||||
Opm::flowEbosGasOilSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosGasOilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosGasOilMain(argc, argv);
|
return Opm::flowEbosGasOilMain(argc, argv);
|
||||||
}
|
}
|
||||||
// oil-water
|
// oil-water
|
||||||
else if ( phases.active( Opm::Phase::WATER ) )
|
else if ( phases.active( Opm::Phase::WATER ) )
|
||||||
{
|
{
|
||||||
Opm::flowEbosOilWaterSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosOilWaterSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosOilWaterMain(argc, argv);
|
return Opm::flowEbosOilWaterMain(argc, argv);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -255,26 +258,26 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( phases.size() == 3 ) { // oil water polymer case
|
if ( phases.size() == 3 ) { // oil water polymer case
|
||||||
Opm::flowEbosOilWaterPolymerSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosOilWaterPolymerSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosOilWaterPolymerMain(argc, argv);
|
return Opm::flowEbosOilWaterPolymerMain(argc, argv);
|
||||||
} else {
|
} else {
|
||||||
Opm::flowEbosPolymerSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosPolymerSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosPolymerMain(argc, argv);
|
return Opm::flowEbosPolymerMain(argc, argv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Solvent case
|
// Solvent case
|
||||||
else if ( phases.active( Opm::Phase::SOLVENT ) ) {
|
else if ( phases.active( Opm::Phase::SOLVENT ) ) {
|
||||||
Opm::flowEbosSolventSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosSolventSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosSolventMain(argc, argv);
|
return Opm::flowEbosSolventMain(argc, argv);
|
||||||
}
|
}
|
||||||
// Energy case
|
// Energy case
|
||||||
else if (eclipseState->getSimulationConfig().isThermal()) {
|
else if (eclipseState->getSimulationConfig().isThermal()) {
|
||||||
Opm::flowEbosEnergySetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosEnergySetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosEnergyMain(argc, argv);
|
return Opm::flowEbosEnergyMain(argc, argv);
|
||||||
}
|
}
|
||||||
// Blackoil case
|
// Blackoil case
|
||||||
else if( phases.size() == 3 ) {
|
else if( phases.size() == 3 ) {
|
||||||
Opm::flowEbosBlackoilSetDeck(*deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosBlackoilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosBlackoilMain(argc, argv);
|
return Opm::flowEbosBlackoilMain(argc, argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -34,11 +34,12 @@
|
|||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
void flowEbosBlackoilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosBlackoilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowProblem) TypeTag;
|
typedef TTAG(EclFlowProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosBlackoilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosBlackoilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosBlackoilMain(int argc, char** argv);
|
int flowEbosBlackoilMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,12 @@ SET_BOOL_PROP(EclFlowEnergyProblem, EnableEnergy, true);
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosEnergySetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosEnergySetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowEnergyProblem) TypeTag;
|
typedef TTAG(EclFlowEnergyProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosEnergySetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosEnergySetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosEnergyMain(int argc, char** argv);
|
int flowEbosEnergyMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,11 +58,12 @@ public:
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosGasOilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosGasOilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowGasOilProblem) TypeTag;
|
typedef TTAG(EclFlowGasOilProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosGasOilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosGasOilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosGasOilMain(int argc, char** argv);
|
int flowEbosGasOilMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,11 +58,12 @@ public:
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosOilWaterSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosOilWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowOilWaterProblem) TypeTag;
|
typedef TTAG(EclFlowOilWaterProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosOilWaterSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosOilWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosOilWaterMain(int argc, char** argv);
|
int flowEbosOilWaterMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +59,12 @@ public:
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosOilWaterPolymerSetDeck(Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowOilWaterPolymerProblem) TypeTag;
|
typedef TTAG(EclFlowOilWaterPolymerProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosOilWaterPolymerSetDeck(Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosOilWaterPolymerMain(int argc, char** argv);
|
int flowEbosOilWaterPolymerMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,12 @@ SET_BOOL_PROP(EclFlowPolymerProblem, EnablePolymer, true);
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosPolymerSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosPolymerSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowPolymerProblem) TypeTag;
|
typedef TTAG(EclFlowPolymerProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosPolymerSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosPolymerSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosPolymerMain(int argc, char** argv);
|
int flowEbosPolymerMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,12 @@ SET_BOOL_PROP(EclFlowSolventProblem, EnableSolvent, true);
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosSolventSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosSolventSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowSolventProblem) TypeTag;
|
typedef TTAG(EclFlowSolventProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
|
Vanguard::setExternalSetupTime(setupTime);
|
||||||
Vanguard::setExternalDeck(&deck, &eclState);
|
Vanguard::setExternalDeck(&deck, &eclState);
|
||||||
Vanguard::setExternalSchedule(&schedule);
|
Vanguard::setExternalSchedule(&schedule);
|
||||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
void flowEbosSolventSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
void flowEbosSolventSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||||
int flowEbosSolventMain(int argc, char** argv);
|
int flowEbosSolventMain(int argc, char** argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user