20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLSOLVERBASE_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLSOLVERBASE_HPP_
28 class DomainPartition;
30 class WellElementSubRegion;
51 Group *
const parent );
71 virtual Group *
createChild(
string const & childKey,
string const & childName )
override;
267 static constexpr
char const * fluidNamesString() {
return "fluidNames"; }
268 static constexpr
char const * isThermalString() {
return "isThermal"; }
269 static constexpr
char const * writeCSVFlagString() {
return "writeCSV"; }
307 virtual void printRates(
real64 const & time_n,
331 string const m_ratesOutputDir;
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Base class for all physics solvers.
This class describes the controls used to operate a well.
This class describes a collection of local well elements and perforations.
virtual string wellElementDofName() const =0
get the name of DOF defined on well elements
virtual void validateWellConstraints(real64 const &time_n, real64 const &dt, WellElementSubRegion const &subRegion)=0
Make sure that the well constraints are compatible.
virtual real64 updateSubRegionState(WellElementSubRegion &subRegion)=0
Recompute all dependent quantities from primary variables (including constitutive models)
virtual void computePerforationRates(real64 const &time_n, real64 const &dt, DomainPartition &domain)=0
Recompute the perforation rates for all the wells.
string m_flowSolverName
name of the flow solver
virtual void expandObjectCatalogs() override
Expand catalog for schema generation.
integer m_isThermal
flag indicating whether thermal formulation is used
virtual void updateState(DomainPartition &domain) override
Recompute all dependent quantities from primary variables (including constitutive models)
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
virtual localIndex numFluidPhases() const =0
Get the number of fluid phases.
integer m_numComponents
the number of fluid components
virtual Group * createChild(string const &childKey, string const &childName) override
creates a child group of of this PhysicsSolverBase instantiation
virtual void assembleAccumulationTerms(real64 const &time_n, real64 const &dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)=0
assembles the accumulation term for all the well elements
virtual void initializePostSubGroups() override
Called by Initialize() after to initializing sub-Groups.
string m_referenceFluidModelName
name of the fluid constitutive model used as a reference for component/phase description
integer m_numDofPerWellElement
the number of Degrees of Freedom per well element
static string coupledSolverAttributePrefix()
String used to form the solverName used to register single-physics solvers in CoupledSolver.
string const & getFlowSolverName() const
getter for the name of the flow solver (used in UpdateState)
virtual void assembleFluxTerms(real64 const &time_n, real64 const &dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)=0
assembles the flux terms for all connections between well elements
WellControls & getWellControls(WellElementSubRegion const &subRegion)
getter for the well controls associated to this well subRegion
localIndex numDofPerResElement() const
getter for the number of degrees of freedom per mesh element
virtual localIndex numFluidComponents() const =0
const getter for the number of fluid components
integer isThermal() const
getter for iso/thermal switch
virtual void postInputInitialization() override
integer m_writeCSV
rates output
WellControls const & getWellControls(WellElementSubRegion const &subRegion) const
const getter for the well controls associated to this well subRegion
integer m_keepVariablesConstantDuringInitStep
flag to freeze the initial state during initialization in coupled problems
virtual void initializeWells(DomainPartition &domain, real64 const &time_n, real64 const &dt)=0
Initialize all the primary and secondary variables in all the wells.
integer m_numDofPerResElement
the number of Degrees of Freedom per reservoir element
WellSolverBase(WellSolverBase &&)=default
default move constructor
virtual string resElementDofName() const =0
get the name of DOF defined on well elements
localIndex numDofPerWellElement() const
getter for the number of degrees of freedom per well element
WellSolverBase()=delete
deleted default constructor
WellSolverBase & operator=(WellSolverBase const &)=delete
deleted assignment operator
WellSolverBase(WellSolverBase const &)=delete
deleted copy constructor
virtual void assemblePressureRelations(real64 const &time_n, real64 const &dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)=0
assembles the pressure relations at all connections between well elements except at the well head
integer m_numPhases
the max number of fluid phases
void setFlowSolverName(string const &name)
setter for the name of the flow solver (needed to use the flow kernels like UpdateFluid)
virtual ~WellSolverBase() override
default destructor
WellSolverBase & operator=(WellSolverBase &&)=delete
deleted move operator
void setKeepVariablesConstantDuringInitStep(bool const keepVariablesConstantDuringInitStep)
Utility function to keep the well variables during a time step (used in poromechanics simulations)
virtual void assembleSystem(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
function to assemble the linear system matrix and rhs
WellSolverBase(const string &name, Group *const parent)
main constructor for Group Objects
virtual void registerDataOnMesh(Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
virtual void implicitStepSetup(real64 const &time_n, real64 const &dt, DomainPartition &domain) override
function to perform setup for implicit timestep
virtual void setupDofs(DomainPartition const &domain, DofManager &dofManager) const override
Populate degree-of-freedom manager with fields relevant to this solver.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
std::int32_t integer
Signed integer type.
Structure to hold scoped key names.