https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PressureTempl< is_ad > Class Template Reference

Pressure applies a pressure on a given boundary in the direction defined by component. More...

#include <Pressure.h>

Inheritance diagram for PressureTempl< is_ad >:
[legend]

Public Member Functions

 PressureTempl (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 
static InputParameters actionParams ()
 

Protected Member Functions

GenericReal< is_ad > computePressure () const override
 

Protected Attributes

const Real _alpha
 _alpha Parameter for HHT time integration scheme
 
 usingTransientInterfaceMembers
 
const Real _factor
 Pressure value constant factor, function factor, and postprocessor factor.
 
const Function *const _function
 
const PostprocessorValue *const _postprocessor
 

Detailed Description

template<bool is_ad>
class PressureTempl< is_ad >

Pressure applies a pressure on a given boundary in the direction defined by component.

Definition at line 26 of file Pressure.h.

Constructor & Destructor Documentation

◆ PressureTempl()

template<bool is_ad>
PressureTempl< is_ad >::PressureTempl ( const InputParameters parameters)

Definition at line 53 of file Pressure.C.

54 : PressureParent<is_ad>(parameters),
55 _factor(parameters.isParamSetByUser("factor") ? this->template getParam<Real>("factor")
56 : parameters.isParamSetByUser("constant") ? this->template getParam<Real>("constant")
57 : 1.0),
58 _function(this->isParamValid("function") ? &this->getFunction("function") : NULL),
60 this->isParamValid("postprocessor") ? &this->getPostprocessorValue("postprocessor") : NULL),
61 _alpha(this->template getParam<Real>("hht_alpha"))
62{
63 if (parameters.isParamSetByUser("factor") && parameters.isParamSetByUser("constant"))
64 mooseError("Cannot set 'factor' and 'constant'.");
65}
void mooseError(Args &&... args)
typename std::conditional< is_ad, ADPressureBase, PressureBase >::type PressureParent
bool isParamSetByUser(const std::string &name) const
const Real _alpha
_alpha Parameter for HHT time integration scheme
Definition Pressure.h:44
const PostprocessorValue *const _postprocessor
Definition Pressure.h:40
const Real _factor
Pressure value constant factor, function factor, and postprocessor factor.
Definition Pressure.h:38
const Function *const _function
Definition Pressure.h:39
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ actionParams()

template<bool is_ad>
InputParameters PressureTempl< is_ad >::actionParams ( )
static

Definition at line 34 of file Pressure.C.

35{
37 params.addDeprecatedParam<Real>("constant",
38 "The magnitude to use in computing the pressure",
39 "Use 'factor' in place of 'constant'");
40 params.addParam<Real>("factor", 1.0, "The magnitude to use in computing the pressure");
41 params.addParam<FunctionName>("function", "The function that describes the pressure");
42 params.addParam<PostprocessorName>("postprocessor",
43 "Postprocessor that will supply the pressure value");
44
45 params.addParam<Real>("hht_alpha",
46 0,
47 "alpha parameter for mass dependent numerical damping induced "
48 "by HHT time integration scheme");
49 return params;
50}
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)

◆ computePressure()

template<bool is_ad>
GenericReal< is_ad > PressureTempl< is_ad >::computePressure ( ) const
overrideprotected

Definition at line 69 of file Pressure.C.

70{
72
73 if (_function)
74 factor *= _function->value(_t + _alpha * _dt, _q_point[_qp]);
75
77 factor *= *_postprocessor;
78
79 return factor;
80}
Moose::GenericType< Real, is_ad > GenericReal
virtual Real value(Real t, const Point &p) const

◆ validParams()

template<bool is_ad>
InputParameters PressureTempl< is_ad >::validParams ( )
static

Definition at line 24 of file Pressure.C.

25{
27 params.addClassDescription("Applies a pressure on a given boundary in a given direction");
28 params += actionParams();
29 return params;
30}
void addClassDescription(const std::string &doc_string)
static InputParameters actionParams()
Definition Pressure.C:34

Member Data Documentation

◆ _alpha

template<bool is_ad>
const Real PressureTempl< is_ad >::_alpha
protected

_alpha Parameter for HHT time integration scheme

Definition at line 44 of file Pressure.h.

◆ _factor

template<bool is_ad>
const Real PressureTempl< is_ad >::_factor
protected

Pressure value constant factor, function factor, and postprocessor factor.

Definition at line 38 of file Pressure.h.

◆ _function

template<bool is_ad>
const Function* const PressureTempl< is_ad >::_function
protected

Definition at line 39 of file Pressure.h.

◆ _postprocessor

template<bool is_ad>
const PostprocessorValue* const PressureTempl< is_ad >::_postprocessor
protected

Definition at line 40 of file Pressure.h.

◆ usingTransientInterfaceMembers

template<bool is_ad>
PressureTempl< is_ad >::usingTransientInterfaceMembers
protected

Definition at line 46 of file Pressure.h.


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