mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
A function to calulate the surface volume fraction of the rates
for StandardWellsDense.
This commit is contained in:
parent
aaa4af6c49
commit
01d8813f53
@ -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;
|
||||
|
@ -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>::
|
||||
|
Loading…
Reference in New Issue
Block a user