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 "GapFluxModelBase.h" 11 : #include "ModularGapConductanceConstraint.h" 12 : 13 : InputParameters 14 1281 : GapFluxModelBase::validParams() 15 : { 16 1281 : InputParameters params = InterfaceUserObjectBase::validParams(); 17 1281 : params.addClassDescription("Gap flux model base class"); 18 : 19 : // UOs of this type should not be executed by MOOSE, but only called through 20 : // ModularGapConductanceConstraint 21 1281 : params.set<ExecFlagEnum>("execute_on") = EXEC_CUSTOM; 22 1281 : params.suppressParameter<ExecFlagEnum>("execute_on"); 23 : 24 : // flux models default to operating on the displaced mesh 25 1281 : params.set<bool>("use_displaced_mesh") = true; 26 : 27 1281 : return params; 28 0 : } 29 : 30 520 : GapFluxModelBase::GapFluxModelBase(const InputParameters & parameters) 31 520 : : InterfaceUserObjectBase(parameters), ADFunctorInterface(this), _qp(0), _gap_width(0.0) 32 : { 33 520 : } 34 : 35 : ADReal 36 48698992 : GapFluxModelBase::computeFluxInternal( 37 : const ModularGapConductanceConstraint & mortar_constraint) const 38 : { 39 : // Cache general geometry information 40 : // This allows derived user object to compute gap physics without external dependencies 41 : 42 48698992 : _qp = mortar_constraint._qp; 43 48698992 : _gap_width = mortar_constraint._gap_width; 44 48698992 : _surface_integration_factor = mortar_constraint._surface_integration_factor; 45 48698992 : _adjusted_length = mortar_constraint._adjusted_length; 46 48698992 : _normal_pressure = mortar_constraint._normal_pressure; 47 48698992 : _secondary_point = Moose::ElemPointArg({mortar_constraint._interior_secondary_elem, 48 48698992 : mortar_constraint._phys_points_secondary[_qp], 49 : false}); 50 48698992 : _primary_point = Moose::ElemPointArg({mortar_constraint._interior_primary_elem, 51 48698992 : mortar_constraint._phys_points_primary[_qp], 52 : false}); 53 : 54 48698992 : return computeFlux(); 55 : }