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 18 of file NSGravityPower.h.

Constructor & Destructor Documentation

NSGravityPower::NSGravityPower ( const InputParameters &  parameters)

Definition at line 20 of file NSGravityPower.C.

21  : Kernel(parameters),
22  _momentum_var(coupled("momentum")),
23  _momentum(coupledValue("momentum")),
24  _acceleration(getParam<Real>("acceleration"))
25 {
26 }
const Real _acceleration
unsigned int _momentum_var
const VariableValue & _momentum

Member Function Documentation

Real NSGravityPower::computeQpJacobian ( )
protectedvirtual

Definition at line 36 of file NSGravityPower.C.

37 {
38  return 0.0;
39 }
Real NSGravityPower::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 42 of file NSGravityPower.C.

43 {
44  if (jvar == _momentum_var)
45  return -_phi[_j][_qp] * _acceleration * _test[_i][_qp];
46 
47  return 0.0;
48 }
const Real _acceleration
unsigned int _momentum_var
Real NSGravityPower::computeQpResidual ( )
protectedvirtual

Definition at line 29 of file NSGravityPower.C.

30 {
31  // -(rho * U * g) * phi
32  return -_momentum[_qp] * _acceleration * _test[_i][_qp];
33 }
const Real _acceleration
const VariableValue & _momentum

Member Data Documentation

const Real NSGravityPower::_acceleration
protected

Definition at line 31 of file NSGravityPower.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const VariableValue& NSGravityPower::_momentum
protected

Definition at line 29 of file NSGravityPower.h.

Referenced by computeQpResidual().

unsigned int NSGravityPower::_momentum_var
protected

Definition at line 28 of file NSGravityPower.h.

Referenced by computeQpOffDiagJacobian().


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