22 #ifndef OPM_BLACKOILWELLMODEL_NLDD_HEADER_INCLUDED 23 #define OPM_BLACKOILWELLMODEL_NLDD_HEADER_INCLUDED 25 #include <opm/grid/utility/SparseTable.hpp> 27 #include <opm/simulators/timestepping/ConvergenceReport.hpp> 29 #include <opm/simulators/utils/DeferredLogger.hpp> 31 #include <opm/simulators/wells/BlackoilWellModel.hpp> 39 template<
typename Scalar,
typename IndexTraits>
43 std::vector<Scalar> getPrimaryVarsDomain(
const int domainIdx)
const;
44 void setPrimaryVarsDomain(
const int domainIdx,
const std::vector<Scalar>& vars);
47 {
return well_local_cells_; }
49 const std::map<std::string, int>& well_domain()
const 50 {
return well_domain_; }
54 : genWellModel_(model)
57 void calcDomains(
const std::vector<const SubDomainIndices*>& domains);
60 void logDomains()
const;
62 void findWellDomains(
const std::vector<const SubDomainIndices*>& domains);
64 void calcLocalIndices(
const std::vector<const SubDomainIndices*>& domains);
69 std::map<std::string, int> well_domain_{};
76 template<
typename TypeTag>
79 typename GetPropType<TypeTag, Properties::FluidSystem>::IndexTraitsType>
85 using PressureMatrix =
typename BlackoilWellModel<TypeTag>::PressureMatrix;
86 using BVector =
typename BlackoilWellModel<TypeTag>::BVector;
88 using IndexTraits =
typename FluidSystem::IndexTraitsType;
98 void addWellPressureEquations(PressureMatrix& jacobian,
99 const BVector& weights,
100 const bool use_well_weights,
101 const int domainIndex)
const;
105 void assemble(
const double dt,
106 const Domain& domain);
108 void updateWellControls(
const Domain& domain);
110 void setupDomains(
const std::vector<Domain>& domains);
113 ConvergenceReport getWellConvergence(
const Domain& domain,
114 const std::vector<Scalar>& B_avg,
115 DeferredLogger& local_deferredLogger)
const;
119 void recoverWellSolutionAndUpdateWellState(
const BVector& x,
120 const int domainIdx);
123 int numLocalWells()
const 125 return wellModel_.numLocalWells();
129 int numLocalWellsEnd()
const 131 return wellModel_.numLocalWellsEnd();
135 BlackoilWellModel<TypeTag>& wellModel_;
137 void assembleWellEq(
const double dt,
138 const Domain& domain);
144 mutable BVector x_local_;
150 #include "BlackoilWellModelNldd_impl.hpp" Class for handling the blackoil well model.
Definition: ActionHandler.hpp:39
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
Representing a part of a grid, in a way suitable for performing local solves.
Definition: SubDomain.hpp:84
Class for handling the blackoil well model.
Definition: BlackoilModelProperties.hpp:32
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Class for handling the blackoil well model in a NLDD solver.
Definition: BlackoilWellModel.hpp:86
Definition: BlackoilWellModelNldd.hpp:40