mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changes to make local update of primaryvariables and intensive quantities possible
This commit is contained in:
parent
112c2c3573
commit
56f742ed7d
@ -102,6 +102,7 @@ class BlackOilIntensiveQuantitiesSimple
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum { compositionSwitchIdx = Indices::compositionSwitchIdx };
|
||||
|
||||
|
||||
static const bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
|
||||
static const bool waterEnabled = Indices::waterEnabled;
|
||||
static const bool gasEnabled = Indices::gasEnabled;
|
||||
@ -132,10 +133,11 @@ public:
|
||||
void update(const Problem& problem,const PrimaryVariables& primaryVars,unsigned globalSpaceIdx, unsigned timeIdx)
|
||||
{
|
||||
//ParentType::update(elemCtx, dofIdx, timeIdx);//only used for extrusion factor
|
||||
const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
||||
//const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
|
||||
const auto& materialParams = problem.materialLawParams(0);
|
||||
Scalar RvMax;
|
||||
if (FluidSystem::enableVaporizedOil()) {
|
||||
RvMax = problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx);
|
||||
RvMax = problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx);
|
||||
}else{
|
||||
RvMax = 0.0;
|
||||
}
|
||||
@ -439,7 +441,7 @@ public:
|
||||
} else {
|
||||
x = rockCompressibility*(fluidState_.pressure(gasPhaseIdx) - rockRefPressure);
|
||||
}
|
||||
porosity_ *= 1.0 + x + 0.5*x*x;
|
||||
porosity_ *= 1.0 + (1 + 0.5*x)*x;
|
||||
}
|
||||
|
||||
// // deal with water induced rock compaction
|
||||
|
@ -232,7 +232,6 @@ public:
|
||||
numPriVarsSwitched_ = comm.sum(numPriVarsSwitched_);
|
||||
}
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* \copydoc FvBaseNewtonMethod::updatePrimaryVariables_
|
||||
*/
|
||||
|
@ -784,6 +784,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void invalidateAndUpdateIntensiveSingleQuantitiesSimple(const Problem& problem,
|
||||
const PrimaryVariables& primaryVar,
|
||||
unsigned dofIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
//invalidateIntensiveQuantitiesCache(timeIdx);
|
||||
auto& intquant = intensiveQuantityCache_[timeIdx][dofIdx];
|
||||
intquant.update(problem, primaryVar, dofIdx, timeIdx);
|
||||
intensiveQuantityCacheUpToDate_[timeIdx][dofIdx] = true;
|
||||
}
|
||||
|
||||
void invalidateAndUpdateIntensiveQuantitiesSimple(const Problem& problem,
|
||||
const SolutionVector& primaryVars,
|
||||
|
Loading…
Reference in New Issue
Block a user