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

#include <NSGravityPower.h>

Inheritance diagram for NSGravityPower:
[legend]

Public Member Functions

 NSGravityPower (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

unsigned int _momentum_var
 
const VariableValue & _momentum
 
const Real _acceleration
 

Detailed Description

Definition at line 21 of file NSGravityPower.h.

Constructor & Destructor Documentation

◆ NSGravityPower()

NSGravityPower::NSGravityPower ( const InputParameters &  parameters)

Definition at line 25 of file NSGravityPower.C.

26  : Kernel(parameters),
27  _momentum_var(coupled("momentum")),
28  _momentum(coupledValue("momentum")),
29  _acceleration(getParam<Real>("acceleration"))
30 {
31 }
const Real _acceleration
unsigned int _momentum_var
const VariableValue & _momentum

Member Function Documentation

◆ computeQpJacobian()

Real NSGravityPower::computeQpJacobian ( )
protectedvirtual

Definition at line 41 of file NSGravityPower.C.

42 {
43  return 0.0;
44 }

◆ computeQpOffDiagJacobian()

Real NSGravityPower::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 47 of file NSGravityPower.C.

48 {
49  if (jvar == _momentum_var)
50  return -_phi[_j][_qp] * _acceleration * _test[_i][_qp];
51 
52  return 0.0;
53 }
const Real _acceleration
unsigned int _momentum_var

◆ computeQpResidual()

Real NSGravityPower::computeQpResidual ( )
protectedvirtual

Definition at line 34 of file NSGravityPower.C.

35 {
36  // -(rho * U * g) * phi
37  return -_momentum[_qp] * _acceleration * _test[_i][_qp];
38 }
const Real _acceleration
const VariableValue & _momentum

Member Data Documentation

◆ _acceleration

const Real NSGravityPower::_acceleration
protected

Definition at line 34 of file NSGravityPower.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _momentum

const VariableValue& NSGravityPower::_momentum
protected

Definition at line 32 of file NSGravityPower.h.

Referenced by computeQpResidual().

◆ _momentum_var

unsigned int NSGravityPower::_momentum_var
protected

Definition at line 31 of file NSGravityPower.h.

Referenced by computeQpOffDiagJacobian().


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