www.mooseframework.org
NSPenalizedNormalFlowBC.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 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<NSIntegratedBC>();
19  params.addClassDescription("This class penalizes the the value of u.n on the boundary so that it "
20  "matches some desired value.");
21  params.addRequiredParam<Real>("penalty", "The penalty parameter, some (large) value.");
22  params.addParam<Real>("specified_udotn", 0., "The desired value of u.n.");
23  return params;
24 }
25 
26 NSPenalizedNormalFlowBC::NSPenalizedNormalFlowBC(const InputParameters & parameters)
27  : NSIntegratedBC(parameters),
28  _penalty(getParam<Real>("penalty")),
29  _specified_udotn(getParam<Real>("specified_udotn"))
30 {
31 }
32 
33 Real
35 {
36  const RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
37  return _penalty * ((vel * _normals[_qp]) - _specified_udotn) * _test[_i][_qp];
38 }
39 
40 Real
42 {
43  // TODO
44  return 0.0;
45 }
46 
47 Real
49 {
50  // TODO
51  return 0.0;
52 }
validParams< NSPenalizedNormalFlowBC >
InputParameters validParams< NSPenalizedNormalFlowBC >()
Definition: NSPenalizedNormalFlowBC.C:16
validParams< NSIntegratedBC >
InputParameters validParams< NSIntegratedBC >()
Definition: NSIntegratedBC.C:22
NSPenalizedNormalFlowBC::_specified_udotn
const Real _specified_udotn
Definition: NSPenalizedNormalFlowBC.h:39
NSIntegratedBC::_w_vel
const VariableValue & _w_vel
Definition: NSIntegratedBC.h:37
NSPenalizedNormalFlowBC::NSPenalizedNormalFlowBC
NSPenalizedNormalFlowBC(const InputParameters &parameters)
Definition: NSPenalizedNormalFlowBC.C:26
NSPenalizedNormalFlowBC
This class penalizes the the value of u.n on the boundary so that it matches some desired value.
Definition: NSPenalizedNormalFlowBC.h:24
NSPenalizedNormalFlowBC::_penalty
const Real _penalty
Definition: NSPenalizedNormalFlowBC.h:38
NSPenalizedNormalFlowBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: NSPenalizedNormalFlowBC.C:48
NSPenalizedNormalFlowBC.h
NSIntegratedBC
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
Definition: NSIntegratedBC.h:29
NSIntegratedBC::_v_vel
const VariableValue & _v_vel
Definition: NSIntegratedBC.h:36
NSIntegratedBC::_u_vel
const VariableValue & _u_vel
Definition: NSIntegratedBC.h:35
registerMooseObject
registerMooseObject("NavierStokesApp", NSPenalizedNormalFlowBC)
NSPenalizedNormalFlowBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSPenalizedNormalFlowBC.C:41
NSPenalizedNormalFlowBC::computeQpResidual
virtual Real computeQpResidual()
The standard interface functions.
Definition: NSPenalizedNormalFlowBC.C:34