www.mooseframework.org
NSInflowThermalBC.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 "NSInflowThermalBC.h"
11 
12 // FluidProperties includes
14 
15 registerMooseObject("NavierStokesApp", NSInflowThermalBC);
16 
19 {
21 
22  params.addClassDescription("This class is used on a boundary where the incoming flow values "
23  "(rho, u, v, T) are all completely specified.");
24  // Boundary condition values, all required except for velocity which defaults to zero.
25  params.addRequiredParam<Real>("specified_rho", "Density of incoming flow");
26  params.addRequiredParam<Real>("specified_temperature", "Temperature of incoming flow");
27  params.addParam<Real>("specified_velocity_magnitude", 0., "Velocity magnitude of incoming flow");
28  params.addRequiredParam<UserObjectName>("fluid_properties",
29  "The name of the user object for fluid properties");
30 
31  return params;
32 }
33 
35  : NodalBC(parameters),
36  _specified_rho(getParam<Real>("specified_rho")),
37  _specified_temperature(getParam<Real>("specified_temperature")),
38  _specified_velocity_magnitude(getParam<Real>("specified_velocity_magnitude")),
39  _fp(getUserObject<IdealGasFluidProperties>("fluid_properties"))
40 {
41 }
42 
43 Real
45 {
46  // For the total energy, the essential BC is:
47  // rho*E = rho*(c_v*T + 0.5*|u|^2)
48  //
49  // or, in residual form, (In general, this BC is coupled to the velocity variables.)
50  // rho*E - rho*(c_v*T + 0.5*|u|^2) = 0
51  //
52  // ***at a no-slip wall*** this further reduces to (no coupling to velocity variables):
53  // rho*E - rho*cv*T = 0
54  return _u[_qp] -
57 }
const Real _specified_rho
const IdealGasFluidProperties & _fp
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const unsigned int _qp
void addRequiredParam(const std::string &name, const std::string &doc_string)
NSInflowThermalBC(const InputParameters &parameters)
This class is used on a boundary where the incoming flow values (rho, u, v, T) are all completely spe...
registerMooseObject("NavierStokesApp", NSInflowThermalBC)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _specified_velocity_magnitude
const Real _specified_temperature
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...
static InputParameters validParams()
const VariableValue & _u
virtual Real computeQpResidual()