20 #ifndef GEOS_PHYSICSSOLVERS_FINITEVOLUME_FLOWSOLVERBASE_HPP_
21 #define GEOS_PHYSICSSOLVERS_FINITEVOLUME_FLOWSOLVERBASE_HPP_
39 template<
typename VIEWTYPE >
53 Group *
const parent );
76 static constexpr
char const * isThermalString() {
return "isThermal"; }
77 static constexpr
char const * inputTemperatureString() {
return "temperature"; }
78 static constexpr
char const * allowNegativePressureString() {
return "allowNegativePressure"; }
79 static constexpr
char const * maxAbsolutePresChangeString() {
return "maxAbsolutePressureChange"; }
80 static constexpr
char const * maxSequentialPresChangeString() {
return "maxSequentialPressureChange"; }
81 static constexpr
char const * maxSequentialTempChangeString() {
return "maxSequentialTemperatureChange"; }
83 static constexpr
char const * fluidNamesString() {
return "fluidNames"; }
84 static constexpr
char const * solidNamesString() {
return "solidNames"; }
85 static constexpr
char const * permeabilityNamesString() {
return "permeabilityNames"; }
86 static constexpr
char const * solidInternalEnergyNamesString() {
return "solidInternalEnergyNames"; }
87 static constexpr
char const * thermalConductivityNamesString() {
return "thermalConductivityNames"; }
108 void updatePorosityAndPermeability( CellElementSubRegion & subRegion )
const;
110 virtual void updatePorosityAndPermeability( SurfaceElementSubRegion & subRegion )
const;
140 void enableLaggingFractureStencilWeightsUpdate(){ m_isLaggingFractureStencilWeightsUpdate = 1; };
147 real64 const & timeAtBeginningOfStep,
168 GEOS_UNUSED_VAR ( time_n, dt, domain, dofManager, localMatrix, localRhs, dR_dAper );
169 GEOS_ERROR(
"Poroelastic fluxes with conforming fractures not yet implemented." );
176 virtual void initializeThermalState( MeshLevel & mesh,
string_array const & regionNames ) {
GEOS_UNUSED_VAR( mesh, regionNames ); }
186 std::map< string, localIndex >
const & equilNameToEquilId,
201 std::map< string, localIndex >
const & bcNameToBcId,
233 virtual void precomputeData(
MeshLevel & mesh,
238 void checkDiscretizationName()
const;
278 real64 m_maxSequentialPresChange;
282 real64 m_maxSequentialTempChange;
302 static string conflictingComposition(
int comp,
string_view componentName,
306 static string invalidComponentIndex(
int comp,
309 static string notAppliedOnRegion(
int componentIndex,
string_view componentName,
313 static string generateMessage(
string_view baseMessage,
321 integer m_isLaggingFractureStencilWeightsUpdate;
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOS_ERROR(msg)
Raise a hard error and terminate the program.
Enumerates the Units that are in use in GEOS and regroups useful conversion and formatting functions.
Unit
Enumerator of available unit types for given physical scales. Units are in SI by default.
Provides management of the boundary stencil points (stencils used to prescribe boundary conditions on...
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...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
Class used for displaying boundary warning message.
virtual void saveSequentialIterationState(DomainPartition &domain) override
Utility function to save the iteration state (useful for sequential simulations)
virtual void initializePostInitialConditionsPreSubGroups() override
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
bool m_keepVariablesConstantDuringInitStep
flag to freeze the initial state during initialization in coupled problems
virtual void validatePoreVolumes(DomainPartition const &domain) const
Helper function to compute/report the elements with small pore volumes.
virtual units::Unit getMassUnit() const
virtual void registerDataOnMesh(Group &MeshBodies) override
Register wrappers that contain data on the mesh objects.
FlowSolverBase(FlowSolverBase &&)=default
default move constructor
FlowSolverBase & operator=(FlowSolverBase const &)=delete
deleted assignment operator
real64 m_sequentialPresChange
maximum (absolute) pressure change in a sequential iteration
void updateStencilWeights(DomainPartition &domain) const
Update the stencil weights by adding the contribution of the hydraulic aperture after the aperture is...
void computeSourceFluxSizeScalingFactor(real64 const &time, real64 const &dt, DomainPartition &domain, std::map< string, localIndex > const &bcNameToBcId, arrayView1d< globalIndex > const &bcAllSetsSize) const
For each source flux boundary condition, loop over all the target cells and sum the owned cells.
bool m_isFixedStressPoromechanicsUpdate
enable the fixed stress poromechanics update of porosity
void setKeepVariablesConstantDuringInitStep(bool const keepVariablesConstantDuringInitStep)
Utility function to keep the flow variables during a time step (used in poromechanics simulations)
FlowSolverBase & operator=(FlowSolverBase &&)=delete
deleted move operator
bool m_isJumpStabilized
enable pressure jump stabilzation for fixed-stress poromechanics
void prepareStencilWeights(DomainPartition &domain) const
Prepare the stencil weights by removing the contribution of the hydraulic aperture before the apertur...
FlowSolverBase(const string &name, Group *const parent)
main constructor for Group Objects
void findMinMaxElevationInEquilibriumTarget(DomainPartition &domain, std::map< string, localIndex > const &equilNameToEquilId, arrayView1d< real64 > const &maxElevation, arrayView1d< real64 > const &minElevation) const
For each equilibrium initial condition, loop over all the target cells and compute the min/max elevat...
virtual void setConstitutiveNamesCallSuper(ElementSubRegionBase &subRegion) const override
This function sets constitutive name fields on an ElementSubRegionBase, and calls the base function i...
FlowSolverBase(FlowSolverBase const &)=delete
deleted copy constructor
virtual void initializePreSubGroups() override
Called by Initialize() prior to initializing sub-Groups.
static string coupledSolverAttributePrefix()
String used to form the solverName used to register single-physics solvers in CoupledSolver.
integer m_allowNegativePressure
flag if negative pressure is allowed
integer m_isThermal
flag to determine whether or not this is a thermal simulation
real64 m_maxAbsolutePresChange
maximum (absolute) pressure change in a Newton iteration
virtual bool checkSequentialSolutionIncrements(DomainPartition &domain) const override
Check if the solution increments are ok to use.
void allowNegativePressure()
Function to activate the flag allowing negative pressure.
real64 m_sequentialTempChange
maximum (absolute) temperature change in a sequential iteration
FlowSolverBase()=delete
deleted default constructor
integer m_numDofPerCell
the number of Degrees of Freedom per cell
virtual void assembleHydrofracFluxTerms(real64 const time_n, real64 const dt, DomainPartition const &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, CRSMatrixView< real64, localIndex const > const &dR_dAper)
assembles the flux terms for all cells for the hydrofracture case
virtual void saveAquiferConvergedState(real64 const &time, real64 const &dt, DomainPartition &domain)
Increment the cumulative flux from each aquifer.
virtual void saveConvergedState(ElementSubRegionBase &subRegion) const
Utility function to save the converged state.
real64 m_inputTemperature
the input temperature
Class facilitating the representation of a multi-level discretization of a MeshBody.
Base class for all physics solvers.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
stdVector< string > string_array
A 1-dimensional array of geos::string types.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.
std::string_view string_view
String type.
Structure to hold scoped key names.