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

A boundary condition object for the advection equation using a cell-centered finite volume method. More...

#include <AEFVBC.h>

Inheritance diagram for AEFVBC:
[legend]

Public Member Functions

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

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 

Protected Attributes

MooseEnum _component
 choose an equation More...
 
const VariableValue & _uc1
 piecewise constant variable values in host element More...
 
const MaterialProperty< Real > & _u1
 extrapolated variable values at side center More...
 
const BoundaryFluxBase_flux
 bounadry flux object More...
 

Detailed Description

A boundary condition object for the advection equation using a cell-centered finite volume method.

Notes:

  1. This BC kernel itself does not do any complex calculation. It gets the flux vector and Jacobian matrix from the boundary flux user object being called.
  2. If a system of governing equations is being solved, the flux vector and Jacobian matrix are calculated only once for the first equation and cached for use for the rest of the equations in the system.
  3. On the "left" state of the boundary face, the variable value is interpolated from the reconstructed linear polynomial in the host element, which is provided from the corresponding material kernel.
  4. On the "right" state of the boundary face, the variable value should be obtained from the bc user object being called.

Definition at line 43 of file AEFVBC.h.

Constructor & Destructor Documentation

AEFVBC::AEFVBC ( const InputParameters &  parameters)

Definition at line 24 of file AEFVBC.C.

25  : IntegratedBC(parameters),
26  _component(getParam<MooseEnum>("component")),
27  _uc1(coupledValue("u")),
28  _u1(getMaterialProperty<Real>("u")),
29  _flux(getUserObject<BoundaryFluxBase>("flux"))
30 {
31 }
MooseEnum _component
choose an equation
Definition: AEFVBC.h:54
const VariableValue & _uc1
piecewise constant variable values in host element
Definition: AEFVBC.h:59
const BoundaryFluxBase & _flux
bounadry flux object
Definition: AEFVBC.h:65
const MaterialProperty< Real > & _u1
extrapolated variable values at side center
Definition: AEFVBC.h:62
virtual AEFVBC::~AEFVBC ( )
inlinevirtual

Definition at line 47 of file AEFVBC.h.

47 {}

Member Function Documentation

Real AEFVBC::computeQpJacobian ( )
protectedvirtual

Definition at line 49 of file AEFVBC.C.

Referenced by ~AEFVBC().

50 {
51  // assemble the input vectors, which are
52  // the constant monomial from the current element
53  std::vector<Real> uvec1 = {_uc1[_qp]};
54 
55  // calculate the flux
56  auto & fjac1 = _flux.getJacobian(_current_side, _current_elem->id(), uvec1, _normals[_qp], _tid);
57 
58  // distribute the contribution to the current element
59  return fjac1(_component, _component) * _phi[_j][_qp] * _test[_i][_qp];
60 }
MooseEnum _component
choose an equation
Definition: AEFVBC.h:54
const VariableValue & _uc1
piecewise constant variable values in host element
Definition: AEFVBC.h:59
virtual const DenseMatrix< Real > & getJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, THREAD_ID tid) const
Get the boundary Jacobian matrix.
const BoundaryFluxBase & _flux
bounadry flux object
Definition: AEFVBC.h:65
Real AEFVBC::computeQpResidual ( )
protectedvirtual

Definition at line 34 of file AEFVBC.C.

Referenced by ~AEFVBC().

35 {
36  // assemble the input vectors, which are
37  // the reconstructed linear monomial
38  // extrapolated at side center from the current element
39  std::vector<Real> uvec1 = {_u1[_qp]};
40 
41  // calculate the flux
42  const auto & flux = _flux.getFlux(_current_side, _current_elem->id(), uvec1, _normals[_qp], _tid);
43 
44  // distribute the contribution to the current element
45  return flux[_component] * _test[_i][_qp];
46 }
MooseEnum _component
choose an equation
Definition: AEFVBC.h:54
const BoundaryFluxBase & _flux
bounadry flux object
Definition: AEFVBC.h:65
virtual const std::vector< Real > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, THREAD_ID tid) const
Get the boundary flux vector.
const MaterialProperty< Real > & _u1
extrapolated variable values at side center
Definition: AEFVBC.h:62

Member Data Documentation

MooseEnum AEFVBC::_component
protected

choose an equation

Definition at line 54 of file AEFVBC.h.

Referenced by computeQpJacobian(), and computeQpResidual().

const BoundaryFluxBase& AEFVBC::_flux
protected

bounadry flux object

Definition at line 65 of file AEFVBC.h.

Referenced by computeQpJacobian(), and computeQpResidual().

const MaterialProperty<Real>& AEFVBC::_u1
protected

extrapolated variable values at side center

Definition at line 62 of file AEFVBC.h.

Referenced by computeQpResidual().

const VariableValue& AEFVBC::_uc1
protected

piecewise constant variable values in host element

Definition at line 59 of file AEFVBC.h.

Referenced by computeQpJacobian().


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