All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
Opm::MultisegmentWell< TypeTag > Class Template Reference
Inheritance diagram for Opm::MultisegmentWell< TypeTag >:
Opm::WellInterface< TypeTag >

Public Types

typedef WellInterface< TypeTag > Base
 
typedef Dune::FieldVector
< Scalar, numWellEq
VectorBlockWellType
 
typedef Dune::BlockVector
< VectorBlockWellType > 
BVectorWell
 
typedef Dune::FieldMatrix
< Scalar, numWellEq, numWellEq
DiagMatrixBlockWellType
 
typedef Dune::BCRSMatrix
< DiagMatrixBlockWellType > 
DiagMatWell
 
typedef Dune::FieldMatrix
< Scalar, numWellEq, numEq > 
OffDiagMatrixBlockWellType
 
typedef Dune::BCRSMatrix
< OffDiagMatrixBlockWellType > 
OffDiagMatWell
 
typedef DenseAd::Evaluation
< double, numEq+numWellEq
EvalWell
 
using WellState = WellStateFullyImplicitBlackoil
 
typedef BlackoilModelParameters ModelParameters
 
typedef double Scalar
 
typedef Dune::BCRSMatrix
< MatrixBlockType > 
Mat
 
typedef Dune::BlockVector
< VectorBlockType > 
BVector
 
typedef DenseAd::Evaluation
< double, numEq > 
Eval
 
- Public Types inherited from Opm::WellInterface< TypeTag >
using WellState = WellStateFullyImplicitBlackoil
 
typedef BlackoilModelParameters ModelParameters
 
typedef double Scalar
 
typedef Dune::FieldVector
< Scalar, numEq > 
VectorBlockType
 
typedef Dune::FieldMatrix
< Scalar, numEq, numEq > 
MatrixBlockType
 
typedef Dune::BCRSMatrix
< MatrixBlockType > 
Mat
 
typedef Dune::BlockVector
< VectorBlockType > 
BVector
 
typedef DenseAd::Evaluation
< double, numEq > 
Eval
 
typedef
Ewoms::BlackOilPolymerModule
< TypeTag > 
PolymerModule
 

Public Member Functions

 MultisegmentWell (const Well *well, const int time_step, const Wells *wells, const ModelParameters &param)
 
virtual void init (const PhaseUsage *phase_usage_arg, const std::vector< bool > *active_arg, const std::vector< double > &depth_arg, const double gravity_arg, const int num_cells)
 
virtual void initPrimaryVariablesEvaluation () const
 
virtual void assembleWellEq (Simulator &ebosSimulator, const double dt, WellState &well_state, bool only_wells)
 
virtual void updateWellStateWithTarget (const int current, WellState &well_state) const
 updating the well state based the control mode specified with current
 
virtual ConvergenceReport getWellConvergence (const std::vector< double > &B_avg) const
 check whether the well equations get converged for this well
 
virtual void apply (const BVector &x, BVector &Ax) const
 Ax = Ax - C D^-1 B x.
 
virtual void apply (BVector &r) const
 r = r - C D^-1 Rw
 
virtual void recoverWellSolutionAndUpdateWellState (const BVector &x, WellState &well_state) const
 using the solution x to recover the solution xw for wells and applying xw to update Well State
 
virtual void computeWellPotentials (const Simulator &ebosSimulator, const WellState &well_state, std::vector< double > &well_potentials)
 computing the well potentials for group control
 
virtual void updatePrimaryVariables (const WellState &well_state) const
 
virtual void solveEqAndUpdateWellState (WellState &well_state)
 
virtual void calculateExplicitQuantities (const Simulator &ebosSimulator, const WellState &well_state)
 
int numberOfSegments () const
 number of segments for this well int number_of_segments_;
 
int numberOfPerforations () const
 
- Public Member Functions inherited from Opm::WellInterface< TypeTag >
typedef GET_PROP_TYPE (TypeTag, Grid) Grid
 
typedef GET_PROP_TYPE (TypeTag, Simulator) Simulator
 
typedef GET_PROP_TYPE (TypeTag, FluidSystem) FluidSystem
 
typedef GET_PROP_TYPE (TypeTag, Indices) BlackoilIndices
 
typedef GET_PROP_TYPE (TypeTag, IntensiveQuantities) IntensiveQuantities
 
typedef GET_PROP_TYPE (TypeTag, MaterialLaw) MaterialLaw
 
 WellInterface (const Well *well, const int time_step, const Wells *wells, const ModelParameters &param)
 Constructor.
 
virtual ~WellInterface ()
 Virutal destructor.
 
const std::string & name () const
 Well name.
 
const std::vector< int > & cells ()
 Well cells.
 
WellType wellType () const
 Well type, INJECTOR or PRODUCER.
 
WellControls * wellControls () const
 Well controls.
 
void setVFPProperties (const VFPProperties *vfp_properties_arg)
 
void updateListEconLimited (const WellState &well_state, DynamicListEconLimited &list_econ_limited) const
 
void setWellEfficiencyFactor (const double efficiency_factor)
 
void computeRepRadiusPerfLength (const Grid &grid, const std::map< int, int > &cartesian_to_compressed)
 
void updateWellControl (WellState &xw, wellhelpers::WellSwitchingLogger &logger) const
 

Static Public Attributes

static const bool gasoil = numEq == 2 && (BlackoilIndices::compositionSwitchIdx >= 0)
 
static const int GTotal = 0
 
static const int WFrac = gasoil? -1000: 1
 
static const int GFrac = gasoil? 1 : 2
 
static const int SPres = gasoil? 2 : 3
 
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? numEq : numEq + 1
 the number of well equations // TODO: it should have a more general strategy for it
 
- Static Public Attributes inherited from Opm::WellInterface< TypeTag >
static const int numEq = BlackoilIndices::numEq
 
static const bool has_solvent = GET_PROP_VALUE(TypeTag, EnableSolvent)
 
static const bool has_polymer = GET_PROP_VALUE(TypeTag, EnablePolymer)
 

Protected Member Functions

WellSegment::CompPressureDropEnum compPressureDrop () const
 
WellSegment::MultiPhaseModelEnum multiphaseModel () const
 
const SegmentSet & segmentSet () const
 
int segmentNumberToIndex (const int segment_number) const
 
void initMatrixAndVectors (const int num_cells) const
 
void recoverSolutionWell (const BVector &x, BVectorWell &xw) const
 
void updateWellState (const BVectorWell &dwells, const bool inner_iteration, WellState &well_state) const
 
void initSegmentRatesWithWellRates (WellState &well_state) const
 
void computeInitialComposition ()
 
void computePerfCellPressDiffs (const Simulator &ebosSimulator)
 
EvalWell volumeFraction (const int seg, const int comp_idx) const
 
EvalWell volumeFractionScaled (const int seg, const int comp_idx) const
 
EvalWell surfaceVolumeFraction (const int seg, const int comp_idx) const
 
void computePerfRate (const IntensiveQuantities &int_quants, const std::vector< EvalWell > &mob_perfcells, const int seg, const int perf, const EvalWell &segment_pressure, const bool &allow_cf, std::vector< EvalWell > &cq_s) const
 
EvalWell extendEval (const Eval &in) const
 
void computeSegmentFluidProperties (const Simulator &ebosSimulator)
 
EvalWell getSegmentPressure (const int seg) const
 
EvalWell getSegmentRate (const int seg, const int comp_idx) const
 
EvalWell getSegmentGTotal (const int seg) const
 
void getMobility (const Simulator &ebosSimulator, const int perf, std::vector< EvalWell > &mob) const
 
void assembleControlEq () const
 
void assemblePressureEq (const int seg) const
 
EvalWell getHydroPressureLoss (const int seg) const
 
EvalWell getFrictionPressureLoss (const int seg) const
 
void handleAccelerationPressureLoss (const int seg) const
 
void processFractions (const int seg) const
 
void updateWellStateFromPrimaryVariables (WellState &well_state) const
 
double scalingFactor (const int comp_idx) const
 
bool frictionalPressureLossConsidered () const
 
bool accelerationalPressureLossConsidered () const
 
void iterateWellEquations (Simulator &ebosSimulator, const double dt, WellState &well_state)
 
void assembleWellEqWithoutIteration (Simulator &ebosSimulator, const double dt, WellState &well_state, bool only_wells)
 
- Protected Member Functions inherited from Opm::WellInterface< TypeTag >
bool getAllowCrossFlow () const
 
const std::vector< bool > & active () const
 
const PhaseUsage & phaseUsage () const
 
int flowPhaseToEbosCompIdx (const int phaseIdx) const
 
int flowPhaseToEbosPhaseIdx (const int phaseIdx) const
 
int numComponents () const
 
double wsolvent () const
 
double wpolymer () const
 
bool checkRateEconLimits (const WellEconProductionLimits &econ_production_limits, const WellState &well_state) const
 
bool wellHasTHPConstraints () const
 
const std::vector< double > & compFrac () const
 
double mostStrictBhpFromBhpLimits () const
 
RatioCheckTuple checkMaxWaterCutLimit (const WellEconProductionLimits &econ_production_limits, const WellState &well_state) const
 
RatioCheckTuple checkRatioEconLimits (const WellEconProductionLimits &econ_production_limits, const WellState &well_state) const
 

Protected Attributes

int number_segments_
 
std::vector< std::vector< int > > segment_perforations_
 
std::vector< std::vector< int > > segment_inlets_
 
OffDiagMatWell duneB_
 
OffDiagMatWell duneC_
 
DiagMatWell duneD_
 
BVectorWell resWell_
 
std::vector< std::array
< double, numWellEq > > 
primary_variables_
 
std::vector< std::array
< EvalWell, numWellEq > > 
primary_variables_evaluation_
 
std::vector< double > cell_perforation_depth_diffs_
 
std::vector< double > cell_perforation_pressure_diffs_
 
std::vector< double > perforation_segment_depth_diffs_
 
std::vector< std::vector
< double > > 
segment_comp_initial_
 
std::vector< EvalWell > segment_densities_
 
std::vector< EvalWell > segment_viscosities_
 
std::vector< EvalWell > segment_mass_rates_
 
std::vector< double > segment_depth_diffs_
 
- Protected Attributes inherited from Opm::WellInterface< TypeTag >
const Well * well_ecl_
 
const int current_step_
 
int index_of_well_
 
const ModelParametersparam_
 
enum WellType well_type_
 
int number_of_phases_
 
std::vector< double > comp_frac_
 
struct WellControls * well_controls_
 
int number_of_perforations_
 
int first_perf_
 
std::vector< double > well_index_
 
std::vector< double > perf_depth_
 
double ref_depth_
 
double well_efficiency_factor_
 
std::vector< int > well_cells_
 
std::vector< int > saturation_table_number_
 
std::vector< double > perf_rep_radius_
 
std::vector< double > perf_length_
 
std::vector< double > bore_diameters_
 
const PhaseUsage * phase_usage_
 
const std::vector< bool > * active_
 
const VFPPropertiesvfp_properties_
 
double gravity_
 

Additional Inherited Members

- Protected Types inherited from Opm::WellInterface< TypeTag >
using RatioCheckTuple = std::tuple< bool, bool, int, double >
 
- Static Protected Attributes inherited from Opm::WellInterface< TypeTag >
static const int INVALIDCONNECTION = -100000
 

The documentation for this class was generated from the following files: