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

A PostProcessor object to calculate the allowable time step size for the CNS equations. More...

#include <CNSFVTimeStepLimit.h>

Inheritance diagram for CNSFVTimeStepLimit:
[legend]

Public Member Functions

 CNSFVTimeStepLimit (const InputParameters &parameters)
 
virtual ~CNSFVTimeStepLimit ()
 
virtual void initialize ()
 
virtual void execute ()
 
virtual Real getValue ()
 
virtual void threadJoin (const UserObject &uo)
 

Protected Attributes

unsigned int _dim
 
Real _value
 the value of dt More...
 
Real _cfl
 user-input coefficient More...
 
const MaterialProperty< Real > & _vmag
 velocity magnitude More...
 
const MaterialProperty< Real > & _csou
 speed of sound More...
 

Detailed Description

A PostProcessor object to calculate the allowable time step size for the CNS equations.

Definition at line 21 of file CNSFVTimeStepLimit.h.

Constructor & Destructor Documentation

CNSFVTimeStepLimit::CNSFVTimeStepLimit ( const InputParameters &  parameters)

Definition at line 24 of file CNSFVTimeStepLimit.C.

25  : ElementPostprocessor(parameters),
26  _dim(_mesh.dimension()),
27  _cfl(getParam<Real>("cfl")),
28  _vmag(getMaterialProperty<Real>("velocity_magnitude")),
29  _csou(getMaterialProperty<Real>("speed_of_sound"))
30 {
31 }
const MaterialProperty< Real > & _vmag
velocity magnitude
const MaterialProperty< Real > & _csou
speed of sound
Real _cfl
user-input coefficient
CNSFVTimeStepLimit::~CNSFVTimeStepLimit ( )
virtual

Definition at line 33 of file CNSFVTimeStepLimit.C.

33 {}

Member Function Documentation

void CNSFVTimeStepLimit::execute ( )
virtual

Definition at line 42 of file CNSFVTimeStepLimit.C.

43 {
44  Real h_min = _current_elem->hmin();
45  for (unsigned qp = 0; qp < _qrule->n_points(); ++qp)
46  _value = std::min(_value, _cfl * h_min / (_vmag[qp] + _csou[qp]));
47 }
const MaterialProperty< Real > & _vmag
velocity magnitude
const MaterialProperty< Real > & _csou
speed of sound
Real _value
the value of dt
Real _cfl
user-input coefficient
Real CNSFVTimeStepLimit::getValue ( )
virtual

Definition at line 50 of file CNSFVTimeStepLimit.C.

51 {
52  gatherMin(_value);
53  return _value;
54 }
Real _value
the value of dt
void CNSFVTimeStepLimit::initialize ( )
virtual

Definition at line 36 of file CNSFVTimeStepLimit.C.

37 {
38  _value = std::numeric_limits<Real>::max();
39 }
Real _value
the value of dt
void CNSFVTimeStepLimit::threadJoin ( const UserObject &  uo)
virtual

Definition at line 57 of file CNSFVTimeStepLimit.C.

58 {
59  const CNSFVTimeStepLimit & pps = dynamic_cast<const CNSFVTimeStepLimit &>(uo);
60  _value = std::min(_value, pps._value);
61 }
Real _value
the value of dt
A PostProcessor object to calculate the allowable time step size for the CNS equations.

Member Data Documentation

Real CNSFVTimeStepLimit::_cfl
protected

user-input coefficient

Definition at line 42 of file CNSFVTimeStepLimit.h.

Referenced by execute().

const MaterialProperty<Real>& CNSFVTimeStepLimit::_csou
protected

speed of sound

Definition at line 48 of file CNSFVTimeStepLimit.h.

Referenced by execute().

unsigned int CNSFVTimeStepLimit::_dim
protected

Definition at line 36 of file CNSFVTimeStepLimit.h.

Real CNSFVTimeStepLimit::_value
protected

the value of dt

Definition at line 39 of file CNSFVTimeStepLimit.h.

Referenced by execute(), getValue(), initialize(), and threadJoin().

const MaterialProperty<Real>& CNSFVTimeStepLimit::_vmag
protected

velocity magnitude

Definition at line 45 of file CNSFVTimeStepLimit.h.

Referenced by execute().


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