20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_SINGLEPHASEWELL_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_SINGLEPHASEWELL_HPP_
25 #include "constitutive/fluid/singlefluid/SingleFluidLayouts.hpp"
30 namespace dataRepository
35 namespace constitutive
37 class SingleFluidBase;
39 class WellElementSubRegion;
50 using DerivOffset = constitutive::singlefluid::DerivativeOffsetC< 1 >;
57 Group *
const parent );
102 calculateWellResidualNorm(
real64 const & time_n,
118 real64 const scalingFactor )
override;
124 real64 const scalingFactor )
override;
127 applyWellSystemSolution(
DofManager const & dofManager,
129 real64 const scalingFactor,
137 real64 const scalingFactor,
288 virtual void assembleWellConstraintTerms(
real64 const & time_n,
296 virtual void assembleWellPressureRelations(
real64 const & time_n,
328 void shutDownWell(
real64 const time_n,
335 static constexpr
char const * dofFieldString() {
return "singlePhaseWellVars"; }
338 static constexpr
char const * currentBHPString() {
return "currentBHP"; }
339 static constexpr
char const * dCurrentBHPString() {
return "dCurrentBHP"; }
340 static constexpr
char const * currentVolRateString() {
return "currentVolumetricRate"; }
341 static constexpr
char const * dCurrentVolRateString() {
return "dCurrentVolRate"; }
350 void printRates(
real64 const & time_n,
374 virtual void validateWellConstraints(
real64 const & time_n,
379 virtual bool evaluateConstraints(
real64 const & time_n ,
393 void createSeparator();
#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...
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
Class facilitating the representation of a multi-level discretization of a MeshBody.
void assembleVolumeBalanceTerms(DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
assembles the volume balance terms for all well elements
virtual real64 updateSubRegionState(WellElementSubRegion &subRegion) override
Recompute all dependent quantities from primary variables (including constitutive models) on the well...
virtual string resElementDofName() const override
get the name of DOF defined on well elements
virtual void assembleWellAccumulationTerms(real64 const &time, real64 const &dt, WellElementSubRegion &subRegion, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
assembles the accumulation term for all the well elements
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
virtual string wellElementDofName() const override
get the name of DOF defined on well elements
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
SinglePhaseWell(const string &name, Group *const parent)
main constructor for Group Objects
virtual ~SinglePhaseWell() override=default
default destructor
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) override
assembles the pressure relations at all connections between well elements except at the well head
static string catalogName()
name of the node manager in the object catalog
virtual void calculateReferenceElementRates(WellElementSubRegion &subRegion)
Recompute the volumetric rate that are used in the well constraints.
SinglePhaseWell & operator=(SinglePhaseWell const &)=delete
deleted assignment operator
SinglePhaseWell(SinglePhaseWell const &)=delete
deleted copy constructor
virtual void updateState(DomainPartition &domain) override
Recompute all dependent quantities from primary variables (including constitutive models)
virtual real64 updateWellState(WellElementSubRegion &subRegion) override
Recompute all dependent quantities from primary variables (including constitutive models)
virtual void updateFluidModel(WellElementSubRegion &subRegion) const
Update fluid constitutive model state.
SinglePhaseWell(SinglePhaseWell &&)=default
default move constructor
integer m_allowNegativePressure
flag if negative pressure is allowed
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) override
assembles the flux terms for all connections between well elements
void updateSeparator(WellElementSubRegion &subRegion)
Update separator model state.
virtual localIndex numFluidComponents() const override
const getter for the number of fluid components
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) override
assembles the accumulation term for all the well elements
virtual void registerDataOnMesh(Group &meshBodies) override
Register wrappers that contain data on the mesh objects.
SinglePhaseWell & operator=(SinglePhaseWell &&)=delete
deleted move operator
string getCatalogName() const override
virtual void computePerforationRates(real64 const &time_n, real64 const &dt, DomainPartition &domain) override
Recompute the perforation rates for all the wells.
virtual void assembleWellFluxTerms(real64 const &time, real64 const &dt, WellElementSubRegion const &subRegion, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
assembles the flux terms for all connections between well elements
virtual localIndex numFluidPhases() const override
Get the number of fluid phases.
virtual void updateBHPForConstraint(WellElementSubRegion &subRegion)
Recompute the BHP pressure that is used in the well constraints.
SinglePhaseWell()=delete
deleted default constructor
This class describes a collection of local well elements and perforations.
virtual void implicitStepComplete(real64 const &time, real64 const &dt, DomainPartition &domain) override
perform cleanup for implicit timestep
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override
reset state of physics back to the beginning of the step.
virtual void implicitStepSetup(real64 const &time, real64 const &dt, DomainPartition &domain) override
function to perform setup for implicit timestep
virtual void applySystemSolution(DofManager const &dofManager, arrayView1d< real64 const > const &localSolution, real64 const scalingFactor, real64 const dt, DomainPartition &domain) override
Function to apply the solution vector to the state.
virtual real64 calculateResidualNorm(real64 const &time_n, real64 const &dt, DomainPartition const &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localRhs) override
calculate the norm of the global system residual
virtual bool checkSystemSolution(DomainPartition &domain, DofManager const &dofManager, arrayView1d< real64 const > const &localSolution, real64 const scalingFactor) override
Function to check system solution for physical consistency and constraint violation.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
LvArray::CRSMatrixView< T, COL_INDEX, INDEX_TYPE const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
int integer
Signed integer type.