https://mooseframework.inl.gov
MassFreeBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MassFreeBC.h"
11 #include "MooseMesh.h"
12 
13 registerMooseObject("NavierStokesApp", MassFreeBC);
14 
17 {
19  params.addRequiredCoupledVar("vel_x", "x-component of velocity");
20  params.addCoupledVar("vel_y", "y-component of velocity");
21  params.addCoupledVar("vel_z", "z-component of velocity");
22  params.addClassDescription(
23  "Implements free advective flow boundary conditions for the mass equation.");
24  return params;
25 }
26 
28  : IntegratedBC(parameters),
29  _vel_x(coupledValue("vel_x")),
30  _vel_y(_mesh.dimension() >= 2 ? coupledValue("vel_y") : _zero),
31  _vel_z(_mesh.dimension() >= 3 ? coupledValue("vel_z") : _zero)
32 {
33 }
34 
35 Real
37 {
39  return _u[_qp] * vel_vec * _normals[_qp] * _test[_i][_qp];
40 }
const VariableTestValue & _test
virtual Real computeQpResidual()
Definition: MassFreeBC.C:36
const VariableValue & _vel_z
Definition: MassFreeBC.h:29
const MooseArray< Point > & _normals
static InputParameters validParams()
Definition: MassFreeBC.C:16
static InputParameters validParams()
unsigned int _i
unsigned int _qp
MassFreeBC(const InputParameters &parameters)
Definition: MassFreeBC.C:27
registerMooseObject("NavierStokesApp", MassFreeBC)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const VariableValue & _vel_y
Definition: MassFreeBC.h:28
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _vel_x
Definition: MassFreeBC.h:27
void addClassDescription(const std::string &doc_string)
const VariableValue & _u