Skip to content

Commit

Permalink
Merge pull request idaholab#26850 from tanoret/rad_bc_correct
Browse files Browse the repository at this point in the history
Expanding radiative heat flux BC for FV
  • Loading branch information
GiudGiud committed Feb 22, 2024
2 parents cecf6ca + 6563ed7 commit 2584f74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -42,7 +42,7 @@ class FVRadiativeHeatFluxBCBase : public FVFluxBC

/// Function describing the temperature of the body completely surrounding the surface, e.g. the
/// temperature of the body we are in radiative heat transfer with
const Function & _tinf;
const Moose::Functor<ADReal> & _tinf;

/// Emissivity of the boundary
const Real _eps_boundary;
Expand Down
7 changes: 3 additions & 4 deletions modules/heat_transfer/src/fvbcs/FVRadiativeHeatFluxBCBase.C
Expand Up @@ -8,7 +8,6 @@
//* https://www.gnu.org/licenses/lgpl-2.1.html

#include "FVRadiativeHeatFluxBCBase.h"
#include "Function.h"
#include "MathUtils.h"

InputParameters
Expand All @@ -17,7 +16,7 @@ FVRadiativeHeatFluxBCBase::validParams()
InputParameters params = FVFluxBC::validParams();
params.addCoupledVar("temperature", "temperature variable");
params.addParam<Real>("stefan_boltzmann_constant", 5.670367e-8, "The Stefan-Boltzmann constant.");
params.addParam<FunctionName>(
params.addParam<MooseFunctorName>(
"Tinfinity", "0", "Temperature of the body in radiative heat transfer.");
params.addParam<Real>("boundary_emissivity", 1, "Emissivity of the boundary.");
params.addClassDescription("Boundary condition for radiative heat flux where temperature and the"
Expand All @@ -29,7 +28,7 @@ FVRadiativeHeatFluxBCBase::FVRadiativeHeatFluxBCBase(const InputParameters & par
: FVFluxBC(parameters),
_T(isParamValid("temperature") ? adCoupledValue("temperature") : _u),
_sigma_stefan_boltzmann(getParam<Real>("stefan_boltzmann_constant")),
_tinf(getFunction("Tinfinity")),
_tinf(getFunctor<ADReal>("Tinfinity")),
_eps_boundary(getParam<Real>("boundary_emissivity"))
{
if (!isParamValid("temperature"))
Expand All @@ -40,6 +39,6 @@ ADReal
FVRadiativeHeatFluxBCBase::computeQpResidual()
{
const auto T4 = Utility::pow<4>(_T[_qp]);
const auto T4inf = Utility::pow<4>(_tinf.value(_t, _face_info->faceCentroid()));
const auto T4inf = Utility::pow<4>(_tinf(singleSidedFaceArg(_face_info), determineState()));
return _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf);
}

0 comments on commit 2584f74

Please sign in to comment.