flux corrections

This commit is contained in:
Paul Egberts 2022-03-01 17:20:17 +01:00
parent c464bceb3b
commit 8bfc490367

View File

@ -266,7 +266,7 @@ public:
if (!enableBrine)
return;
static unsigned contiGasEqIdx, contiOilEqIdx;
static unsigned contiWaterEqIdx, contiGasEqIdx, contiOilEqIdx;
if(gasEnabled) { contiGasEqIdx = Indices::conti0EqIdx + Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx); }
if(oilEnabled) { contiOilEqIdx = Indices::conti0EqIdx + Indices::canonicalToActiveComponentIndex(FluidSystem::oilCompIdx); }
@ -284,7 +284,9 @@ public:
*up.fluidState().saltConcentration();
if (enableSaltPrecipitation) {
// modify gas and oil flux for mobility change
// modify fluxes for mobility change
flux[contiBrineEqIdx] *= intQuants.permFactor();
flux[contiWaterEqIdx] *= intQuants.permFactor();
if(gasEnabled) { flux[contiGasEqIdx] *= intQuants.permFactor(); }
if(oilEnabled) { flux[contiOilEqIdx] *= intQuants.permFactor(); }
}
@ -296,7 +298,9 @@ public:
*decay<Scalar>(up.fluidState().saltConcentration());
if (enableSaltPrecipitation) {
// modify gas and oil flux for mobility change
// modify fluxes for mobility change
flux[contiBrineEqIdx] *= decay<Scalar>(intQuants.permFactor());
flux[contiWaterEqIdx] *= decay<Scalar>(intQuants.permFactor());
if(gasEnabled) { flux[contiGasEqIdx] *= decay<Scalar>(intQuants.permFactor()); }
if(oilEnabled) { flux[contiOilEqIdx] *= decay<Scalar>(intQuants.permFactor()); }
}
@ -489,10 +493,6 @@ public:
const auto& permfactTable = BrineModule::permfactTable(elemCtx, dofIdx, timeIdx);
permFactor_ = permfactTable.eval(scalarValue(porosityFactor));
if (permFactor_ < 1 ) {
// adjust mobility for changing permeability
asImp_().mobility_[waterPhaseIdx] *= permFactor_;
}
}
}