https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
32 _temperature_radiation(getFunctor<Real>("temperature_radiation")),
33 _sigma_a(getFunctor<Real>("absorption_coeff"))
34{
35}
36
37Real
42
43Real
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}
registerMooseObject("HeatTransferApp", LinearFVP1RadiationSourceSink)
const Elem * elem() const
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
const ElemInfo * _current_elem_info
static InputParameters validParams()
Kernel that adds contributions for the P1 model radiation source discretized using the finite volume ...
const Moose::Functor< Real > & _temperature_radiation
The functor for the radiation temperature.
LinearFVP1RadiationSourceSink(const InputParameters &params)
Class constructor.
const Moose::Functor< Real > & _sigma_a
The functor for the absorption coefficient.
virtual Real computeRightHandSideContribution() override
virtual Real computeMatrixContribution() override
Moose::StateArg determineState() const