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

Implements a simple constant Dashpot BC where grad(u)=value on the boundary. More...

#include <DashpotBC.h>

Inheritance diagram for DashpotBC:
[legend]

Public Member Functions

 DashpotBC (const InputParameters &parameters)
 Factory constructor, takes parameters so that all derived classes can be built using the same constructor. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Private Attributes

unsigned int _component
 
Real _coefficient
 
unsigned int _disp_x_var
 
unsigned int _disp_y_var
 
unsigned int _disp_z_var
 
const VariableValue & _disp_x_dot
 
const VariableValue & _disp_y_dot
 
const VariableValue & _disp_z_dot
 

Detailed Description

Implements a simple constant Dashpot BC where grad(u)=value on the boundary.

Uses the term produced from integrating the diffusion operator by parts.

Definition at line 24 of file DashpotBC.h.

Constructor & Destructor Documentation

◆ DashpotBC()

DashpotBC::DashpotBC ( const InputParameters &  parameters)

Factory constructor, takes parameters so that all derived classes can be built using the same constructor.

Definition at line 31 of file DashpotBC.C.

32  : IntegratedBC(parameters),
33  _component(getParam<unsigned int>("component")),
34  _coefficient(getParam<Real>("coefficient")),
35  _disp_x_var(coupled("disp_x")),
36  _disp_y_var(isCoupled("disp_y") ? coupled("disp_y") : 0),
37  _disp_z_var(isCoupled("disp_z") ? coupled("disp_z") : 0),
38 
39  _disp_x_dot(coupledDot("disp_x")),
40  _disp_y_dot(isCoupled("disp_y") ? coupledDot("disp_y") : _zero),
41  _disp_z_dot(isCoupled("disp_z") ? coupledDot("disp_z") : _zero)
42 {
43 }

Member Function Documentation

◆ computeQpJacobian()

Real DashpotBC::computeQpJacobian ( )
protectedvirtual

Definition at line 54 of file DashpotBC.C.

55 {
56  RealVectorValue velocity;
57  velocity(_component) = _phi[_j][_qp] / _dt;
58 
59  return _test[_i][_qp] * _coefficient * _normals[_qp] * velocity;
60 }

◆ computeQpOffDiagJacobian()

Real DashpotBC::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 63 of file DashpotBC.C.

64 {
65  RealVectorValue velocity;
66  unsigned int component = 0;
67 
68  if (jvar == _disp_x_var)
69  component = 0;
70  else if (jvar == _disp_y_var)
71  component = 1;
72  else if (jvar == _disp_z_var)
73  component = 2;
74 
75  velocity(component) = _phi[_j][_qp] / _dt;
76 
77  return -_test[_i][_qp] * _normals[_qp] * velocity;
78 }

◆ computeQpResidual()

Real DashpotBC::computeQpResidual ( )
protectedvirtual

Definition at line 46 of file DashpotBC.C.

47 {
48  RealVectorValue velocity(_disp_x_dot[_qp], _disp_y_dot[_qp], _disp_z_dot[_qp]);
49 
50  return _test[_i][_qp] * _coefficient * _normals[_qp] * velocity;
51 }

◆ validParams()

InputParameters DashpotBC::validParams ( )
static

Definition at line 17 of file DashpotBC.C.

18 {
19  InputParameters params = IntegratedBC::validParams();
20  params.addRequiredParam<unsigned int>(
21  "component", "The displacement component corresponding the variable this BC acts on.");
22  params.addRequiredCoupledVar("disp_x", "Displacement in the x direction");
23  params.addCoupledVar("disp_y", "Displacement in the y direction");
24  params.addCoupledVar("disp_z", "Displacement in the z direction");
25 
26  params.addParam<Real>("coefficient", 1.0, "The viscosity coefficient");
27 
28  return params;
29 }

Member Data Documentation

◆ _coefficient

Real DashpotBC::_coefficient
private

Definition at line 42 of file DashpotBC.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _component

unsigned int DashpotBC::_component
private

Definition at line 41 of file DashpotBC.h.

Referenced by computeQpJacobian().

◆ _disp_x_dot

const VariableValue& DashpotBC::_disp_x_dot
private

Definition at line 48 of file DashpotBC.h.

Referenced by computeQpResidual().

◆ _disp_x_var

unsigned int DashpotBC::_disp_x_var
private

Definition at line 44 of file DashpotBC.h.

Referenced by computeQpOffDiagJacobian().

◆ _disp_y_dot

const VariableValue& DashpotBC::_disp_y_dot
private

Definition at line 49 of file DashpotBC.h.

Referenced by computeQpResidual().

◆ _disp_y_var

unsigned int DashpotBC::_disp_y_var
private

Definition at line 45 of file DashpotBC.h.

Referenced by computeQpOffDiagJacobian().

◆ _disp_z_dot

const VariableValue& DashpotBC::_disp_z_dot
private

Definition at line 50 of file DashpotBC.h.

Referenced by computeQpResidual().

◆ _disp_z_var

unsigned int DashpotBC::_disp_z_var
private

Definition at line 46 of file DashpotBC.h.

Referenced by computeQpOffDiagJacobian().


The documentation for this class was generated from the following files:
DashpotBC::_component
unsigned int _component
Definition: DashpotBC.h:41
DashpotBC::_disp_x_var
unsigned int _disp_x_var
Definition: DashpotBC.h:44
DashpotBC::_disp_z_dot
const VariableValue & _disp_z_dot
Definition: DashpotBC.h:50
DashpotBC::_disp_z_var
unsigned int _disp_z_var
Definition: DashpotBC.h:46
validParams
InputParameters validParams()
MaterialTensorCalculatorTools::component
Real component(const SymmTensor &symm_tensor, unsigned int index)
Definition: MaterialTensorCalculatorTools.C:16
DashpotBC::_disp_x_dot
const VariableValue & _disp_x_dot
Definition: DashpotBC.h:48
DashpotBC::_disp_y_dot
const VariableValue & _disp_y_dot
Definition: DashpotBC.h:49
DashpotBC::_disp_y_var
unsigned int _disp_y_var
Definition: DashpotBC.h:45
DashpotBC::_coefficient
Real _coefficient
Definition: DashpotBC.h:42