Merge pull request #5952 from hnil/consistent_primary_variables

Consistent primary variables
This commit is contained in:
Atgeirr Flø Rasmussen 2025-02-13 18:24:53 +01:00 committed by GitHub
commit c015df56f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -152,6 +152,7 @@ update(const WellState<Scalar>& well_state,
}
}
}
init();
}
template<class FluidSystem, class Indices>
@ -208,6 +209,7 @@ updateNewton(const BVectorWell& dwells,
if (stop_or_zero_rate_target) {
value_[0][WQTotal] = 0.;
}
init();
}
template<class FluidSystem, class Indices>

View File

@ -223,6 +223,7 @@ update(const WellState<Scalar>& well_state,
// BHP
value_[Bhp] = ws.bhp;
init();
}
template<class FluidSystem, class Indices>
@ -301,6 +302,7 @@ updateNewton(const BVectorWell& dwells,
// so that bhp constaint can be an active control when needed.
constexpr Scalar bhp_lower_limit = 1. * unit::barsa - 1. * unit::Pascal;
value_[Bhp] = std::max(value_[Bhp] - dx1_limited, bhp_lower_limit);
init();
}
template<class FluidSystem, class Indices>
@ -320,6 +322,7 @@ updateNewtonPolyMW(const BVectorWell& dwells)
value_[pskin_index] -= relaxation_factor * dx_pskin;
}
}
init();
}
template<class FluidSystem, class Indices>