www.mooseframework.org
NSEnergyThermalFlux.h
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 #pragma once
11 
12 #include "NSKernel.h"
13 #include "NSTemperatureDerivs.h"
14 
15 // ForwardDeclarations
17 
18 template <>
19 InputParameters validParams<NSEnergyThermalFlux>();
20 
27 {
28 public:
29  NSEnergyThermalFlux(const InputParameters & parameters);
30 
31 protected:
32  virtual Real computeQpResidual();
33  virtual Real computeQpJacobian();
34  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
35 
36  // Gradients
37  const VariableGradient & _grad_temp;
38 
39  // Material properties
40  const MaterialProperty<Real> & _thermal_conductivity;
41 
42  // A helper object for computing temperature gradient and Hessians.
43  // Constructed via a reference to ourself so we can access all of our data.
45 
46  // Declare ourselves a friend to the helper class
47  template <class U>
48  friend class NSTemperatureDerivs;
49 
50 private:
51  // Computes the Jacobian value (on or off-diagonal) for
52  // var_number, which has been mapped to
53  // 0 = rho
54  // 1 = rho*u
55  // 2 = rho*v
56  // 3 = rho*w
57  // 4 = rho*E
58  Real computeJacobianHelper_value(unsigned var_number);
59 
60  // Single vector to refer to all gradients. We have to store
61  // pointers since you can't have a vector<Foo&>. Initialized in
62  // the ctor.
63  std::vector<const VariableGradient *> _gradU;
64 };
65 
NSEnergyThermalFlux::computeJacobianHelper_value
Real computeJacobianHelper_value(unsigned var_number)
Definition: NSEnergyThermalFlux.C:69
validParams< NSEnergyThermalFlux >
InputParameters validParams< NSEnergyThermalFlux >()
Definition: NSEnergyThermalFlux.C:18
NSTemperatureDerivs< NSEnergyThermalFlux >
NSEnergyThermalFlux
This class is responsible for computing residuals and Jacobian terms for the k * grad(T) * grad(phi) ...
Definition: NSEnergyThermalFlux.h:26
NSEnergyThermalFlux::_grad_temp
const VariableGradient & _grad_temp
Definition: NSEnergyThermalFlux.h:37
NSEnergyThermalFlux::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSEnergyThermalFlux.C:52
NSEnergyThermalFlux::_temp_derivs
NSTemperatureDerivs< NSEnergyThermalFlux > _temp_derivs
Definition: NSEnergyThermalFlux.h:44
NSEnergyThermalFlux::_gradU
std::vector< const VariableGradient * > _gradU
Definition: NSEnergyThermalFlux.h:63
NSKernel
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
Definition: NSKernel.h:29
NSKernel.h
NSTemperatureDerivs.h
NSEnergyThermalFlux::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: NSEnergyThermalFlux.C:60
NSEnergyThermalFlux::computeQpResidual
virtual Real computeQpResidual()
Definition: NSEnergyThermalFlux.C:45
NSEnergyThermalFlux::_thermal_conductivity
const MaterialProperty< Real > & _thermal_conductivity
Definition: NSEnergyThermalFlux.h:40
NSEnergyThermalFlux::NSEnergyThermalFlux
NSEnergyThermalFlux(const InputParameters &parameters)
Definition: NSEnergyThermalFlux.C:28