mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
commit
a840c4f418
@ -29,6 +29,7 @@ endif()
|
|||||||
option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
|
option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
|
||||||
set( USE_OPENMP_DEFAULT OFF ) # Use of OpenMP is considered experimental
|
set( USE_OPENMP_DEFAULT OFF ) # Use of OpenMP is considered experimental
|
||||||
option(BUILD_FLOW "Build the production oriented flow simulator?" ON)
|
option(BUILD_FLOW "Build the production oriented flow simulator?" ON)
|
||||||
|
option(BUILD_FLOW_BLACKOIL_ONLY "Build the production oriented flow simulator only supporting the blackoil model?" OFF)
|
||||||
option(BUILD_FLOW_VARIANTS "Build the variants for flow by default?" OFF)
|
option(BUILD_FLOW_VARIANTS "Build the variants for flow by default?" OFF)
|
||||||
option(BUILD_EBOS "Build the research oriented ebos simulator?" ON)
|
option(BUILD_EBOS "Build the research oriented ebos simulator?" ON)
|
||||||
option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF)
|
option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF)
|
||||||
@ -175,6 +176,24 @@ opm_add_test(flow
|
|||||||
flow/flow_ebos_oilwater_polymer.cpp
|
flow/flow_ebos_oilwater_polymer.cpp
|
||||||
flow/flow_ebos_oilwater_polymer_injectivity.cpp)
|
flow/flow_ebos_oilwater_polymer_injectivity.cpp)
|
||||||
|
|
||||||
|
if (NOT BUILD_FLOW_BLACKOIL_ONLY)
|
||||||
|
set(FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF "FALSE")
|
||||||
|
else()
|
||||||
|
set(FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF "TRUE")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# the production oriented general-purpose ECL simulator
|
||||||
|
opm_add_test(flow_blackoil
|
||||||
|
ONLY_COMPILE
|
||||||
|
ALWAYS_ENABLE
|
||||||
|
DEFAULT_ENABLE_IF ${FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF}
|
||||||
|
DEPENDS "opmsimulators"
|
||||||
|
LIBRARIES "opmsimulators"
|
||||||
|
SOURCES
|
||||||
|
flow/flow.cpp
|
||||||
|
flow/flow_ebos_blackoil.cpp)
|
||||||
|
target_compile_definitions(flow_blackoil PRIVATE "FLOW_BLACKOIL_ONLY")
|
||||||
|
|
||||||
if (NOT BUILD_FLOW_VARIANTS)
|
if (NOT BUILD_FLOW_VARIANTS)
|
||||||
set(FLOW_VARIANTS_DEFAULT_ENABLE_IF "FALSE")
|
set(FLOW_VARIANTS_DEFAULT_ENABLE_IF "FALSE")
|
||||||
else()
|
else()
|
||||||
|
@ -1056,6 +1056,12 @@ public:
|
|||||||
eclWriter_->writeOutput(isSubStep);
|
eclWriter_->writeOutput(isSubStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void finalizeOutput() {
|
||||||
|
// this will write all pending output to disk
|
||||||
|
// to avoid corruption of output files
|
||||||
|
eclWriter_.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void applyActions(int reportStep,
|
void applyActions(int reportStep,
|
||||||
double sim_time,
|
double sim_time,
|
||||||
|
@ -20,7 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
#include <flow/flow_ebos_blackoil.hpp>
|
#include <flow/flow_ebos_blackoil.hpp>
|
||||||
|
|
||||||
|
#ifndef FLOW_BLACKOIL_ONLY
|
||||||
#include <flow/flow_ebos_gasoil.hpp>
|
#include <flow/flow_ebos_gasoil.hpp>
|
||||||
#include <flow/flow_ebos_oilwater.hpp>
|
#include <flow/flow_ebos_oilwater.hpp>
|
||||||
#include <flow/flow_ebos_solvent.hpp>
|
#include <flow/flow_ebos_solvent.hpp>
|
||||||
@ -30,6 +33,7 @@
|
|||||||
#include <flow/flow_ebos_energy.hpp>
|
#include <flow/flow_ebos_energy.hpp>
|
||||||
#include <flow/flow_ebos_oilwater_polymer.hpp>
|
#include <flow/flow_ebos_oilwater_polymer.hpp>
|
||||||
#include <flow/flow_ebos_oilwater_polymer_injectivity.hpp>
|
#include <flow/flow_ebos_oilwater_polymer_injectivity.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||||
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
||||||
@ -381,8 +385,10 @@ int main(int argc, char** argv)
|
|||||||
// TODO: make sure that no illegal combinations like thermal and twophase are
|
// TODO: make sure that no illegal combinations like thermal and twophase are
|
||||||
// requested.
|
// requested.
|
||||||
|
|
||||||
|
if ( false ) {}
|
||||||
|
#ifndef FLOW_BLACKOIL_ONLY
|
||||||
// Twophase cases
|
// Twophase cases
|
||||||
if( phases.size() == 2 ) {
|
else if( phases.size() == 2 ) {
|
||||||
// oil-gas
|
// oil-gas
|
||||||
if (phases.active( Opm::Phase::GAS ))
|
if (phases.active( Opm::Phase::GAS ))
|
||||||
{
|
{
|
||||||
@ -447,6 +453,7 @@ int main(int argc, char** argv)
|
|||||||
Opm::flowEbosEnergySetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosEnergySetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
return Opm::flowEbosEnergyMain(argc, argv, outputCout, outputFiles);
|
return Opm::flowEbosEnergyMain(argc, argv, outputCout, outputFiles);
|
||||||
}
|
}
|
||||||
|
#endif // FLOW_BLACKOIL_ONLY
|
||||||
// Blackoil case
|
// Blackoil case
|
||||||
else if( phases.size() == 3 ) {
|
else if( phases.size() == 3 ) {
|
||||||
Opm::flowEbosBlackoilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
Opm::flowEbosBlackoilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||||
|
@ -277,6 +277,15 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure all output is written to disk before run is finished
|
||||||
|
{
|
||||||
|
Dune::Timer finalOutputTimer;
|
||||||
|
finalOutputTimer.start();
|
||||||
|
|
||||||
|
ebosSimulator_.problem().finalizeOutput();
|
||||||
|
report.output_write_time += finalOutputTimer.stop();
|
||||||
|
}
|
||||||
|
|
||||||
// Stop timer and create timing report
|
// Stop timer and create timing report
|
||||||
totalTimer.stop();
|
totalTimer.stop();
|
||||||
report.total_time = totalTimer.secsSinceStart();
|
report.total_time = totalTimer.secsSinceStart();
|
||||||
|
Loading…
Reference in New Issue
Block a user