www.mooseframework.org
AEFVFreeOutflowBoundaryFlux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<BoundaryFluxBase>();
15  params.addClassDescription("Free outflow BC based boundary flux user object for the advection "
16  "equation using a cell-centered finite volume method.");
17  return params;
18 }
19 
21  : BoundaryFluxBase(parameters)
22 {
23 }
24 
26 
27 void
29  dof_id_type /*ielem*/,
30  const std::vector<Real> & uvec1,
31  const RealVectorValue & dwave,
32  std::vector<Real> & flux) const
33 {
34  mooseAssert(uvec1.size() == 1, "Invalid size for uvec1. Must be single variable coupling.");
35 
36  // assume the velocity vector is constant, e.g. = (1., 1., 1.)
37  RealVectorValue uadv1(1.0, 1.0, 1.0);
38 
39  // assign the size of flux vector, e.g. = 1 for the advection equation
40  flux.resize(1);
41 
42  // finally calculate the flux
43  flux[0] = (uadv1 * dwave) * uvec1[0];
44 }
45 
46 void
48  dof_id_type /*ielem*/,
49  const std::vector<Real> & libmesh_dbg_var(uvec1),
50  const RealVectorValue & /*dwave*/,
51  DenseMatrix<Real> & /*jac1*/) const
52 {
53  mooseAssert(uvec1.size() == 1, "Invalid size for uvec1. Must be single variable coupling.");
54 }
InputParameters validParams< BoundaryFluxBase >()
A base class for computing/caching fluxes at boundaries.
AEFVFreeOutflowBoundaryFlux(const InputParameters &parameters)
virtual void calcJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, DenseMatrix< Real > &jac1) const override
Compute the Jacobian matrix on the boundary face.
InputParameters validParams< AEFVFreeOutflowBoundaryFlux >()
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, std::vector< Real > &flux) const override
Solve the Riemann problem on the boundary face.