www.mooseframework.org
GapConductanceConstant.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
10 #include "GapConductanceConstant.h"
11 
13 
16 {
19  // We can't just make it required in the first place because then it would always
20  // be required in the Action, even if this model isn't used.
21  params.makeParamRequired<Real>("gap_conductance");
22  params.addClassDescription("Material to compute a constant, prescribed gap conductance");
23 
24  return params;
25 }
26 
29 {
31  params.addParam<std::string>(
32  "appended_property_name", "", "Name appended to material properties to make them unique");
33  params.addParam<Real>("gap_conductance", 0.0, "Gap conductance");
34  return params;
35 }
36 
38  : Material(params),
39  _prescribed_gap_conductance(getParam<Real>("gap_conductance")),
40  _appended_property_name(getParam<std::string>("appended_property_name")),
41  _gap_conductance(declareProperty<Real>("gap_conductance" + _appended_property_name)),
42  _gap_conductance_dT(declareProperty<Real>("gap_conductance" + _appended_property_name + "_dT"))
43 {
44  if (!params.isParamSetByUser("gap_conductance"))
45  mooseError("gap_conductance must be specified");
46 }
47 
48 void
50 {
52  _gap_conductance_dT[_qp] = 0.0;
53 }
static InputParameters actionParameters()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
InputParameters emptyInputParameters()
unsigned int _qp
MaterialProperty< Real > & _gap_conductance_dT
static InputParameters validParams()
static InputParameters validParams()
virtual void computeQpProperties() override
const Real & _prescribed_gap_conductance
bool isParamSetByUser(const std::string &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void makeParamRequired(const std::string &name)
void mooseError(Args &&... args) const
GapConductanceConstant(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
registerMooseObject("HeatTransferApp", GapConductanceConstant)
MaterialProperty< Real > & _gap_conductance