unifying interface of a few functions of Wells classes

updateWellControls()
updateWellState()
addWellControlEq()

The change of function computeWellConnectionPressures() is not done
completely. Should find a solution later.
This commit is contained in:
Kai Bao
2016-05-09 15:27:09 +02:00
parent be165a26e0
commit 4254b48b57
10 changed files with 65 additions and 109 deletions

View File

@@ -76,7 +76,7 @@ namespace Opm {
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
const V depth = Opm::AutoDiffGrid::cellCentroidsZToEigen(grid_);
ms_wells_.init(&fluid_, &active_, &phaseCondition_, &vfp_properties_, gravity, &depth);
ms_wells_.init(&fluid_, &active_, &phaseCondition_, &vfp_properties_, gravity, depth);
// TODO: there should be a better way do the following
ms_wells_.setWellsActive(Base::wellsActive());
}
@@ -231,9 +231,7 @@ namespace Opm {
const int canonicalPhaseIdx = canph_[phaseIdx];
fluid_density[phaseIdx] = fluidDensity(canonicalPhaseIdx, rq_[phaseIdx].b, state0.rs, state0.rv);
}
const ADB::V depth = Opm::AutoDiffGrid::cellCentroidsZToEigen(grid_);
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
msWells().computeWellConnectionPressures(state0, well_state, kr_adb, fluid_density, depth, gravity);
msWells().computeWellConnectionPressures(state0, well_state, kr_adb, fluid_density);
// asImpl().computeWellConnectionPressures(state0, well_state);
}
@@ -327,9 +325,7 @@ namespace Opm {
const int canonicalPhaseIdx = canph_[phaseIdx];
fluid_density[phaseIdx] = fluidDensity(canonicalPhaseIdx, rq_[phaseIdx].b, state.rs, state.rv);
}
const ADB::V depth = Opm::AutoDiffGrid::cellCentroidsZToEigen(grid_);
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
msWells().computeWellConnectionPressures(state, well_state, kr_adb, fluid_density, depth, gravity);
msWells().computeWellConnectionPressures(state, well_state, kr_adb, fluid_density);
// asImpl().computeWellConnectionPressures(state, well_state);
}
@@ -455,9 +451,7 @@ namespace Opm {
const int canonicalPhaseIdx = canph_[phaseIdx];
fluid_density[phaseIdx] = fluidDensity(canonicalPhaseIdx, rq_[phaseIdx].b, state.rs, state.rv);
}
const ADB::V depth = Opm::AutoDiffGrid::cellCentroidsZToEigen(grid_);
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
msWells().computeWellConnectionPressures(state, well_state, kr_adb, fluid_density, depth, gravity);
msWells().computeWellConnectionPressures(state, well_state, kr_adb, fluid_density);
// computeWellConnectionPressures(state, well_state);
}