https://mooseframework.inl.gov
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 
10 #include "MomentumConvectiveFlux.h"
11 
13 
16 {
18  params.addRequiredCoupledVar("vel_x", "");
19  params.addCoupledVar("vel_y", "");
20  params.addCoupledVar("vel_z", "");
21  params.addClassDescription(
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 
35 Real
37 {
39  return -_u[_qp] * (vel_vec * _grad_test[_i][_qp]);
40 }
41 
42 Real
44 {
45  return 0.;
46 }
static InputParameters validParams()
const VariableValue & _vel_y
static InputParameters validParams()
registerMooseObject("NavierStokesApp", MomentumConvectiveFlux)
Momentum convective flux: .
const VariableValue & _vel_x
const VariableValue & _vel_z
unsigned int _i
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
MomentumConvectiveFlux(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
const VariableValue & _u
unsigned int _qp