https://mooseframework.inl.gov
KokkosCoupledConvectiveHeatFluxBC.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 
20 {
21 public:
23 
25 
26  template <typename Derived>
27  KOKKOS_FUNCTION Real computeQpResidual(const unsigned int qp, AssemblyDatum & datum) const;
28  template <typename Derived>
29  KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int j,
30  const unsigned int qp,
31  AssemblyDatum & datum) const;
32 
33 private:
35  const unsigned int _n_components;
44 };
45 
46 template <typename Derived>
47 KOKKOS_FUNCTION Real
49  AssemblyDatum & datum) const
50 {
51  Real q = 0;
52  Real u = _u(datum, qp);
53  for (unsigned int c = 0; c < _n_components; c++)
54  q += _alpha(datum, qp, c) * _htc(datum, qp, c) * (u - _T_infinity(datum, qp, c));
55  return q * _scale_factor(datum, qp);
56 }
57 
58 template <typename Derived>
59 KOKKOS_FUNCTION Real
61  const unsigned int qp,
62  AssemblyDatum & datum) const
63 {
64  Real dq = 0;
65  Real phi = _phi(datum, j, qp);
66  for (unsigned int c = 0; c < _n_components; c++)
67  dq += _alpha(datum, qp, c) * _htc(datum, qp, c) * phi;
68  return dq * _scale_factor(datum, qp);
69 }
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
const Moose::Kokkos::VariableValue _alpha
Volume fraction of individual phase.
Boundary condition for convective heat flux where temperature and heat transfer coefficient are given...
const InputParameters & parameters() const
const unsigned int _n_components
The number of components.
const Moose::Kokkos::VariableValue _htc
Convective heat transfer coefficient.
const Moose::Kokkos::VariableValue _T_infinity
Far-field temperature fields for each component.
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int qp, AssemblyDatum &datum) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const VariablePhiValue _phi
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const Moose::Kokkos::VariableValue _scale_factor
Scale factor.
KokkosCoupledConvectiveHeatFluxBC(const InputParameters &parameters)