https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13registerMooseObject("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");
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
35Real
37{
38 RealVectorValue vel_vec(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]);
39 return _u[_qp] * vel_vec * _normals[_qp] * _test[_i][_qp];
40}
registerMooseObject("NavierStokesApp", MassFreeBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
unsigned int _i
const VariableValue & _u
static InputParameters validParams()
const MooseArray< Point > & _normals
const VariableTestValue & _test
virtual Real computeQpResidual()
Definition MassFreeBC.C:36
const VariableValue & _vel_z
Definition MassFreeBC.h:29
const VariableValue & _vel_x
Definition MassFreeBC.h:27
static InputParameters validParams()
Definition MassFreeBC.C:16
const VariableValue & _vel_y
Definition MassFreeBC.h:28
MassFreeBC(const InputParameters &parameters)
Definition MassFreeBC.C:27