https://mooseframework.inl.gov
LinearFVP1TemperatureSourceSink.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 "HeatConductionNames.h"
12 #include "MathUtils.h"
13 
15 
18 {
20  params.addClassDescription(
21  "Implements the source and sink term for the temperature in the P1 radiation formulation.");
22  params.addRequiredParam<MooseFunctorName>("G", "The incident radiation in the P1 model.");
23  params.addParam<MooseFunctorName>(
24  "absorption_coeff", 1.0, "The absorption coefficient of the material.");
25  return params;
26 }
27 
29  : LinearFVElementalKernel(params),
30  _G(getFunctor<Real>("G")),
31  _sigma_a(getFunctor<Real>("absorption_coeff"))
32 {
33 }
34 
35 Real
37 {
38  const auto elem_arg = makeElemArg(_current_elem_info->elem());
39  const auto state_arg = determineState();
40 
43  _sigma_a(elem_arg, state_arg) * _current_elem_volume;
44 }
45 
46 Real
48 {
49  const auto elem_arg = makeElemArg(_current_elem_info->elem());
50  const auto state_arg = determineState();
51 
52  return _sigma_a(elem_arg, state_arg) * _G(elem_arg, state_arg) * _current_elem_volume;
53 }
const ElemInfo * _current_elem_info
const Moose::Functor< Real > & _sigma_a
The functor for the absorption coefficient.
LinearFVP1TemperatureSourceSink(const InputParameters &params)
Class constructor.
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()
MooseLinearVariableFV< Real > & _var
void addRequiredParam(const std::string &name, const std::string &doc_string)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
virtual Real computeRightHandSideContribution() override
registerMooseObject("HeatTransferApp", LinearFVP1TemperatureSourceSink)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Kernel that adds the volumetric source contribution from the participating media radiation.
const Moose::Functor< Real > & _G
The functor for the incident radiation.
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
void addClassDescription(const std::string &doc_string)
T pow(T x, int e)