mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Reduce differences.
This commit is contained in:
parent
1d3fbb54c8
commit
8543e677c1
@ -144,6 +144,7 @@ public:
|
|||||||
|
|
||||||
const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
||||||
//const auto& materialParams = problem.materialLawParams(0);//NB improve speed
|
//const auto& materialParams = problem.materialLawParams(0);//NB improve speed
|
||||||
|
const auto linearizationType = problem.model().linearizer().getLinearizationType();
|
||||||
Scalar RvMax;
|
Scalar RvMax;
|
||||||
if (FluidSystem::enableVaporizedOil()) {
|
if (FluidSystem::enableVaporizedOil()) {
|
||||||
RvMax = problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx);
|
RvMax = problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx);
|
||||||
@ -170,7 +171,7 @@ public:
|
|||||||
//globalSpaceIdx,
|
//globalSpaceIdx,
|
||||||
primaryVars,
|
primaryVars,
|
||||||
materialParams,
|
materialParams,
|
||||||
//linearizationType,
|
linearizationType,
|
||||||
refPorosity,
|
refPorosity,
|
||||||
rockCompressibility,
|
rockCompressibility,
|
||||||
rockRefPressure,
|
rockRefPressure,
|
||||||
@ -186,7 +187,7 @@ public:
|
|||||||
//const unsigned globalIdx,
|
//const unsigned globalIdx,
|
||||||
const PrimaryVariables& priVars,
|
const PrimaryVariables& priVars,
|
||||||
const MaterialParams& materialParams,
|
const MaterialParams& materialParams,
|
||||||
//const LinarizationType& linearizationType,
|
const LinearizationType& linearizationType,
|
||||||
const Scalar& refPorosity,
|
const Scalar& refPorosity,
|
||||||
const Scalar& rockCompressibility,
|
const Scalar& rockCompressibility,
|
||||||
const Scalar& rockRefPressure,
|
const Scalar& rockRefPressure,
|
||||||
@ -450,11 +451,11 @@ public:
|
|||||||
|
|
||||||
//const auto& mu = FluidSystem::viscosity(fluidState_, paramCache, phaseIdx);
|
//const auto& mu = FluidSystem::viscosity(fluidState_, paramCache, phaseIdx);
|
||||||
const auto& mu = FluidSystem::viscosity(fluidState_, phaseIdx ,pvtRegionIdx);
|
const auto& mu = FluidSystem::viscosity(fluidState_, phaseIdx ,pvtRegionIdx);
|
||||||
// if (enableExtbo && phaseIdx == oilPhaseIdx)
|
if (enableExtbo && phaseIdx == oilPhaseIdx)
|
||||||
// mobility_[phaseIdx] /= asImp_().oilViscosity();
|
mobility_[phaseIdx] /= asImp_().oilViscosity();
|
||||||
// else if (enableExtbo && phaseIdx == gasPhaseIdx)
|
else if (enableExtbo && phaseIdx == gasPhaseIdx)
|
||||||
// mobility_[phaseIdx] /= asImp_().gasViscosity();
|
mobility_[phaseIdx] /= asImp_().gasViscosity();
|
||||||
// else
|
else
|
||||||
mobility_[phaseIdx] /= mu;
|
mobility_[phaseIdx] /= mu;
|
||||||
}
|
}
|
||||||
Valgrind::CheckDefined(mobility_);
|
Valgrind::CheckDefined(mobility_);
|
||||||
@ -476,6 +477,12 @@ public:
|
|||||||
fluidState_.Rv() *
|
fluidState_.Rv() *
|
||||||
FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
|
FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
|
||||||
}
|
}
|
||||||
|
if (FluidSystem::enableVaporizedWater()) {
|
||||||
|
rho +=
|
||||||
|
fluidState_.invB(gasPhaseIdx) *
|
||||||
|
fluidState_.Rvw() *
|
||||||
|
FluidSystem::referenceDensity(waterPhaseIdx, pvtRegionIdx);
|
||||||
|
}
|
||||||
fluidState_.setDensity(gasPhaseIdx, rho);
|
fluidState_.setDensity(gasPhaseIdx, rho);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,17 +515,24 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
x = rockCompressibility*(fluidState_.pressure(gasPhaseIdx) - rockRefPressure);
|
x = rockCompressibility*(fluidState_.pressure(gasPhaseIdx) - rockRefPressure);
|
||||||
}
|
}
|
||||||
|
//porosity_ *= 1.0 + x + 0.5*x*x;
|
||||||
porosity_ *= 1.0 + (1 + 0.5*x)*x;
|
porosity_ *= 1.0 + (1 + 0.5*x)*x;
|
||||||
}
|
}
|
||||||
// // deal with water induced rock compaction
|
// // deal with water induced rock compaction
|
||||||
// porosity_ *= problem.template rockCompPoroMultiplier<Evaluation>(*this, globalSpaceIdx);
|
// porosity_ *= problem.template rockCompPoroMultiplier<Evaluation>(*this, globalSpaceIdx);
|
||||||
|
|
||||||
// the MICP processes change the porosity
|
// the MICP processes change the porosity
|
||||||
// if (enableMICP){
|
if (enableMICP){
|
||||||
// Evaluation biofilm_ = priVars.makeEvaluation(Indices::biofilmConcentrationIdx, timeIdx, linearizationType);
|
Evaluation biofilm_ = priVars.makeEvaluation(Indices::biofilmConcentrationIdx, timeIdx, linearizationType);
|
||||||
// Evaluation calcite_ = priVars.makeEvaluation(Indices::calciteConcentrationIdx, timeIdx, linearizationType);
|
Evaluation calcite_ = priVars.makeEvaluation(Indices::calciteConcentrationIdx, timeIdx, linearizationType);
|
||||||
// porosity_ += - biofilm_ - calcite_;
|
porosity_ += - biofilm_ - calcite_;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
// deal with salt-precipitation
|
||||||
|
if (enableSaltPrecipitation && priVars.primaryVarsMeaningBrine() == PrimaryVariables::Sp) {
|
||||||
|
Evaluation Sp = priVars.makeEvaluation(Indices::saltConcentrationIdx, timeIdx);
|
||||||
|
porosity_ *= (1.0 - Sp);
|
||||||
|
}
|
||||||
|
|
||||||
// asImp_().solventPvtUpdate_(elemCtx, dofIdx, timeIdx);
|
// asImp_().solventPvtUpdate_(elemCtx, dofIdx, timeIdx);
|
||||||
// asImp_().zPvtUpdate_();
|
// asImp_().zPvtUpdate_();
|
||||||
|
Loading…
Reference in New Issue
Block a user