mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-24 22:57:42 -05:00
Adressing akva2 comments
This commit is contained in:
1 parent
ccc452f4d4
commit
1541e84f7d
11 files changed
+71
-60
No files matched your search
+5
-4
@@ -18,15 +18,16 @@
|
||||
|
||||
#include <flow/flow_micp.hpp>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/models/blackoil/blackoilonephaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <opm/models/discretization/common/tpfalinearizer.hh>
|
||||
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
namespace TTag {
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
#include <opm/utility/CopyablePtr.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
@@ -147,24 +147,24 @@ struct BlackOilIndices
|
||||
numPolymers > 1 ? polymerConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the first MICP component
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents : -1000;
|
||||
|
||||
//! Index of the primary variable for the second MICP component
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
numMICPs > 1 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 1 ? microbialConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the third MICP component
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 2 ? microbialConcentrationIdx + 1 : -1000;
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 2 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fourth MICP component
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 3 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
numMICPs > 3 ? ureaConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fifth MICP component
|
||||
static constexpr int calciteConcentrationIdx =
|
||||
numMICPs > 4 ? ureaConcentrationIdx + 1 : -1000;
|
||||
numMICPs > 4 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the foam
|
||||
static constexpr int foamConcentrationIdx =
|
||||
@@ -204,24 +204,24 @@ struct BlackOilIndices
|
||||
numPolymers > 1 ? contiPolymerEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the first MICP component
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents + numExtbos : -1000;
|
||||
|
||||
//! Index of the continuity equation for the second MICP component
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
numMICPs > 1 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 1 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the third MICP component
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 2 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 2 ? contiOxygenEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fourth MICP component
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 3 ? contiOxygenEqIdx + 1 : -1000;
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
numMICPs > 3 ? contiUreaEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fifth MICP component
|
||||
static constexpr int contiCalciteEqIdx =
|
||||
numMICPs > 4 ? contiUreaEqIdx + 1 : -1000;
|
||||
numMICPs > 4 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the foam component
|
||||
static constexpr int contiFoamEqIdx =
|
||||
|
||||
@@ -696,11 +696,15 @@ public:
|
||||
|
||||
const Evaluation& permFactor() const
|
||||
{
|
||||
if constexpr (enableMICP)
|
||||
if constexpr (enableMICP) {
|
||||
return MICPIntQua::permFactor();
|
||||
if constexpr (enableSaltPrecipitation)
|
||||
}
|
||||
else if constexpr (enableSaltPrecipitation) {
|
||||
return BrineIntQua::permFactor();
|
||||
throw std::logic_error("permFactor() called but salt precipitation or MICP are disabled");
|
||||
}
|
||||
else {
|
||||
throw std::logic_error("permFactor() called but salt precipitation or MICP are disabled");
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#include <opm/input/eclipse/EclipseState/Tables/BiofilmTable.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/DiffMICPTable.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/PermfactTable.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/SimpleTable.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -145,24 +145,24 @@ struct BlackOilOnePhaseIndices
|
||||
numPolymers > 1 ? polymerConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the first MICP component
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents : -1000;
|
||||
|
||||
//! Index of the primary variable for the second MICP component
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
numMICPs > 1 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 1 ? microbialConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the third MICP component
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 2 ? microbialConcentrationIdx + 1 : -1000;
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 2 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fourth MICP component
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 3 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
numMICPs > 3 ? ureaConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fifth MICP component
|
||||
static constexpr int calciteConcentrationIdx =
|
||||
numMICPs > 4 ? ureaConcentrationIdx + 1 : -1000;
|
||||
numMICPs > 4 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the foam
|
||||
static constexpr int foamConcentrationIdx =
|
||||
@@ -221,24 +221,24 @@ struct BlackOilOnePhaseIndices
|
||||
numPolymers > 1 ? contiPolymerEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the first MICP component
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents : -1000;
|
||||
|
||||
//! Index of the continuity equation for the second MICP component
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
numMICPs > 1 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 1 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the third MICP component
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 2 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 2 ? contiOxygenEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fourth MICP component
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 3 ? contiOxygenEqIdx + 1 : -1000;
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
numMICPs > 3 ? contiUreaEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fifth MICP component
|
||||
static constexpr int contiCalciteEqIdx =
|
||||
numMICPs > 4 ? contiUreaEqIdx + 1 : -1000;
|
||||
numMICPs > 4 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the foam component
|
||||
static constexpr int contiFoamEqIdx =
|
||||
|
||||
@@ -145,24 +145,24 @@ struct BlackOilTwoPhaseIndices
|
||||
numPolymers > 1 ? polymerConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the first MICP component
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents : -1000;
|
||||
|
||||
//! Index of the primary variable for the second MICP component
|
||||
static constexpr int microbialConcentrationIdx =
|
||||
numMICPs > 1 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 1 ? microbialConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the third MICP component
|
||||
static constexpr int oxygenConcentrationIdx =
|
||||
numMICPs > 2 ? microbialConcentrationIdx + 1 : -1000;
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 2 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fourth MICP component
|
||||
static constexpr int ureaConcentrationIdx =
|
||||
numMICPs > 3 ? oxygenConcentrationIdx + 1 : -1000;
|
||||
static constexpr int biofilmConcentrationIdx =
|
||||
numMICPs > 3 ? ureaConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the fifth MICP component
|
||||
static constexpr int calciteConcentrationIdx =
|
||||
numMICPs > 4 ? ureaConcentrationIdx + 1 : -1000;
|
||||
numMICPs > 4 ? biofilmConcentrationIdx + 1 : -1000;
|
||||
|
||||
//! Index of the primary variable for the foam
|
||||
static constexpr int foamConcentrationIdx =
|
||||
@@ -240,24 +240,24 @@ struct BlackOilTwoPhaseIndices
|
||||
numPolymers > 1 ? contiPolymerEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the first MICP component
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
enableMICP ? PVOffset + numPhases + numSolvents : -1000;
|
||||
|
||||
//! Index of the continuity equation for the second MICP component
|
||||
static constexpr int contiMicrobialEqIdx =
|
||||
numMICPs > 1 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 1 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the third MICP component
|
||||
static constexpr int contiOxygenEqIdx =
|
||||
numMICPs > 2 ? contiMicrobialEqIdx + 1 : -1000;
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 2 ? contiOxygenEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fourth MICP component
|
||||
static constexpr int contiUreaEqIdx =
|
||||
numMICPs > 3 ? contiOxygenEqIdx + 1 : -1000;
|
||||
static constexpr int contiBiofilmEqIdx =
|
||||
numMICPs > 3 ? contiUreaEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the fifth MICP component
|
||||
static constexpr int contiCalciteEqIdx =
|
||||
numMICPs > 4 ? contiUreaEqIdx + 1 : -1000;
|
||||
numMICPs > 4 ? contiBiofilmEqIdx + 1 : -1000;
|
||||
|
||||
//! Index of the continuity equation for the foam component
|
||||
static constexpr int contiFoamEqIdx =
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
}
|
||||
|
||||
if (params_.ureaConcentrationOutput_) {
|
||||
// multypliging by scaling factor 10 (see WellInterfaceGeneric.cpp)
|
||||
// multiplying by scaling factor 10 (see WellInterfaceGeneric.cpp)
|
||||
ureaConcentration_[globalDofIdx] =
|
||||
10 * scalarValue(intQuants.ureaConcentration());
|
||||
}
|
||||
|
||||
@@ -527,7 +527,12 @@ readBlackoilExtentionsInitialConditions_(std::size_t numDof,
|
||||
micp_.oxygenConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
if (eclState_.fieldProps().has_double("SUREA")) {
|
||||
micp_.ureaConcentration = getArray(eclState_.fieldProps().get_double("SUREA"));
|
||||
// dividing by scaling factor 10 (see WellInterfaceGeneric.cpp)
|
||||
micp_.ureaConcentration.resize(numDof, 0.1);
|
||||
const auto& urea = getArray(eclState_.fieldProps().get_double("SUREA"));
|
||||
for (std::size_t xIdx = 0; xIdx < numDof; ++xIdx) {
|
||||
micp_.ureaConcentration[xIdx] *= urea[xIdx];
|
||||
}
|
||||
} else {
|
||||
micp_.ureaConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Opm
|
||||
/// to determine active phases.
|
||||
PhaseUsage phaseUsageFromDeck(const Deck& deck);
|
||||
|
||||
/// Handels MICP
|
||||
/// Handles MICP
|
||||
PhaseUsage phaseUsageMICP(const Phases& phases);
|
||||
}
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ Scalar WellInterfaceGeneric<Scalar>::wurea_() const
|
||||
|
||||
if (injectorType == InjectorType::WATER) {
|
||||
WellMICPProperties urea = this->well_ecl_.getMICPProperties();
|
||||
const Scalar urea_injection_concentration = urea.m_ureaConcentration / 10;//Dividing by scaling factor 10
|
||||
const Scalar urea_injection_concentration = urea.m_ureaConcentration / 10;
|
||||
return urea_injection_concentration;
|
||||
} else {
|
||||
// Not a water injection well => no urea.
|
||||
|
||||
Reference in new issue
Block a user