https://mooseframework.inl.gov
MassConvectiveFlux.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 "MassConvectiveFlux.h"
11 
12 registerMooseObject("NavierStokesApp", MassConvectiveFlux);
13 
16 {
18  params.addRequiredCoupledVar("vel_x", "x-component of the velocity vector");
19  params.addCoupledVar("vel_y", "y-component of the velocity vector");
20  params.addCoupledVar("vel_z", "z-component of the velocity vector");
21  params.addClassDescription("Implements the advection term for the Navier Stokes mass equation.");
22 
23  return params;
24 }
25 
27  : Kernel(parameters),
28  _vel_x(coupledValue("vel_x")),
29  _vel_y(isCoupled("vel_y") ? coupledValue("vel_y") : _zero),
30  _vel_z(isCoupled("vel_z") ? coupledValue("vel_z") : _zero)
31 {
32 }
33 
34 Real
36 {
38  return -_u[_qp] * vel_vec * _grad_test[_i][_qp];
39 }
40 
41 Real
43 {
45  return -_phi[_j][_qp] * vel_vec * _grad_test[_i][_qp];
46 }
MassConvectiveFlux(const InputParameters &parameters)
static InputParameters validParams()
const VariableValue & _vel_y
static InputParameters validParams()
virtual Real computeQpJacobian()
unsigned int _i
registerMooseObject("NavierStokesApp", MassConvectiveFlux)
const VariableValue & _vel_x
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpResidual()
const VariableTestGradient & _grad_test
void addClassDescription(const std::string &doc_string)
const VariableValue & _vel_z
Mass convective flux: .
const VariablePhiValue & _phi
const VariableValue & _u
unsigned int _qp