mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-31 17:47:45 -05:00
Merge pull request #6504 from daavid00/biobugs
Add missing invB in BioeffectsFluxes
This commit is contained in:
4 files changed
+15
-13
No files matched your search
@@ -22,8 +22,8 @@
|
||||
#include <flow/flow_biofilm.hpp>
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
#include <opm/models/discretization/common/tpfalinearizer.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
|
||||
+1
-1
@@ -21,8 +21,8 @@
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/models/blackoil/blackoilonephaseindices.hh>
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <opm/models/blackoil/blackoilonephaseindices.hh>
|
||||
#include <opm/models/discretization/common/tpfalinearizer.hh>
|
||||
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
@@ -208,23 +208,26 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
template <class UpEval, class Eval, class IntensiveQuantities>
|
||||
template <class UpEval>
|
||||
static void addBioeffectsFluxes_(RateVector& flux,
|
||||
unsigned phaseIdx,
|
||||
const Eval& volumeFlux,
|
||||
const Evaluation& volumeFlux,
|
||||
const IntensiveQuantities& upFs)
|
||||
{
|
||||
if (phaseIdx == waterPhaseIdx) {
|
||||
if constexpr (enableBioeffects) {
|
||||
flux[contiMicrobialEqIdx] =
|
||||
decay<UpEval>(upFs.microbialConcentration())
|
||||
* decay<UpEval>(upFs.fluidState().invB(waterPhaseIdx))
|
||||
* volumeFlux;
|
||||
if constexpr (enableMICP) {
|
||||
flux[contiOxygenEqIdx] =
|
||||
decay<UpEval>(upFs.oxygenConcentration())
|
||||
* decay<UpEval>(upFs.fluidState().invB(waterPhaseIdx))
|
||||
* volumeFlux;
|
||||
flux[contiUreaEqIdx] =
|
||||
decay<UpEval>(upFs.ureaConcentration())
|
||||
* decay<UpEval>(upFs.fluidState().invB(waterPhaseIdx))
|
||||
* volumeFlux;
|
||||
}
|
||||
}
|
||||
@@ -262,16 +265,15 @@ public:
|
||||
|
||||
template <class UpstreamEval>
|
||||
static void addBioeffectsFluxes_(RateVector& flux,
|
||||
const ElementContext& elemCtx,
|
||||
unsigned scvfIdx,
|
||||
unsigned timeIdx)
|
||||
const ElementContext& elemCtx,
|
||||
unsigned scvfIdx,
|
||||
unsigned timeIdx)
|
||||
{
|
||||
const auto& extQuants = elemCtx.extensiveQuantities(scvfIdx, timeIdx);
|
||||
unsigned upIdx = extQuants.upstreamIndex(waterPhaseIdx);
|
||||
const auto& up = elemCtx.intensiveQuantities(upIdx, timeIdx);
|
||||
const auto& fs = up.fluidState();
|
||||
const auto& volFlux = extQuants.volumeFlux(waterPhaseIdx);
|
||||
addBioeffectsFluxes_<UpstreamEval>(flux, volFlux, fs);
|
||||
addBioeffectsFluxes_<UpstreamEval>(flux, waterPhaseIdx, volFlux, up);
|
||||
}
|
||||
|
||||
static void addSource(RateVector& source,
|
||||
|
||||
@@ -415,8 +415,8 @@ public:
|
||||
addPhaseEnthalpyFluxes_<Evaluation>(flux, phaseIdx, darcyFlux, up.fluidState());
|
||||
}
|
||||
if constexpr (enableBioeffects) {
|
||||
BioeffectsModule::template addBioeffectsFluxes_<Evaluation, Evaluation, IntensiveQuantities>
|
||||
(flux, phaseIdx, darcyFlux, up);
|
||||
BioeffectsModule::template
|
||||
addBioeffectsFluxes_<Evaluation>(flux, phaseIdx, darcyFlux, up);
|
||||
}
|
||||
if constexpr (enableBrine) {
|
||||
BrineModule::template
|
||||
@@ -431,8 +431,8 @@ public:
|
||||
addPhaseEnthalpyFluxes_<Scalar>(flux, phaseIdx, darcyFlux, up.fluidState());
|
||||
}
|
||||
if constexpr (enableBioeffects) {
|
||||
BioeffectsModule::template addBioeffectsFluxes_<Scalar, Evaluation, IntensiveQuantities>
|
||||
(flux, phaseIdx, darcyFlux, up);
|
||||
BioeffectsModule::template
|
||||
addBioeffectsFluxes_<Scalar>(flux, phaseIdx, darcyFlux, up);
|
||||
}
|
||||
if constexpr (enableBrine) {
|
||||
BrineModule::template
|
||||
|
||||
Reference in new issue
Block a user