mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 10:35:34 -06:00
Merge pull request #4650 from totto82/addPrecEnergy
Add energy + precipitation of salt in brine-gas simulator
This commit is contained in:
commit
f5b44ad26d
@ -430,7 +430,7 @@ set(FLOW_MODELS blackoil brine energy extbo foam gasoil gaswater
|
||||
oilwater oilwater_brine gaswater_brine oilwater_polymer
|
||||
oilwater_polymer_injectivity micp polymer solvent
|
||||
gasoil_energy brine_saltprecipitation
|
||||
gaswater_saltprec_vapwat brine_precsalt_vapwat
|
||||
gaswater_saltprec_vapwat gaswater_saltprec_energy brine_precsalt_vapwat
|
||||
blackoil_legacyassembly gasoildiffuse gaswater_dissolution
|
||||
gaswater_dissolution_diffuse gaswater_energy)
|
||||
set(FLOW_VARIANT_MODELS brine_energy onephase onephase_energy)
|
||||
|
105
flow/flow_ebos_gaswater_saltprec_energy.cpp
Normal file
105
flow/flow_ebos_gaswater_saltprec_energy.cpp
Normal file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <flow/flow_ebos_gaswater_saltprec_energy.hpp>
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
namespace TTag {
|
||||
struct EclFlowGasWaterSaltprecEnergyProblem {
|
||||
using InheritsFrom = std::tuple<EclFlowProblem>;
|
||||
};
|
||||
}
|
||||
template<class TypeTag>
|
||||
struct EnableBrine<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableSaltPrecipitation<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableEvaporation<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableDisgasInWater<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
//! The indices required by the model
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EclFlowGasWaterSaltprecEnergyProblem>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using BaseTypeTag = TTag::EclFlowProblem;
|
||||
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnableExtbo>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::oilCompIdx,
|
||||
getPropValue<TypeTag, Properties::EnableMICP>()> type;
|
||||
};
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
|
||||
// ----------------- Main program -----------------
|
||||
int flowEbosGasWaterSaltprecEnergyMain(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.
|
||||
resetLocale();
|
||||
|
||||
FlowMainEbos<Properties::TTag::EclFlowGasWaterSaltprecEnergyProblem>
|
||||
mainfunc {argc, argv, outputCout, outputFiles};
|
||||
return mainfunc.execute();
|
||||
}
|
||||
|
||||
int flowEbosGasWaterSaltprecEnergyMainStandalone(int argc, char** argv)
|
||||
{
|
||||
using TypeTag = Properties::TTag::EclFlowGasWaterSaltprecEnergyProblem;
|
||||
auto mainObject = Opm::Main(argc, argv);
|
||||
return mainObject.runStatic<TypeTag>();
|
||||
}
|
||||
|
||||
}
|
30
flow/flow_ebos_gaswater_saltprec_energy.hpp
Normal file
30
flow/flow_ebos_gaswater_saltprec_energy.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef FLOW_EBOS_GASWATER_SALTPREC_ENERGY_HPP
|
||||
#define FLOW_EBOS_GASWATER_SALTPREC_ENERGY_HPP
|
||||
|
||||
namespace Opm {
|
||||
|
||||
//! \brief Main function used in flow binary.
|
||||
int flowEbosGasWaterSaltprecEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
|
||||
//! \brief Main function used in flow_gaswater_saltprec_energy binary.
|
||||
int flowEbosGasWaterSaltprecEnergyMainStandalone(int argc, char** argv);
|
||||
|
||||
}
|
||||
|
||||
#endif // FLOW_EBOS_GASWATER_SALTPREC_ENERGY_HPP
|
24
flow/flow_gaswater_saltprec_energy.cpp
Normal file
24
flow/flow_gaswater_saltprec_energy.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <flow/flow_ebos_gaswater_saltprec_energy.hpp>
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::flowEbosGasWaterSaltprecEnergyMainStandalone(argc, argv);
|
||||
}
|
@ -37,6 +37,7 @@
|
||||
#include <flow/flow_ebos_brine.hpp>
|
||||
#include <flow/flow_ebos_brine_saltprecipitation.hpp>
|
||||
#include <flow/flow_ebos_gaswater_saltprec_vapwat.hpp>
|
||||
#include <flow/flow_ebos_gaswater_saltprec_energy.hpp>
|
||||
#include <flow/flow_ebos_brine_precsalt_vapwat.hpp>
|
||||
#include <flow/flow_ebos_onephase.hpp>
|
||||
#include <flow/flow_ebos_onephase_energy.hpp>
|
||||
@ -226,7 +227,7 @@ private:
|
||||
}
|
||||
|
||||
// Brine case
|
||||
else if (phases.active(Phase::BRINE)) {
|
||||
else if (phases.active(Phase::BRINE) && !thermal) {
|
||||
return this->runBrine(phases);
|
||||
}
|
||||
|
||||
@ -604,6 +605,10 @@ private:
|
||||
|
||||
// water-gas-thermal
|
||||
if (!phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
|
||||
|
||||
if (phases.active(Phase::BRINE)){
|
||||
return flowEbosGasWaterSaltprecEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
return flowEbosGasWaterEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
||||
}
|
||||
|
||||
|
@ -356,6 +356,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,1u,0u>)
|
||||
|
@ -507,6 +507,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
|
||||
|
@ -633,6 +633,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
|
||||
|
@ -773,6 +773,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
|
||||
|
@ -272,6 +272,7 @@ INSTANCE(7u, BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(7u, BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
|
||||
INSTANCE(8u, BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(7u, BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(8u, BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(8u, BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(9u, BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
|
||||
|
@ -557,6 +557,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
|
||||
|
@ -220,6 +220,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
|
||||
|
@ -731,6 +731,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
|
||||
|
@ -131,6 +131,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,1u,0u,false,true,0u,2u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
|
||||
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
|
||||
|
||||
// Blackoil
|
||||
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
|
||||
|
Loading…
Reference in New Issue
Block a user