https://mooseframework.inl.gov
LinearFVP1RadiationSourceSink.C
Go to the documentation of this file.
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 
11 #include "Assembly.h"
12 #include "SubProblem.h"
13 #include "HeatConductionNames.h"
14 #include "MathUtils.h"
15 
17 
20 {
22  params.addClassDescription("Implements the source and sink term for the P1 radiation model "
23  "solving for incident radiation G.");
24  params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiative temperature.");
25  params.addParam<MooseFunctorName>(
26  "absorption_coeff", 1.0, "The absorption coefficient of the material.");
27  return params;
28 }
29 
31  : LinearFVElementalKernel(params),
32  _temperature_radiation(getFunctor<Real>("temperature_radiation")),
33  _sigma_a(getFunctor<Real>("absorption_coeff"))
34 {
35 }
36 
37 Real
39 {
41 }
42 
43 Real
45 {
46  const auto elem_arg = makeElemArg(_current_elem_info->elem());
47  const auto state_arg = determineState();
48 
49  return 4.0 * HeatConduction::Constants::sigma * _sigma_a(elem_arg, state_arg) *
50  Utility::pow<4>(_temperature_radiation(elem_arg, state_arg)) * _current_elem_volume;
51 }
const ElemInfo * _current_elem_info
LinearFVP1RadiationSourceSink(const InputParameters &params)
Class constructor.
virtual Real computeRightHandSideContribution() override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Moose::StateArg determineState() const
const Elem * elem() const
static InputParameters validParams()
registerMooseObject("HeatTransferApp", LinearFVP1RadiationSourceSink)
Kernel that adds contributions for the P1 model radiation source discretized using the finite volume ...
void addRequiredParam(const std::string &name, const std::string &doc_string)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
virtual Real computeMatrixContribution() override
const Moose::Functor< Real > & _temperature_radiation
The functor for the radiation temperature.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const Moose::Functor< Real > & _sigma_a
The functor for the absorption coefficient.