https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MomentumConvectiveFlux.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
11
13
16{
18 params.addRequiredCoupledVar("vel_x", "");
19 params.addCoupledVar("vel_y", "");
20 params.addCoupledVar("vel_z", "");
22 "Implements the advective term of the Navier Stokes momentum equation.");
23
24 return params;
25}
26
28 : Kernel(parameters),
29 _vel_x(coupledValue("vel_x")),
30 _vel_y(isCoupled("vel_y") ? coupledValue("vel_y") : _zero),
31 _vel_z(isCoupled("vel_z") ? 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 * _grad_test[_i][_qp]);
40}
41
42Real
registerMooseObject("NavierStokesApp", MomentumConvectiveFlux)
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
static InputParameters validParams()
const VariableTestGradient & _grad_test
const VariableValue & _u
Momentum convective flux: .
const VariableValue & _vel_x
const VariableValue & _vel_y
MomentumConvectiveFlux(const InputParameters &parameters)
static InputParameters validParams()
const VariableValue & _vel_z