16 #ifndef GEOS_PHYSICSSOLVERS_SEISMICITYRATEKERNELS_HPP_
17 #define GEOS_PHYSICSSOLVERS_SEISMICITYRATEKERNELS_HPP_
20 #include "common/GEOS_RAJA_Interface.hpp"
27 namespace seismicityRateKernels
51 m_R( subRegion.
getField< fields::inducedSeismicity::seismicityRate >() ),
52 m_logDenom( subRegion.
getField< fields::inducedSeismicity::logDenom >() ),
53 m_sigma_0( subRegion.
getField< fields::inducedSeismicity::initialProjectedNormalTraction >() ),
54 m_sigma_n( subRegion.
getField< fields::inducedSeismicity::projectedNormalTraction_n >() ),
55 m_sigma( subRegion.
getField< fields::inducedSeismicity::projectedNormalTraction >() ),
56 m_tau_0( subRegion.
getField< fields::inducedSeismicity::initialProjectedShearTraction >() ),
57 m_tau_n( subRegion.
getField< fields::inducedSeismicity::projectedShearTraction_n >() ),
58 m_tau( subRegion.
getField< fields::inducedSeismicity::projectedShearTraction >() )
71 real64 const backgroundStressingRate ):
72 directEffectValue( directEffect ),
73 backgroundStressingRateValue( backgroundStressingRate ),
74 effectiveNormalTraction_0( 0.0 ),
75 effectiveNormalTraction_n( 0.0 ),
76 effectiveNormalTraction( 0.0 )
79 real64 const directEffectValue;
81 real64 const backgroundStressingRateValue;
83 real64 effectiveNormalTraction_0;
85 real64 effectiveNormalTraction_n;
87 real64 effectiveNormalTraction;
94 stack.effectiveNormalTraction_0 = -m_sigma_0[k];
95 stack.effectiveNormalTraction_n = -m_sigma_n[k];
96 stack.effectiveNormalTraction = -m_sigma[k];
100 void computeSeismicityRate(
localIndex const k,
103 StackVariables & stack )
const
107 real64 const g = ( LvArray::math::abs( m_tau[k] ) + stack.backgroundStressingRateValue*(time_n+dt) ) / ( stack.directEffectValue*stack.effectiveNormalTraction ) -
108 LvArray::math::abs( m_tau_0[k] ) / (stack.directEffectValue * stack.effectiveNormalTraction_0 );
110 real64 const g_n = ( LvArray::math::abs( m_tau_n[k] ) + stack.backgroundStressingRateValue*time_n ) / ( stack.directEffectValue*stack.effectiveNormalTraction_n ) -
111 LvArray::math::abs( m_tau_0[k] ) / (stack.directEffectValue*stack.effectiveNormalTraction_0);
116 LvArray::math::log( 1 + dt/(2*(stack.directEffectValue*stack.effectiveNormalTraction_0/stack.backgroundStressingRateValue) ) *
117 ( LvArray::math::exp( g - m_logDenom[k] ) + LvArray::math::exp( g_n - m_logDenom[k] ) ));
120 m_R[k] = LvArray::math::exp( g - m_logDenom[k] );
150 m_pressure_0( subRegion.
getField< fields::flow::initialPressure >() ),
151 m_pressure_n( subRegion.
getField< fields::flow::pressure_n >() ),
152 m_pressure( subRegion.
getField< fields::flow::pressure >() )
159 stack.effectiveNormalTraction_0 = -m_sigma_0[k] - m_pressure_0[k];
160 stack.effectiveNormalTraction_n = -m_sigma_n[k] - m_pressure_n[k];
161 stack.effectiveNormalTraction = -m_sigma[k] - m_pressure[k];
178 template<
typename POLICY,
bool ISPORO >
183 real64 const directEffectValue,
184 real64 const backgroundStressingRateValue )
188 using kernelType = std::conditional_t< ISPORO, SeismicityRateKernelPoroelastic, SeismicityRateKernel >;
189 kernelType kernel( subRegion );
193 typename kernelType::StackVariables stack( directEffectValue, backgroundStressingRateValue );
194 kernel.setup( k, stack );
195 kernel.computeSeismicityRate( k, time_n, dt, stack );
#define GEOS_HOST_DEVICE
Marks a host-device function.
#define GEOS_MARK_FUNCTION
Mark function with both Caliper and NVTX if enabled.
GEOS_DECLTYPE_AUTO_RETURN getField() const
Get a view to the field associated with a trait from this ObjectManagerBase.
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
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).
Kernel variables located on the stack.