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

A material kernel for the advection equation using a cell-centered finite volume method. More...

#include <AEFVMaterial.h>

Inheritance diagram for AEFVMaterial:
[legend]

Public Member Functions

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

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

const VariableValue & _uc
 
const SlopeLimitingBase_lslope
 
MaterialProperty< Real > & _u
 

Detailed Description

A material kernel for the advection equation using a cell-centered finite volume method.

Notes:

  1. This material kernel is responsible for invoking the in-cell slope reconstruction and slope limiting based on the cell-average variable values.
  2. The reconstructed/limited linear polynomial variable in each element is then interpolated to the center of each side that surrounds an element.
  3. If a system of governing equations is being solved, the reconstructed/limited vector of variable gradients is only calculated once when the first equation is dealt with, and then cached for use for the rest of the equations.
  4. If reconstruction/limiting scheme is not turned on, the cell-average constant variable is used for flux calculations, which is first-order accurate in space and absolutely stable

Definition at line 42 of file AEFVMaterial.h.

Constructor & Destructor Documentation

AEFVMaterial::AEFVMaterial ( const InputParameters &  parameters)

Definition at line 25 of file AEFVMaterial.C.

26  : Material(parameters),
27  _uc(coupledValue("u")),
28  _lslope(getUserObject<SlopeLimitingBase>("slope_limiting")),
29  _u(declareProperty<Real>("u"))
30 {
31 }
MaterialProperty< Real > & _u
Definition: AEFVMaterial.h:58
const VariableValue & _uc
Definition: AEFVMaterial.h:52
const SlopeLimitingBase & _lslope
Definition: AEFVMaterial.h:55
AEFVMaterial::~AEFVMaterial ( )
virtual

Definition at line 33 of file AEFVMaterial.C.

33 {}

Member Function Documentation

void AEFVMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 36 of file AEFVMaterial.C.

37 {
38  // initialize the variable
39  _u[_qp] = _uc[_qp];
40 
41  // interpolate variable values at face center
42  if (_bnd)
43  {
44  // you should know how many equations you are solving and assign this number
45  // e.g. = 1 (for the advection equation)
46  unsigned int nvars = 1;
47  std::vector<RealGradient> ugrad(nvars, RealGradient(0., 0., 0.));
48  ugrad = _lslope.getElementSlope(_current_elem->id());
49 
50  // get the directional vector from cell center to face center
51  RealGradient dvec = _q_point[_qp] - _current_elem->centroid();
52 
53  // calculate the variable at face center
54  _u[_qp] += ugrad[0] * dvec;
55 
56  // clear the temporary vectors
57  ugrad.clear();
58  }
59  // calculations only for elemental output
60  else if (!_bnd)
61  {
62  }
63 }
MaterialProperty< Real > & _u
Definition: AEFVMaterial.h:58
const VariableValue & _uc
Definition: AEFVMaterial.h:52
virtual const std::vector< RealGradient > & getElementSlope(dof_id_type elementid) const
accessor function call
const SlopeLimitingBase & _lslope
Definition: AEFVMaterial.h:55

Member Data Documentation

const SlopeLimitingBase& AEFVMaterial::_lslope
protected

Definition at line 55 of file AEFVMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& AEFVMaterial::_u
protected

Definition at line 58 of file AEFVMaterial.h.

Referenced by computeQpProperties().

const VariableValue& AEFVMaterial::_uc
protected

Definition at line 52 of file AEFVMaterial.h.

Referenced by computeQpProperties().


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