20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_THERMALDIRICHLETFLUXCOMPUTEKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_THERMALDIRICHLETFLUXCOMPUTEKERNEL_HPP
24 #include "constitutive/thermalConductivity/MultiPhaseThermalConductivityBase.hpp"
25 #include "constitutive/thermalConductivity/ThermalConductivityFields.hpp"
30 namespace thermalCompositionalMultiphaseFVMKernels
43 template<
typename FLUIDWRAPPER,
typename POLICY,
integer NUM_COMP,
integer NUM_DOF = NUM_COMP + 2 >
57 template<
typename VIEWTYPE >
61 using DofNumberAccessor = AbstractBase::DofNumberAccessor;
71 using AbstractBase::m_gravCoef;
73 using AbstractBase::m_dPhaseCompFrac;
81 using Base::m_dPhaseMob;
82 using Base::m_dPhaseMassDens;
87 using Base::m_faceTemp;
95 fields::multifluid::phaseEnthalpy,
96 fields::multifluid::dPhaseEnthalpy >;
100 fields::thermalconductivity::effectiveConductivity >;
127 FLUIDWRAPPER
const & fluidWrapper,
128 DofNumberAccessor
const & dofNumberAccessor,
139 BitFlags< isothermalCompositionalMultiphaseFVMKernels::KernelFlags > kernelFlags );
155 using Base::StackVariables::transmissibility;
220 template<
typename POLICY,
typename STENCILWRAPPER >
246 BitFlags< isothermalCompositionalMultiphaseFVMKernels::KernelFlags > kernelFlags,
247 string const & dofKey,
248 string const & solverName,
251 STENCILWRAPPER
const & stencilWrapper,
252 constitutive::MultiFluidBase & fluidBase,
#define GEOS_HOST_DEVICE
Marks a host-device function.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
A struct to automatically construct and store element view accessors.
A struct to automatically construct and store element view accessors.
Define the interface for the assembly kernel in charge of Dirichlet face flux terms.
arrayView1d< real64 const > const m_faceGravCoef
View on the face gravity coefficient.
Base class for FluxComputeKernel that holds all data not dependent on template parameters (like stenc...
real64 const m_dt
Time step size.
ElementViewConst< arrayView1d< globalIndex const > > const m_dofNumber
Views on dof numbers.
ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac
Views on phase component fractions.
globalIndex const m_rankOffset
Offset for my MPI rank.
ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const m_dCompFrac_dCompDens
Views on derivatives of comp fractions.
integer const m_numPhases
Number of fluid phases.
static constexpr integer numEqn
Compute time value for the number of equations (all of them, except the volume balance equation)
static constexpr integer numComp
Compile time value for the number of components.
ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const m_phaseMob
Views on phase mobilities.
STENCILWRAPPER::IndexContainerViewConstType const m_seri
Connection to element maps.
static constexpr integer numDof
Compute time value for the number of degrees of freedom.
BoundaryStencilWrapper const m_stencilWrapper
Reference to the stencil wrapper.
static void createAndLaunch(integer const numComps, integer const numPhases, globalIndex const rankOffset, BitFlags< isothermalCompositionalMultiphaseFVMKernels::KernelFlags > kernelFlags, string const &dofKey, string const &solverName, FaceManager const &faceManager, ElementRegionManager const &elemManager, STENCILWRAPPER const &stencilWrapper, constitutive::MultiFluidBase &fluidBase, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
Create a new kernel and launch.
Define the interface for the assembly kernel in charge of Dirichlet face flux terms.
void launchKernel(localIndex const numConnections)
Launch the kernel for a given number of connections.
ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseEnthalpy
Views on phase enthalpies.
GEOS_HOST_DEVICE void complete(localIndex const iconn, StackVariables &stack) const
Performs the complete phase for the kernel.
ElementViewConst< arrayView1d< real64 const > > const m_temp
Views on temperature.
ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based data. Consists entirely of ArrayView's.
ElementViewConst< arrayView3d< real64 const > > const m_thermalConductivity
View on thermal conductivity.
DirichletFluxComputeKernel(integer const numPhases, globalIndex const rankOffset, FaceManager const &faceManager, BoundaryStencilWrapper const &stencilWrapper, FLUIDWRAPPER const &fluidWrapper, DofNumberAccessor const &dofNumberAccessor, CompFlowAccessors const &compFlowAccessors, ThermalCompFlowAccessors const &thermalCompFlowAccessors, MultiFluidAccessors const &multiFluidAccessors, ThermalMultiFluidAccessors const &thermalMultiFluidAccessors, CapPressureAccessors const &capPressureAccessors, PermeabilityAccessors const &permeabilityAccessors, ThermalConductivityAccessors const &thermalConductivityAccessors, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, BitFlags< isothermalCompositionalMultiphaseFVMKernels::KernelFlags > kernelFlags)
Constructor for the kernel interface.
GEOS_HOST_DEVICE void computeFlux(localIndex const iconn, StackVariables &stack) const
Compute the local flux contributions to the residual and Jacobian.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
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.
Kernel variables (dof numbers, jacobian and residual) located on the stack.
Kernel variables (dof numbers, jacobian and residual) located on the stack.
real64 localFlux[numEqn]
Storage for the face local residual vector.
real64 localFluxJacobian[numEqn][numDof]
Storage for the face local Jacobian matrix.
globalIndex dofColIndices[numDof]
Indices of the matrix rows/columns corresponding to the dofs in this face.
real64 dEnergyFlux_dT
Derivative of energy fluxes wrt temperature.
real64 dCompFlux_dT[numComp]
Derivatives of component fluxes wrt temperature.
real64 dEnergyFlux_dP
Derivative of energy fluxes wrt pressure.
GEOS_HOST_DEVICE StackVariables(localIndex const size, localIndex numElems)
Constructor for the stack variables.
real64 dEnergyFlux_dC[numComp]
Derivatives of energy fluxes wrt component densities.
real64 energyFlux
Energy fluxes.