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

Gravity computes the body force (force/volume) given the acceleration of gravity (value) and the density. More...

#include <Gravity.h>

Inheritance diagram for Gravity:
[legend]

Public Member Functions

 Gravity (const InputParameters &parameters)
 
virtual ~Gravity ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const MaterialProperty< Real > & _density
 
Real _value
 
Function & _function
 
const Real _alpha
 

Detailed Description

Gravity computes the body force (force/volume) given the acceleration of gravity (value) and the density.

Definition at line 22 of file Gravity.h.

Constructor & Destructor Documentation

Gravity::Gravity ( const InputParameters &  parameters)

Definition at line 25 of file Gravity.C.

26  : Kernel(parameters),
27  _density(getMaterialProperty<Real>("density")),
28  _value(getParam<Real>("value")),
29  _function(getFunction("function")),
30  _alpha(getParam<Real>("alpha"))
31 {
32 }
Real _value
Definition: Gravity.h:34
Function & _function
Definition: Gravity.h:35
const MaterialProperty< Real > & _density
Definition: Gravity.h:32
const Real _alpha
Definition: Gravity.h:37
virtual Gravity::~Gravity ( )
inlinevirtual

Definition at line 27 of file Gravity.h.

27 {}

Member Function Documentation

Real Gravity::computeQpResidual ( )
protectedvirtual

Definition at line 35 of file Gravity.C.

Referenced by ~Gravity().

36 {
37  Real factor = _value * _function.value(_t + _alpha * _dt, _q_point[_qp]);
38  return _density[_qp] * _test[_i][_qp] * -factor;
39 }
Real _value
Definition: Gravity.h:34
Function & _function
Definition: Gravity.h:35
const MaterialProperty< Real > & _density
Definition: Gravity.h:32
const Real _alpha
Definition: Gravity.h:37

Member Data Documentation

const Real Gravity::_alpha
protected

Definition at line 37 of file Gravity.h.

Referenced by computeQpResidual().

const MaterialProperty<Real>& Gravity::_density
protected

Definition at line 32 of file Gravity.h.

Referenced by computeQpResidual().

Function& Gravity::_function
protected

Definition at line 35 of file Gravity.h.

Referenced by computeQpResidual().

Real Gravity::_value
protected

Definition at line 34 of file Gravity.h.

Referenced by computeQpResidual().


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