upwinding segment for top segment is itself

This commit is contained in:
Kai Bao committed 2019-04-12 11:25:19 +02:00
1 parent 1d7089fca8
commit 88fb158067
1 file changed
+2 -3
+2 -3
View File
@@ -1333,13 +1333,12 @@ namespace Opm
int& seg_upwind) const
{
// not considering upwinding for the injectors for now
if ((!upwinding) || (well_type_ == INJECTOR) || (primary_variables_evaluation_[seg][GTotal] <= 0.) ) {
if ((!upwinding) || (well_type_ == INJECTOR) || (primary_variables_evaluation_[seg][GTotal] <= 0.) || (seg == 0)) {
seg_upwind = seg; // using the composition from the seg
return primary_variables_evaluation_[seg][GTotal] * volumeFractionScaled(seg, comp_idx);
}
assert( seg != 0); // if top segment flowing towards the wrong direction, we are not handling it
// assert( seg != 0); // if top segment flowing towards the wrong direction, we are not handling it
// basically here, it a producer and flow is in the injecting direction
// we will use the compsotion from the outlet segment