Line data Source code
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 : 10 : #include "ADSolidMaterial.h" 11 : #include "HeatConductionModel.h" 12 : 13 : registerMooseObjectDeprecated("ThermalHydraulicsApp", ADSolidMaterial, "04/31/2024 24:00"); 14 : 15 : InputParameters 16 344 : ADSolidMaterial::validParams() 17 : { 18 344 : InputParameters params = Material::validParams(); 19 344 : params.addClassDescription("Computes solid thermal properties as a function of temperature"); 20 : // Coupled variables 21 688 : params.addRequiredCoupledVar("T", "Temperature in the solid"); 22 : 23 688 : params.addRequiredParam<UserObjectName>( 24 : "properties", "The name of an user object describing material conductivity"); 25 344 : return params; 26 0 : } 27 : 28 267 : ADSolidMaterial::ADSolidMaterial(const InputParameters & parameters) 29 : : Material(parameters), 30 534 : _thermal_conductivity(declareADProperty<Real>(HeatConductionModel::THERMAL_CONDUCTIVITY)), 31 267 : _specific_heat(declareADProperty<Real>(HeatConductionModel::SPECIFIC_HEAT_CONSTANT_PRESSURE)), 32 267 : _density(declareADProperty<Real>(HeatConductionModel::DENSITY)), 33 267 : _temp(adCoupledValue("T")), 34 534 : _props(getUserObject<SolidMaterialProperties>("properties")) 35 : { 36 267 : mooseDeprecated( 37 : "Heat structure materials are deprecated in favor of SolidProperties objects, so this " 38 : "Material should no longer be used. See heat structure documentation for more information."); 39 267 : } 40 : 41 : void 42 158700 : ADSolidMaterial::computeQpProperties() 43 : { 44 158700 : _thermal_conductivity[_qp] = _props.k(_temp[_qp]); 45 158700 : _specific_heat[_qp] = _props.cp(_temp[_qp]); 46 158700 : _density[_qp] = _props.rho(_temp[_qp]); 47 158700 : }