20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_THERMALPHASEMOBILITYKERNEL_HPP 
   21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_THERMALPHASEMOBILITYKERNEL_HPP 
   28 namespace thermalCompositionalMultiphaseFVMKernels
 
   39 template< 
integer NUM_COMP, 
integer NUM_PHASE >
 
   46   using Base::m_dPhaseVolFrac;
 
   47   using Base::m_dPhaseMob;
 
   49   using Base::m_dPhaseDens;
 
   51   using Base::m_dPhaseVisc;
 
   52   using Base::m_dPhaseRelPerm_dPhaseVolFrac;
 
   61                        constitutive::MultiFluidBase 
const & fluid,
 
   62                        constitutive::RelativePermeabilityBase 
const & relperm )
 
   63     : 
Base( subRegion, fluid, relperm )
 
   74     using Deriv = constitutive::multifluid::DerivativeOffset;
 
   77     arraySlice2d< 
real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > 
const dPhaseDens = m_dPhaseDens[ei][0];
 
   79     arraySlice2d< 
real64 const, constitutive::multifluid::USD_PHASE_DC - 2 > 
const dPhaseVisc = m_dPhaseVisc[ei][0];
 
   80     arraySlice2d< 
real64 const, constitutive::relperm::USD_RELPERM_DS - 2 > 
const dPhaseRelPerm_dPhaseVolFrac = m_dPhaseRelPerm_dPhaseVolFrac[ei][0];
 
   81     arraySlice2d< 
real64 const, compflow::USD_PHASE_DC - 1 > 
const dPhaseVolFrac = m_dPhaseVolFrac[ei];
 
   91         dRelPerm_dT += dPhaseRelPerm_dPhaseVolFrac[ip][jp] * dPhaseVolFrac[jp][Deriv::dT];
 
   95       dPhaseMob[Deriv::dT] = dRelPerm_dT * phaseDens[ip] / phaseVisc[ip]
 
   96                              + phaseMob * (dPhaseDens[ip][Deriv::dT] / phaseDens[ip] - dPhaseVisc[ip][Deriv::dT] / phaseVisc[ip] );
 
  118   template< 
typename POLICY >
 
  123                    constitutive::MultiFluidBase 
const & fluid,
 
  124                    constitutive::RelativePermeabilityBase 
const & relperm )
 
  128       isothermalCompositionalMultiphaseBaseKernels::
 
  129         internal::kernelLaunchSelectorCompSwitch( numComp, [&] ( 
auto NC )
 
  131         integer constexpr NUM_COMP = NC();
 
  136     else if( numPhase == 3 )
 
  138       isothermalCompositionalMultiphaseBaseKernels::
 
  139         internal::kernelLaunchSelectorCompSwitch( numComp, [&] ( 
auto NC )
 
  141         integer constexpr NUM_COMP = NC();
 
#define GEOS_HOST_DEVICE
Marks a host-device function.
 
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
 
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
 
Define the base interface for the property update kernels.
 
Defines the interface for the property kernel in charge of computing the phase mobilities.
 
arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseDens
Views on the phase densities.
 
arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > m_phaseVisc
Views on the phase viscosities.
 
static constexpr integer numPhase
Compile time value for the number of phases.
 
GEOS_HOST_DEVICE void compute(localIndex const ei, FUNC &&phaseMobilityKernelOp=NoOpFunc{}) const
Compute the phase mobilities in an element.
 
static void createAndLaunch(integer const numComp, integer const numPhase, ObjectManagerBase &subRegion, constitutive::MultiFluidBase const &fluid, constitutive::RelativePermeabilityBase const &relperm)
Create a new kernel and launch.
 
Define the interface for the property kernel in charge of computing the phase mobilities.
 
PhaseMobilityKernel(ObjectManagerBase &subRegion, constitutive::MultiFluidBase const &fluid, constitutive::RelativePermeabilityBase const &relperm)
Constructor.
 
GEOS_HOST_DEVICE void compute(localIndex const ei) const
Compute the phase mobilities in an element.
 
ArraySlice< T, 2, USD > arraySlice2d
Alias for 2D array slice.
 
double real64
64-bit floating point type.
 
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
 
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
 
int integer
Signed integer type.