mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-10 08:23:04 -06:00
ECL peaceman well: remove some artifact code from the development process
during debugging this was used to make sure that the rate limits are correct. the issue is that this is slow if many wells are involved because it uses a full iteration over the grid for each well to calculate these rates...
This commit is contained in:
parent
6e478f6f18
commit
4e59104a80
@ -566,52 +566,7 @@ public:
|
||||
* accumulation callback.
|
||||
*/
|
||||
void beginIterationPostProcess()
|
||||
{
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
||||
currentSurfaceRates_[phaseIdx] = 0.0;
|
||||
|
||||
std::array<Scalar, numPhases> dofReservoirRates;
|
||||
std::array<Scalar, numPhases> dofSurfaceRates;
|
||||
|
||||
// call the accumulation routines
|
||||
ElementContext elemCtx(simulator_);
|
||||
auto elemIt = simulator_.gridManager().gridView().template begin</*codim=*/0>();
|
||||
const auto &elemEndIt = simulator_.gridManager().gridView().template end</*codim=*/0>();
|
||||
for (; elemIt != elemEndIt; ++elemIt) {
|
||||
elemCtx.updateStencil(*elemIt);
|
||||
elemCtx.updateIntensiveQuantities(/*timeIdx=*/0);
|
||||
|
||||
for (int dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
|
||||
int globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
|
||||
if (!applies(globalDofIdx))
|
||||
continue;
|
||||
|
||||
const DofVariables &dofVars = dofVariables_.at(globalDofIdx);
|
||||
|
||||
computeUnconstraintVolumetricDofRates_(dofReservoirRates,
|
||||
dofVars,
|
||||
elemCtx,
|
||||
dofIdx,
|
||||
/*timeIdx=*/0);
|
||||
|
||||
limitVolumetricReservoirRates_(dofReservoirRates,
|
||||
dofVars,
|
||||
elemCtx,
|
||||
dofIdx,
|
||||
/*timeIdx=*/0);
|
||||
computeSurfaceRates_(dofSurfaceRates,
|
||||
dofReservoirRates,
|
||||
elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState());
|
||||
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
||||
currentSurfaceRates_[phaseIdx] += dofSurfaceRates[phaseIdx];
|
||||
}
|
||||
}
|
||||
|
||||
Valgrind::CheckDefined(currentSurfaceRates_[oilPhaseIdx]);
|
||||
Valgrind::CheckDefined(currentSurfaceRates_[gasPhaseIdx]);
|
||||
Valgrind::CheckDefined(currentSurfaceRates_[waterPhaseIdx]);
|
||||
}
|
||||
{ }
|
||||
|
||||
/*!
|
||||
* \brief Called by the simulator after each Newton-Raphson iteration.
|
||||
|
Loading…
Reference in New Issue
Block a user