www.mooseframework.org
MassConvectiveFlux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<Kernel>();
19  params.addRequiredCoupledVar("vel_x", "x-component of the velocity vector");
20  params.addCoupledVar("vel_y", "y-component of the velocity vector");
21  params.addCoupledVar("vel_z", "z-component of the velocity vector");
22  return params;
23 }
24 
25 MassConvectiveFlux::MassConvectiveFlux(const InputParameters & parameters)
26  : Kernel(parameters),
27  _vel_x(coupledValue("vel_x")),
28  _vel_y(isCoupled("vel_y") ? coupledValue("vel_y") : _zero),
29  _vel_z(isCoupled("vel_z") ? coupledValue("vel_z") : _zero)
30 {
31 }
32 
33 Real
35 {
36  RealVectorValue vel_vec(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]);
37  return -_u[_qp] * vel_vec * _grad_test[_i][_qp];
38 }
39 
40 Real
42 {
43  RealVectorValue vel_vec(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]);
44  return -_phi[_j][_qp] * vel_vec * _grad_test[_i][_qp];
45 }
MassConvectiveFlux::_vel_z
const VariableValue & _vel_z
Definition: MassConvectiveFlux.h:35
validParams< MassConvectiveFlux >
InputParameters validParams< MassConvectiveFlux >()
Definition: MassConvectiveFlux.C:16
MassConvectiveFlux.h
MassConvectiveFlux::_vel_y
const VariableValue & _vel_y
Definition: MassConvectiveFlux.h:34
MassConvectiveFlux::_vel_x
const VariableValue & _vel_x
Definition: MassConvectiveFlux.h:33
MassConvectiveFlux::computeQpJacobian
virtual Real computeQpJacobian()
Definition: MassConvectiveFlux.C:41
registerMooseObject
registerMooseObject("NavierStokesApp", MassConvectiveFlux)
MassConvectiveFlux::MassConvectiveFlux
MassConvectiveFlux(const InputParameters &parameters)
Definition: MassConvectiveFlux.C:25
MassConvectiveFlux::computeQpResidual
virtual Real computeQpResidual()
Definition: MassConvectiveFlux.C:34
MassConvectiveFlux
Mass convective flux: .
Definition: MassConvectiveFlux.h:23