https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FVVelocityJumpGreenGaussGradient Class Reference

Green-Gauss velocity gradient that uses the one-sided baffle face states of a porous Rhie-Chow object instead of interpolating velocity across pressure baffles. More...

#include <FVVelocityJumpGreenGaussGradient.h>

Inheritance diagram for FVVelocityJumpGreenGaussGradient:
[legend]

Public Types

typedef std::vector< std::unique_ptr< libMesh::NumericVector< libMesh::Number > > > GradientContainer
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 FVVelocityJumpGreenGaussGradient (const InputParameters &params)
 
void linkFlowSystem (const PorousRhieChowMassFlux &rc)
 Link this method to the porous Rhie-Chow object that supplies the baffle face states.
 
void computeGradient (SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const
 
Moose::FV::GradientLimiterType limiterType () const
 
virtual void resolveGradientMethodDependencies (FEProblemBase &fe_problem)
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () 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
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (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
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) 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
 
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 void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Types

typedef std::pair< Real, Real > InternalFaceValues
 

Protected Member Functions

void computeGradientWithoutLimiter (SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 

Protected Attributes

const bool & _enabled
 
MooseApp & _app
 
Factory & _factory
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
const Parallel::Communicator & _communicator
 

Private Member Functions

InternalFaceValues internalFaceValues (const FaceInfo &fi, const ElemInfo &elem_info, const ElemInfo &neighbor_info, const MooseLinearVariableFV< Real > &variable, Real elem_value, Real neighbor_value) const override
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

const PorousRhieChowMassFlux * _rhie_chow = nullptr
 Porous Rhie-Chow object supplying baffle locations and face states after linkage.
 
const Moose::FV::GradientLimiterType _limiter_type
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 

Detailed Description

Green-Gauss velocity gradient that uses the one-sided baffle face states of a porous Rhie-Chow object instead of interpolating velocity across pressure baffles.

Definition at line 19 of file FVVelocityJumpGreenGaussGradient.h.

Constructor & Destructor Documentation

◆ FVVelocityJumpGreenGaussGradient()

FVVelocityJumpGreenGaussGradient::FVVelocityJumpGreenGaussGradient ( const InputParameters &  params)

Definition at line 27 of file FVVelocityJumpGreenGaussGradient.C.

Member Function Documentation

◆ internalFaceValues()

FVGreenGaussGradient::InternalFaceValues FVVelocityJumpGreenGaussGradient::internalFaceValues ( const FaceInfo &  fi,
const ElemInfo &  elem_info,
const ElemInfo &  neighbor_info,
const MooseLinearVariableFV< Real > &  variable,
Real  elem_value,
Real  neighbor_value 
) const
overrideprivatevirtual

Reimplemented from FVGreenGaussGradient.

Definition at line 44 of file FVVelocityJumpGreenGaussGradient.C.

50{
53 fi, elem_info, neighbor_info, variable, elem_value, neighbor_value);
54
55 for (const auto component : make_range(_rhie_chow->dimension()))
56 {
57 const auto & velocity = _rhie_chow->velocityVariable(component);
58 if (velocity.number() != variable.number() ||
59 _rhie_chow->momentumSystem(component).number() != variable.sys().number())
60 continue;
61
62 // The face states are exact for a velocity that is linear on each side, so the gradient
63 // carries no slope from the jump across the baffle.
64 return {_rhie_chow->baffleFaceVelocity(fi, /*elem_side=*/true)(component),
65 _rhie_chow->baffleFaceVelocity(fi, /*elem_side=*/false)(component)};
66 }
67
68 mooseError("Can only compute gradients of the velocity variables of PorousRhieChowMassFlux '",
70 "', but it was used for variable '",
71 variable.name(),
72 "'.");
73}
virtual InternalFaceValues internalFaceValues(const FaceInfo &fi, const ElemInfo &elem_info, const ElemInfo &neighbor_info, const MooseLinearVariableFV< Real > &variable, Real elem_value, Real neighbor_value) const
const PorousRhieChowMassFlux * _rhie_chow
Porous Rhie-Chow object supplying baffle locations and face states after linkage.
const std::string & name() const
void mooseError(Args &&... args) const
SystemBase & sys()
unsigned int number() const
bool faceIsBaffle(const FaceInfo &fi) const
Whether a face is governed by a pressure-jump model.
RealVectorValue baffleFaceVelocity(const FaceInfo &fi, bool elem_side) const
Return the superficial velocity at a baffle face as seen from one side.
MooseLinearVariableFVReal & velocityVariable(unsigned int component)
Velocity variable for one spatial component.
LinearSystem & momentumSystem(unsigned int component)
Momentum linear system for one spatial component.
unsigned int number() const
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
IntRange< T > make_range(T beg, T end)

◆ linkFlowSystem()

void FVVelocityJumpGreenGaussGradient::linkFlowSystem ( const PorousRhieChowMassFlux &  rc)

Link this method to the porous Rhie-Chow object that supplies the baffle face states.

Definition at line 33 of file FVVelocityJumpGreenGaussGradient.C.

34{
35 if (_rhie_chow && _rhie_chow != &rc)
36 mooseError("Already linked to PorousRhieChowMassFlux '",
38 "'. Use a separate gradient method for each flow system.");
39
40 _rhie_chow = &rc;
41}

◆ validParams()

InputParameters FVVelocityJumpGreenGaussGradient::validParams ( )
static

Definition at line 18 of file FVVelocityJumpGreenGaussGradient.C.

19{
21 params.suppressParameter<MooseEnum>("limiter");
22 params.addClassDescription("Computes a Green-Gauss velocity gradient using one-sided face states "
23 "on pressure baffles.");
24 return params;
25}
static InputParameters validParams()
void suppressParameter(const std::string &name)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _rhie_chow

const PorousRhieChowMassFlux* FVVelocityJumpGreenGaussGradient::_rhie_chow = nullptr
private

Porous Rhie-Chow object supplying baffle locations and face states after linkage.

Definition at line 37 of file FVVelocityJumpGreenGaussGradient.h.

Referenced by internalFaceValues(), and linkFlowSystem().


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