https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
34Real
36{
37 RealVectorValue vel_vec(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]);
38 return -_u[_qp] * vel_vec * _grad_test[_i][_qp];
39}
40
41Real
43{
44 RealVectorValue vel_vec(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]);
45 return -_phi[_j][_qp] * vel_vec * _grad_test[_i][_qp];
46}
registerMooseObject("NavierStokesApp", MassConvectiveFlux)
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 _j
unsigned int _i
const VariablePhiValue & _phi
static InputParameters validParams()
const VariableTestGradient & _grad_test
const VariableValue & _u
Mass convective flux: .
static InputParameters validParams()
const VariableValue & _vel_z
MassConvectiveFlux(const InputParameters &parameters)
virtual Real computeQpResidual()
virtual Real computeQpJacobian()
const VariableValue & _vel_y
const VariableValue & _vel_x