Line data Source code
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 "NSEnergyWeakStagnationBC.h" 11 : 12 : // FluidProperties includes 13 : #include "IdealGasFluidProperties.h" 14 : 15 : registerMooseObject("NavierStokesApp", NSEnergyWeakStagnationBC); 16 : 17 : InputParameters 18 41 : NSEnergyWeakStagnationBC::validParams() 19 : { 20 41 : InputParameters params = NSWeakStagnationBaseBC::validParams(); 21 41 : params.addClassDescription("The inviscid energy BC term with specified normal flow."); 22 41 : return params; 23 0 : } 24 : 25 22 : NSEnergyWeakStagnationBC::NSEnergyWeakStagnationBC(const InputParameters & parameters) 26 22 : : NSWeakStagnationBaseBC(parameters) 27 : { 28 22 : } 29 : 30 : Real 31 114240 : NSEnergyWeakStagnationBC::computeQpResidual() 32 : { 33 : // Compute stagnation values 34 114240 : Real T_s = 0.0, p_s = 0.0, rho_s = 0.0; 35 114240 : staticValues(T_s, p_s, rho_s); 36 : 37 : // And get velocity magnitude, squared 38 114240 : Real velmag2 = this->velmag2(); 39 : 40 : // Compute static total energy, E_s 41 114240 : Real E_s = _fp.cv() * T_s + 0.5 * velmag2; 42 : 43 : // Compute the product rho_s * H_s (H_s = static enthalpy) 44 114240 : Real rhoH_s = rho_s * E_s + p_s; 45 : 46 : // rho_s * H_s * |u| * (s.n) * phi_i 47 114240 : return rhoH_s * std::sqrt(velmag2) * this->sdotn() * _test[_i][_qp]; 48 : } 49 : 50 : Real 51 69888 : NSEnergyWeakStagnationBC::computeQpJacobian() 52 : { 53 : // TODO 54 69888 : return 0.0; 55 : } 56 : 57 : Real 58 209664 : NSEnergyWeakStagnationBC::computeQpOffDiagJacobian(unsigned /*jvar*/) 59 : { 60 : // TODO 61 209664 : return 0.0; 62 : }