Making Thermal Contact Conductance a Parameter in ANSYS Mechanical 18.0 and Earlier with an APDL Command Object

A support request from one of our customers recently was for the ability to make Thermal Contact Conductance, which is sort of a reciprocal of thermal resistance at the contact interface, a parameter so it can be varied in a parametric study.  Unfortunately, this property of contact regions is not exposed as a parameter in the ANSYS Mechanical window like many other quantities are.

Fortunately, with ANSYS there is almost always a way……in this case we use the capability of an APDL (ANSYS Parametric Design Language) command object within ANSYS Mechanical.  This allows us to access additional functionality that isn’t exposed in the Mechanical menus.  This is a rare occurrence in the recent versions of ANSYS, but I thought this was a good example to explain how it is done including verifying that it works.

A key capability is that user-defined parameters within a command object have a ‘magic’ set of parameter names.  These names are ARG1, ARG2, ARG3, etc.  Eric Miller of PADT explained their use in a good PADT Focus blog posting back in 2013

In this application, we want to be able to vary the value of thermal contact conductance.  A low value means less heat will flow across the boundary between parts, while a high value means more heat will flow.  The default value is a calculated high value of conductance, meaning there is little to no resistance to heat flow across the contact boundary.

In order to make this work, we need to know how the thermal contact conductance is applied.  In fact, it is a property of the contact elements.  A quick look at the ANSYS Help for the CONTA174 or similar contact elements shows that the 14th field in the Real Constants is the defined value of TCC, the thermal contact conductance.  Real Constants are properties of elements that may need to be defined or may be optional values that can be defined.  Knowing that TCC is the 14th field in the real constant set, we can now build our APDL command object.

This is what the command object looks like, including some explanatory comments.  Everything after a “!” is a comment:

! Command object to parameterize thermal contact conductance
! by Ted Harris, PADT, Inc., 3/31/2017
! Note: This is just an example. It is up to the user to create and verify
! the concept for their own application.

! From the ANSYS help, we can see that real constant TCC is the 14th real constant for
! the 17X contact elements. Therefore, we can define an APDL parameter with the desired
! TCC value and then assign that parameter to the 14th real constant value.
!
! We use ARG1 in the Details view for this command snippet to define and enable the
! parameter to be used for TCC.

r,cid ! tells ANSYS we are defining real constants for this contact pair
! any values left blank will not be overwritten from defaults or those
! assigned by Mechanical. R command is used for values 1-6 of the real constants
rmore,,,,,, ! values 7-12 for this real constant set
rmore,,arg1 ! This assigned value of arg1 to 14th field of real constant

! Now repeat for target side to cover symmetric contact case
r,tid ! tells ANSYS we are defining real constants for this contact pair
! any values left blank will not be overwritten from defaults or those
! assigned by Mechanical. R command is used for values 1-6 of the real constants
rmore,,,,,, ! values 7-12 for this real constant set
rmore,,arg1 ! This assigned value of arg1 to 14th field of real constant

You may have noticed the ‘cid’ and ‘tid’ labels in the command object.  These identify the integer ‘pointers’ for the contact and target element types, respectively.  They also identify the contact and target real constant set number and material property number.  So how do we know what values of integers are used by ‘cid’ and ‘tid’ for a given contact region?  That’s part of the beauty of the command object: you don’t know the values of the cid and tid variables, but you alsp don’t need to know them.  ANSYS automatically plugs in the correct integer values for each contact pair simply by us putting the magic ‘cid’ and ‘tid’ labels in the command snippet.  The top of a command object within the contact branch will automatically contain these comments at the top, which explain it:

!   Commands inserted into this file will be executed just after the contact region definition.
!   The type number for the contact type is equal to the parameter “cid”.
!   The type number for the target type is equal to the parameter “tid”.
!   The real and mat number for the asymmetric contact pair is equal to the parameter “cid”.
!   The real and mat number for the symmetric contact pair(if it exists)
! is equal to the parameter “tid”.

Next, we need to know how to implement this in ANSYS Mechanical.  We start with a model of a ball valve assembly, using some simple geometry from one of our training classes.  The idea is that hot water passes through the valve represented by a constant temperature of 125 F.  There is a heat sink represented at the OD of the ends of the valve at a constant 74 degrees.  There is also some convection on most of the outer surfaces carrying some heat away.

The ball valve and the valve housing are separate parts and contact is used to allow heat to flow from the hotter ball valve into the cooler valve assembly:

Here is the command snippet associated with that contact region.  The ‘magic’ is the ARG1 parameter which is given an initial value in the Details view, BEFORE the P box is checked to make it a parameter.  Wherever we need to define the value of TCC in the command object, we use the ARG1 parameter name, as shown here:

Next, we verify that it actually works as expected.  Here I have setup a table of design points, with increasing values of TCC (ARG1).  The output parameter that is tracked is the minimum temperature on the inner surface of the valve housing, where it makes contact with the ball.  If conductance is low, little heat should flow so the housing remains cool.  If the conductance is high, more heat should flow into the housing making it hotter.  After solving all the design points in the Workbench window, we see that indeed that’s what happens:

And here is a log scale plot showing temperature rise with increasing TCC:

So, excluding the comments our command object is 6 lines long.  With those six lines of text as well as knowledge of how to use the ARG1 parameter, we now have thermal contact conductance which varies as a parameter.  This is a simple case and you will certainly want to test and verify for your own use.  Hopefully this helps with explaining the process and how it is done, including verification.

 

 

 

Connection Groups and Your Sanity in ANSYS Mechanical

You kids don’t know how good you have it with automatic contact creation in Mechanical.  Back in my day, I’d have to use the contact wizard in MAPDL or show off my mastery of the ESURF command to define contacts between parts.  Sure, there were some macros somewhere on the interwebs that would go through and loop for surfaces within a particular offset, but for the sake of this stereotypical “old-tyme” rant, I didn’t use them (I actually didn’t, I was just TOO good at using ESURF to need anyone else’s help).

Image result for old tyme

Hey, it gets me from point A to B

In Mechanical contact is automatically generated based on a set of rules contained in the ‘Connection Group’ object:

image

It might look a little over-whelming, but really the only thing you’ll need to play around with is the ‘Tolerance Type’.  This can either ‘Slider’ or ‘Value’ (or use sheet thickness if you’re working with shells).  What this controls is the face offset value for which Mechanical will automatically build contact.  So in the picture shown above faces that are 5.9939E-3in apart will automatically have contact created.  You can play around with the slider value to change what the tolerance

image image image

As you can see, the smaller the tolerance slider the larger the ‘acceptable’ gap becomes.  If you change the Tolerance Type to be ‘Value’ then you can just directly type in a number.

Typically the default values do a pretty good job automatically defining contact.  However, what happens if you have a large assembly with a lot of thin parts?  Then what you run into is non-sensical contact between parts that don’t actually touch (full disclosure, I actually had to modify the contact settings to have the auto-generated contact do something like this…but I have seen this in other assemblies with very thin/slender parts stacked on top of each other):

image

In the image above, we see that contact has been defined between the bolt head and a plate when there is clearly a washer present.  So we can fix this by going in and specifying a value of 0, meaning that only surfaces that are touching will have contact defined.  But now let’s say that some parts of your assembly aren’t touching (maybe it’s bad CAD, maybe it’s a welded assembly, maybe you suppressed parts that weren’t important).

image

The brute force way to handle this would be to set the auto-detection value to be 0 and then go back and manually define the missing contacts using the options shown in the image above.  Or, what we could do is modify the auto-contact to be broken up into groups and apply appropriate rules as necessary.  The other benefit to this is if you’re working in large assemblies, you can retain your sanity by having contact generated region by region.   In the words of the original FE-guru, Honest Abe, it’s easier to manage things when they’re logically broken up into chunks.

image

Said No One Ever

Sorry…that was bad.  I figured in the new alt-fact world with falsely-attributed quotes to historical leaders, I might as well make something up for the oft-overlooked FE-crowd.

So, how do you go about implementing this?  Easy, first just delete the default connection group (right-mouse-click on it and select delete).  Next, just select a group of bodies and click the ‘Connection Group’ button:

image image image

In the image series above, I selected all the bolts and washers, clicked the connection group, and now I have created a connection group that will only automatically generate contact between the bolts and washers.  I don’t have to worry about contact being generated between the bolt and plate.  Rinse, lather, and repeat the process until you’ve created all the groups you want:

image

ALL the Connection Groups!

Now that you have all these connection groups, you can fine-tune the auto-detection rules to meet the ‘needs’ of those individual body groups.  Just zooming in on one of the groups:

image

By default, when I generate contact for this group I’ll get two contact pairs:

image image

While this may work, let’s say I don’t want a single contact pair for the two dome-like structures, but 2.  That way I can just change the behavior on the outer ‘ring’ to be frictionless and force the top to be bonded:

image

I modified the auto-detection tolerance to be a user-defined distance (note that when you type in a number and move your mouse over into the graphics window you will see a bulls-eye that indicates the search radius you just defined).  Next, I told the auto-detection not to group any auto-detected contacts together.  The result is I now get 3 contact pairs defined:

image image image

Now I can just modify the auto-generated contacts to have the middle-picture shown in the series above to be frictionless.  I could certainly just manually define the contact regions, but if you have an assembly of dozens/hundreds of parts it’s significantly easier to have Mechanical build up all the contact regions and then you just have to modify individual contact pairs to have the type/behavior/etc you want (bonded, frictionless, symmetric, asymmetric, custom pinball radius, etc).  This is also useful if you have bodies that need to be connected via face-to-edge or edge-to-edge contact (then you can set the appropriate priority as to which, if any of those types should be preserved over others).

So the plus side to doing all of this is that after any kind of geometry update you shouldn’t have much, if any, contact ‘repair’ to do.  All the bodies/rules have already been fine tuned to automatically build what you want/need.  You also know where to look to modify contacts (although using the ‘go to’ functionality makes that pretty easy as well).  That way you can define all these connection groups, leave everything as bonded and do a preliminary solve to ensure things look ‘okay’.  Then go back and start introducing some more reality into the simulation by allowing certain regions to move relative to each other.

The downside to doing your contacts this way is you risk missing an interface because you’re now defining the load path.  To deal with that you can just insert a dummy-modal environment into your project, solve, and check that you don’t have any 0-Hz modes.

Be a Pinball Wizard with Contact Regions in ANSYS Mechanical

pinball-wizard-pinball-machine-ANSYS-3
A pinball machine based on The Who’s Tommy

I had a very cool music teacher back in 6th or 7th grade in the 1970’s in upstate New York.  Today we’d probably say she was eclectic.  In that class we listened to and discussed fairly recent songs in addition to general music studies.  Two songs I remember in particular are ‘Hurdy Gurdy Man’ by Donovan and ‘Pinball Wizard’ by The Who.  If you’re not familiar with Pinball Wizard, it’s from The Who’s rock opera Tommy, and is about a deaf, mute, blind young man who happens to be adept at the game of pinball.  Yes, he is a Pinball Wizard.  This sing popped into my head recently when we had some customer questions here at PADT regarding the pinball region concept as it pertains to ANSYS contact regions.

I’m not sure if the developers at ANSYS, Inc. had this song in mind when they came up with the nomenclature for the 17X (latest and greatest) series of contact elements in ANSYS, but regardless, you too can be a pinball wizard when it comes to understanding contact elements in ANSYS Mechanical and MAPDL.

Fans of this blog may remember one of my prior posts on contact regions in ANSYS that also had a musical theme (bringing to mind Peter Gabriel’s song “I Have the Touch”):

In this current entry we will go more in depth on the pinball region, also known as the pinball radius.  The pinball region is involved with the distance from contact element to target element in a given contact region.  Outside the pinball region, ANSYS doesn’t bother to check to see if the elements on opposite sides of the contact region are touching or not.  The program assumes they are far away from each other and doesn’t worry about any additional calculations for the most part.

Here is an illustration.  The gray elements on the left represent the contact body and the red elements on the right represent the target body (assuming asymmetric contact).  Target elements outside the pinball radius will not be checked for contact.  The contact and target elements actually ‘coat’ the underlying solid elements so they are shown as dashed lines slightly offset from the solid elements for the sake of visibility.  Here the pinball radius is displayed as a dashed blue circle, centered on the contact elements, with a radius of 2X the depth of the underlying solid elements.

pinball_radius_contact_illustration

So, outside the pinball region, we know ANSYS doesn’t check to see if the contact and target are actually in contact.  It just assumes they are far away and not in contact.  What about what happens if the contact and target are inside the pinball region?  The answer to that question depends on which contact type we have selected.

For frictionless contact (aka standard contact in MAPDL) and frictional contact, the program will then check to see if the contact and target are truly touching.  If they are touching, the program will check to see if they are sliding or possibly separating.  If they are touching and penetrating, the program will check to see if the penetration exceeds the allowable amount and will make adjustments, etc.  In other words, for frictionless and frictional contact, if the contact and target elements are close enough to be inside the pinball region, the program will make all sorts of checks and adjustments to make sure the contact behavior is adequately captured.

The other scenario is for bonded and no separation contact.  With these contact types, the program’s behavior when the contact and target elements are within the pinball region is different.  For these types, as long as the contact and target are close enough to be within the pinball region, the program considers the contact region to be closed.  So, for bonded and no separation, your contact and target elements do not need to be line on line touching in order for contact to be recognized.  The contact and target pairs just need to be inside the pinball region.  This can be good, in that it allows for some ‘slop’ in the geometry to be automatically ignored, but it also can have a downside if we have a curved surface touching a flat surface for example.  In that case, more of the curved surface may be considered in contact than would be the case if the pinball region was smaller.  This effect is shown in the image below.  Reducing the pinball radius to an appropriate smaller amount would be the fix for eliminating this ‘overconstraint’ if desired.

pinball_radius_bonded_noseparation

There is a default value for the pinball region/radius.  It can be changed if needed.  We’ll add more details in a moment.  First, why is it called the “pinball” region?  I like to think it’s because when it’s visualized in the Mechanical window, it looks like a blue pinball from an actual pinball arcade game, but I’ll admit that the ANSYS terminology may predate the Mechanical interface.  The image below shows what I mean.  The blue balls are the different pinball radii for different contact regions.

pinball_radius_visualization

 

Note that you don’t see the pinball region displayed as shown in the above image unless you have manually changed the pinball size in Mechanical.  The pinball region can be changed in the Mechanical window in the details view for each contact region by changing Pinball Region from Program Controlled to Radius, like this:

pinball_radius_change

In MAPDL, the pinball radius value can be changed by defining or editing the real constant labeled PINB.

By now you’re probably wondering what is the default value for the pinball radius?  The good news is that it is intelligently decided by the program for each contact region.  The default is always a scale factor on the depth of the underlying elements of each contact region.  In the first pinball region image shown near the beginning of this article, the example plot shows the pinball region/radius as two times the depth of the underlying elements.

The table below summarizes the default pinball radius values for most circumstances for 2D and 3D solid element models.  More detailed information is available in the ANSYS Help.

Default Pinball Radius ValuesLarge Deflection Off
Flexible-Flexible
Large Deflection On
Flexible-Flexible
Frictionless and Frictional1* Underlying Element Depth2*Underlying Element Depth
Bonded and No Seperation0.25*Underlying Element Depth0.5*Underlying Element Depth
Rigid-Flexible Contact: Typically the Default Values are Doubled

Summing it all up:  we have seen how the default values are calculated and also how to change them.  We have seen what they look like as blue balls in a plot of contact regions in Mechanical if the pinball radius has been explicitly defined.  We also discussed what the pinball radius does and how it’s different for frictionless/frictional contact and bonded/no separation contact.

You should be well on your way to becoming a pinball wizard at this point.

Does performing simulation in ANSYS make you think of certain songs, or are there songs you like to listen to while working away on your simulations an addition to The Who’s “Pinball Wizard” and Peter Gabriel’s “I Have the Touch”?  If so, we’d love to hear about your song preferences in the comments below.

ANSYS Workbench Mechanical: The Body Views Features Can Be a Huge Time Saver

ss1The following is a story of discovery. The discovery of an ANSYS feature that has been around since at least ANSYS14! How is that possible you ask? The PADT team members are the ANSYS experts of the Southwest, how could they have missed this! And we would agree with you on the former, but even we overlook some of the most fundamental and helpful features. And you are going to want to store this one away, so copy the link, bookmark the page, or make a mental note with your photographic memory and file it under productivity enhancer.

After all of that hype, what could I possibly be going tell you that is so earth shattering. Well, it’s not really a secret if you read the title but I’ll let you be the judge of this little nugget’s seismic impact. Now, if you’ll indulge me, I’ll set the stage.

A couple of weeks ago, I was compiling a report of an ANSYS Mechanical analysis. One of the report sections required details of the contact definition between each part. I hunkered down to spend what I thought would be a tedious hour of documenting each contact expecting to use a procedure that consisted in some form of isolating the two bodies of interest, capturing screenshots of the two parts in various relation to each other in order to adequately represent the contact context. As I sat looking at the screen creating my plan of attack, I thought to myself, I wish there was an ANSYS feature that would automatically isolate the two connected bodies so that I would not have to go through the finger numbing (or should I say finger cramping) task of “hiding all other bodies” (even though this is one of my other favorite features). As soon as the thought flashed through my mind, my eyes moved up the screen and, above the Mechanical graphics window, I saw it.

Body Views! The star of my post. You will find our elusive capability in the painfully obvious Connections Context Toolbar:

ss2

When I clicked on it, the graphics window transformed from this:

ss3

To this:

ss4

The relevant bodies were isolated into two different views, contact and target. I was elated. My task of manually isolating the bodies and adjusting the views while intermediately capturing the desired screens now turned into a joyful, albeit nerdy, moment of discovery. With some experimenting, I easily found that each view can be adjusted independently, unless of course you would like them all to move together. You can accomplish this by selecting the Sync Views option:ss5

Why this feature is helpful:

  • Use it to easily isolate contact/target body
  • Use it to easily identify missing or over defined contact regions
  • Use it to document contact definition
  • Use it in combination with the filtering and tagging capabilities to more easily parse through a large assembly model

Summary of steps to enable the Body Views feature:

  • Click on the Connections Branch in the Model Tree so that the Connections context toolbar appears

ss6

  • Click Body Views ssa1
  • Select your desired contact region to analyze

ssa2

  • Use the two views to evaluate

ss8

  • Use the Sync Views option to force views to move together

ss9

To my chagrin, this option has been available in ANSYS for a few releases at least and I never took note. But the possibility that some of you might have also overlooked this option prompted me to highlight it for you and I hope you find it useful in the future.

Final thought:

If you found this article helpful and are interested in learning about or being reminded of some other excellent ANSYS time saver capabilities, check out the article by Eric Miller on filtering and tagging here.

Default Contact Stiffness Behavior for Bonded Contact

p7It recently came to my attention that the default contact stiffness factor for bonded contact can change based on other contact regions in a model. This applies both to Mechanical as well as Mechanical APDL. If all contacts are bonded, the default contact stiffness factor is 10.0. This means that in our bonded region, the stiffness tending to hold the two sides of contact together is 10 times the underlying stiffness of the underlying solid or shell elements.

However, if there is at least one other contact region that has a type set to anything other than bonded, then the default contact stiffness for ALL contact pairs becomes 1.0. This is the default behavior as documented in the ANSYS Mechanical APDL Help, in section 3.9 of the Contact Technology Guide in the notes for Table 3.1:

“FKN = 10 for bonded. For all other, FKN = 1.0, but if bonded and other contact behavior exists, FKN = 1 for all.”

So, why should we care about this? It’s possible that if you are relying on bonded contact to simulate a connection between one part and another, the resulting stress in those parts could be different in a run with all bonded contact vs. a run with all bonded and one or more contact pairs set to a type other than bonded. The default contact stiffness is now less than it would be if all the contact regions were set to bonded.

This can occur even if the non-bonded contact is in a region of the model that is in no way connected to the bonded region of interest. Simply the presence of any non-bonded contact region results in the contact stiffness factor for all contact pairs to have a default value of 1.0 rather than the 10.0 value you might expect.

Here is an example, consisting of a simple static structural model. In this model, we have an inner column with a disk on top. There are also two blocks supporting a ring. The inner column and disk are completely separate from the blocks and ring, sharing no load path or other interaction. Initially all contact pairs are set to bonded for the contact type. All default settings are used for contact.
p1

Loading consists of a uniform temperature differential as well as a bearing load on the disk at the top. Both blocks as well as the column have their bases constrained in all degrees of freedom.
p2

After solving, this is the calculated maximum principal stress distribution in the ring. The max value is 41,382.
p3

Next, to demonstrate the behavior described above, we changed the contact type for the connection between the column and the disk from bonded to rough, all else remaining the same.
p4

After solving, we check the stresses in the ring again. The max stress in the ring has dropped from 41,283 to 15,277 as you can see in the figure below. Again, the only change that was made was in a part of the model that was in no way connected to the ring for which we are checking stresses. The change in stress is due solely to a change in contact type setting in a different part of the model. The reason the stress has decreased is that the stiffness of the bonded connection is less by a factor of 10, so the bonded region is a softer connection than it was in the original run.

p5

So, what do we as analysts need to do in light of this information? A good practice would be to manually specify the contact stiffness factor for all contact pairs. This behavior only crops up when the default values for contact stiffness factor are utilized. We can define these stiffness factors easily in ANSYS Mechanical in the details view for each contact region. Further, we need to always remember that ANSYS as well as other analytical tools are just that – tools. It’s up to us to ensure that the results of interest we are getting are not sensitive to factors we can adjust, such as mesh density, contact stiffness, weak spring stiffness, stabilization factors, etc.

Using Probes to Obtain Contact Forces in ANSYS Mechanical

Recently we have had a few questions on obtaining contact results in ANSYS Mechanical. A lot of contact results can be accessed using the Contact Tool, but to obtain contact forces we use Probes. Since not everyone is familiar with how it’s done, we’ll explain the basics here.

Below is a screen shot of a Mechanical model involving two parts. One part has a load that causes it to be deflected into the other part.

p1

We are interested in obtaining the total force that is being transmitted across the contact elements as the analysis progresses. Fortunately this is easy to do using Probes in Mechanical.

The first thing we do is click on the Solution branch in the tree so we can see the Probes button in the context toolbar. We then click on the Probe drop down button and select Force Reaction, as shown here:

p2

Next, we click on the resulting Force Reaction result item under the Solution branch to continue with the configuration. We first change the Location Method from Boundary Condition to Contact Region:

p3

We then specify the desired contact region for the force calculation from the Contact Region dropdown:

p4

Note that the coordinate system for force calculation can either be Cartesian or Cylindrical. You can setup a coordinate system wherever you need it, selectable via the Orientation dropdown.

There is also an Extraction dropdown with various options for using the contact elements themselves, the elements underlying the contact elements, or the elements underlying the target elements (target elements themselves have no reaction forces or other results calculated). Care must be taken when using underlying elements to make sure we’re not also calculating forces from other contact regions that are part of the same elements, or from applied loads or constraints. In most cases you will want to use either Contact (Underlying Element) or Target (Underlying Element). If contact is non-symmetric, only one of these will have non zero values.

In this case, the setting Contact (Contact Element) was a choice that gave us appropriate results, based on our contact behavior method of Asymmetric:

p5

Here are the details including the contact force results:

p6

This is a close up of the force vs. ‘time’ graphs and table (this was a static structural analysis with a varying pressure load):

p7
p8


***** SUMMATION OF TOTAL FORCES AND MOMENTS IN THE GLOBAL COORDINATE SYSTEM *****

FX = -0.4640219E-04
FY = -251.1265
FZ = -0.1995618E-06
MX = 62.78195
MY = -0.1096794E-04
MZ = -688.9742
SUMMATION POINT= 0.0000 0.0000 0.0000

We hope this information is useful to you in being able to quickly and easily obtain your contact forces.