https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSPenalizedNormalFlowBC.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.addClassDescription("This class penalizes the the value of u.n on the boundary so that it "
19 "matches some desired value.");
20 params.addRequiredParam<Real>("penalty", "The penalty parameter, some (large) value.");
21 params.addParam<Real>("specified_udotn", 0., "The desired value of u.n.");
22 return params;
23}
24
26 : NSIntegratedBC(parameters),
27 _penalty(getParam<Real>("penalty")),
28 _specified_udotn(getParam<Real>("specified_udotn"))
29{
30}
31
32Real
34{
35 const RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
36 return _penalty * ((vel * _normals[_qp]) - _specified_udotn) * _test[_i][_qp];
37}
38
39Real
41{
42 // TODO
43 return 0.0;
44}
45
46Real
48{
49 // TODO
50 return 0.0;
51}
registerMooseObject("NavierStokesApp", NSPenalizedNormalFlowBC)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _i
const MooseArray< Point > & _normals
const VariableTestValue & _test
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
const VariableValue & _w_vel
const VariableValue & _v_vel
static InputParameters validParams()
const VariableValue & _u_vel
This class penalizes the the value of u.n on the boundary so that it matches some desired value.
virtual Real computeQpOffDiagJacobian(unsigned jvar)
NSPenalizedNormalFlowBC(const InputParameters &parameters)
static InputParameters validParams()
virtual Real computeQpResidual()
The standard interface functions.