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 
12 #include "KokkosIntegratedBC.h"
13 
20 {
21 public:
23 
25 
26  KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i,
27  const unsigned int qp,
28  ResidualDatum & datum) const;
29  KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i,
30  const unsigned int j,
31  const unsigned int qp,
32  ResidualDatum & datum) const;
33 
34 private:
36  const unsigned int _n_components;
45 };
46 
47 KOKKOS_FUNCTION inline Real
49  const unsigned int qp,
50  ResidualDatum & datum) const
51 {
52  Real q = 0;
53  Real u = _u(datum, qp);
54  for (unsigned int c = 0; c < _n_components; c++)
55  q += _alpha(datum, qp, c) * _htc(datum, qp, c) * (u - _T_infinity(datum, qp, c));
56  return _test(datum, i, qp) * q * _scale_factor(datum, qp);
57 }
58 
59 KOKKOS_FUNCTION inline Real
61  const unsigned int j,
62  const unsigned int qp,
63  ResidualDatum & datum) const
64 {
65  Real dq = 0;
66  Real phi = _phi(datum, j, qp);
67  for (unsigned int c = 0; c < _n_components; c++)
68  dq += _alpha(datum, qp, c) * _htc(datum, qp, c) * phi;
69  return _test(datum, i, qp) * dq * _scale_factor(datum, qp);
70 }
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 VariableValue _u
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 i, const unsigned int qp, ResidualDatum &datum) const
const VariableTestValue _test
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i, const unsigned int j, const unsigned int qp, ResidualDatum &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)