adding prepareStep() for the BlackoilMultiSegmentModel

Have not added the wellbore volume related part.
This commit is contained in:
Kai Bao 2015-09-23 11:41:28 +02:00
parent cdb2b92bb6
commit 40f245deef
2 changed files with 12 additions and 5 deletions

View File

@ -55,6 +55,7 @@ namespace Opm {
typedef BlackoilModelBase<Grid, BlackoilMultiSegmentModel<Grid> > Base; // base class
typedef typename Base::ReservoirState ReservoirState;
typedef typename Base::WellState WellState;
typedef BlackoilMultiSegmentSolutionState SolutionState;
// --------- Public methods ---------
@ -93,7 +94,7 @@ namespace Opm {
/// \param[in, out] well_state well state variables
void prepareStep(const double dt,
ReservoirState& reservoir_state,
WellState& well_state) {};
WellState& well_state);
/// Called once after each time step.
/// In this class, this function does nothing.
@ -133,6 +134,9 @@ namespace Opm {
// For the non-segmented well, it should be the density with AVG or SEG way.
// while usually SEG way
using Base::well_perforation_densities_; //Density of each well perforation
using Base::pvdt_;
using Base::geo_;
using Base::active_;
// Diff to the pressure of the related segment.
@ -177,6 +181,7 @@ namespace Opm {
// return wells object
// TODO: remove this wells structure
using Base::wells;
using Base::updatePrimalVariableFromState;
const std::vector<WellMultiSegmentConstPtr>& wellsMultiSegment() const { return wells_multisegment_; }

View File

@ -90,17 +90,19 @@ namespace Opm {
/* template <class Grid, class Implementation>
template <class Grid>
void
BlackoilModelBase<Grid, Implementation>::
BlackoilMultiSegmentModel<Grid>::
prepareStep(const double dt,
ReservoirState& reservoir_state,
WellState&)
WellState& well_state)
{
pvdt_ = geo_.poreVolume() / dt;
if (active_[Gas]) {
updatePrimalVariableFromState(reservoir_state);
}
//TODO: handle the volume related.
}
@ -109,7 +111,7 @@ namespace Opm {
template <class Grid, class Implementation>
/* template <class Grid, class Implementation>
void
BlackoilModelBase<Grid, Implementation>::makeConstantState(SolutionState& state) const
{