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

#include <PresetVelocity.h>

Inheritance diagram for PresetVelocity:
[legend]

Public Member Functions

 PresetVelocity (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpValue ()
 

Protected Attributes

const VariableValue & _u_old
 
const Real _velocity
 
Function & _function
 

Detailed Description

Definition at line 15 of file PresetVelocity.h.

Constructor & Destructor Documentation

◆ PresetVelocity()

PresetVelocity::PresetVelocity ( const InputParameters &  parameters)

Definition at line 26 of file PresetVelocity.C.

27  : PresetNodalBC(parameters),
28  _u_old(valueOld()),
29  _velocity(parameters.get<Real>("velocity")),
30  _function(getFunction("function"))
31 {
32 }
Function & _function
const VariableValue & _u_old
const Real _velocity

Member Function Documentation

◆ computeQpValue()

Real PresetVelocity::computeQpValue ( )
protectedvirtual

Definition at line 35 of file PresetVelocity.C.

36 {
37  Real v2 = _function.value(_t, *_current_node);
38  Real v1 = _function.value(_t - _dt, *_current_node);
39  Real vel = _velocity * 0.5 * (v1 + v2);
40 
41  return _u_old[_qp] + _dt * vel;
42 }
Function & _function
const VariableValue & _u_old
const Real _velocity

Member Data Documentation

◆ _function

Function& PresetVelocity::_function
protected

Definition at line 25 of file PresetVelocity.h.

Referenced by computeQpValue().

◆ _u_old

const VariableValue& PresetVelocity::_u_old
protected

Definition at line 23 of file PresetVelocity.h.

Referenced by computeQpValue().

◆ _velocity

const Real PresetVelocity::_velocity
protected

Definition at line 24 of file PresetVelocity.h.

Referenced by computeQpValue().


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