www.mooseframework.org
navier_stokes
src
bcs
NSMomentumConvectiveWeakStagnationBC.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 "
NSMomentumConvectiveWeakStagnationBC.h
"
11
12
registerMooseObject
(
"NavierStokesApp"
,
NSMomentumConvectiveWeakStagnationBC
);
13
14
template
<>
15
InputParameters
16
validParams<NSMomentumConvectiveWeakStagnationBC>
()
17
{
18
InputParameters params =
validParams<NSWeakStagnationBaseBC>
();
19
params.addClassDescription(
"The convective part (sans pressure term) of the momentum equation "
20
"boundary integral evaluated at specified stagnation temperature, "
21
"stagnation pressure, and flow direction values."
);
22
params.addRequiredParam<
unsigned
>(
23
"component"
,
"(0,1,2) = (x,y,z) for which momentum component this BC is applied to"
);
24
return
params;
25
}
26
27
NSMomentumConvectiveWeakStagnationBC::NSMomentumConvectiveWeakStagnationBC
(
28
const
InputParameters & parameters)
29
:
NSWeakStagnationBaseBC
(parameters), _component(getParam<unsigned>(
"component"
))
30
{
31
}
32
33
Real
34
NSMomentumConvectiveWeakStagnationBC::computeQpResidual
()
35
{
36
// Compute stagnation values
37
Real T_s = 0.0, p_s = 0.0, rho_s = 0.0;
38
staticValues
(T_s, p_s, rho_s);
39
40
// The specified flow direction, as a vector
41
RealVectorValue s(
_sx
,
_sy
,
_sz
);
42
43
// (rho_s * |u|^2 * s_k * (s.n)) * phi_i
44
return
(rho_s * this->
velmag2
() * s(
_component
) * this->
sdotn
()) * _test[_i][_qp];
45
}
46
47
Real
48
NSMomentumConvectiveWeakStagnationBC::computeQpJacobian
()
49
{
50
// TODO
51
return
0.0;
52
}
53
54
Real
55
NSMomentumConvectiveWeakStagnationBC::computeQpOffDiagJacobian
(
unsigned
/*jvar*/
)
56
{
57
// TODO
58
return
0.0;
59
}
registerMooseObject
registerMooseObject("NavierStokesApp", NSMomentumConvectiveWeakStagnationBC)
NSMomentumConvectiveWeakStagnationBC::NSMomentumConvectiveWeakStagnationBC
NSMomentumConvectiveWeakStagnationBC(const InputParameters ¶meters)
Definition:
NSMomentumConvectiveWeakStagnationBC.C:27
NSMomentumConvectiveWeakStagnationBC::_component
const unsigned int _component
Definition:
NSMomentumConvectiveWeakStagnationBC.h:36
NSMomentumConvectiveWeakStagnationBC::computeQpResidual
virtual Real computeQpResidual()
Definition:
NSMomentumConvectiveWeakStagnationBC.C:34
NSMomentumConvectiveWeakStagnationBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition:
NSMomentumConvectiveWeakStagnationBC.C:55
NSWeakStagnationBaseBC::_sz
Real _sz
Definition:
NSWeakStagnationBaseBC.h:53
NSWeakStagnationBaseBC
This is the base class for "weakly-imposed" stagnation boundary conditions, that is the relevant boun...
Definition:
NSWeakStagnationBaseBC.h:27
NSMomentumConvectiveWeakStagnationBC
The convective part (sans pressure term) of the momentum equation boundary integral evaluated at spec...
Definition:
NSMomentumConvectiveWeakStagnationBC.h:25
NSMomentumConvectiveWeakStagnationBC.h
NSWeakStagnationBaseBC::staticValues
void staticValues(Real &T_s, Real &p_s, Real &rho_s)
Definition:
NSWeakStagnationBaseBC.C:42
NSMomentumConvectiveWeakStagnationBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition:
NSMomentumConvectiveWeakStagnationBC.C:48
NSWeakStagnationBaseBC::sdotn
Real sdotn()
Definition:
NSWeakStagnationBaseBC.C:73
validParams< NSMomentumConvectiveWeakStagnationBC >
InputParameters validParams< NSMomentumConvectiveWeakStagnationBC >()
Definition:
NSMomentumConvectiveWeakStagnationBC.C:16
NSWeakStagnationBaseBC::_sx
Real _sx
Definition:
NSWeakStagnationBaseBC.h:51
NSWeakStagnationBaseBC::_sy
Real _sy
Definition:
NSWeakStagnationBaseBC.h:52
NSWeakStagnationBaseBC::velmag2
Real velmag2()
Definition:
NSWeakStagnationBaseBC.C:67
validParams< NSWeakStagnationBaseBC >
InputParameters validParams< NSWeakStagnationBaseBC >()
Definition:
NSWeakStagnationBaseBC.C:18
Generated on Sat Jan 25 2020 12:04:38 for www.mooseframework.org by
1.8.16