https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSInflowThermalBC.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
10#include "NSInflowThermalBC.h"
11
12// FluidProperties includes
14
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
43Real
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}
registerMooseObject("NavierStokesApp", NSInflowThermalBC)
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature.
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)
This class is used on a boundary where the incoming flow values (rho, u, v, T) are all completely spe...
static InputParameters validParams()
const Real _specified_temperature
const IdealGasFluidProperties & _fp
virtual Real computeQpResidual()
const Real _specified_velocity_magnitude
NSInflowThermalBC(const InputParameters &parameters)
const VariableValue & _u
static InputParameters validParams()
const unsigned int _qp