Fix intial fluid distribution in the well

Solve the well equation in order to determine the initial fluid content
of the well used for the hydrostatic pressure calculation in the well.
This commit is contained in:
Tor Harald Sandve 2018-03-23 12:56:19 +01:00
parent 6f18f7115f
commit 975a9a6766
2 changed files with 8 additions and 0 deletions

View File

@ -194,6 +194,7 @@ namespace Opm {
size_t number_of_cells_;
double gravity_;
std::vector<double> depth_;
bool initial_step_;
DynamicListEconLimited dynamic_list_econ_limited_;
std::unique_ptr<RateConverterType> rateConverter_;

View File

@ -29,6 +29,7 @@ namespace Opm {
extractLegacyCellPvtRegionIndex_();
extractLegacyDepth_();
initial_step_ = true;
}
@ -273,6 +274,12 @@ namespace Opm {
if (param_.solve_welleq_initially_ && iterationIdx == 0) {
// solve the well equations as a pre-processing step
last_report_ = solveWellEq(dt);
if (initial_step_) {
// update the explixit quanteties to get the initial fluid distribution in the well correct.
calculateExplicitQuantities();
last_report_ = solveWellEq(dt);
initial_step_ = false;
}
}
assembleWellEq(dt, false);