adding extendEval() to StandardWell

For this type of functions that related to Evaluation should be
implemented within individual well model.
This commit is contained in:
Kai Bao 2017-06-19 15:24:49 +02:00
parent ff2ada66bc
commit 266442b0bd
2 changed files with 20 additions and 0 deletions

View File

@ -109,6 +109,8 @@ namespace Opm
EvalWell wellSurfaceVolumeFraction(const int phase) const;
EvalWell extendEval(const Eval& in) const;
using WellInterface<TypeTag>::phaseUsage;
using WellInterface<TypeTag>::active;
using WellInterface<TypeTag>::numberOfPerforations;
@ -119,6 +121,7 @@ namespace Opm
using WellInterface<TypeTag>::compFrac;
using WellInterface<TypeTag>::numberOfPhases;
using WellInterface<TypeTag>::perfDepth;
using WellInterface<TypeTag>::flowToEbosPvIdx;
protected:

View File

@ -390,4 +390,21 @@ namespace Opm
return wellVolumeFractionScaled(phase) / sum_volume_fraction_scaled;
}
template<typename TypeTag>
typename StandardWell<TypeTag>::EvalWell
StandardWell<TypeTag>::
extendEval(const Eval& in) const
{
EvalWell out = 0.0;
out.setValue(in.value());
for(int eqIdx = 0; eqIdx < numEq;++eqIdx) {
out.setDerivative(eqIdx, in.derivative(flowToEbosPvIdx(eqIdx)));
}
return out;
}
}