https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
21public:
23
25
26 template <typename Derived>
27 KOKKOS_FUNCTION Real precomputeQpResidual(const unsigned int qp, AssemblyDatum & datum) const;
28 template <typename Derived>
29 KOKKOS_FUNCTION Real precomputeQpJacobian(const unsigned int j,
30 const unsigned int qp,
31 AssemblyDatum & datum) const;
32
33private:
35 const unsigned int _n_components;
44};
45
46template <typename Derived>
47KOKKOS_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
58template <typename Derived>
59KOKKOS_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}
Boundary condition for convective heat flux where temperature and heat transfer coefficient are given...
KokkosCoupledConvectiveHeatFluxBC(const InputParameters &parameters)
const Moose::Kokkos::VariableValue _htc
Convective heat transfer coefficient.
KOKKOS_FUNCTION Real precomputeQpResidual(const unsigned int qp, AssemblyDatum &datum) const
static InputParameters validParams()
const Moose::Kokkos::VariableValue _scale_factor
Scale factor.
KOKKOS_FUNCTION Real precomputeQpJacobian(const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
const Moose::Kokkos::VariableValue _alpha
Volume fraction of individual phase.
const unsigned int _n_components
The number of components.
const Moose::Kokkos::VariableValue _T_infinity
Far-field temperature fields for each component.
const InputParameters & parameters() const
const VariablePhiValue _phi