A function to calulate the surface volume fraction of the rates

for StandardWellsDense.
This commit is contained in:
Kai Bao 2017-03-07 13:31:40 +01:00
parent aaa4af6c49
commit 01d8813f53
2 changed files with 23 additions and 0 deletions

View File

@ -310,6 +310,9 @@ enum WellVariablePositions {
EvalWell wellVolumeFractionScaled(const int wellIdx, const int phaseIdx) const;
// Q_p / (Q_w + Q_g + Q_o) for three phase cases.
EvalWell wellSurfaceVolumeFraction(const int well_index, const int phase) const;
bool checkRateEconLimits(const WellEconProductionLimits& econ_production_limits,
const WellState& well_state,
const int well_number) const;

View File

@ -2076,6 +2076,26 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>::
wellSurfaceVolumeFraction(const int well_index, const int phase) const
{
EvalWell sum_volume_fraction_scaled = 0.;
const int np = wells().number_of_phases;
for (int p = 0; p < np; ++p) {
sum_volume_fraction_scaled += wellVolumeFractionScaled(well_index, p);
}
assert(sum_volume_fraction_scaled.value() != 0.);
return wellVolumeFractionScaled(well_index, phase) / sum_volume_fraction_scaled;
}
template<typename FluidSystem, typename BlackoilIndices>
bool
StandardWellsDense<FluidSystem, BlackoilIndices>::