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 2667 : GapFluxModelBase::validParams() 15 : { 16 2667 : InputParameters params = InterfaceUserObjectBase::validParams(); 17 2667 : 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 2667 : params.set<ExecFlagEnum>("execute_on") = EXEC_CUSTOM; 22 2667 : params.suppressParameter<ExecFlagEnum>("execute_on"); 23 : 24 : // flux models default to operating on the displaced mesh 25 2667 : params.set<bool>("use_displaced_mesh") = true; 26 : 27 2667 : return params; 28 0 : } 29 : 30 1100 : GapFluxModelBase::GapFluxModelBase(const InputParameters & parameters) 31 1100 : : InterfaceUserObjectBase(parameters), ADFunctorInterface(this), _qp(0), _gap_width(0.0) 32 : { 33 1100 : } 34 : 35 : ADReal 36 53127964 : 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 53127964 : _qp = mortar_constraint._qp; 43 53127964 : _gap_width = mortar_constraint._gap_width; 44 53127964 : _surface_integration_factor = mortar_constraint._surface_integration_factor; 45 53127964 : _adjusted_length = mortar_constraint._adjusted_length; 46 53127964 : _normal_pressure = mortar_constraint._normal_pressure; 47 53127964 : _secondary_point = Moose::ElemPointArg({mortar_constraint._interior_secondary_elem, 48 53127964 : mortar_constraint._phys_points_secondary[_qp], 49 : false}); 50 53127964 : _primary_point = Moose::ElemPointArg({mortar_constraint._interior_primary_elem, 51 53127964 : mortar_constraint._phys_points_primary[_qp], 52 : false}); 53 : 54 53127964 : return computeFlux(); 55 : }