https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
30 _G(getFunctor<Real>("G")),
31 _sigma_a(getFunctor<Real>("absorption_coeff"))
32{
33}
34
35Real
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
46Real
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}
registerMooseObject("HeatTransferApp", LinearFVP1TemperatureSourceSink)
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()
MooseLinearVariableFV< Real > & _var
Kernel that adds the volumetric source contribution from the participating media radiation.
LinearFVP1TemperatureSourceSink(const InputParameters &params)
Class constructor.
const Moose::Functor< Real > & _sigma_a
The functor for the absorption coefficient.
const Moose::Functor< Real > & _G
The functor for the incident radiation.
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
Moose::StateArg determineState() const
T pow(T x, int e)