www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
RichardsPiecewiseLinearSink Class Reference

Applies a flux sink to a boundary The sink is a piecewise linear function of porepressure (the "variable") at the quad points. More...

#include <RichardsPiecewiseLinearSink.h>

Inheritance diagram for RichardsPiecewiseLinearSink:
[legend]

Public Types

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

Public Member Functions

 RichardsPiecewiseLinearSink (const InputParameters &parameters)
 
virtual const MooseVariablevariable () const override
 
void computeOffDiagJacobianScalar (unsigned int jvar) override
 
virtual void computeResidualAndJacobian () override
 
void prepareShapes (unsigned int var_num) override final
 
virtual bool shouldApply ()
 
virtual void computeNonlocalJacobian ()
 
virtual void computeNonlocalOffDiagJacobian (unsigned int)
 
const SubProblemsubProblem () const
 
virtual bool enabled () 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 & 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 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 &name, const std::string *param=nullptr) 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 ()
 
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
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 
const std::vector< BoundaryName > & boundaryNames () const
 
unsigned int numBoundaryIDs () const
 
bool hasBoundary (const BoundaryName &name) const
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 
bool hasBoundary (const BoundaryID &id) const
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 
virtual bool boundaryRestricted () const
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 
virtual bool checkVariableBoundaryIntegrity () const
 
PenetrationLocatorgetPenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
PenetrationLocatorgetQuadraturePenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
bool requiresGeometricSearch () const
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > & getCoupledVars () const
 
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars () const
 
const std::vector< MooseVariable *> & getCoupledStandardMooseVars () const
 
const std::vector< VectorMooseVariable *> & getCoupledVectorMooseVars () const
 
const std::vector< ArrayMooseVariable *> & getCoupledArrayMooseVars () const
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 
bool hasWritableCoupledVariables () const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
const ADVectorVariableValuegetADDefaultVectorValue (const std::string &var_name) const
 
const ADVariableGradientgetADDefaultGradient () const
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 
const ADVariableSecondgetADDefaultSecond () const
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () 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)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase *> > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
bool getMaterialPropertyCalled () const
 
const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
MooseVariableBasemooseVariableBase () const
 
MooseVariableField< Real > & mooseVariableField ()
 
MooseVariableFE< Real > * mooseVariable () const
 
MooseVariableFV< Real > * mooseVariableFV () 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 DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
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 bool restricted (const std::set< BoundaryID > &ids)
 

Public Attributes

 ALL
 
 ANY
 
const ConsoleStream _console
 

Static Public Attributes

static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 

Protected Member Functions

virtual void computeResidual () override
 
virtual Real computeQpResidual () override
 
virtual void computeJacobian () override
 
virtual Real computeQpJacobian () override
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
void prepareNodalValues ()
 calculates the nodal values of pressure, mobility, and derivatives thereof More...
 
Real jac (unsigned int wrt_num)
 derivative of residual wrt the wrt_num Richards variable More...
 
virtual Real computeQpOffDiagJacobianScalar (unsigned int jvar)
 
virtual void precalculateQpResidual ()
 
virtual void precalculateQpJacobian ()
 
virtual void precalculateQpOffDiagJacobian (const MooseVariableFEBase &)
 
virtual void precalculateResidual ()
 
virtual void precalculateJacobian ()
 
virtual void precalculateOffDiagJacobian (unsigned int)
 
const MooseVariableFieldBasegetVariable (unsigned int jvar_num) const
 
virtual void addUserObjectDependencyHelper (const UserObject &) const
 
Moose::StateArg determineState () 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 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 addResidualsAndJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
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)
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 
virtual void coupledCallback (const std::string &, bool) const
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 
virtual bool isCoupledConstant (const std::string &var_name) const
 
unsigned int coupledComponents (const std::string &var_name) const
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValues (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableValue< is_ad > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< false > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< true > *> coupledGenericValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericDofValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
virtual const VariableValuecoupledValueLower (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledValues (const std::string &var_name) const
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVectorVariableValue *> adCoupledVectorValues (const std::string &var_name) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, TagID tag) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValuecoupledVectorTagArrayDofValue (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ArrayVariableValue *> coupledArrayValues (const std::string &var_name) const
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 
void checkWritableVar (MooseWritableVariable *var)
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOlder (const std::string &var_name) const
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradients (const std::string &var_name) const
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableGradientadCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableGradient *> adCoupledGradients (const std::string &var_name) const
 
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableGradient< false > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
const GenericVariableGradient< true > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableGradient< is_ad > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< false > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< true > *> coupledGenericGradients (const std::string &var_name) const
 
const ADVectorVariableGradientadCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableSecondadCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradientsOld (const std::string &var_name) const
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledDots (const std::string &var_name) const
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledDots (const std::string &var_name) const
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const Moose::ADType< T >::typeadCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValues (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOlder (const std::string &var_name) const
 
virtual const ArrayVariableValuecoupledArrayDofValues (const std::string &var_name, unsigned int comp=0) const
 
virtual const ADVariableValueadCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadZeroValue () const
 
const ADVariableGradientadZeroGradient () const
 
const ADVariableSecondadZeroSecond () const
 
const GenericVariableValue< is_ad > & genericZeroValue ()
 
const GenericVariableValue< false > & genericZeroValue ()
 
const GenericVariableValue< true > & genericZeroValue ()
 
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 
const GenericVariableGradient< false > & genericZeroGradient ()
 
const GenericVariableGradient< true > & genericZeroGradient ()
 
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 
const GenericVariableSecond< false > & genericZeroSecond ()
 
const GenericVariableSecond< true > & genericZeroSecond ()
 
bool checkVar (const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
const T * getVarHelper (const std::string &var_name, unsigned int comp) const
 
T * getVarHelper (const std::string &var_name, unsigned int comp)
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
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 ()
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Protected Attributes

bool _use_mobility
 whether to multiply the sink flux by permeability*density/viscosity More...
 
bool _use_relperm
 whether to multiply the sink flux by relative permeability More...
 
bool _fully_upwind
 whether to use full upwinding More...
 
LinearInterpolation _sink_func
 piecewise-linear function of porepressure (this defines the strength of the sink) More...
 
const Function_m_func
 sink flux gets multiplied by this function More...
 
const RichardsVarNames_richards_name_UO
 holds info about the names and values of richards variable in the simulation More...
 
unsigned int _num_p
 number of richards variables More...
 
unsigned int _pvar
 the moose internal variable number corresponding to the porepressure of this sink flux More...
 
const RichardsDensity *const _density_UO
 user object defining the density. Only used if _fully_upwind = true More...
 
const RichardsSeff *const _seff_UO
 user object defining the effective saturation. Only used if _fully_upwind = true More...
 
const RichardsRelPerm *const _relperm_UO
 user object defining the relative permeability. Only used if _fully_upwind = true More...
 
const PostprocessorValue_area_pp
 area postprocessor. if given then all bare_fluxes are divided by this quantity More...
 
unsigned int _num_nodes
 number of nodes in this element. Only used if _fully_upwind = true More...
 
std::vector< Real_nodal_density
 nodal values of fluid density These are used if _fully_upwind = true More...
 
std::vector< std::vector< Real > > _dnodal_density_dv
 d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true More...
 
std::vector< Real_nodal_relperm
 nodal values of relative permeability These are used if _fully_upwind = true More...
 
std::vector< std::vector< Real > > _dnodal_relperm_dv
 d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true More...
 
const MaterialProperty< std::vector< Real > > & _pp
 porepressure values (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
 d(porepressure_i)/d(variable_j) More...
 
const MaterialProperty< std::vector< Real > > & _viscosity
 viscosity (only the _pvar component is used) More...
 
const MaterialProperty< RealTensorValue > & _permeability
 permeability More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dseff_dv
 derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all variables More...
 
const MaterialProperty< std::vector< Real > > & _rel_perm
 relative permeability (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
 d(relperm_i)/d(variable_j) More...
 
const MaterialProperty< std::vector< Real > > & _density
 fluid density (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
 d(density_i)/d(variable_j) More...
 
std::vector< const VariableValue * > _ps_at_nodes
 Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _ps_at_nodes[_pvar] is a pointer to this variable's nodal porepressure values So: (*_ps_at_nodes[_pvar])[i] = _var.dofValues()[i] = porepressure of pressure-variable _pvar at node i. More...
 
MooseVariable_var
 
const MooseArray< Point > & _normals
 
const VariablePhiValue_phi
 
const VariablePhiGradient_grad_phi
 
const VariableTestValue_test
 
const VariableTestGradient_grad_test
 
const VariableValue_u
 
const VariableGradient_grad_u
 
const Elem *const & _current_elem
 
const Real_current_elem_volume
 
const unsigned int_current_side
 
const Elem *const & _current_side_elem
 
const Real_current_side_volume
 
const BoundaryID_current_boundary_id
 
unsigned int _qp
 
const QBase *const & _qrule
 
const MooseArray< Point > & _q_point
 
const MooseArray< Real > & _JxW
 
const MooseArray< Real > & _coord
 
unsigned int _i
 
unsigned int _j
 
bool _has_save_in
 
std::vector< MooseVariableFEBase *> _save_in
 
std::vector< AuxVariableName > _save_in_strings
 
bool _has_diag_save_in
 
std::vector< MooseVariableFEBase *> _diag_save_in
 
std::vector< AuxVariableName > _diag_save_in_strings
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
THREAD_ID _tid
 
Assembly_assembly
 
MooseMesh_mesh
 
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
 
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
 
DenseVector< Number_local_re
 
DenseMatrix< Number_local_ke
 
DenseMatrix< Number_nonlocal_ke
 
GeometricSearchData_geometric_search_data
 
bool _requires_geometric_search
 
const InputParameters_c_parameters
 
const std::string & _c_name
 
const std::string & _c_type
 
FEProblemBase_c_fe_problem
 
const SystemBase *const _c_sys
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > _coupled_vars
 
std::vector< MooseVariableFieldBase *> _coupled_moose_vars
 
std::vector< MooseVariable *> _coupled_standard_moose_vars
 
std::vector< VectorMooseVariable *> _coupled_vector_moose_vars
 
std::vector< ArrayMooseVariable *> _coupled_array_moose_vars
 
std::vector< MooseVariableFV< Real > *> _coupled_standard_fv_moose_vars
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 
bool _c_nodal
 
bool _c_is_implicit
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< DualReal > > > _ad_default_value
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
 
VariableValue _default_value_zero
 
VariableGradient _default_gradient
 
MooseArray< ADRealVectorValue_ad_default_gradient
 
MooseArray< ADRealTensorValue_ad_default_vector_gradient
 
VariableSecond _default_second
 
MooseArray< ADRealTensorValue_ad_default_second
 
const VariableValue_zero
 
const VariablePhiValue_phi_zero
 
const MooseArray< DualReal > & _ad_zero
 
const VariableGradient_grad_zero
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient_grad_phi_zero
 
const VariableSecond_second_zero
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 
const VectorVariableValue_vector_zero
 
const VectorVariableCurl_vector_curl_zero
 
VectorVariableValue _default_vector_value_zero
 
VectorVariableGradient _default_vector_gradient
 
VectorVariableCurl _default_vector_curl
 
ArrayVariableValue _default_array_value_zero
 
ArrayVariableGradient _default_array_gradient
 
ArrayVariableCurl _default_array_curl
 
bool _coupleable_neighbor
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
bool _nodal
 
MooseVariableFE< Real > * _variable
 
MooseVariableFV< Real > * _fv_variable
 
Assembly_mvi_assembly
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Detailed Description

Applies a flux sink to a boundary The sink is a piecewise linear function of porepressure (the "variable") at the quad points.

This is specified by _sink_func. In addition, this sink can be multiplied by: (1) the relative permeability of the fluid at the quad point. (2) perm_nn*density/viscosity, where perm_nn is the permeability tensor projected in the normal direction. (3) a Function (which can be time-dependent, for instance) and divided by: (4) an area Postprocessor

Definition at line 35 of file RichardsPiecewiseLinearSink.h.

Constructor & Destructor Documentation

◆ RichardsPiecewiseLinearSink()

RichardsPiecewiseLinearSink::RichardsPiecewiseLinearSink ( const InputParameters parameters)

Definition at line 77 of file RichardsPiecewiseLinearSink.C.

79  _use_mobility(getParam<bool>("use_mobility")),
80  _use_relperm(getParam<bool>("use_relperm")),
81  _fully_upwind(getParam<bool>("fully_upwind")),
82 
83  _sink_func(getParam<std::vector<Real>>("pressures"),
84  getParam<std::vector<Real>>("bare_fluxes")),
85 
86  _m_func(getFunction("multiplying_fcn")),
87 
88  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
91 
92  // in the following, getUserObjectByName returns a reference (an alias) to a RichardsBLAH user
93  // object, and the & turns it into a pointer
94  _density_UO(_fully_upwind ? &getUserObjectByName<RichardsDensity>(
95  getParam<std::vector<UserObjectName>>("density_UO")[_pvar])
96  : NULL),
97  _seff_UO(_fully_upwind ? &getUserObjectByName<RichardsSeff>(
98  getParam<std::vector<UserObjectName>>("seff_UO")[_pvar])
99  : NULL),
100  _relperm_UO(_fully_upwind ? &getUserObjectByName<RichardsRelPerm>(
101  getParam<std::vector<UserObjectName>>("relperm_UO")[_pvar])
102  : NULL),
103 
104  _area_pp(getPostprocessorValue("area_pp")),
105 
106  _num_nodes(0),
107  _nodal_density(0),
109  _nodal_relperm(0),
111 
112  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
113  _dpp_dv(getMaterialProperty<std::vector<std::vector<Real>>>("dporepressure_dv")),
114 
115  _viscosity(getMaterialProperty<std::vector<Real>>("viscosity")),
116  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
117 
118  _dseff_dv(getMaterialProperty<std::vector<std::vector<Real>>>("ds_eff_dv")),
119 
120  _rel_perm(getMaterialProperty<std::vector<Real>>("rel_perm")),
121  _drel_perm_dv(getMaterialProperty<std::vector<std::vector<Real>>>("drel_perm_dv")),
122 
123  _density(getMaterialProperty<std::vector<Real>>("density")),
124  _ddensity_dv(getMaterialProperty<std::vector<std::vector<Real>>>("ddensity_dv"))
125 {
126  _ps_at_nodes.resize(_num_p);
127  for (unsigned int pnum = 0; pnum < _num_p; ++pnum)
129 }
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
const RichardsDensity *const _density_UO
user object defining the density. Only used if _fully_upwind = true
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
bool _use_relperm
whether to multiply the sink flux by relative permeability
const RichardsSeff *const _seff_UO
user object defining the effective saturation. Only used if _fully_upwind = true
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
unsigned int number() const
const Function & getFunction(const std::string &name) const
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
const VariableValue * nodal_var(unsigned int richards_var_num) const
The nodal variable values for the given richards_var_num To extract a the value of pressure variable ...
IntegratedBC(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
const PostprocessorValue & getPostprocessorValue(const std::string &param_name, const unsigned int index=0) const
const RichardsRelPerm *const _relperm_UO
user object defining the relative permeability. Only used if _fully_upwind = true ...
unsigned int num_v() const
the number of porepressure variables
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const RichardsVarNames & _richards_name_UO
holds info about the names and values of richards variable in the simulation
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
const T & getParam(const std::string &name) const
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
d(relperm_i)/d(variable_j)
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
const Function & _m_func
sink flux gets multiplied by this function
const MaterialProperty< std::vector< std::vector< Real > > > & _dseff_dv
derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all var...
bool _fully_upwind
whether to use full upwinding
MooseVariable & _var
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
unsigned int _num_nodes
number of nodes in this element. Only used if _fully_upwind = true
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const MaterialProperty< T > & getMaterialProperty(const std::string &name, MaterialData &material_data, const unsigned int state=0)
const InputParameters & parameters() const
unsigned int _num_p
number of richards variables
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const MaterialProperty< RealTensorValue > & _permeability
permeability
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
d(density_i)/d(variable_j)

Member Function Documentation

◆ computeJacobian()

void RichardsPiecewiseLinearSink::computeJacobian ( )
overrideprotectedvirtual

Reimplemented from IntegratedBC.

Definition at line 229 of file RichardsPiecewiseLinearSink.C.

230 {
231  if (_fully_upwind)
234 }
virtual void computeJacobian() override
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof

◆ computeOffDiagJacobian()

void RichardsPiecewiseLinearSink::computeOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from IntegratedBC.

Definition at line 243 of file RichardsPiecewiseLinearSink.C.

244 {
245  if (_fully_upwind)
248 }
virtual void computeOffDiagJacobian(unsigned int jvar) override
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof

◆ computeQpJacobian()

Real RichardsPiecewiseLinearSink::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from IntegratedBC.

Definition at line 237 of file RichardsPiecewiseLinearSink.C.

238 {
239  return jac(_pvar);
240 }
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
Real jac(unsigned int wrt_num)
derivative of residual wrt the wrt_num Richards variable

◆ computeQpOffDiagJacobian()

Real RichardsPiecewiseLinearSink::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from IntegratedBC.

Definition at line 251 of file RichardsPiecewiseLinearSink.C.

252 {
254  return 0.0;
255  unsigned int dvar = _richards_name_UO.richards_var_num(jvar);
256  return jac(dvar);
257 }
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
const RichardsVarNames & _richards_name_UO
holds info about the names and values of richards variable in the simulation
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
Real jac(unsigned int wrt_num)
derivative of residual wrt the wrt_num Richards variable

◆ computeQpResidual()

Real RichardsPiecewiseLinearSink::computeQpResidual ( )
overrideprotectedvirtual

Implements IntegratedBC.

Definition at line 183 of file RichardsPiecewiseLinearSink.C.

184 {
185  Real flux = 0;
186  Real k = 0;
187 
188  if (!_fully_upwind)
189  {
190  flux = _test[_i][_qp] * _sink_func.sample(_pp[_qp][_pvar]);
191  if (_use_mobility)
192  {
194  flux *= _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
195  }
196  if (_use_relperm)
197  flux *= _rel_perm[_qp][_pvar];
198  }
199  else
200  {
201  flux = _test[_i][_qp] * _sink_func.sample((*_ps_at_nodes[_pvar])[_i]);
202  if (_use_mobility)
203  {
204  k = (_permeability[0] * _normals[_qp]) * _normals[_qp]; // assume that _permeability is
205  // constant throughout element so
206  // doesn't need to be upwinded
207  flux *= _nodal_density[_i] * k /
208  _viscosity[0][_pvar]; // assume that viscosity is constant throughout element
209  }
210  if (_use_relperm)
211  flux *= _nodal_relperm[_i];
212  }
213 
214  flux *= _m_func.value(_t, _q_point[_qp]);
215 
216  if (_area_pp == 0.0)
217  {
218  if (flux != 0)
219  mooseError("RichardsPiecewiseLinearSink: flux is nonzero, but area is zero!\n");
220  // if flux == 0, then leave it as zero.
221  }
222  else
223  flux /= _area_pp;
224 
225  return flux;
226 }
const VariableTestValue & _test
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
const MooseArray< Point > & _normals
bool _use_relperm
whether to multiply the sink flux by relative permeability
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
T sample(const T &x) const
unsigned int _i
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
unsigned int _qp
const MooseArray< Point > & _q_point
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
const Function & _m_func
sink flux gets multiplied by this function
bool _fully_upwind
whether to use full upwinding
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
void mooseError(Args &&... args) const
virtual Real value(Real t, const Point &p) const
const MaterialProperty< RealTensorValue > & _permeability
permeability
static const std::string k
Definition: NS.h:124

◆ computeResidual()

void RichardsPiecewiseLinearSink::computeResidual ( )
overrideprotectedvirtual

Reimplemented from IntegratedBC.

Definition at line 175 of file RichardsPiecewiseLinearSink.C.

176 {
177  if (_fully_upwind)
180 }
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof
virtual void computeResidual() override

◆ jac()

Real RichardsPiecewiseLinearSink::jac ( unsigned int  wrt_num)
protected

derivative of residual wrt the wrt_num Richards variable

Definition at line 260 of file RichardsPiecewiseLinearSink.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

261 {
262  Real flux = 0;
263  Real deriv = 0;
264  Real k = 0;
265  Real mob = 0;
266  Real mobp = 0;
267  Real phi = 0;
268 
269  if (!_fully_upwind)
270  {
271  flux = _sink_func.sample(_pp[_qp][_pvar]);
273  phi = _phi[_j][_qp];
274  if (_use_mobility)
275  {
277  mob = _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
278  mobp = _ddensity_dv[_qp][_pvar][wrt_num] * k / _viscosity[_qp][_pvar];
279  deriv = mob * deriv + mobp * flux;
280  flux *= mob;
281  }
282  if (_use_relperm)
283  deriv = _rel_perm[_qp][_pvar] * deriv + _drel_perm_dv[_qp][_pvar][wrt_num] * flux;
284  }
285  else
286  {
287  if (_i != _j)
288  return 0.0; // residual at node _i only depends on variables at that node
289  flux = _sink_func.sample((*_ps_at_nodes[_pvar])[_i]);
291  : 0); // NOTE: i'm assuming that the variables are pressure variables
292  phi = 1;
293  if (_use_mobility)
294  {
295  k = (_permeability[0] * _normals[_qp]) * _normals[_qp];
296  mob = _nodal_density[_i] * k / _viscosity[0][_pvar];
297  mobp = _dnodal_density_dv[_i][wrt_num] * k / _viscosity[0][_pvar];
298  deriv = mob * deriv + mobp * flux;
299  flux *= mob;
300  }
301  if (_use_relperm)
302  deriv = _nodal_relperm[_i] * deriv + _dnodal_relperm_dv[_i][wrt_num] * flux;
303  }
304 
306 
307  if (_area_pp == 0.0)
308  {
309  if (deriv != 0)
310  mooseError("RichardsPiecewiseLinearSink: deriv is nonzero, but area is zero!\n");
311  // if deriv == 0, then leave it as zero.
312  }
313  else
314  deriv /= _area_pp;
315 
316  return _test[_i][_qp] * deriv * phi;
317 }
const VariableTestValue & _test
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
unsigned int _j
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
const MooseArray< Point > & _normals
bool _use_relperm
whether to multiply the sink flux by relative permeability
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
unsigned int _i
T sample(const T &x) const
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
const VariablePhiValue & _phi
unsigned int _qp
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const MooseArray< Point > & _q_point
T sampleDerivative(const T &x) const
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
d(relperm_i)/d(variable_j)
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
const Function & _m_func
sink flux gets multiplied by this function
bool _fully_upwind
whether to use full upwinding
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
void mooseError(Args &&... args) const
virtual Real value(Real t, const Point &p) const
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const MaterialProperty< RealTensorValue > & _permeability
permeability
static const std::string k
Definition: NS.h:124
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
d(density_i)/d(variable_j)

◆ prepareNodalValues()

void RichardsPiecewiseLinearSink::prepareNodalValues ( )
protected

calculates the nodal values of pressure, mobility, and derivatives thereof

Definition at line 132 of file RichardsPiecewiseLinearSink.C.

Referenced by computeJacobian(), computeOffDiagJacobian(), and computeResidual().

133 {
134  // NOTE: i'm assuming that all the richards variables are pressure values
135 
136  _num_nodes = (*_ps_at_nodes[_pvar]).size();
137 
138  Real p;
139  Real seff;
140  std::vector<Real> dseff_dp;
141  Real drelperm_ds;
142 
143  _nodal_density.resize(_num_nodes);
145  _nodal_relperm.resize(_num_nodes);
147  dseff_dp.resize(_num_p);
148  for (unsigned int nodenum = 0; nodenum < _num_nodes; ++nodenum)
149  {
150  // retrieve and calculate basic things at the node
151  p = (*_ps_at_nodes[_pvar])[nodenum]; // pressure of fluid _pvar at node nodenum
152 
153  _nodal_density[nodenum] = _density_UO->density(p); // density of fluid _pvar at node nodenum
154  _dnodal_density_dv[nodenum].resize(_num_p);
155  for (unsigned int ph = 0; ph < _num_p; ++ph)
156  _dnodal_density_dv[nodenum][ph] = 0;
157  _dnodal_density_dv[nodenum][_pvar] = _density_UO->ddensity(p); // d(density)/dP
158 
159  seff = _seff_UO->seff(_ps_at_nodes,
160  nodenum); // effective saturation of fluid _pvar at node nodenum
161  _seff_UO->dseff(
162  _ps_at_nodes, nodenum, dseff_dp); // d(seff)/d(P_ph), for ph = 0, ..., _num_p - 1
163 
164  _nodal_relperm[nodenum] =
165  _relperm_UO->relperm(seff); // relative permeability of fluid _pvar at node nodenum
166  drelperm_ds = _relperm_UO->drelperm(seff); // d(relperm)/dseff
167 
168  _dnodal_relperm_dv[nodenum].resize(_num_p);
169  for (unsigned int ph = 0; ph < _num_p; ++ph)
170  _dnodal_relperm_dv[nodenum][ph] = drelperm_ds * dseff_dp[ph];
171  }
172 }
virtual void dseff(std::vector< const VariableValue *> p, unsigned int qp, std::vector< Real > &result) const =0
derivative(s) of effective saturation as a function of porepressure(s) at given quadpoint of the elem...
const RichardsDensity *const _density_UO
user object defining the density. Only used if _fully_upwind = true
virtual Real drelperm(Real seff) const =0
derivative of relative permeability wrt effective saturation This must be over-ridden in your derived...
virtual Real ddensity(Real p) const =0
derivative of fluid density wrt porepressure This must be over-ridden in derived classes to provide a...
const RichardsSeff *const _seff_UO
user object defining the effective saturation. Only used if _fully_upwind = true
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
const RichardsRelPerm *const _relperm_UO
user object defining the relative permeability. Only used if _fully_upwind = true ...
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
virtual Real seff(std::vector< const VariableValue *> p, unsigned int qp) const =0
effective saturation as a function of porepressure(s) at given quadpoint of the element ...
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _num_nodes
number of nodes in this element. Only used if _fully_upwind = true
unsigned int _num_p
number of richards variables
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...

◆ validParams()

InputParameters RichardsPiecewiseLinearSink::validParams ( )
static

Definition at line 21 of file RichardsPiecewiseLinearSink.C.

22 {
24  params.addRequiredParam<bool>(
25  "use_mobility",
26  "If true, then fluxes are multiplied by (density*permeability_nn/viscosity), "
27  "where the '_nn' indicates the component normal to the boundary. In this "
28  "case bare_flux is measured in Pa.s^-1. This can be used in conjunction "
29  "with use_relperm.");
30  params.addRequiredParam<bool>("use_relperm",
31  "If true, then fluxes are multiplied by relative "
32  "permeability. This can be used in conjunction "
33  "with use_mobility");
34  params.addParam<std::vector<UserObjectName>>("relperm_UO",
35  "List of names of user objects that "
36  "define relative permeability. Only "
37  "needed if fully_upwind is used");
38  params.addParam<std::vector<UserObjectName>>(
39  "seff_UO",
40  "List of name of user objects that define effective saturation as a function of "
41  "pressure list. Only needed if fully_upwind is used");
42  params.addParam<std::vector<UserObjectName>>("density_UO",
43  "List of names of user objects that "
44  "define the fluid density. Only "
45  "needed if fully_upwind is used");
46  params.addRequiredParam<std::vector<Real>>(
47  "pressures", "Tuple of pressure values. Must be monotonically increasing.");
48  params.addRequiredParam<std::vector<Real>>(
49  "bare_fluxes",
50  "Tuple of flux values (measured in kg.m^-2.s^-1 for use_mobility=false, and "
51  "in Pa.s^-1 if use_mobility=true). This flux is OUT of the medium: hence "
52  "positive values of flux means this will be a SINK, while negative values "
53  "indicate this flux will be a SOURCE. A piecewise-linear fit is performed to "
54  "the (pressure,bare_fluxes) pairs to obtain the flux at any arbitrary "
55  "pressure, and the first or last bare_flux values are used if the quad-point "
56  "pressure falls outside this range.");
57  params.addParam<FunctionName>("multiplying_fcn",
58  1.0,
59  "If this function is provided, the flux "
60  "will be multiplied by this function. "
61  "This is useful for spatially or "
62  "temporally varying sinks");
63  params.addRequiredParam<UserObjectName>(
64  "richardsVarNames_UO", "The UserObject that holds the list of Richards variable names.");
65  params.addParam<bool>("fully_upwind", false, "Use full upwinding");
66  params.addParam<PostprocessorName>(
67  "area_pp",
68  1,
69  "An area postprocessor. If given, the bare_fluxes will be divided by this "
70  "quantity. This means the bare fluxes are measured in kg.s^-1. This is "
71  "useful for the case when you wish to provide the *total* flux, and let MOOSE "
72  "proportion it uniformly across the boundary. In that case you would have "
73  "use_mobility=false=use_relperm, and only one bare flux should be specified");
74  return params;
75 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)

Member Data Documentation

◆ _area_pp

const PostprocessorValue& RichardsPiecewiseLinearSink::_area_pp
protected

area postprocessor. if given then all bare_fluxes are divided by this quantity

Definition at line 89 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _ddensity_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_ddensity_dv
protected

d(density_i)/d(variable_j)

Definition at line 146 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _density

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_density
protected

fluid density (only the _pvar component is used)

Definition at line 143 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _density_UO

const RichardsDensity* const RichardsPiecewiseLinearSink::_density_UO
protected

user object defining the density. Only used if _fully_upwind = true

Definition at line 80 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _dnodal_density_dv

std::vector<std::vector<Real> > RichardsPiecewiseLinearSink::_dnodal_density_dv
protected

d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true

Definition at line 104 of file RichardsPiecewiseLinearSink.h.

Referenced by jac(), and prepareNodalValues().

◆ _dnodal_relperm_dv

std::vector<std::vector<Real> > RichardsPiecewiseLinearSink::_dnodal_relperm_dv
protected

d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true

Definition at line 116 of file RichardsPiecewiseLinearSink.h.

Referenced by jac(), and prepareNodalValues().

◆ _dpp_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_dpp_dv
protected

d(porepressure_i)/d(variable_j)

Definition at line 122 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _drel_perm_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_drel_perm_dv
protected

d(relperm_i)/d(variable_j)

Definition at line 140 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _dseff_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_dseff_dv
protected

derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all variables

Definition at line 134 of file RichardsPiecewiseLinearSink.h.

◆ _fully_upwind

bool RichardsPiecewiseLinearSink::_fully_upwind
protected

whether to use full upwinding

Definition at line 62 of file RichardsPiecewiseLinearSink.h.

Referenced by computeJacobian(), computeOffDiagJacobian(), computeQpResidual(), computeResidual(), and jac().

◆ _m_func

const Function& RichardsPiecewiseLinearSink::_m_func
protected

sink flux gets multiplied by this function

Definition at line 68 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _nodal_density

std::vector<Real> RichardsPiecewiseLinearSink::_nodal_density
protected

nodal values of fluid density These are used if _fully_upwind = true

Definition at line 98 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), and prepareNodalValues().

◆ _nodal_relperm

std::vector<Real> RichardsPiecewiseLinearSink::_nodal_relperm
protected

nodal values of relative permeability These are used if _fully_upwind = true

Definition at line 110 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), and prepareNodalValues().

◆ _num_nodes

unsigned int RichardsPiecewiseLinearSink::_num_nodes
protected

number of nodes in this element. Only used if _fully_upwind = true

Definition at line 92 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _num_p

unsigned int RichardsPiecewiseLinearSink::_num_p
protected

number of richards variables

Definition at line 74 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues(), and RichardsPiecewiseLinearSink().

◆ _permeability

const MaterialProperty<RealTensorValue>& RichardsPiecewiseLinearSink::_permeability
protected

permeability

Definition at line 128 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _pp

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_pp
protected

porepressure values (only the _pvar component is used)

Definition at line 119 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _ps_at_nodes

std::vector<const VariableValue *> RichardsPiecewiseLinearSink::_ps_at_nodes
protected

Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _ps_at_nodes[_pvar] is a pointer to this variable's nodal porepressure values So: (*_ps_at_nodes[_pvar])[i] = _var.dofValues()[i] = porepressure of pressure-variable _pvar at node i.

Definition at line 156 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), prepareNodalValues(), and RichardsPiecewiseLinearSink().

◆ _pvar

unsigned int RichardsPiecewiseLinearSink::_pvar
protected

the moose internal variable number corresponding to the porepressure of this sink flux

Definition at line 77 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpJacobian(), computeQpResidual(), jac(), and prepareNodalValues().

◆ _rel_perm

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_rel_perm
protected

relative permeability (only the _pvar component is used)

Definition at line 137 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _relperm_UO

const RichardsRelPerm* const RichardsPiecewiseLinearSink::_relperm_UO
protected

user object defining the relative permeability. Only used if _fully_upwind = true

Definition at line 86 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _richards_name_UO

const RichardsVarNames& RichardsPiecewiseLinearSink::_richards_name_UO
protected

holds info about the names and values of richards variable in the simulation

Definition at line 71 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpOffDiagJacobian(), and RichardsPiecewiseLinearSink().

◆ _seff_UO

const RichardsSeff* const RichardsPiecewiseLinearSink::_seff_UO
protected

user object defining the effective saturation. Only used if _fully_upwind = true

Definition at line 83 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _sink_func

LinearInterpolation RichardsPiecewiseLinearSink::_sink_func
protected

piecewise-linear function of porepressure (this defines the strength of the sink)

Definition at line 65 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _use_mobility

bool RichardsPiecewiseLinearSink::_use_mobility
protected

whether to multiply the sink flux by permeability*density/viscosity

Definition at line 56 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _use_relperm

bool RichardsPiecewiseLinearSink::_use_relperm
protected

whether to multiply the sink flux by relative permeability

Definition at line 59 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _viscosity

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_viscosity
protected

viscosity (only the _pvar component is used)

Definition at line 125 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().


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