adding function updateThp() to StandardWell

hopefully, to improve the readability.
This commit is contained in:
Kai Bao 2018-05-16 12:44:38 +02:00
parent f3f096dbbb
commit efbac8a628
2 changed files with 15 additions and 0 deletions

View File

@ -327,6 +327,8 @@ namespace Opm
void updateWellStateFromPrimaryVariables(WellState& well_state) const;
void updateThp(WellState& well_state) const;
void assembleControlEq();
// handle the non reasonable fractions due to numerical overshoot

View File

@ -1043,10 +1043,23 @@ namespace Opm
}
}
updateThp(well_state);
}
template<typename TypeTag>
void
StandardWell<TypeTag>::
updateThp(WellState& well_state) const
{
// for the wells having a THP constaint, we should update their thp value
// If it is under THP control, it will be set to be the target value.
// TODO: a better standard is probably whether we have the table to calculate the THP value
// TODO: it is something we need to check the output to decide.
const PhaseUsage& pu = phaseUsage();
const WellControls* wc = well_controls_;
// TODO: we should only maintain one current control either from the well_state or from well_controls struct.
// Either one can be more favored depending on the final strategy for the initilzation of the well control