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

Constructor & Destructor Documentation

◆ AEFVBC()

AEFVBC::AEFVBC ( const InputParameters &  parameters)

Definition at line 28 of file AEFVBC.C.

29  : IntegratedBC(parameters),
30  _component(getParam<MooseEnum>("component")),
31  _uc1(coupledValue("u")),
32  _u1(getMaterialProperty<Real>("u")),
33  _flux(getUserObject<BoundaryFluxBase>("flux"))
34 {
35 }

◆ ~AEFVBC()

virtual AEFVBC::~AEFVBC ( )
inlinevirtual

Definition at line 48 of file AEFVBC.h.

48 {}

Member Function Documentation

◆ computeQpJacobian()

Real AEFVBC::computeQpJacobian ( )
protectedvirtual

Definition at line 53 of file AEFVBC.C.

54 {
55  // assemble the input vectors, which are
56  // the constant monomial from the current element
57  std::vector<Real> uvec1 = {_uc1[_qp]};
58 
59  // calculate the flux
60  auto & fjac1 = _flux.getJacobian(_current_side, _current_elem->id(), uvec1, _normals[_qp]);
61 
62  // distribute the contribution to the current element
63  return fjac1(_component, _component) * _phi[_j][_qp] * _test[_i][_qp];
64 }

◆ computeQpResidual()

Real AEFVBC::computeQpResidual ( )
protectedvirtual

Definition at line 38 of file AEFVBC.C.

39 {
40  // assemble the input vectors, which are
41  // the reconstructed linear monomial
42  // extrapolated at side center from the current element
43  std::vector<Real> uvec1 = {_u1[_qp]};
44 
45  // calculate the flux
46  const auto & flux = _flux.getFlux(_current_side, _current_elem->id(), uvec1, _normals[_qp]);
47 
48  // distribute the contribution to the current element
49  return flux[_component] * _test[_i][_qp];
50 }

Member Data Documentation

◆ _component

MooseEnum AEFVBC::_component
protected

choose an equation

Definition at line 55 of file AEFVBC.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _flux

const BoundaryFluxBase& AEFVBC::_flux
protected

bounadry flux object

Definition at line 66 of file AEFVBC.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _u1

const MaterialProperty<Real>& AEFVBC::_u1
protected

extrapolated variable values at side center

Definition at line 63 of file AEFVBC.h.

Referenced by computeQpResidual().

◆ _uc1

const VariableValue& AEFVBC::_uc1
protected

piecewise constant variable values in host element

Definition at line 60 of file AEFVBC.h.

Referenced by computeQpJacobian().


The documentation for this class was generated from the following files:
BoundaryFluxBase::getJacobian
virtual const DenseMatrix< Real > & getJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave) const
Get the boundary Jacobian matrix.
Definition: BoundaryFluxBase.C:70
AEFVBC::_component
MooseEnum _component
choose an equation
Definition: AEFVBC.h:55
AEFVBC::_flux
const BoundaryFluxBase & _flux
bounadry flux object
Definition: AEFVBC.h:66
AEFVBC::_uc1
const VariableValue & _uc1
piecewise constant variable values in host element
Definition: AEFVBC.h:60
AEFVBC::_u1
const MaterialProperty< Real > & _u1
extrapolated variable values at side center
Definition: AEFVBC.h:63
BoundaryFluxBase::getFlux
virtual const std::vector< Real > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave) const
Get the boundary flux vector.
Definition: BoundaryFluxBase.C:54