www.mooseframework.org
INSMomentumNoBCBCLaplaceForm.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 
11 #include "MooseMesh.h"
12 
14 
17 {
19 
20  params.addClassDescription("This class implements the 'No BC' boundary condition based on the "
21  "'Laplace' form of the viscous stress tensor.");
22  return params;
23 }
24 
26  : INSMomentumNoBCBCBase(parameters)
27 {
28 }
29 
30 Real
32 {
33  // -mu * (grad(u).n) * test
34  Real viscous_part = -_mu[_qp] * (_grad_u[_qp] * _normals[_qp]) * _test[_i][_qp];
35 
36  // pIn * test
37  Real pressure_part = 0.;
39  pressure_part = _p[_qp] * _normals[_qp](_component) * _test[_i][_qp];
40 
41  return viscous_part + pressure_part;
42 }
43 
44 Real
46 {
47  return -_mu[_qp] * (_grad_phi[_j][_qp] * _normals[_qp]) * _test[_i][_qp];
48 }
49 
50 Real
52 {
53  if (jvar == _p_var_number && _integrate_p_by_parts)
54  return _phi[_j][_qp] * _normals[_qp](_component) * _test[_i][_qp];
55 
56  else
57  return 0.;
58 }
const VariableTestValue & _test
unsigned int _j
const MooseArray< Point > & _normals
INSMomentumNoBCBCLaplaceForm(const InputParameters &parameters)
const MaterialProperty< Real > & _mu
virtual Real computeQpOffDiagJacobian(unsigned jvar)
const VariableGradient & _grad_u
unsigned int _i
const VariableValue & _p
const VariablePhiValue & _phi
unsigned int _qp
const VariablePhiGradient & _grad_phi
registerMooseObject("NavierStokesApp", INSMomentumNoBCBCLaplaceForm)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
Base class for the "No BC" boundary condition.
This class implements the "No BC" boundary condition based on the "Laplace" form of the viscous stres...