https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSStagnationTemperatureBC.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// Navier-Stokes includes
12#include "NS.h"
13
14// FluidProperties includes
16
18
21{
23 params.addClassDescription("This Dirichlet condition imposes the condition T_0 = T_0_desired.");
24 params.addRequiredCoupledVar(NS::temperature, "temperature");
25 params.addRequiredParam<Real>("desired_stagnation_temperature", "");
26 return params;
27}
28
30 : NSStagnationBC(parameters),
31 _temperature(coupledValue(NS::temperature)),
32 _desired_stagnation_temperature(getParam<Real>("desired_stagnation_temperature"))
33{
34}
35
36Real
38{
39 // T_0 = T*(1 + 0.5*(gam-1)*M^2)
40 Real computed_stagnation_temperature =
41 _temperature[_qp] * (1. + 0.5 * (_fp.gamma() - 1.) * _mach[_qp] * _mach[_qp]);
42
43 // Return the difference between the current solution's stagnation temperature
44 // and the desired. The Dirichlet condition asserts that these should be equal.
45 return computed_stagnation_temperature - _desired_stagnation_temperature;
46}
registerMooseObject("NavierStokesApp", NSStagnationTemperatureBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
This is the base class for the "imposed stagnation" value boundary conditions.
static InputParameters validParams()
const IdealGasFluidProperties & _fp
const VariableValue & _mach
This Dirichlet condition imposes the condition T_0 = T_0_desired, where T_0 is the stagnation tempera...
static InputParameters validParams()
NSStagnationTemperatureBC(const InputParameters &parameters)
const unsigned int _qp
static const std::string temperature
Definition NS.h:60