https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ModularGapConductanceConstraint.h
Go to the documentation of this file.
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#pragma once
11
12#include "ADMortarConstraint.h"
13#include "MortarNodalFrames.h"
14
16
23{
24public:
26
28
29 virtual void initialSetup() override;
30 virtual void residualSetup() override;
31 virtual void jacobianSetup() override;
32
40 static bool displacementsShareSystem(const FEProblemBase & problem,
41 const VariableName & temperature,
42 const std::vector<std::string> & displacements);
43
44protected:
48 virtual ADReal computeQpResidual(Moose::MortarType mortar_type) override;
49
55
60 virtual ADReal computeGapFlux();
61
63 const ADReal & gapWidth() const { return _gap_width; }
64
66 std::vector<UserObjectName> _gap_flux_model_names;
67
69 std::vector<const GapFluxModelBase *> _gap_flux_models;
70
72 const std::vector<std::string> _disp_name;
73 const unsigned int _n_disp;
74 std::vector<const ADVariableValue *> _disp_secondary;
75 std::vector<const ADVariableValue *> _disp_primary;
77
78private:
80
81 virtual ADReal computeGapLength() const;
82
86 void computeGapRadii(const ADReal & gap_length);
87
89 enum class GapGeometry
90 {
91 AUTO,
92 PLATE,
94 SPHERE,
96
97 virtual void setGapGeometryParameters(const InputParameters & params,
98 const Moose::CoordinateSystemType coord_sys,
99 unsigned int axisymmetric_radial_coord,
100 GapGeometry & gap_geometry_type);
101
104
107
110
112 Point & _p1;
113 Point & _p2;
115
121
122 const Real _max_gap;
123
125
132
135
138
142
144 const Elem * _qp_normals_msm_elem = nullptr;
145
147 std::vector<ADRealVectorValue> _qp_normals;
148
149 friend class GapFluxModelBase;
150};
DualNumber< Real, DNDerivativeType, true > ADReal
Base class for gap flux models used by ModularGapConductanceConstraint.
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
const MooseVariable *const _disp_x_var
x-displacement variable
void computeGapRadii(const ADReal &gap_length)
Computes radii as a function of point and geometry.
const MooseVariable *const _disp_z_var
z-displacement variable
std::vector< const GapFluxModelBase * > _gap_flux_models
Gap flux models.
virtual ADReal computeQpResidual(Moose::MortarType mortar_type) override
Computes the residual for the LM equation, lambda = (k/l)*(T^(1) - PT^(2)).
const Elem * _qp_normals_msm_elem
The mortar segment whose quadrature points _qp_normals belong to.
ADReal _gap_width
Gap width to pass into flux models.
ADReal _surface_integration_factor
Factor to preserve energy balance (due to mismatch in primary/secondary differential surface sizes)
std::vector< const ADVariableValue * > _disp_secondary
Point & _p1
Points for geometric definitions.
const ADReal & gapWidth() const
Gap width at the current quadrature point.
Moose::Mortar::ADNodalFrames _nodal_frames
Secondary nodal normals with their displacement derivatives.
std::vector< UserObjectName > _gap_flux_model_names
Gap flux model names.
static bool displacementsShareSystem(const FEProblemBase &problem, const VariableName &temperature, const std::vector< std::string > &displacements)
std::vector< const ADVariableValue * > _disp_primary
const bool _normal_derivatives
Whether the displacement derivatives of the normals can be included, i.e.
ADReal _r1
Radii for quadrature points.
const MooseVariable *const _disp_y_var
y-displacement variable
virtual void setGapGeometryParameters(const InputParameters &params, const Moose::CoordinateSystemType coord_sys, unsigned int axisymmetric_radial_coord, GapGeometry &gap_geometry_type)
const std::vector< std::string > _disp_name
Displacement variables.
GapGeometry
Gap geometry (user input or internally overwritten)
enum ModularGapConductanceConstraint::GapGeometry _gap_geometry_type
ADReal _normal_pressure
Cached contact pressure for use by UserObjects.
void deduceGeometryParameters()
Automatically set up axis/center for 2D cartesian problems with cylindrical/spherical gap geometry.
std::vector< ADRealVectorValue > _qp_normals
The normals at the quadrature points of _qp_normals_msm_elem.
const InputParameters & parameters() const
CoordinateSystemType