https://mooseframework.inl.gov
OneD3EqnEnergyHeatSource.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 "Function.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", OneD3EqnEnergyHeatSource);
14 
17 {
19  params.addRequiredParam<FunctionName>("q", "Volumetric heat source");
20  params.addRequiredCoupledVar("A", "Cross sectional area");
21  params.addClassDescription("Computes a volumetric heat source for 1-phase flow channel");
22  return params;
23 }
24 
26  : Kernel(parameters), _q(getFunction("q")), _A(coupledValue("A"))
27 {
28 }
29 
30 Real
32 {
33  return -_q.value(_t, _q_point[_qp]) * _A[_qp] * _test[_i][_qp];
34 }
35 
36 Real
38 {
39  return 0.;
40 }
41 
42 Real
44 {
45  return 0.;
46 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
static InputParameters validParams()
OneD3EqnEnergyHeatSource(const InputParameters &parameters)
registerMooseObject("ThermalHydraulicsApp", OneD3EqnEnergyHeatSource)
const VariableValue & _A
Cross sectional area.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableTestValue & _test
Real & _t
unsigned int _i
Volumetric heat source for 1-phase flow channel.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const Function & _q
Heat source function.
void addClassDescription(const std::string &doc_string)
virtual Real value(Real t, const Point &p) const
const MooseArray< Point > & _q_point
unsigned int _qp