mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Some clean-up adressing PR comments
This commit is contained in:
parent
5c7cfd8c21
commit
a7f718a368
@ -1495,7 +1495,6 @@ namespace Opm
|
||||
assembleControlEq(Opm::DeferredLogger& deferred_logger) const
|
||||
{
|
||||
EvalWell control_eq(0.0);
|
||||
const std::vector<double> g = {1.0, 1.0, 0.01};
|
||||
|
||||
switch (well_controls_get_current_type(well_controls_)) {
|
||||
case THP: // not handling this one for now
|
||||
@ -1520,6 +1519,7 @@ namespace Opm
|
||||
}
|
||||
assert(number_phases_under_control > 0);
|
||||
const double target_rate = well_controls_get_current_target(well_controls_);
|
||||
const std::vector<double> g = {1.0, 1.0, 0.01};
|
||||
|
||||
if (well_type_ == INJECTOR) {
|
||||
assert(number_phases_under_control == 1);
|
||||
@ -1569,8 +1569,6 @@ namespace Opm
|
||||
default:
|
||||
OPM_DEFLOG_THROW(std::runtime_error, "Unknown well control control types for well " << name(), deferred_logger);
|
||||
}
|
||||
|
||||
|
||||
// using control_eq to update the matrix and residuals
|
||||
|
||||
resWell_[0][SPres] = control_eq.value();
|
||||
@ -2455,16 +2453,9 @@ namespace Opm
|
||||
for (int seg = 0; seg < numberOfSegments(); ++seg) {
|
||||
// special treatment is needed for segment 0
|
||||
if (seg == 0) {
|
||||
if ( (well_type_ == INJECTOR)) {
|
||||
// maybe it is safer to return -1 to make sure that we don't return the wrong segment number
|
||||
// for injectors
|
||||
upwinding_segments_[seg] = seg;
|
||||
assert(primary_variables_evaluation_[seg][GTotal] >= 0.);
|
||||
continue;
|
||||
}
|
||||
|
||||
// we don't handle injecting producers.
|
||||
assert(primary_variables_evaluation_[seg][GTotal] <= 0.);
|
||||
// we are not supposed to have injecting producers and producing injectors
|
||||
assert( ! (well_type_ == PRODUCER && primary_variables_evaluation_[seg][GTotal] > 0.) );
|
||||
assert( ! (well_type_ == INJECTOR && primary_variables_evaluation_[seg][GTotal] < 0.) );
|
||||
upwinding_segments_[seg] = seg;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user