Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : #include "LinearFVP1RadiationMarshakBC.h" 11 : #include "HeatConductionNames.h" 12 : 13 : registerMooseObject("HeatTransferApp", LinearFVP1RadiationMarshakBC); 14 : 15 : InputParameters 16 144 : LinearFVP1RadiationMarshakBC::validParams() 17 : { 18 144 : InputParameters params = LinearFVAdvectionDiffusionFunctorRobinBCBase::validParams(); 19 144 : params.addClassDescription("Marshak boundary condition for radiative heat flux."); 20 288 : params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiation temperature."); 21 288 : params.addRequiredParam<MooseFunctorName>("coeff_diffusion", 22 : "Radiative heat flux P1 diffusion coefficient."); 23 288 : params.addParam<MooseFunctorName>("boundary_emissivity", 1.0, "Emissivity of the boundary."); 24 144 : return params; 25 0 : } 26 : 27 72 : LinearFVP1RadiationMarshakBC::LinearFVP1RadiationMarshakBC(const InputParameters & parameters) 28 : : LinearFVAdvectionDiffusionFunctorRobinBCBase(parameters), 29 72 : _temperature_radiation(getFunctor<Real>("temperature_radiation")), 30 144 : _coeff_diffusion(getFunctor<Real>("coeff_diffusion")), 31 216 : _eps_boundary(getFunctor<Real>("boundary_emissivity")) 32 : { 33 72 : } 34 : 35 : Real 36 4820 : LinearFVP1RadiationMarshakBC::getAlpha(Moose::FaceArg face, Moose::StateArg state) const 37 : { 38 4820 : const auto alpha = -_coeff_diffusion(face, state); 39 4820 : return alpha; 40 : } 41 : 42 : Real 43 4820 : LinearFVP1RadiationMarshakBC::getBeta(Moose::FaceArg face, Moose::StateArg state) const 44 : { 45 4820 : const auto beta = -_eps_boundary(face, state) / (2 * (2 - _eps_boundary(face, state))); 46 4820 : return beta; 47 : } 48 : 49 : Real 50 3615 : LinearFVP1RadiationMarshakBC::getGamma(Moose::FaceArg face, Moose::StateArg state) const 51 : { 52 3615 : const auto gamma = -_eps_boundary(face, state) * 4 * HeatConduction::Constants::sigma * 53 3615 : Utility::pow<4>(_temperature_radiation(face, state)) / 54 3615 : ((2 * (2 - _eps_boundary(face, state)))); 55 : 56 3615 : return gamma; 57 : }