21 #ifndef GEOS_FIELDSPECIFICATION_AQUIFERBOUNDARYCONDITION_HPP
22 #define GEOS_FIELDSPECIFICATION_AQUIFERBOUNDARYCONDITION_HPP
64 : m_initialPressure( initialPressure ),
66 m_gravCoef( gravCoef ),
67 m_timeConstant( timeConstant ),
68 m_influxConstant( influxConstant ),
69 m_cumulativeFlux( cumulativeFlux ),
70 m_pressureInfluenceFunction( pressureInfluenceFunction )
88 real64 const & reservoirPressure,
89 real64 const & reservoirPressure_n,
90 real64 const & reservoirGravCoef,
91 real64 const & areaFraction,
92 real64 & dAquiferVolFlux_dPres )
const;
275 void setupDefaultPressureInfluenceFunction();
280 void computeTimeConstant();
285 void computeInfluxConstant();
303 integer m_allowAllPhasesIntoAquifer;
318 array1d<
string > m_phaseComponentNames;
321 real64 m_totalCompressibility;
345 string m_pressureInfluenceFunctionName;
352 compute(
real64 const & timeAtBeginningOfStep,
354 real64 const & reservoirPressure,
355 real64 const & reservoirPressure_n,
356 real64 const & reservoirGravCoef,
357 real64 const & areaFraction,
358 real64 & dAquiferVolFlux_dPres )
const
361 real64 const dimensionlessTimeAtBeginningOfStep = timeAtBeginningOfStep / m_timeConstant;
362 real64 const dimensionlessTimeAtEndOfStep = ( timeAtBeginningOfStep + dt ) / m_timeConstant;
365 real64 dPresInfluence_dTime = 0;
366 real64 const presInfluence = m_pressureInfluenceFunction.
compute( &dimensionlessTimeAtEndOfStep, &dPresInfluence_dTime );
369 real64 const potDiff = m_initialPressure - reservoirPressure_n - m_density * ( m_gravCoef - reservoirGravCoef );
372 real64 const timeConstantInv = 1.0 / m_timeConstant;
373 real64 const denom = presInfluence - dimensionlessTimeAtBeginningOfStep * dPresInfluence_dTime;
374 real64 const a = timeConstantInv * ( m_influxConstant * potDiff - m_cumulativeFlux * dPresInfluence_dTime ) / denom;
377 real64 const b = timeConstantInv * m_influxConstant / denom;
380 real64 const aquiferVolFlux = areaFraction * ( a - b * ( reservoirPressure - reservoirPressure_n ) );
381 dAquiferVolFlux_dPres = -areaFraction * b;
383 return aquiferVolFlux;
#define GEOS_HOST_DEVICE
Marks a host-device function.
KernelWrapper(real64 initialPressure, real64 density, real64 gravCoef, real64 timeConstant, real64 influxConstant, real64 cumulativeFlux, TableFunction::KernelWrapper pressureInfluenceFunction)
Constructor of the kernel wrapper.
GEOS_HOST_DEVICE real64 compute(real64 const &timeAtBeginningOfStep, real64 const &dt, real64 const &reservoirPressure, real64 const &reservoirPressure_n, real64 const &reservoirGravCoef, real64 const &areaFraction, real64 &dAquiferVolFlux_dPres) const
Compute the aquifer-reservoir volumetric flux.
real64 const & getWaterPhaseDensity() const
Getter for the aquifer water phase density.
static string catalogName()
Static Factory Catalog Functions.
bool allowAllPhasesIntoAquifer() const
Flag to allow all phases to flow into the aquifer.
void saveConvergedState(real64 const fluxIncrement)
Increment the cumulative flux for this aquifer.
AquiferBoundaryCondition & operator=(AquiferBoundaryCondition &&)=delete
deleted move assignment operator
void setGravityVector(R1Tensor const &gravityVector)
Setter for the R1Tensor storing the gravity vector.
AquiferBoundaryCondition(AquiferBoundaryCondition const &)=delete
deleted copy constructor
void setWaterPhaseIndex(integer const waterPhaseIndex)
Setter for the water phase index.
AquiferBoundaryCondition(AquiferBoundaryCondition &&)=default
defaulted move constructor
AquiferBoundaryCondition(string const &name, Group *parent)
constructor
integer getWaterPhaseIndex() const
Getter for the water phase index.
virtual void postInputInitialization() override final
KernelWrapper createKernelWrapper() const
Create the wrapper performing in-kernel aquifer flow rate computation.
arrayView1d< string const > getWaterPhaseComponentNames() const
Getter for the aquifer water phase component names.
AquiferBoundaryCondition & operator=(AquiferBoundaryCondition const &)=delete
deleted copy assignment operator
AquiferBoundaryCondition()=delete
deleted default constructor
arrayView1d< real64 const > getWaterPhaseComponentFraction() const
Getter for the aquifer water phase composition.
virtual ~AquiferBoundaryCondition()=default
default destructor
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.
Array< T, 1 > array1d
Alias for 1D array.
constexpr static char const * aquiferTotalCompressibilityString()
constexpr static char const * aquiferWaterPhaseComponentNamesString()
constexpr static char const * aquiferPermeabilityString()
constexpr static char const * aquiferInnerRadiusString()
constexpr static char const * aquiferAngleString()
constexpr static char const * aquiferWaterPhaseComponentFractionString()
constexpr static char const * aquiferElevationString()
constexpr static char const * aquiferInitialPressureString()
constexpr static char const * aquiferWaterViscosityString()
constexpr static char const * aquiferPorosityString()
constexpr static char const * cumulativeFluxString()
constexpr static char const * pressureInfluenceFunctionNameString()
constexpr static char const * allowAllPhasesIntoAquiferString()
constexpr static char const * aquiferWaterDensityString()
constexpr static char const * aquiferThicknessString()