20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORTKERNELS_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORTKERNELS_HPP_
24 #include "common/GEOS_RAJA_Interface.hpp"
25 #include "constitutive/fluid/singlefluid/SingleFluidFields.hpp"
26 #include "constitutive/fluid/singlefluid/ParticleFluidBase.hpp"
27 #include "constitutive/fluid/singlefluid/ParticleFluidFields.hpp"
28 #include "constitutive/fluid/singlefluid/SlurryFluidBase.hpp"
29 #include "constitutive/fluid/singlefluid/SlurryFluidFields.hpp"
30 #include "constitutive/permeability/PermeabilityBase.hpp"
31 #include "constitutive/permeability/PermeabilityFields.hpp"
41 namespace proppantTransportKernels
47 template<
typename FLUID_WRAPPER >
48 static void launch( FLUID_WRAPPER
const & fluidWrapper,
54 localIndex const NC = fluidWrapper.numFluidComponents();
59 compConc[c] = componentConcentration[a][c];
62 for(
localIndex q = 0; q < fluidWrapper.numGauss(); ++q )
64 fluidWrapper.updateFluidProperty( a, q,
77 template<
typename FLUID_WRAPPER >
78 static void launch( FLUID_WRAPPER
const & fluidWrapper,
84 localIndex const NC = fluidWrapper.numFluidComponents();
89 compConc[c] = componentConcentration[a][c];
92 for(
localIndex q = 0; q < fluidWrapper.numGauss(); ++q )
94 fluidWrapper.updateComponentDensity( a, q,
106 template<
typename PROPPANT_WRAPPER >
107 static void launch( PROPPANT_WRAPPER
const & proppantWrapper,
119 proppantWrapper.update( a,
122 dFluidDens_dPres[a][0],
123 dFluidDens_dCompConc[a][0],
125 dFluidVisc_dPres[a][0],
126 dFluidVisc_dCompConc[a][0] );
140 real64 const proppantConc_n,
141 real64 const proppantConcNew,
147 real64 const packPoreVolume,
148 real64 const proppantLiftVolume,
169 real64 const maxProppantConcentration,
181 fields::flow::pressure,
182 fields::flow::gravityCoefficient,
183 fields::proppant::proppantConcentration,
184 fields::proppant::isProppantMobile >;
188 fields::flow::gravityCoefficient,
193 fields::particlefluid::settlingFactor,
194 fields::particlefluid::dSettlingFactor_dPressure,
195 fields::particlefluid::dSettlingFactor_dProppantConcentration,
196 fields::particlefluid::dSettlingFactor_dComponentConcentration,
197 fields::particlefluid::collisionFactor,
198 fields::particlefluid::dCollisionFactor_dProppantConcentration >;
202 fields::singlefluid::density,
203 fields::singlefluid::dDensity_dPressure,
204 fields::slurryfluid::dDensity_dProppantConcentration,
205 fields::slurryfluid::dDensity_dComponentConcentration,
206 fields::singlefluid::viscosity,
207 fields::singlefluid::dViscosity_dPressure,
208 fields::slurryfluid::dViscosity_dProppantConcentration,
209 fields::slurryfluid::dViscosity_dComponentConcentration,
210 fields::slurryfluid::componentDensity,
211 fields::slurryfluid::dComponentDensity_dPressure,
212 fields::slurryfluid::dComponentDensity_dComponentConcentration,
213 fields::slurryfluid::fluidDensity,
214 fields::slurryfluid::dFluidDensity_dPressure,
215 fields::slurryfluid::dFluidDensity_dComponentConcentration >;
219 fields::singlefluid::density,
220 fields::singlefluid::viscosity >;
224 fields::permeability::permeability,
225 fields::permeability::permeabilityMultiplier >;
234 template<
typename VIEWTYPE >
237 template<
typename VIEWTYPE >
245 integer const updateProppantPacking,
297 template< localIndex MAX_NUM_FLUX_ELEMS >
327 real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS],
328 real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS],
329 real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS],
335 template< localIndex MAX_NUM_FLUX_ELEMS >
338 computeCellBasedFlux(
localIndex const numElems,
345 real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS],
346 real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS],
347 real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS],
358 fields::proppant::cellBasedFlux,
359 fields::proppant::isProppantMobile,
360 fields::proppant::isProppantBoundary >;
367 fields::singlefluid::density,
368 fields::slurryfluid::fluidDensity,
369 fields::slurryfluid::fluidViscosity >;
372 template<
typename VIEWTYPE >
375 template<
typename VIEWTYPE >
381 real64 const proppantDensity,
382 real64 const proppantDiameter,
383 real64 const maxProppantConcentration,
385 real64 const criticalShieldsNumber,
386 real64 const fricitonCoefficient,
405 real64 const maxProppantConcentration,
415 computeProppantPackVolume(
localIndex const numElems,
417 real64 const proppantDensity,
418 real64 const proppantDiameter,
419 real64 const maxProppantConcentration,
421 real64 const criticalShieldsNumber,
422 real64 const frictionCoefficient,
445 updateProppantPackVolume(
localIndex const numElems,
450 real64 const maxProppantConcentration,
478 real64 const minNormalizer )
490 LinfStackVariables & stack )
const override
496 if( valMass > stack.localValue[0] )
498 stack.localValue[0] = valMass;
505 L2StackVariables & stack )
const override
511 stack.localNormalizer[0] += normalizer;
544 template<
typename POLICY >
549 string const & dofKey,
552 real64 const minNormalizer,
553 real64 (& residualNorm)[1],
554 real64 (& residualNormalizer)[1] )
560 numComp, subRegion, minNormalizer );
561 if( normType == physicsSolverBaseKernels::NormType::Linf )
563 ResidualNormKernel::launchLinf< POLICY >( subRegion.
size(), kernel, residualNorm );
567 ResidualNormKernel::launchL2< POLICY >( subRegion.
size(), kernel, residualNorm, residualNormalizer );
#define GEOS_HOST_DEVICE
Marks a host-device function.
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
NormType
Type of norm used to check convergence TODO: find a way to put this inside the class.
typename ElementViewAccessor< VIEWTYPE >::NestedViewType ElementView
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
arrayView1d< real64 const > getElementVolume() const
Get the volume of each element in this subregion.
array1d< integer > const & ghostRank()
Get the ghost information of each object.
A struct to automatically construct and store element view accessors.
A struct to automatically construct and store element view accessors.
Provides management of the interior stencil points for a face elements when using Two-Point flux appr...
Provides access to the SurfaceElementStencil that may be called from a kernel function.
GEOS_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
Define the base interface for the residual calculations.
real64 const m_minNormalizer
Value used to make sure that normalizers are never zero.
arrayView1d< globalIndex const > const m_dofNumber
View on the dof numbers.
GEOS_HOST_DEVICE integer ghostRank(localIndex const i) const
Getter for the ghost rank.
globalIndex const m_rankOffset
Offset for my MPI rank.
arrayView1d< real64 const > const m_localResidual
View on the local residual.
static void createAndLaunch(physicsSolverBaseKernels::NormType const normType, integer const numComp, globalIndex const rankOffset, string const &dofKey, arrayView1d< real64 const > const &localResidual, ElementSubRegionBase const &subRegion, real64 const minNormalizer, real64(&residualNorm)[1], real64(&residualNormalizer)[1])
Create a new kernel and launch.
virtual GEOS_HOST_DEVICE void computeL2(localIndex const ei, L2StackVariables &stack) const override
Compute the local values and normalizer for the L2 norm.
integer const m_numComp
Number of fluid components.
virtual GEOS_HOST_DEVICE void computeLinf(localIndex const ei, LinfStackVariables &stack) const override
Compute the local values for the Linf norm.
arrayView1d< real64 const > const m_volume
View on the element volume.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
StackArray< T, 1, MAXSIZE > stackArray1d
Alias for 1D stack array.
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.
std::int32_t integer
Signed integer type.
ArrayView< T, 4, USD > arrayView4d
Alias for 4D array view.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.
Trait struct for elementAperture data.
Trait struct for elementVolume data.
Trait struct for ghostRank data.
typename ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based non-constitutive data parameters. Consists entirely of ArrayView's.
static GEOS_HOST_DEVICE void computeJunction(localIndex const numElems, localIndex const numDofPerCell, arraySlice1d< localIndex const > const &stencilElementIndices, arrayView1d< real64 const > const &pres, arrayView1d< real64 const > const &proppantConc, arrayView3d< real64 const > const &componentDens, arrayView3d< real64 const > const &dComponentDens_dPres, arrayView4d< real64 const > const &dComponentDens_dComponentConc, arrayView1d< real64 const > const &gravDepth, arrayView2d< real64 const > const &dens, arrayView2d< real64 const > const &dDens_dPres, arrayView2d< real64 const > const &dDens_dProppantConc, arrayView3d< real64 const > const &dDens_dComponentConc, arrayView2d< real64 const > const &visc, arrayView2d< real64 const > const &dVisc_dPres, arrayView2d< real64 const > const &dVisc_dProppantConc, arrayView3d< real64 const > const &dVisc_dComponentConc, arrayView2d< real64 const > const &fluidDensity, arrayView2d< real64 const > const &dFluidDens_dPres, arrayView3d< real64 const > const &dFluidDens_dComponentConc, arrayView1d< real64 const > const &settlingFactor, arrayView1d< real64 const > const &dSettlingFactor_dPres, arrayView1d< real64 const > const &dSettlingFactor_dProppantConc, arrayView2d< real64 const > const &dSettlingFactor_dComponentConc, arrayView1d< real64 const > const &collisionFactor, arrayView1d< real64 const > const &dCollisionFactor_dProppantConc, arrayView1d< integer const > const &isProppantMobile, real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS], real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS], real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS], real64 const dt, arraySlice1d< real64 > const &localFlux, arraySlice2d< real64 > const &localFluxJacobian)
Compute flux and its derivatives for a given multi-element connector.