https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADPipeOuterWallAmbientTemperatureScalarKernel.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
12#include "ScalarCoupleable.h"
13
15
18{
20 params.addClassDescription("Assembles transport equation for the temperature of the "
21 "outer-surface radial node of a pipe wall, "
22 "with heat transfer to an ambient environment.");
23 params.addCoupledVar("inner_wall_temperature",
24 {},
25 "Temperature of the inner-surface wall node, on the other side of this "
26 "layer's radial conduction path. Takes a scalar variable name");
27 params.addRequiredParam<MooseFunctorName>("T_ambient", "Ambient temperature functor [K]");
28 params.addRequiredParam<MooseFunctorName>(
29 "htc_ambient", "Ambient heat transfer coefficient functor [W/(m^2*K)]");
30 params.addRequiredParam<MooseFunctorName>(
31 "ambient_perimeter", "Perimeter of this wall node exposed to the ambient environment [m]");
32
33 return params;
34}
35
37 const InputParameters & parameters)
38 : Base(parameters),
39 _Tin(ScalarCoupleable::adCoupledScalarValue("inner_wall_temperature")),
40 _T_ambient(this->template getFunctor<ADReal>("T_ambient")),
41 _htc_ambient(this->template getFunctor<ADReal>("htc_ambient")),
42 _ambient_perimeter(this->template getFunctor<ADReal>("ambient_perimeter"))
43{
44}
45
48{
49 const Moose::PointArg arg = {Point(1, 2, 3)};
51
52 // Convective heat transfer with the ambient environment
53 return _htc_ambient(arg, state) * _ambient_perimeter(arg, state) *
54 (_T_ambient(arg, state) - Base::_u[0]);
55}
56
57Real
59{
60 mooseError("convectiveJacobian() should not be called in AD mode");
61 return 0;
62}
registerMooseObject("ThermalHydraulicsApp", ADPipeOuterWallAmbientTemperatureScalarKernel)
DualNumber< Real, DNDerivativeType, true > ADReal
Outer wall path-integrated incompressible conjugate heat transfer kernel with an ambient outer bounda...
const Moose::Functor< ADReal > & _ambient_perimeter
Perimeter of this wall node exposed to the ambient environment.
const Moose::Functor< ADReal > & _htc_ambient
Ambient heat transfer coefficient functor.
virtual Real convectiveJacobian() const override
Derivative of convectiveLinearHeatRate() with respect to this node's own temperature.
virtual ADReal convectiveLinearHeatRate() const override
Heat flux exchanged with the fluid or ambient environment on this node's interface to the fluid/envir...
const Moose::Functor< ADReal > & _T_ambient
Ambient temperature functor.
Base class for path-integrated incompressible conjugate heat transfer kernels.
const bool _is_implicit
Property state integration flag.
const ADVariableValue & _u
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void mooseError(Args &&... args) const
StateArg oldState()
StateArg currentState()