All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
Opm::StandardWell< TypeTag > Class Template Reference
Inheritance diagram for Opm::StandardWell< 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
Ewoms::BlackOilPolymerModule
< TypeTag > 
PolymerModule
 
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

 StandardWell (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 &xw) 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)
 
- 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 XvarWell = 0
 
static const int WFrac = gasoil? -1000: 1
 
static const int GFrac = gasoil? 1: 2
 
static const int SFrac = 3
 
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? numEq-1 : numEq
 
static const int contiSolventEqIdx = BlackoilIndices::contiSolventEqIdx
 
static const int contiPolymerEqIdx = BlackoilIndices::contiPolymerEqIdx
 
static const int solventSaturationIdx = BlackoilIndices::solventSaturationIdx
 
static const int polymerConcentrationIdx = BlackoilIndices::polymerConcentrationIdx
 
- 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

EvalWell getBhp () const
 
EvalWell getQs (const int comp_idx) const
 
EvalWell wellVolumeFractionScaled (const int phase) const
 
EvalWell wellVolumeFraction (const int phase) const
 
EvalWell wellSurfaceVolumeFraction (const int phase) const
 
EvalWell extendEval (const Eval &in) const
 
bool crossFlowAllowed (const Simulator &ebosSimulator) const
 
void recoverSolutionWell (const BVector &x, BVectorWell &xw) const
 
void updateWellState (const BVectorWell &dwells, WellState &well_state) const
 
void computePropertiesForWellConnectionPressures (const Simulator &ebosSimulator, const WellState &xw, std::vector< double > &b_perf, std::vector< double > &rsmax_perf, std::vector< double > &rvmax_perf, std::vector< double > &surf_dens_perf) const
 
void computeConnectionDensities (const std::vector< double > &perfComponentRates, const std::vector< double > &b_perf, const std::vector< double > &rsmax_perf, const std::vector< double > &rvmax_perf, const std::vector< double > &surf_dens_perf)
 
void computeConnectionPressureDelta ()
 
void computeWellConnectionDensitesPressures (const WellState &xw, const std::vector< double > &b_perf, const std::vector< double > &rsmax_perf, const std::vector< double > &rvmax_perf, const std::vector< double > &surf_dens_perf)
 
void computeAccumWell ()
 
void computeWellConnectionPressures (const Simulator &ebosSimulator, const WellState &xw)
 
void computePerfRate (const IntensiveQuantities &intQuants, const std::vector< EvalWell > &mob_perfcells_dense, const double Tw, const EvalWell &bhp, const double &cdp, const bool &allow_cf, std::vector< EvalWell > &cq_s) const
 
void computeWellRatesWithBhp (const Simulator &ebosSimulator, const EvalWell &bhp, std::vector< double > &well_flux) const
 
std::vector< double > computeWellPotentialWithTHP (const Simulator &ebosSimulator, const double initial_bhp, const std::vector< double > &initial_potential) const
 
template<class ValueType >
ValueType calculateBhpFromThp (const std::vector< ValueType > &rates, const int control_index) const
 
double calculateThpFromBhp (const std::vector< double > &rates, const int control_index, const double bhp) const
 
void getMobility (const Simulator &ebosSimulator, const int perf, std::vector< EvalWell > &mob) const
 
double scalingFactor (const int comp_idx) const
 
- 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

std::vector< double > perf_densities_
 
std::vector< double > perf_pressure_diffs_
 
BVectorWell resWell_
 
OffDiagMatWell duneB_
 
OffDiagMatWell duneC_
 
DiagMatWell invDuneD_
 
BVectorWell Bx_
 
BVectorWell invDrw_
 
std::vector< double > primary_variables_
 
std::vector< EvalWell > primary_variables_evaluation_
 
std::vector< double > F0_
 
- 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: