23 #ifndef OPM_MULTISEGMENTWELL_ASSEMBLE_HEADER_INCLUDED 24 #define OPM_MULTISEGMENTWELL_ASSEMBLE_HEADER_INCLUDED 26 #include <opm/input/eclipse/Schedule/Well/Well.hpp> 27 #include <opm/material/densead/Evaluation.hpp> 33 template<
class Scalar>
class GroupState;
39 template<
typename Scalar,
typename IndexTraits>
class WellState;
43 template<
class Flu
idSystem,
class Indices>
47 static constexpr
int WQTotal = PrimaryVariables::WQTotal;
48 static constexpr
bool has_wfrac_variable = PrimaryVariables::has_wfrac_variable;
49 static constexpr
bool has_gfrac_variable = PrimaryVariables::has_gfrac_variable;
50 static constexpr
bool enable_energy = PrimaryVariables::enable_energy;
51 static constexpr
int WFrac = PrimaryVariables::WFrac;
52 static constexpr
int GFrac = PrimaryVariables::GFrac;
53 static constexpr
int Temperature = PrimaryVariables::Temperature;
54 static constexpr
int SPres = PrimaryVariables::SPres;
57 static constexpr
int numWellEq = Indices::numPhases + 1 + enable_energy;
58 using Scalar =
typename FluidSystem::Scalar;
59 using IndexTraits =
typename FluidSystem::IndexTraitsType;
61 using EvalWell = DenseAd::Evaluation<Scalar, numWellEq+Indices::numEq>;
71 const Well::InjectionControls& inj_controls,
72 const Well::ProductionControls& prod_controls,
74 const PrimaryVariables& primary_variables,
76 const bool stopped_or_zero_target)
const;
82 const EvalWell& accelerationTerm,
83 Equations& eqns1)
const;
87 const int seg_density,
88 const EvalWell& hydro_pressure_drop_seg,
89 Equations& eqns1)
const;
94 const EvalWell& extra_derivatives,
95 Equations& eqns1)
const;
100 const int outlet_segment_index,
101 const EvalWell& pressure_equation,
102 const EvalWell& outlet_pressure,
103 Equations& eqns)
const;
108 Equations& eqns)
const;
113 const EvalWell& accumulation_term,
114 Equations& eqns1)
const;
118 const int seg_upwind,
120 const EvalWell& segment_rate,
121 Equations& eqns1)
const;
126 const int inlet_upwind,
128 const EvalWell& inlet_rate,
129 Equations& eqns)
const;
133 const int local_perf_index,
135 const EvalWell& cq_s_effective,
136 Equations& eqns)
const;
144 #endif // OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED void assemblePressureEq(const int seg, const int seg_upwind, const int outlet_segment_index, const EvalWell &pressure_equation, const EvalWell &outlet_pressure, Equations &eqns) const
Assemble pressure terms.
Definition: MultisegmentWellAssemble.cpp:270
void assembleOutflowTerm(const int seg, const int seg_upwind, const int comp_idx, const EvalWell &segment_rate, Equations &eqns1) const
Assemble outflow term.
Definition: MultisegmentWellAssemble.cpp:336
void assembleHydroPressureLoss(const int seg, const int seg_density, const EvalWell &hydro_pressure_drop_seg, Equations &eqns1) const
Assemble hydraulic pressure term.
Definition: MultisegmentWellAssemble.cpp:232
Class handling assemble of the equation system for MultisegmentWell.
Definition: MultisegmentWellAssemble.hpp:44
void assembleAccelerationTerm(const int seg_target, const int seg, const int seg_upwing, const EvalWell &accelerationTerm, Equations &eqns1) const
Assemble piece of the acceleration term.
Definition: MultisegmentWellAssemble.cpp:201
void assembleTrivialEq(const int seg, const Scalar value, Equations &eqns) const
Assembles a trivial equation.
Definition: MultisegmentWellAssemble.cpp:300
Definition: MultisegmentWellAssemble.hpp:34
Definition: MultisegmentWellAssemble.hpp:35
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Definition: BlackoilWellModelConstraints.hpp:37
MultisegmentWellAssemble(const WellInterfaceIndices< FluidSystem, Indices > &well)
Constructor initializes reference to well.
Definition: MultisegmentWellAssemble.hpp:65
void assemblePressureEqExtraDerivatives(const int seg, const int seg_upwind, const EvalWell &extra_derivatives, Equations &eqns1) const
Assemble additional derivatives due to reverse flow.
Definition: MultisegmentWellAssemble.cpp:252
Definition: MultisegmentWellAssemble.hpp:38
void assembleInflowTerm(const int seg, const int inlet, const int inlet_upwind, const int comp_idx, const EvalWell &inlet_rate, Equations &eqns) const
Assemble inflow term.
Definition: MultisegmentWellAssemble.cpp:370
void assembleControlEq(const GroupStateHelperType &groupStateHelper, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const Scalar rho, const PrimaryVariables &primary_variables, Equations &eqns, const bool stopped_or_zero_target) const
Assemble control equation.
Definition: MultisegmentWellAssemble.cpp:86
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: TemperatureModel.hpp:65
void assembleAccumulationTerm(const int seg, const int comp_idx, const EvalWell &accumulation_term, Equations &eqns1) const
Assemble accumulation term.
Definition: MultisegmentWellAssemble.cpp:318
void assemblePerforationEq(const int seg, const int local_perf_index, const int comp_idx, const EvalWell &cq_s_effective, Equations &eqns) const
Assemble equation for a perforation.
Definition: MultisegmentWellAssemble.cpp:405