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 "GapPerfectConductance.h" 11 : 12 : registerMooseObject("HeatTransferApp", GapPerfectConductance); 13 : 14 : InputParameters 15 19 : GapPerfectConductance::validParams() 16 : { 17 19 : InputParameters params = IntegratedBC::validParams(); 18 19 : params.addClassDescription("Enforces equal temperatures across the gap."); 19 38 : params.addRequiredCoupledVar("gap_distance", "Distance across the gap."); 20 38 : params.addRequiredCoupledVar("gap_temp", "Temperature on the other side of the gap."); 21 38 : params.addParam<Real>("penalty", 1e3, "Penalty value to be applied to the constraint."); 22 19 : return params; 23 0 : } 24 : 25 10 : GapPerfectConductance::GapPerfectConductance(const InputParameters & parameters) 26 : : IntegratedBC(parameters), 27 10 : _gap_distance(coupledValue("gap_distance")), 28 10 : _gap_temp(coupledValue("gap_temp")), 29 30 : _penalty(getParam<Real>("penalty")) 30 : { 31 10 : } 32 : 33 : Real 34 1562 : GapPerfectConductance::computeQpResidual() 35 : { 36 1562 : return _penalty * (_u[_qp] - _gap_temp[_qp]); 37 : } 38 : 39 : Real 40 720 : GapPerfectConductance::computeQpJacobian() 41 : { 42 720 : return _penalty; 43 : }