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

#include <NSImposedVelocityBC.h>

Inheritance diagram for NSImposedVelocityBC:
[legend]

Public Member Functions

 NSImposedVelocityBC (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const VariableValue & _rho
 
Real _desired_velocity
 

Detailed Description

Definition at line 23 of file NSImposedVelocityBC.h.

Constructor & Destructor Documentation

◆ NSImposedVelocityBC()

NSImposedVelocityBC::NSImposedVelocityBC ( const InputParameters &  parameters)

Definition at line 27 of file NSImposedVelocityBC.C.

28  : NodalBC(parameters),
29  _rho(coupledValue(NS::density)),
30  _desired_velocity(getParam<Real>("desired_velocity"))
31 {
32 }
const VariableValue & _rho
const std::string density
Definition: NS.h:17

Member Function Documentation

◆ computeQpResidual()

Real NSImposedVelocityBC::computeQpResidual ( )
protectedvirtual

Definition at line 35 of file NSImposedVelocityBC.C.

36 {
37  // Return the difference between the current momentum and the desired value
38  // (rho*u) - rho*desired_velocity
39  return _u[_qp] - (_rho[_qp] * _desired_velocity);
40 }
const VariableValue & _rho

Member Data Documentation

◆ _desired_velocity

Real NSImposedVelocityBC::_desired_velocity
protected

Definition at line 39 of file NSImposedVelocityBC.h.

Referenced by computeQpResidual().

◆ _rho

const VariableValue& NSImposedVelocityBC::_rho
protected

Definition at line 36 of file NSImposedVelocityBC.h.

Referenced by computeQpResidual().


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