https://mooseframework.inl.gov
KokkosRadiativeHeatFluxBCBase.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 
13 
19 {
20 public:
23 
24  template <typename Derived>
25  KOKKOS_FUNCTION Real precomputeQpResidual(const unsigned int qp, AssemblyDatum & datum) const;
26  template <typename Derived>
27  KOKKOS_FUNCTION Real precomputeQpJacobian(const unsigned int j,
28  const unsigned int qp,
29  AssemblyDatum & datum) const;
30 
31 protected:
34 
36  const Real _tinf;
37 };
38 
39 template <typename Derived>
40 KOKKOS_FUNCTION Real
42  AssemblyDatum & datum) const
43 {
44  auto bc = static_cast<const Derived *>(this);
45 
46  Real T = _u(datum, qp);
47  Real T4 = T * T * T * T;
48  Real T4inf = _tinf * _tinf * _tinf * _tinf;
49  return _sigma_stefan_boltzmann * bc->coefficient() * (T4 - T4inf);
50 }
51 
52 template <typename Derived>
53 KOKKOS_FUNCTION Real
55  const unsigned int qp,
56  AssemblyDatum & datum) const
57 {
58  auto bc = static_cast<const Derived *>(this);
59 
60  Real T = _u(datum, qp);
61  Real T3 = T * T * T;
62  return 4 * _sigma_stefan_boltzmann * bc->coefficient() * T3 * _phi(datum, j, qp);
63 }
const double T
static InputParameters validParams()
KokkosRadiativeHeatFluxBCBase(const InputParameters &parameters)
const InputParameters & parameters() const
const Real _tinf
The temperature of the body irhs.
Boundary condition for radiative heat flux where temperature and the temperature of a body in radiati...
KOKKOS_FUNCTION Real precomputeQpResidual(const unsigned int qp, AssemblyDatum &datum) const
KOKKOS_FUNCTION Real precomputeQpJacobian(const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
const Real _sigma_stefan_boltzmann
Stefan-Boltzmann constant.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariablePhiValue _phi
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")