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 "GapFluxModelPressureDependentConduction.h" 11 : 12 : registerMooseObject("HeatTransferApp", GapFluxModelPressureDependentConduction); 13 : 14 : InputParameters 15 410 : GapFluxModelPressureDependentConduction::validParams() 16 : { 17 410 : InputParameters params = GapFluxModelBase::validParams(); 18 : 19 410 : params.addClassDescription("Heat flux model across a closed gap to calculate the conductance " 20 : "between two solid materials"); 21 820 : params.addRequiredCoupledVar("temperature", "The name of the temperature variable"); 22 820 : params.addRequiredCoupledVar("contact_pressure", "The name of the contact pressure variable"); 23 : 24 820 : params.addParam<Real>( 25 : "scaling_coefficient", 26 820 : 1.0, 27 : "The leading coefficient for the closed gap conductance value; used for tuning"); 28 820 : params.addRequiredParam<MaterialPropertyName>( 29 : "primary_conductivity", "The thermal conductivity of the primary surface solid material"); 30 820 : params.addRequiredParam<MaterialPropertyName>( 31 : "secondary_conductivity", "The thermal conductivity of the secondary surface solid material"); 32 820 : params.addRequiredParam<MaterialPropertyName>( 33 : "primary_hardness", "The hardness value of the primary surface material"); 34 820 : params.addRequiredParam<MaterialPropertyName>("secondary_hardness", 35 : "The hardness of the secondary surface material"); 36 : 37 410 : return params; 38 0 : } 39 : 40 220 : GapFluxModelPressureDependentConduction::GapFluxModelPressureDependentConduction( 41 220 : const InputParameters & parameters) 42 : : GapFluxModelBase(parameters), 43 220 : _primary_T(adCoupledNeighborValue("temperature")), 44 220 : _secondary_T(adCoupledValue("temperature")), 45 220 : _contact_pressure(adCoupledLowerValue("contact_pressure")), 46 440 : _scaling(getParam<Real>("scaling_coefficient")), 47 440 : _primary_conductivity(getNeighborADMaterialProperty<Real>("primary_conductivity")), 48 440 : _secondary_conductivity(getADMaterialProperty<Real>("secondary_conductivity")), 49 440 : _primary_hardness(getNeighborADMaterialProperty<Real>("primary_hardness")), 50 660 : _secondary_hardness(getADMaterialProperty<Real>("secondary_hardness")) 51 : { 52 220 : } 53 : 54 : ADReal 55 69000 : GapFluxModelPressureDependentConduction::computeFlux() const 56 : { 57 : // Check that the surfaces are in actual contact with the pressure: 58 69000 : if (_contact_pressure[_qp] <= 0.0) 59 0 : return 0.0; 60 : 61 : // calculate the harmonic means of the two material properties 62 69000 : const ADReal k_sum = _primary_conductivity[_qp] + _secondary_conductivity[_qp]; 63 69000 : const ADReal k_harmonic = 2 * _primary_conductivity[_qp] * _secondary_conductivity[_qp] / k_sum; 64 : 65 69000 : const ADReal h_sum = _primary_hardness[_qp] + _secondary_hardness[_qp]; 66 69000 : const ADReal h_harmonic = 2 * _primary_hardness[_qp] * _secondary_hardness[_qp] / h_sum; 67 : 68 207000 : return _scaling * k_harmonic * (_primary_T[_qp] - _secondary_T[_qp]) * _contact_pressure[_qp] / 69 : h_harmonic; 70 : }