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 44 of file AEFVMaterial.h.

Constructor & Destructor Documentation

◆ AEFVMaterial()

AEFVMaterial::AEFVMaterial ( const InputParameters &  parameters)

Definition at line 29 of file AEFVMaterial.C.

30  : Material(parameters),
31  _uc(coupledValue("u")),
32  _lslope(getUserObject<SlopeLimitingBase>("slope_limiting")),
33  _u(declareProperty<Real>("u"))
34 {
35 }
MaterialProperty< Real > & _u
Definition: AEFVMaterial.h:60
const VariableValue & _uc
Definition: AEFVMaterial.h:54
const SlopeLimitingBase & _lslope
Definition: AEFVMaterial.h:57

◆ ~AEFVMaterial()

AEFVMaterial::~AEFVMaterial ( )
virtual

Definition at line 37 of file AEFVMaterial.C.

37 {}

Member Function Documentation

◆ computeQpProperties()

void AEFVMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 40 of file AEFVMaterial.C.

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

Member Data Documentation

◆ _lslope

const SlopeLimitingBase& AEFVMaterial::_lslope
protected

Definition at line 57 of file AEFVMaterial.h.

Referenced by computeQpProperties().

◆ _u

MaterialProperty<Real>& AEFVMaterial::_u
protected

Definition at line 60 of file AEFVMaterial.h.

Referenced by computeQpProperties().

◆ _uc

const VariableValue& AEFVMaterial::_uc
protected

Definition at line 54 of file AEFVMaterial.h.

Referenced by computeQpProperties().


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