20 #ifndef OPM_BLACKOILMULTISEGMENTMODEL_HEADER_INCLUDED 21 #define OPM_BLACKOILMULTISEGMENTMODEL_HEADER_INCLUDED 23 #include <opm/core/simulator/BlackoilState.hpp> 24 #include <opm/autodiff/BlackoilModelBase.hpp> 25 #include <opm/autodiff/BlackoilModelParameters.hpp> 26 #include <opm/autodiff/WellStateMultiSegment.hpp> 27 #include <opm/autodiff/WellMultiSegment.hpp> 28 #include <opm/autodiff/StandardWells.hpp> 29 #include <opm/simulators/timestepping/SimulatorTimerInterface.hpp> 31 #include <opm/autodiff/MultisegmentWells.hpp> 60 typedef typename Base::ReservoirState ReservoirState;
61 typedef typename Base::WellState WellState;
88 const RockCompressibility* rock_comp_props,
91 std::shared_ptr< const EclipseState > eclState,
92 const bool has_disgas,
93 const bool has_vapoil,
94 const bool terminal_output);
101 const ReservoirState& reservoir_state,
102 const WellState& well_state);
110 assemble(
const ReservoirState& reservoir_state,
111 WellState& well_state,
112 const bool initial_assembly);
131 using Base::residual_;
135 using Base::has_disgas_;
136 using Base::has_vapoil_;
139 using Base::linsolver_;
140 using Base::phaseCondition_;
141 using Base::vfp_properties_;
142 using Base::well_model_;
148 using Base::phaseCondition;
149 using Base::fluidRvSat;
150 using Base::fluidRsSat;
151 using Base::fluidDensity;
153 using Base::computeGasPressure;
154 using Base::dpMaxRel;
156 using Base::drMaxRel;
158 using Base::maxResidualAllowed;
159 using Base::variableState;
162 using Base::variableReservoirStateInitials;
165 const std::vector<WellMultiSegmentConstPtr>& wellsMultiSegment()
const {
return well_model_.msWells(); }
170 solveWellEq(
const std::vector<ADB>& mob_perfcells,
171 const std::vector<ADB>& b_perfcells,
172 const ReservoirState& reservoir_state,
174 WellState& well_state);
183 const WellState& well_state);
188 template <
class Gr
idT>
191 typedef BlackoilState ReservoirState;
202 #include "BlackoilMultiSegmentModel_impl.hpp" 204 #endif // OPM_BLACKOILMULTISEGMENTMODEL_HEADER_INCLUDED BlackoilMultiSegmentModel(const typename Base::ModelParameters ¶m, const Grid &grid, const BlackoilPropsAdFromDeck &fluid, const DerivedGeology &geo, const RockCompressibility *rock_comp_props, const MultisegmentWells &well_model, const NewtonIterationBlackoilInterface &linsolver, std::shared_ptr< const EclipseState > eclState, const bool has_disgas, const bool has_vapoil, const bool terminal_output)
Construct the model.
Definition: BlackoilMultiSegmentModel_impl.hpp:60
static AutoDiffBlock null()
Construct an empty AutoDiffBlock.
Definition: AutoDiffBlock.hpp:104
Definition: BlackoilMultiSegmentModel.hpp:35
A model implementation for three-phase black oil.
Definition: BlackoilModelBase.hpp:76
void prepareStep(const SimulatorTimerInterface &timer, const ReservoirState &reservoir_state, const WellState &well_state)
Called once before each time step.
Definition: BlackoilMultiSegmentModel_impl.hpp:83
Definition: MultisegmentWells.hpp:62
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: AdditionalObjectDeleter.hpp:22
Solver parameters for the BlackoilModel.
Definition: BlackoilModelParameters.hpp:31
const std::string & materialName(int material_index) const
The name of an active material in the model.
Definition: BlackoilModelBase_impl.hpp:406
SimulatorReport assemble(const ReservoirState &reservoir_state, WellState &well_state, const bool initial_assembly)
Assemble the residual and Jacobian of the nonlinear system.
Definition: BlackoilMultiSegmentModel_impl.hpp:132
void updatePrimalVariableFromState(const ReservoirState &state)
update the primal variable for Sg, Rv or Rs.
Definition: BlackoilModelBase_impl.hpp:2193
Traits to encapsulate the types used by classes using or extending this model.
Definition: BlackoilModelBase.hpp:60
A model implementation for three-phase black oil with support for multi-segment wells.
Definition: BlackoilMultiSegmentModel.hpp:55
MultisegmentWells & wellModel()
return the WellModel object
Definition: BlackoilModelBase.hpp:268
bool terminal_output_
Whether we print something to std::cout.
Definition: BlackoilModelBase.hpp:353
Interface class for SimulatorTimer objects, to be improved.
Definition: SimulatorTimerInterface.hpp:35
Struct for containing iteration variables.
Definition: DefaultBlackoilSolutionState.hpp:29
Class containing static geological properties that are derived from grid and petrophysical properties...
Definition: GeoProps.hpp:59
BlackoilMultiSegmentModel< Grid > & asImpl()
Access the most-derived class used for static polymorphism (CRTP).
Definition: BlackoilModelBase.hpp:370
int numPhases() const
The number of active fluid phases in the model.
Definition: BlackoilModelBase_impl.hpp:383
bool wellsActive() const
return true if wells are available in the reservoir
Definition: BlackoilModelBase.hpp:386
Interface class for (linear) solvers for the fully implicit black-oil system.
Definition: NewtonIterationBlackoilInterface.hpp:31
double convergenceReduction(const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > &B, const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > &tempV, const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > &R, std::vector< double > &R_sum, std::vector< double > &maxCoeff, std::vector< double > &B_avg, std::vector< double > &maxNormWell, int nc) const
Compute the reduction within the convergence check.
Definition: BlackoilModelBase_impl.hpp:1634
This class implements the AD-adapted fluid interface for three-phase black-oil.
Definition: BlackoilPropsAdFromDeck.hpp:61
The state of a set of multi-sgemnet wells.
Definition: WellStateMultiSegment.hpp:45
void updatePhaseCondFromPrimalVariable(const ReservoirState &state)
Update the phaseCondition_ member based on the primalVariable_ member.
Definition: BlackoilModelBase_impl.hpp:2206
int numMaterials() const
The number of active materials in the model.
Definition: BlackoilModelBase_impl.hpp:394
Class for handling the multi-segment well model.
Definition: MultisegmentWells.hpp:55