https://mooseframework.inl.gov
HeatStructure2DCouplerBC.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", HeatStructure2DCouplerBC);
14 
17 {
19 
20  params.addRequiredParam<FunctionName>("heat_transfer_coefficient",
21  "Heat transfer coefficient function");
22  params.addRequiredParam<Real>("coupling_area_fraction", "Coupling area fraction");
23 
24  params.addClassDescription("Applies BC for HeatStructure2DCoupler for plate heat structure");
25 
26  return params;
27 }
28 
30  : HeatStructure2DCouplerBCBase(parameters),
31 
32  _htc(getFunction("heat_transfer_coefficient")),
33  _coupling_area_fraction(getParam<Real>("coupling_area_fraction"))
34 {
35 }
36 
37 ADReal
39 {
40  const auto T_coupled = computeCoupledTemperature();
41  return _htc.value(_t, _q_point[_qp]) * (_u[_qp] - T_coupled) * _coupling_area_fraction *
42  _test[_i][_qp];
43 }
const ADTemplateVariableValue< T > & _u
const Function & _htc
Heat transfer coefficient.
registerMooseObject("ThermalHydraulicsApp", HeatStructure2DCouplerBC)
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
const MooseArray< Point > & _q_point
HeatStructure2DCouplerBC(const InputParameters &parameters)
Base class for BC for components derived from HeatStructure2DCouplerBase.
virtual ADReal computeQpResidual() override
Applies BC for HeatStructure2DCoupler for plate heat structure.
ADReal computeCoupledTemperature() const
Computes the coupled neighbor temperature.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADTemplateVariableTestValue< T > & _test
const Real & _coupling_area_fraction
Coupling area fraction.
void addClassDescription(const std::string &doc_string)
virtual Real value(Real t, const Point &p) const