https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
LinearWCNSFV2PMomentumDriftFlux Class Reference

Adds drift flux kernel coming for two-phase mixture model for the linear finite volume discretization. More...

#include <LinearWCNSFV2PMomentumDriftFlux.h>

Inheritance diagram for LinearWCNSFV2PMomentumDriftFlux:
[legend]

Public Types

enum  ResidualTagType { ResidualTagType::NonReference, ResidualTagType::Reference }
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 LinearWCNSFV2PMomentumDriftFlux (const InputParameters &params)
 
virtual Real computeElemMatrixContribution () override
 
virtual Real computeNeighborMatrixContribution () override
 
virtual Real computeElemRightHandSideContribution () override
 
virtual Real computeNeighborRightHandSideContribution () override
 
virtual Real computeBoundaryMatrixContribution (const LinearFVBoundaryCondition &) override
 
virtual Real computeBoundaryRHSContribution (const LinearFVBoundaryCondition &bc) override
 
virtual void setupFaceData (const FaceInfo *face_info) override
 Set the current FaceInfo object. More...
 
virtual void addMatrixContribution () override
 
virtual void addRightHandSideContribution () override
 
virtual bool hasFaceSide (const FaceInfo &fi, bool fi_elem_side) const override
 
void setCurrentFaceArea (const Real area)
 
virtual const MooseLinearVariableFV< Real > & variable () const override
 
void linkTaggedVectorsAndMatrices (const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void subdomainSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 
unsigned long getRandomLong () const
 
Real getRandomReal () const
 
unsigned int getSeed (std::size_t id)
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
virtual void meshChanged ()
 
void useVectorTag (const TagName &tag_name, VectorTagsKey)
 
void useVectorTag (TagID tag_id, VectorTagsKey)
 
void useMatrixTag (const TagName &tag_name, MatrixTagsKey)
 
void useMatrixTag (TagID tag_id, MatrixTagsKey)
 
bool isVectorTagged ()
 
bool isMatrixTagged ()
 
bool hasVectorTags () const
 
const std::set< TagID > & getVectorTags (VectorTagsKey) const
 
const std::set< TagID > & getMatrixTags (MatrixTagsKey) const
 
const std::vector< SubdomainName > & blocks () const
 
unsigned int numBlocks () const
 
virtual const std::set< SubdomainID > & blockIDs () const
 
unsigned int blocksMaxDimension () const
 
bool hasBlocks (const SubdomainName &name) const
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 
bool hasBlocks (const std::set< SubdomainName > &names) const
 
bool hasBlocks (SubdomainID id) const
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 
bool hasBlockMaterialProperty (const std::string &prop_name)
 
const std::set< SubdomainID > & meshBlockIDs () const
 
virtual bool blockRestricted () const
 
virtual void checkVariable (const MooseVariableFieldBase &variable) const
 
MooseVariableBasemooseVariableBase () const
 
MooseVariableField< Real > & mooseVariableField ()
 
MooseVariableFE< Real > * mooseVariable () const
 
MooseVariableFV< Real > * mooseVariableFV () const
 
MooseLinearVariableFV< Real > * mooseLinearVariableFV () const
 
const std::set< MooseVariableFieldBase *> & getMooseVariableDependencies () const
 
std::set< MooseVariableFieldBase *> checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 
std::set< MooseVariableFieldBase *> checkVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
Moose::FaceArg makeFace (const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
 
Moose::FaceArg makeCDFace (const FaceInfo &fi, const bool correct_skewness=false) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 
static void setRMParamsAdvection (const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
 
static void setRMParamsDiffusion (const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
 

Public Attributes

const ConsoleStream _console
 

Protected Member Functions

Real computeInternalAdvectionElemMatrixContribution ()
 Computes the matrix contribution of the advective flux on the element side of current face when the face is an internal face (doesn't have associated boundary conditions). More...
 
Real computeInternalAdvectionNeighborMatrixContribution ()
 Computes the matrix contribution of the advective flux on the neighbor side of current face when the face is an internal face (doesn't have associated boundary conditions). More...
 
void computeFlux ()
 Compute the face flux. More...
 
std::string deduceFunctorName (const std::string &name) const
 
Moose::FaceArg singleSidedFaceArg (const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
 
virtual void addUserObjectDependencyHelper (const UserObject &) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTagNeighbor (Assembly &assembly, unsigned int ivar)
 
void prepareVectorTagLower (Assembly &assembly, unsigned int ivar)
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar, DenseMatrix< Number > &k) const
 
void prepareMatrixTagNonlocal (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type, DenseMatrix< Number > &k) const
 
void prepareMatrixTagLower (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::ConstraintJacobianType type)
 
void accumulateTaggedLocalResidual ()
 
void assignTaggedLocalResidual ()
 
void accumulateTaggedLocalMatrix ()
 
void accumulateTaggedLocalMatrix (Assembly &assembly, unsigned int ivar, unsigned int jvar, const DenseMatrix< Number > &k)
 
void accumulateTaggedLocalMatrix (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type, const DenseMatrix< Number > &k)
 
void accumulateTaggedNonlocalMatrix ()
 
void assignTaggedLocalMatrix ()
 
void addResiduals (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResiduals (Assembly &assembly, const DenseVector< T > &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResiduals (Assembly &assembly, const ADResidualsPacket &packet)
 
void addResidualsAndJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResidualsAndJacobian (Assembly &assembly, const ADResidualsPacket &packet)
 
void addJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobian (Assembly &assembly, const ADResidualsPacket &packet)
 
void addJacobian (Assembly &assembly, DenseMatrix< Real > &local_k, const std::vector< dof_id_type > &row_indices, const std::vector< dof_id_type > &column_indices, Real scaling_factor)
 
void addResidualsWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResidualsAndJacobianWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobianWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobianElement (Assembly &assembly, Real value, dof_id_type row_index, dof_id_type column_index, Real scaling_factor)
 
void setResidual (SystemBase &sys, const T &residual, MooseVariableFE< T > &var)
 
void setResidual (SystemBase &sys, Real residual, dof_id_type dof_index)
 
void setResidual (SystemBase &sys, SetResidualFunctor set_residual_functor)
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
virtual const OutputTools< Real >::VariableValuevalue ()
 
virtual const OutputTools< Real >::VariableValuevalueOld ()
 
virtual const OutputTools< Real >::VariableValuevalueOlder ()
 
virtual const OutputTools< Real >::VariableValuedot ()
 
virtual const OutputTools< Real >::VariableValuedotDot ()
 
virtual const OutputTools< Real >::VariableValuedotOld ()
 
virtual const OutputTools< Real >::VariableValuedotDotOld ()
 
virtual const VariableValuedotDu ()
 
virtual const VariableValuedotDotDu ()
 
virtual const OutputTools< Real >::VariableGradientgradient ()
 
virtual const OutputTools< Real >::VariableGradientgradientOld ()
 
virtual const OutputTools< Real >::VariableGradientgradientOlder ()
 
virtual const OutputTools< Real >::VariableSecondsecond ()
 
virtual const OutputTools< Real >::VariableSecondsecondOld ()
 
virtual const OutputTools< Real >::VariableSecondsecondOlder ()
 
virtual const OutputTools< Real >::VariableTestSecondsecondTest ()
 
virtual const OutputTools< Real >::VariableTestSecondsecondTestFace ()
 
virtual const OutputTools< Real >::VariablePhiSecondsecondPhi ()
 
virtual const OutputTools< Real >::VariablePhiSecondsecondPhiFace ()
 

Protected Attributes

const unsigned int _dim
 The dimension of the simulation. More...
 
const RhieChowMassFlux_mass_flux_provider
 The Rhie-Chow user object that provides us with the face velocity. More...
 
const Moose::Functor< Real > & _rho_d
 Dispersed phase density. More...
 
const Moose::Functor< Real > & _f_d
 Dispersed phase fraction. More...
 
const Moose::Functor< Real > & _u_slip
 slip velocity in direction x More...
 
const Moose::Functor< Real > *const _v_slip
 slip velocity in direction y More...
 
const Moose::Functor< Real > *const _w_slip
 slip velocity in direction z More...
 
const unsigned int _index
 The index of the momentum component. More...
 
const Moose::FV::InterpMethod _density_interp_method
 The face interpolation method for the density. More...
 
Real _face_flux
 Face flux. More...
 
std::pair< Real, Real_velocity_interp_coeffs
 Advected coefficients. More...
 
const FaceInfo_current_face_info
 
Real _current_face_area
 
FaceInfo::VarFaceNeighbors _current_face_type
 
bool _cached_matrix_contribution
 
bool _cached_rhs_contribution
 
const bool _force_boundary_execution
 
DenseVector< dof_id_type_dof_indices
 
DenseMatrix< Real_matrix_contribution
 
DenseVector< Real_rhs_contribution
 
MooseLinearVariableFV< Real > & _var
 
const unsigned int _var_num
 
const unsigned int _sys_num
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
libMesh::LinearImplicitSystem_linear_system
 
const THREAD_ID _tid
 
MooseMesh_mesh
 
std::vector< NumericVector< Number > *> _vectors
 
std::vector< SparseMatrix< Number > *> _matrices
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real_t
 
const Real_t_old
 
int_t_step
 
Real_dt
 
Real_dt_old
 
bool _is_transient
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
SubProblem_subproblem
 
DenseVector< Number_local_re
 
DenseMatrix< Number_local_ke
 
DenseMatrix< Number_nonlocal_ke
 
const MaterialData_blk_material_data
 
bool _nodal
 
MooseVariableFE< Real > * _variable
 
MooseVariableFV< Real > * _fv_variable
 
MooseLinearVariableFV< Real > * _linear_fv_variable
 
MooseVariableField< Real > * _field_variable
 
Assembly_mvi_assembly
 
const Parallel::Communicator & _communicator
 

Detailed Description

Adds drift flux kernel coming for two-phase mixture model for the linear finite volume discretization.

Definition at line 22 of file LinearWCNSFV2PMomentumDriftFlux.h.

Constructor & Destructor Documentation

◆ LinearWCNSFV2PMomentumDriftFlux()

LinearWCNSFV2PMomentumDriftFlux::LinearWCNSFV2PMomentumDriftFlux ( const InputParameters params)

Definition at line 49 of file LinearWCNSFV2PMomentumDriftFlux.C.

50  : LinearFVFluxKernel(params),
52  _mass_flux_provider(getUserObject<RhieChowMassFlux>("rhie_chow_user_object")),
53  _rho_d(getFunctor<Real>("rho_d")),
54  _f_d(getFunctor<Real>("fd")),
55  _u_slip(getFunctor<Real>("u_slip")),
56  _v_slip(isParamValid("v_slip") ? &getFunctor<Real>("v_slip") : nullptr),
57  _w_slip(isParamValid("w_slip") ? &getFunctor<Real>("w_slip") : nullptr),
58  _index(getParam<MooseEnum>("momentum_component")),
60  Moose::FV::selectInterpolationMethod(getParam<MooseEnum>("density_interp_method")))
61 {
62  if (_dim >= 2 && !_v_slip)
63  mooseError("In two or more dimensions, the v_slip velocity must be supplied using the 'v_slip' "
64  "parameter");
65  if (_dim >= 3 && !_w_slip)
66  mooseError(
67  "In three dimensions, the w_slip velocity must be supplied using the 'w_slip' parameter");
68 
69  // Note that since this is used in a segregated solver at this time, we don't need to declare
70  // that this kernel may depend on a phase fraction variable
71 }
virtual MooseMesh & mesh()=0
const Moose::Functor< Real > & _rho_d
Dispersed phase density.
SubProblem & _subproblem
const unsigned int _index
The index of the momentum component.
const Moose::Functor< Real > & _u_slip
slip velocity in direction x
const Moose::Functor< Real > *const _v_slip
slip velocity in direction y
bool isParamValid(const std::string &name) const
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
const Moose::Functor< Real > & _f_d
Dispersed phase fraction.
virtual unsigned int dimension() const
const Moose::FV::InterpMethod _density_interp_method
The face interpolation method for the density.
LinearFVFluxKernel(const InputParameters &params)
void mooseError(Args &&... args) const
const Moose::Functor< Real > *const _w_slip
slip velocity in direction z
InterpMethod selectInterpolationMethod(const std::string &interp_method)
const unsigned int _dim
The dimension of the simulation.

Member Function Documentation

◆ computeBoundaryMatrixContribution()

virtual Real LinearWCNSFV2PMomentumDriftFlux::computeBoundaryMatrixContribution ( const LinearFVBoundaryCondition )
inlineoverridevirtual

Implements LinearFVFluxKernel.

Definition at line 36 of file LinearWCNSFV2PMomentumDriftFlux.h.

37  {
38  return 0;
39  }

◆ computeBoundaryRHSContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeBoundaryRHSContribution ( const LinearFVBoundaryCondition bc)
overridevirtual

Implements LinearFVFluxKernel.

Definition at line 162 of file LinearWCNSFV2PMomentumDriftFlux.C.

164 {
165  // Lagging the whole term for now
166  // TODO: make sure this only gets called once, and not once per BC
167  return -_face_flux * _current_face_area;
168 }

◆ computeElemMatrixContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeElemMatrixContribution ( )
overridevirtual

Implements LinearFVFluxKernel.

Definition at line 117 of file LinearWCNSFV2PMomentumDriftFlux.C.

118 {
119  const auto u_old = _var(makeCDFace(*_current_face_info), Moose::previousNonlinearState()).value();
120  if (std::abs(u_old) > 1e-6)
121  return _velocity_interp_coeffs.first * _face_flux / u_old * _current_face_area;
122  else
123  return 0.;
124 }
MooseLinearVariableFV< Real > & _var
const FaceInfo * _current_face_info
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
StateArg previousNonlinearState()

◆ computeElemRightHandSideContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeElemRightHandSideContribution ( )
overridevirtual

Implements LinearFVFluxKernel.

Definition at line 138 of file LinearWCNSFV2PMomentumDriftFlux.C.

139 {
140  // Get old velocity
141  const auto u_old = _var(makeCDFace(*_current_face_info), Moose::previousNonlinearState()).value();
142  const auto u = _var(makeCDFace(*_current_face_info), Moose::currentState()).value();
143  if (std::abs(u_old) > 1e-6)
144  return _velocity_interp_coeffs.first * _face_flux * (u / u_old - 1) * _current_face_area;
145  else
146  return -_face_flux * _current_face_area;
147 }
MooseLinearVariableFV< Real > & _var
const FaceInfo * _current_face_info
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
StateArg previousNonlinearState()
StateArg currentState()

◆ computeFlux()

void LinearWCNSFV2PMomentumDriftFlux::computeFlux ( )
protected

Compute the face flux.

Definition at line 74 of file LinearWCNSFV2PMomentumDriftFlux.C.

Referenced by setupFaceData().

75 {
76  const auto & normal = _current_face_info->normal();
77  const auto state = determineState();
78  const bool on_boundary = Moose::FV::onBoundary(*this, *_current_face_info);
79 
80  Moose::FaceArg face_arg;
81  if (on_boundary)
83  else
84  face_arg = makeCDFace(*_current_face_info);
85 
86  RealVectorValue u_slip_vel_vec;
87  if (_dim == 1)
88  u_slip_vel_vec = RealVectorValue(_u_slip(face_arg, state), 0.0, 0.0);
89  else if (_dim == 2)
90  u_slip_vel_vec = RealVectorValue(_u_slip(face_arg, state), (*_v_slip)(face_arg, state), 0.0);
91  else
92  u_slip_vel_vec = RealVectorValue(
93  _u_slip(face_arg, state), (*_v_slip)(face_arg, state), (*_w_slip)(face_arg, state));
94 
95  const auto uslipdotn = normal * u_slip_vel_vec;
96 
97  Real face_rho_fd;
98  if (on_boundary)
99  face_rho_fd = _rho_d(face_arg, state) * _f_d(face_arg, state);
100  else
101  {
102  const auto elem_arg = makeElemArg(_current_face_info->elemPtr());
103  const auto neigh_arg = makeElemArg(_current_face_info->neighborPtr());
104 
106  face_rho_fd,
107  _rho_d(elem_arg, state) * _f_d(elem_arg, state),
108  _rho_d(neigh_arg, state) * _f_d(neigh_arg, state),
110  true);
111  }
112 
113  _face_flux = -face_rho_fd * uslipdotn * u_slip_vel_vec(_index);
114 }
const Moose::Functor< Real > & _rho_d
Dispersed phase density.
const unsigned int _index
The index of the momentum component.
const Moose::Functor< Real > & _u_slip
slip velocity in direction x
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
Moose::StateArg determineState() const
const Moose::Functor< Real > *const _v_slip
slip velocity in direction y
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Moose::Functor< Real > & _f_d
Dispersed phase fraction.
const FaceInfo * _current_face_info
const Elem * neighborPtr() const
const Point & normal() const
const Elem * elemPtr() const
const Moose::FV::InterpMethod _density_interp_method
The face interpolation method for the density.
bool onBoundary(const SubdomainRestrictable &obj, const FaceInfo &fi)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Moose::Functor< Real > *const _w_slip
slip velocity in direction z
const unsigned int _dim
The dimension of the simulation.
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)

◆ computeInternalAdvectionElemMatrixContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeInternalAdvectionElemMatrixContribution ( )
protected

Computes the matrix contribution of the advective flux on the element side of current face when the face is an internal face (doesn't have associated boundary conditions).

◆ computeInternalAdvectionNeighborMatrixContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeInternalAdvectionNeighborMatrixContribution ( )
protected

Computes the matrix contribution of the advective flux on the neighbor side of current face when the face is an internal face (doesn't have associated boundary conditions).

◆ computeNeighborMatrixContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeNeighborMatrixContribution ( )
overridevirtual

Implements LinearFVFluxKernel.

Definition at line 127 of file LinearWCNSFV2PMomentumDriftFlux.C.

128 {
129  const auto u_old = _var(makeCDFace(*_current_face_info), Moose::previousNonlinearState()).value();
130  if (std::abs(u_old) > 1e-6)
131  return _velocity_interp_coeffs.second * _face_flux / u_old * _current_face_area;
132  else
133  // place term on RHS if u_old is too close to 0
134  return 0.;
135 }
MooseLinearVariableFV< Real > & _var
const FaceInfo * _current_face_info
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
StateArg previousNonlinearState()

◆ computeNeighborRightHandSideContribution()

Real LinearWCNSFV2PMomentumDriftFlux::computeNeighborRightHandSideContribution ( )
overridevirtual

Implements LinearFVFluxKernel.

Definition at line 150 of file LinearWCNSFV2PMomentumDriftFlux.C.

151 {
152  // Get old velocity
153  const auto u_old = _var(makeCDFace(*_current_face_info), Moose::previousNonlinearState()).value();
154  const auto u = _var(makeCDFace(*_current_face_info), Moose::currentState()).value();
155  if (std::abs(u_old) > 1e-6)
156  return _velocity_interp_coeffs.second * _face_flux * (u / u_old - 1) * _current_face_area;
157  else
158  return -_face_flux * _current_face_area;
159 }
MooseLinearVariableFV< Real > & _var
const FaceInfo * _current_face_info
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
StateArg previousNonlinearState()
StateArg currentState()

◆ setupFaceData()

void LinearWCNSFV2PMomentumDriftFlux::setupFaceData ( const FaceInfo face_info)
overridevirtual

Set the current FaceInfo object.

We override this here to make sure the face velocity evaluation happens only once and that it can be reused for the matrix and right hand side contributions.

Parameters
face_infoThe face info which will be used as current face info

Reimplemented from LinearFVFluxKernel.

Definition at line 171 of file LinearWCNSFV2PMomentumDriftFlux.C.

172 {
174 
175  // Caching the mass flux on the face which will be reused in the advection term's matrix and right
176  // hand side contributions
177  computeFlux();
178 
179  // Caching the interpolation coefficients so they will be reused for the matrix and right hand
180  // side terms
184  true,
186 }
std::pair< Real, Real > interpCoeffs(const InterpMethod m, const FaceInfo &fi, const bool one_is_elem, const T &face_flux=0.0)
Real getMassFlux(const FaceInfo &fi) const
Get the face velocity times density (used in advection terms)
virtual void setupFaceData(const FaceInfo *face_info)
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
const FaceInfo * _current_face_info
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
const Moose::FV::InterpMethod _density_interp_method
The face interpolation method for the density.

◆ validParams()

InputParameters LinearWCNSFV2PMomentumDriftFlux::validParams ( )
static

Definition at line 19 of file LinearWCNSFV2PMomentumDriftFlux.C.

20 {
21  auto params = LinearFVFluxKernel::validParams();
22  params.addClassDescription("Implements the drift momentum flux source.");
23  params.addRequiredParam<UserObjectName>(
24  "rhie_chow_user_object",
25  "The rhie-chow user-object which is used to determine the face velocity.");
26  params.addRequiredParam<MooseFunctorName>("u_slip", "The slip velocity in the x direction.");
27  params.addParam<MooseFunctorName>("v_slip", "The slip velocity in the y direction.");
28  params.addParam<MooseFunctorName>("w_slip", "The slip velocity in the z direction.");
29  params.addRequiredParam<MooseFunctorName>("rho_d", "Dispersed phase density.");
30  params.addParam<MooseFunctorName>("fd", 0.0, "Fraction dispersed phase.");
31  params.renameParam("fd", "fraction_dispersed", "");
32 
33  params.addParam<bool>(
34  "force_boundary_execution", true, "This kernel should execute on boundaries by default");
35  MooseEnum momentum_component("x=0 y=1 z=2");
36  params.addRequiredParam<MooseEnum>(
37  "momentum_component",
38  momentum_component,
39  "The component of the momentum equation that this kernel applies to.");
40 
41  MooseEnum coeff_interp_method("average harmonic", "harmonic");
42  params.addParam<MooseEnum>("density_interp_method",
43  coeff_interp_method,
44  "Switch that can select face interpolation method for the density.");
45 
46  return params;
47 }
static InputParameters validParams()

Member Data Documentation

◆ _density_interp_method

const Moose::FV::InterpMethod LinearWCNSFV2PMomentumDriftFlux::_density_interp_method
protected

The face interpolation method for the density.

Definition at line 85 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux(), and setupFaceData().

◆ _dim

const unsigned int LinearWCNSFV2PMomentumDriftFlux::_dim
protected

The dimension of the simulation.

Definition at line 63 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux(), and LinearWCNSFV2PMomentumDriftFlux().

◆ _f_d

const Moose::Functor<Real>& LinearWCNSFV2PMomentumDriftFlux::_f_d
protected

Dispersed phase fraction.

Definition at line 72 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux().

◆ _face_flux

Real LinearWCNSFV2PMomentumDriftFlux::_face_flux
protected

◆ _index

const unsigned int LinearWCNSFV2PMomentumDriftFlux::_index
protected

The index of the momentum component.

Definition at line 82 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux().

◆ _mass_flux_provider

const RhieChowMassFlux& LinearWCNSFV2PMomentumDriftFlux::_mass_flux_provider
protected

The Rhie-Chow user object that provides us with the face velocity.

Definition at line 66 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by setupFaceData().

◆ _rho_d

const Moose::Functor<Real>& LinearWCNSFV2PMomentumDriftFlux::_rho_d
protected

Dispersed phase density.

Definition at line 69 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux().

◆ _u_slip

const Moose::Functor<Real>& LinearWCNSFV2PMomentumDriftFlux::_u_slip
protected

slip velocity in direction x

Definition at line 75 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux().

◆ _v_slip

const Moose::Functor<Real>* const LinearWCNSFV2PMomentumDriftFlux::_v_slip
protected

slip velocity in direction y

Definition at line 77 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux(), and LinearWCNSFV2PMomentumDriftFlux().

◆ _velocity_interp_coeffs

std::pair<Real, Real> LinearWCNSFV2PMomentumDriftFlux::_velocity_interp_coeffs
protected

◆ _w_slip

const Moose::Functor<Real>* const LinearWCNSFV2PMomentumDriftFlux::_w_slip
protected

slip velocity in direction z

Definition at line 79 of file LinearWCNSFV2PMomentumDriftFlux.h.

Referenced by computeFlux(), and LinearWCNSFV2PMomentumDriftFlux().


The documentation for this class was generated from the following files: