Using the ACT Console for Automation in Ansys Mechanical

Editor’s Note: The other day we got a tech support question. A user was creating lots of STL’s from his Ansys Mechanical results and was tired of clicking so much. They were wondering if we could give them a few hints to get going. Alex Grishen, Matt Sutton, and Joe Woodward all pitched in on the email thread. Then, seeing how useful it was Alex converted it into a PowerPoint that we could share with other users.

A big change in Ansys Mechanical scripting with ACT is the introduction of a recording button. This allows you to record your actions as a starting point for your script. The tutorial also includes links to other resources.

If you find yourself clicking away and thinking, “there has got to be a way to automate this,” then you need to try automation out.

PADT-ANSYS-ACT_Automation

Ansys Mechanical Selection Information: Even More Useful Than We Thought

I have always known that the Selection Information window is extremely useful, giving us properties like Surface Area, Edge length, and the distance between two selected nodes.

But it will also do a few things that I had not known about, until recently. 

Normally you can Export the Nodal Locations with a solution result plot, but for that you have to solve the model first. If you have not yet solved the model, you can still get the nodal locations using the Selection Information window, though it is a little finicky.

  1. Open the Selection information window from the Home tab.
  1. Select all the nodes by selecting one node and hitting CTRL-A.
  1. In the Selection Information window, click the ‘Node ID’ header to sort by Node ID number.
  1. Select the first cell of the data you want.
  1. Scroll all the way to the bottom of the Window, and while holding down the Shift key, select the last row of the adjacent columns that you want to select.
  1. Once selected, right-click on it and hit “Export Text File”, or “Copy” and then Paste the data into Excel.

The trick is that the “Export Text File” and “Copy” do not show up if you pick the headers to select the entire columns like you do in Excel.

You can do the same thing to thing to get the mass properties of an assembly.

Selecting bodies will give you the mass, centroid, and principal moments of inertia. You can get this in the Worksheet view when the Geometry branch is highlighted.  Unlike the Worksheet, however, we can change the options to show the Moments of inertia about a given coordinate system.

We can now export out the six moments of inertia about any given coordinate system.  Next, I will attempt the find the ACT calls to do the same thing.   Stay tuned…

Alternating Stresses in Ansys Mechanical – Part 2: von Mises Stress

Editor’s Note:
The following PowerPoint is from one of PADT’s inhouse experts on linear dynamics, Alex Grishin.

One of the most valuable results that can come from a harmonic response analysis is the predicted alternating stresses in the part. This feeds fatigue and other downstream calculations as well as predicting maximum possible values. Because of the math involved, calculating derived stresses, like Principal Stresses and von Mises Stress can be done in several ways. This post shows how Ansys Mechanical does it and offers an alternative that is considered more accurate for some cases for von Mises. Part 1 covers how to do the same for Principal Stresses.

Alternating_vonMises_Stress

Alex also made this zip file that contains updated macros, an example Mechanical database, and a spreadsheet:

6 – An update on outputting results in Ansys Mechanical: 3D Printing Results

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the final, of six, and we finally get to the topic that we get the most questions on: “How do I convert my Ansys Results to a 3D Printed Model.” This article will cover taking Ansys Mechanical FEA results, stress, vibration, and heat transfer, and make a cool 3D plot on Stratasys full-color printers. The process should work on other color printers, but we have only tested it with Stratasys.

3D Printing and Color

Since the beginning of 3D Printing, we have been using a file format called STL. The format only contains the external surface of an object represented as triangles, and it does not support color. But there is good news, a new format, 3MF, or 3D Manufacturing Format was recently introduced to replace STL. It is one of several 3D formats that contain not only triangles on the surface of an object, but they support color information for each triangle. 3MF is for 3D Printing. PLY, OBJ, X3D, and others are for rendering and viewing.

But there is bad news. At this time (2020 R2), no Ansys products support 3MF. So we need to get our results into a format that Stratasys can read color data from, which is the latest version of OBJ. Because of this, we will use our favorite Ansys post-processor, EnSight, to create a PLY file, then an open-source 3rd Party tool, Meshlab, to make an OBJ.

Note 1: As soon as Ansys supports 3MF or OBJ or someone adds a 3MF/OBJ ACT Extension, we will update this article.

Note 2: The steps below are actually covered in the post in Post 2 on how to use EnSight and Post 5 on how to make usable 3D result files. But I’ll repeat them here since you may have only come to learn how to make a 3D result file.

Step 1: Get what you want to print as PLY in Ansys EnSight

Ansys Ensight is a powerful tool that does so much more than make 3D result files. But we will focus on this particular capability because we can use it to get our 3D Printed results.

In Post 2 of this series, I go over how to get a high-quality 2D image from EnSight. Review it if you want more details or if you run into problems following these steps.

Before we get going, one key thing you should know is that Ansys EnSight reads a ton of formats, and one of them is the result files from Ansys Mechanical APDL. So we will start with getting that file.

The program reads Ansys Mechanical APDL result files. These are created when you run Ansys Mechanical and are stored in your project directory under dp0/SYS/MECH and is called file.rst or file.rth. I like to copy the result file from that directory to a folder where I’m going to store my plots and also rename it so I know what it is. For our impeller model, I called it impeller-thin-modal-1.rst.

Once you have your rst file, go ahead and launch EnSight.

That brings up a blank sessions. To get started click File > Open

This will bring up a dialog box for specifying a results file. If you click on the “File type:” dropdown, you will see the long list of supported files it can work with. Take a look while you are there and see if any other tools you use are listed. Of course, Ansys FLUENT and CFX are in there.

But the one we want is Ansys Results (*.rst *.rth *.rfl *.rmg). Chose that, then go to the directory where you put your Ansys result file.

EnSight will read the file and put it in a Case. It will list the results as Part 0 under Case 1.

The left part of the screen shows what you have to work with, and the right shows your model. The “Time” control, circled in green, is where you specify what time, substep, or mode you want. The “Parts” control lets you deal with parts, which we really won’t use. And the “Variables” control, circled in orange, is how you specify what result you want to view.

We want to plot deflection, which is a vector. Click on the + sign next to Vectors, and you get a list of what values you can show. The only supported result for model analysis is Displacment__Vibration_mode. Click on that. Then hold down the right mouse button and select “Color Part” > All.

This tells the program to use that result to shade the part. You should now see your contour.

Our example is a modal result. If you use a structural result file, you will be able to plot the displacement vector, as well as many stress results, under “Scalars”

By default, EnSight shows an undeformed object. If you want to see the deflected shape, click on the part then on the “Displacement” icon above the graphics window. Select the vector result you want to use, displacement in this case. Note, the default displacement factor may not be a good guess, change that till you get the amount of deflection you want.

Note, the default displacement factor may not be a good guess, change that till you get the amount of deflection you want.

The other thing you may want to change is the contours. It has a full library of colors you can change to, but I like the default. What I don’t like is that the min and max may not be where I want them, especially for modal deflection results. The min and max values are the min and max in the result file, and unless you normalize your results, you should tweak the values for your 3D print.

Here is the default color scheme for my 40th mode:

To change the range, click on the contour key and Right-Mouse-Button on the legend, and select Edit… This brings up the Create/edit annotation (legends) dialog. Then click “Edit Pallet…” at the top of that dialog to get to the Pallete editor.

You can make lots of changes here, but what I recommend you do is only change the min and max values. If I set the max to 50, I get this contour on my result:

Next, we wan to save as PLY.

Go to File > Export > Geomtric Entities.

In the dialog, chose PLY Polygonal File Format. This will be the generic format we can convert into something GrabCad likes. Make sure you specify which times or modes you want. By default, it will make a PLY for each one. Also, make sure you have selected the part.

Now you have a color-coded, faceted representation of your results, in a 3D file format. Just not one that GrabCADPrint currently supports.

Step 2: Convert to OBJ in MeshLab

Now we need MeshLab. There are many other tools the read PLY files and output to other formats, but MeshLab has not let me down yet. It is opensource, does everything, and is a pain to use. You will laugh at the user interface. But as ugly as it is, it works. You can download MeshLab from www.meshlab.net. Once you have it installed, follow these steps:

  • Open MeshLab
  • Chose File > Import Mesh
  • Spin it around, look at it. You could scale and transform. But we just want to convert it.
  • Chose File > Export Mesh As
  • Scroll down in the File of Type dropdown and pick Alias Wavefront Object (*.obj)
  • Save
  • Make sure you have only Color checked for Vert. Then click OK

Here is an OBJ file from the example above.

That is it. Import that file into Stratasys GrabCAD Print and have at it.

I printed a different mode shape, but I think it looks fantastic. Click to get the full-resolution version.

Closing thoughts

And this ends our series on getting output from Ansys Mechanical, circa early 2021. It was just going to be one article on getting higher resolution images, but it grew a bit. We hope you find it useful.

Remember, PADT is here to help. We are proud to be an Ansys Elite Channel Partner offering Ansys products across the southwestern US.

PADT has been doing this for a while, and we can offer help in terms of one-on-one support, training, customization, and consulting services. Although this article focused on Ansys Mechanical, we cover the physics across the Ansys product line with experienced engineers in every area. And don’t forget we do 3D Printing as a service as well as product design.

Please contact us to learn more.

5 – An update on outputting results in Ansys Mechanical: 3D Result Objects

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the fifth of six and it is about creating results objects that can be viewed in 3D by people who don’t own Ansys Mechanical. You can use the Ansys Viewer, 3D PDF, make rendering files, and display on a web page. Using the Ansys viewer is simple and 3D PDF requires a plugin. For rendering or web viewing, it is not a direct shot, but with the help of EnSight and a few open-source tools, you can share complex 3D results with a lot of people.

Using the Ansys Viewer format and Ansys Viewer

Ansys solves the problem of sharing 3D results across their product line with people who don’t have Ansys through the Ansys Viewer. It is free, simple to use, and should be used in most situations. Right now you can export results from Ansys CFX, CFD-Post (for CFX or Fluent results), TurboGrid, and Ansys Mechanical to this format.

You can download the viewer here.

Making the file is very simple. Just Right-Mouse-Button on the object you want to share. Then select Export > Ansys Result Viewer

Then open this file in Ansys viewer and view away. We have not had any problems with customers of all skill levels use this tool.

For most real engineering situations, you should stop here. This is a robust way to share 3D result objects with anyone, and they don’t need a license of Ansys. But if you need more, including higher-quality 3D objects, keep going.

What about 3D PDF?

If you want to use 3D PDF, there is a plugin for this on the Ansys app store. One of the European channel partners, 7tech, has created More-PDF. Note, it is not free. Free to download and try, but there is a cost. It works in Ansys Mechanical as a plugin and has a stand-alone version that works with CFD Pre/Post, Electronics Desktop, or MAPDL. I won’t get into how to install or use it because the help files that come with are outstanding.

Here is a sample Ansys result that they have provided. You can view it in Acrobat Reader.

If you want to share results in PDF, this seems to be a good tool for that. I’m not sure what the pricing is for it. More information is here, including more example files.

Making a Generic 3D File: PLY

If you read the article on making high-quality images, you saw that Ansys Ensight is a very powerful tool. One thing it does is support a bunch of different 3D file formats. One of those formats is a PLY file, which is a great intermediate format for so much more.

Get started by following the instructions in the previous article about high-quality images using EnSight. But instead of exporting to an image, we are going to save as PLY.

When you have the result you want, go to File > Export > Geomtric Entities.

In the dialog, chose PLY Polygonal File Format. This will be our generic format we can convert into many different things (including 3D printer files, discussed in the next article.) Make sure you specify which times or modes you want. By default, it will make a PLY for each one.

You can now take that PLY file into any fancy rendering program. If you want to show your results in the middle of a rendered scene of something else, the PLY file is the file to use.

I downloaded the opensource tool Blender and gave it a try. The user interface in these tools is nothing like CAD or CAE tools, so it took me a while to get something useful. I think Keyshot Pro would be a better tool for those who don’t know “artist” tools like Blender.

If you do want to give it a try, you can get your color contours by clicking on the object after you import it, then click on the material icon and choose Surface, then set Surface to Specular, Base Color to Vertex Color | Color, and make sure the specular color is dark or black.

One could spend hours (days) learning a rendering tool and playing with surface reflection and transparency. But if you need something high quality for the marketing team, pass them a PLY file and let their graphic artists do their thing.

Here is the file to help if you do want to dig in yourself.

3D Web Results with X3D (and what happened to VRML?)

Early in the days of the web, there were a lot of people that saw the platform as a way to share and interact with three-dimensional virtual space. They create the Virtual Reality Modeling Language, VRML, as a way to represent 3D objects using triangles with detailed information on each triangle about color, texture, transparency, and shininess. It is fundamentally a file format that represents what your graphics card needs to do 3D graphics but in a common format. The fact that simulation results are basically the same thing made it a nice fit for sharing results, geometry, and meshes with other people.

It was pretty cool and you can still save Ansys information in VRML from various programs. But the viewers were clunky and were focused on the virtual reality experience and not showing 3D objects. It also never really took off because you needed a VRML viewer to see the object. That was always a pain.

As it drifted out of favor, an organization replaced it with a new, better format and a JavaScript viewer that would get loaded automatically: the result, X3D graphics.

Here is the result. Click on the impeller and spin away. Here are some basic commands:

Spin: Left Mouse Button
Pan: Middle Mouse Button
Zoom: Scroll Wheel

Reset: r
Show all: a

Are you sure you want to do this?

Now that I’ve gotten you excited about doing this, let me scare you. This is not for the faint of heart. You need to use an Ansys Mechanical APDL result file in Ansys Ensight to make the file. Then you need to do some HTML/CSS. If you are comfortable with going down that path, read on.

The obvious question is, “when will Ansys add these file formates to the Export capability?” Right now you can only export 3D results to a deformed STL (not color info) and the Ansys in-house Ansys Viewer Format, *.avz.

Getting an X3D from PLY

Now we need MeshLab. There are many other tools the read PLY files and output to other formats, but MeshLab has not let me down yet. It is opensource, does everything, and is a pain to use. You will laugh at the user interface. But if you want 3D objects on your website (or to 3D Print results) this is the best path. You can download MeshLab from www.meshlab.net. Once you have it installed, follow these steps:

  • Open MeshLab
  • Chose File > Import Mesh
  • Spin it around, look at it. You could scale and transform. But we just want to convert it.
  • Chose File > Export Mesh As
  • Scroll down in the File of Type dropdown and pick X3D File Format (*.x3d)
  • Save
  • Make sure you have onlly Color checked for Vert. Then click OK

Now we are really close… but not really. We have a X3D file.

Here are both the PLY and X3D files:

I hosted the x3d file on our web server as well.

Here is where the HTML/CSS happens. And explaining that is way beyond this post. Here is the code to show the solution of mode 35 of our impeller, as shown above:

<script src="https://x3dom.org/release/x3dom.js"></script>

<link rel="stylesheet" href="https://x3dom.org/release/x3dom.css" />
<style>
#imp1 {
    background: #000;
    border: 1px solid orange;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
}
</style>
<x3d id="imp1" x="10px" y="10px" width="400px" height="400px" >
  <scene render="true">
    <environment id="myEnv" ssao="true" ssaoamount="0.5" 
	ssaoblurdepthtreshold="1.0" ssaoradius="0.4" 
	ssaorandomtexturesize="8" sorttrans="true" 
	gammacorrectiondefault="linear" tonemapping="none" 
	frustumculling="true" smallfeaturethreshold="1" 
	lowprioritythreshold="1" minframerate="1" 
	maxframerate="62.5" userdatafactor="-1" 
	smallfeaturefactor="-1" 
	occlusionvisibilityfactor="-1" 
	lowpriorityfactor="-1" 
	tessellationerrorfactor="-1">
    </environment>
    <SpotLight id='spot' on ="TRUE" beamWidth='0.9' 
	color='0 0 1' cutOffAngle='0.78' 
	location='0 0 12' radius='22' > 
    </SpotLight>
    <NavigationInfo id="head" headlight='true' type='"EXAMINE"'>      
    </NavigationInfo>
    <Transform translation = '0 0 -2'>
      <inline 
	url="https://www.padtinc.com/downloads/i1-m35-3d-a.x3d"> 
      </inline>
    </transform>
  </scene>
</x3d>

The above code works for our example and has a smattering of options available to make your image show the way you want it. There are hundreds more. If the code makes sense to you, use the documentation at x3dom.org to do more. If it looks like gobly-gook, find someone who can help you or buckle down and learn. It’s not hard, just different for us simulation types.

Some Tough Talk about 3D Results

The truth of the matter is that Ansys Mechanical is great for looking at 3D Results in Mechanical or in the Ansys Viewer. It is not set up to support other 3D file formats. And there is a reason for that. Do you really need to have a 3D PDF? Is having a 3D result on your website just cool, or do you really need it?

The fact is, for most projects, you need a 2D image of your key results in your report. Most of the fancy 3D viewable is to help people who don’t have Ansys understand results better. Or you need it for marketing. For the first case, just use the Ansys viewer. For the second, it can be a bit of work but you can create some eye-catching geometry.

However, one advantage of having a 3D result object is that you can convert it into something you can 3D print. And that is the subject of our next, and final post on this topic: “6 – An update on outputting results in Ansys Mechanical: 3D Printing Results.

4 – An update on outputting results in Ansys Mechanical: Animated GIFs

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the fourth of six, and it is about making animation files that are not videos, called Animated GIFs (pronounced with a J like Jeff, not G like Garry).
For a couple of reasons, making an animated gif is not as easy as we would like, but with a few tips below, it is not so difficult.

Animated GIFs explained

The GIF image file, Graphics Interchange Format, was invented in 1987 when color computing was new and the internet was not around yet. It is compact and allows only 256 colors (remember that part) and supported animation. The animated format was very popular on dial-up services and the early internet. They then fell out of favor until their use in messaging apps and social media to send animations to people that did not require a player. Everyone could see your cat falling off the table, instantly.

Or their dog being woken up in the middle of an afternoon nap. I just took my iPhone, turned around in my chair, and took this video. Then I converted it to a GIF. It took me less than 30 seconds to make and share this gem:

For those of us in the world of simulation, they have been a popular format for the same reason—almost all applications, from email to web browsers to Microsoft Powerpoint, support animated GIFs. The file contains as many images as you want and a tag for each layer documenting how long to display each frame. The difference is we are not capturing our overweight mutt struggling to roll over. We have specific information we are trying to convey.

Ansys Mechanical Default

If you read the post about making videos, you will remember that one of the output options was GIF. Well, here is what you get when you use that option. Note, it only plays once, to play it again.

And by default, the file does not repeat. Also, to make things worse, the way Ansys stores the GIF is an order of magnitude larger than a video.

As a contrast, here is the same result as video played through YouTube

Video to GIF is much better

So, unless you need something in 30 seconds, don’t use the default save video as GIF in Ansys Mechanical. A much better option is to convert a good video to a GIF.

So, go back to the article on making videos and get what you want for your animation using that info and save it to *.mp4 format. Then use one of the methods below to convert that to GIF.

Ezgif.com

If I take the video above that I posted on YouTube and run it through the free conversion tool, ezgif.com, I get this:

It is not as nice as the video, but it does not need a player. It just plays. Ezgif.com is free (lots of advertising) but has a lot of options. Not only does it covert quickly, but it also lets you crop, resize, add effects, change the speed, add text, and overlay.

The downside, if you have proprietary information you are letting someone else see it. My guess is uploading to a free server in the cloud will violate any NDA or security you have in place. But if not, ezgif.com is the simplest way to get a GIF from a video.

Adobe PhotoShop

The first option, if you can’t use a free cloud-based tool like ezgif.com, is the Photoshop suite. Photoshop is the defacto tool for image editing and processing, and it has a lot of tools for making sophisticated animated GIFs, including importing a video, editing the frames from the video, and outputting a GIF.

Here is the process:

  1. Open Adobe Photoshop
  2. Chose File > Import > Vidio to Layers
  3. Chose your MP4 file
  4. In the “Import Video to Layers” dialog, make sure “From Beginning to End” is chosen and “Make Frame Animation” is checked on.
  5. Click OK
    1. At this point, you can do a huge amount of modifying and editing. But that is way beyond the scope of this post. We just want a GIF made. But if you know Adobe Photoshop, have at it. I often crop and change the size here. Maybe even run some filters on it. Or, if I’m getting really fancy, delete the background from each frame to have a transparent animation.
  6. Go to File > Export > Save for Web (Legacy)
  7. Chose GIF as the file format.
    1. Set colors to 256
    2. I like to set Dither to 100%
    3. Make sure Animation > Looping Options at the bottom is set to Forever.
    4. Click Save… and give it a file name.

Here is what the result looks like:

Adobe Premier

Adobe Premiere is, well, the premier tool for video editing and creation. Many professional videos are made with this tool. It is massive, powerful, and made for people who speak video. If you want to add to your animation, do fancy things with it, use Premiere. Otherwise, stick with Photoshop or an open-source or cloud tool.

But, if you want to use Premier, here is that basic process without any bells or whistles (literally and figuratively) added in:

  1. Open a new Project
  2. Specify a good directory for the project
  3. Drop your MP4into the Project Window
  4. The drag it to the Timeline
    1. Here is where you do your editing magic on the video.
  5. When you are ready to make your file, click File > Export > Media
  6. Chose Animated GIF for the format
    1. Do not pick GIF. That will make an image of every frame.
  7. Click on the name next to “Output Name” to set the name and directory.
  8. Make any other changes you feel are correct if you know Premier.
  9. Click Export

This is what you get.

GifTuna

if you don’t have access to any Adobe tools, I recommend GifTuna. Yes, the name is stupid. But it works and it is free.

Go to giftuna.io and download the app. it comes as a ZIP file. Just extract the zip file and run the executable, GifTuna.exe. It will then ask you to install FFMPEG. This is the same library that ezgif.com uses.

Once everything is installed:

  1. Click “Select File”
  2. Select the video you saved in Ansys Mechanical.
  3. Change the size if you want to
  4. Keep all the other defaults for your first pass.
  5. Click Export

You get a pretty nice video. Play with the dither options if it looks kind of fuzzy.

Making an Animated GIF out of Images

In all the examples above, we created animations by converting a good video into the animated GIF format. What if we just have a bunch of images and want to make a slide show out of them. Or maybe we want to show a series of geometry changes. Maybe the various steps in an animation.

In that case, save an image to a PNG or JPEG file for each frame you want, then use ezgif.com or PhotoShop to make your animation.

A word about APNG

The only real problem with Animated GIFS is that the GIF format only supports 256 colors. In many ways, PNG took over for GIF as the preferred file format. It is compact, handles transparency, and has the advantage of not being restricted on colors. The problem, only browsers support APNG. PowerPoint and most mail programs do not. And many tools like the Adobe Suite do not output in that format. But, ezgif.com does.

In fact, WordPress does not support the format. To view the APNG file, download this file and then open it in a browser:

Maybe someday this will be supported better. Hopefully in Microsoft products soon.

Moving from Motion to 3D

This should help you get a nice animation that you can put on a website and not have to worry about hosting so people can see it. The same goes for Email and PowerPoint. If you can live with fewer colors, it really is the best format for animations of results when you need to show them anywhere.

Now its time to move from 2D results to 3D. We will cover how to create 3D objects of your results in “5 – An update on outputting results in Ansys Mechanical: 3D Result Objects.

3 – An update on outputting results in Ansys Mechanical: Making Videos

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the third of six and it is an update on making videos of results animations with Ansys Mechanical. A lot of improvements have been made in recent releases and you can get good quality videos that are very useful for sharing results with others.

Getting a video of what you see on the screen

In most cases, you can get the video you need by using the animation tools built into Ansys Mechanical. By default, the animation tool shows up at the top of the animation window. If it is not there, go to Home > Layout > Reset Layout. Or add it with Home > Layout > Manage > Graph.

The key thing to know about making videos of results in Ansys Mechanical is that the “save to file” commands do a screengrab of what you see on the screen. So the size, orientation, and resolution are what is in front of you. There are lot of things can be done easily with the help of ecdel.

The Export Video File button is how you save the animation to a file.

As the tip in the image shows, the command supports AVI, MP4, WMV, and GIF formats. We will discuss the formats below and improving quality in the next section. Most of the time, you should pick MP4 and save the file.

But first, you should know that there are four things you can animate and save to a video file: modal results, static results, results over time, and motion of the camera (keyframe).

Plotting Mode Shapes

Modal results are the simplest. In our example impeller, you need to pick the mode you want to view, get the orientation you want, and then click the play button. When you are ready to make your video file, click the”Export Video File” button and save it.

Now is a good time to explore the different formats. For the sample model I’m using, the file size for the three video formats is pretty much the same:

MP41,139 KB
WMV1,320 KB
AVI1,120 KB
GIF29,072 KB

The Animated GIF is much larger, and it turns out, a much lower quality format. We will cover that in the next article, let’s just ignore GIF for now.

Taking a look at the 3 videos, I’m not sure I can tell a difference. Note, you need to download them and play them on your desktop to see any differences. If we upload to a streaming service then the format gets changed by the service.

And here it is embedded as a YouTube Video, which we will do for all the other examples. I used the MP4 format because I think it might look a little better.

Static Results

This one is very simple and is identical to mode shapes. It plots one result from initial conditions to the final result. Although in our example, it’s not so useful, for complex bending with lots of different loads, it can be handy.

Results Over Time/Steps

The most common use for animation is looking at results over time or over multiple load steps. I was too lazy to build a transient example, so I just put some strange acceleration loads on our impeller and varied them over 5 timesteps.

This gave some movement of the rotor (we will cover changing deflection exaggeration in the next section) so you can see what is going on.

To get your animation, select the result you want from the tree and orient things in a way that shows what you need to show. Push play to view. Tweak as needed then save as we did with modal results. This is what you get:

With the default settings, it creates the specified number of frames across the whole result set. This uses the “Distributed” setting, the green icon. If you watch the vertical line as it animates, you can see it linearly interpolating results between result steps.

If you don’t want this, then click the blue icon to get one frame per solution on the result file. This is a good idea, and even critical, for many transient runs or nonlinear runs where linear interpolation is not correct. Notice how the field for specifying frames is grayed out and set to 5. That is because we have 5 result sets.

To show the difference, including the graph at the bottom, I actually did a screen recording, which we will cover in the last section.

It really is simple. Get what you want going on your screen, then save it to a file.

Making it better

The default settings are great for most situations, but you can get better results with a few small changes.

Distortion

For any type of mechanical simulation, you are solving for deflection, and you usually want the distorted shape to show up in your animation. Most of the time the program calculated exaggeration is just fine. But if you need to change it, use Result > Display and the drop-down for the Deformation Scale Factor. Change it and see what happens.

Background

The first thing I always do is get rid of the blue gradient background. One reason for this is that the compression algorithms that various video formats use can cause the background gradient to shift slightly over the video. Or it might reduce the colors. Having a solid background gets rid of that. And, if you ask me, it just looks better.

You can set your preferences for images to always have a white background, but you can’t do that in Animation. So you need to change the Workbench background.

Go to Workbench > Tools> Options…

Then select Appearance. Set Background Style to Uniform and the first color to the color you want. I use White.

But a rich purple is kind of cool and makes the other colors stand out:

Remember to change this back when you are done making your animations. If you are working debugging a really tricky model, that purple will burn a hole in your head.

Size

Remember, Mechanical is just doing a screen capture in the background, so the size of your plot on your computer screen determines the output. Sometimes you may want a small video, sometimes a big one. Let’s look at getting the highest resolution possible.

The graphics window size is determined by everything around it. By default, the graphics window is embedded, but with a little trick, you can set it free.

Here is the default on my monitor, my rotor is 584 pixels tall. (my screen is 1080 pixels high.

  1. Go into full-screen mode by pressing F11 or clicking Home > Layout > Full Screen
  2. Then click the X Tabular data windows to remove it.
  3. Grab the blue strip on the Graph window and drag it to pull it out of the window. You need to keep that window to save your animation.
  4. Press CTRL-O to get rid of the outline
  5. Press CTRL-D to remove the details window.

That gives you a nice big window of your results. Now my impeller is 911 pixels tall. And I can zoom in a little to get it a bit bigger.

But you will notice the screen is wide. If I animate now, for my geometry, I’m wasting a lot of bits storing the background. Click on the “Restore Down” button in the upper right of your window to get it out of windows full screen. Then drag the edges to get the size and shape that are just big enough to show your results.

If you want another 20 pixels (now we are getting greedy) you can get rid of the toolbar at the top. Click on the tiny down arrow on the far right of the toolbar. Then click Add or Remove Buttons > Customize. Then uncheck “Graphics.”

Now run your animation. Then, when you are happy, save it. You can bring the outline back with CTRL+O if you need it. If you need more pixels, get a higher resolution monitor or stretch the graphics window over multiple monitors.

I’m working on a Microsoft Surface, and I’ve been doing my animations on my portable monitor, which is only 1080 pixels high. To get the best image, I moved over to the main screen, which is 1824 high.

So with all the tricks and on my highest resolution monitor, I get a video that is 1785 pixels high, and it looks pretty good, even after YouTube compresses it:

Here is the file to view on your own machine:

Important! To get back hit F11 then Home > Layout > Reset Layout. You may have to also do Home > Layout > Manage > Tabular Data to get that window back and Home > Layout > Manage > Graphics Toolbar to add that back to the top of the graphics window

Frames & Time

The last thing to play with is the number of frames and the length. A good rule of thumb is to not have less than 10 frames per second. And greater than 20 is good. Set it to 5 Frames and 5 Seconds to see blocky. Then 100 Frames and 5 Seconds (20 frames/sec) to see everything smooth.

Moving the object with Keyframe animation

If you want the object to move during an animation, you can use what is called Keyframe animation. To be honest, I am not sure I’m using it right in the program, but I got it to work somewhat, so I’ll share what I did. I’m also only going to cover the basics, see the documentation for more.

First, open the Keyframe Animation tool with Home > Tools > Keyframe Animation.

Orient your parts the way you want them, and click the add Keyframe button. The one with the green plus.

Now pick your second orientation, and add it to the list. Keep going till you have all your orientations in there. Set the time to somehting like 4 or 5 seconds, and hit play.

Now, getting a little fancy, you can add pauses at any Keyframe if you want. Do this by double-clickingon the Keyframe step to orient the part, then click the Insert Keyframe icon (top row, 4th from the left) to make a copy. You now how two keyframes at the same orientation so your part won’t move.

This window has a save animation button as well, so save it. When I used it, this is what I got:

This spins the final distorted shape, not the animated shape.

If you look at results that are not from a modal run, you will see that you can animate the results over time by clicking on the Keyframe icon in the animation bar:

The first icon, red circle, tells the program to change the orientation as defined in the Keyframe Animation Window while it animates your results. Click on the second icon, green circle, to use the frame counts you have specified in your Keyframe Animation Window.

This is what the multi-step results look like over the motion:

What about modal? Well in theory you can’t plot a mode shape with keyframe animation. But… if you set up a keyframe for a non-modal result, run it. Then move to a modal result, it works, sort of. The results animate if you have two keyframes that are the same next to each other. This is not a documented feature and may even be a bug. But here is how it looks:

When all else fails, make your own recording

Sometimes you can’t get what you need saved to a file, but you can see it on the screen. Including the Graph window is a good example. Rotating a modal result, since Keyframe really doesn’t work with modal, is another good example. Now that we all have learned to use online meeting software through COVID-19, we know how to do a screen capture of the animation. I use MS Teams and it works just fine.

But, the quality is OK and you get artifacts from the meeting, like my icon on the bottom for attendees. Those can be edited out, but not ideal. Here is a sample:

If you need better quality, a dedicated screen capture program may be better.

And it turns out that Windows 10 had a built-in screen recorder. It’s called XBOX Game Bar, and it works pretty well. Here is a link on how to use it.

And I get a nice full screen video:

Play, but not too much, and RTM.

The last bit of advice we can give on animating in Ansys Mechanical is that if you want something beyond the defaults, set aside some time to play. There are a lot of options, many we have not even looked at. But at the same time, in your quest for an Oscar, you may be spending time on something that is not going to make a difference. So use your time wisely.

And as always, Read the Manual. There is a wealth of detailed information there.

Getting the right Animated GIF

Now that we have covered creating various video formats, what about making an animation that doesn’t need some sort of player? The next post, “4 – An update on outputting results in Ansys Mechanical: Animated GIFs” explains how to do that.

2 – An update on outputting results in Ansys Mechanical: Taking it to the Next Level with Ansys EnSight

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the second of six on what I’ve learned after fiddling around for a while. It is looking at a post-processing tool that Ansys acquired a few years back called Ansys EnSight. It takes making output to the next level in functionality and quality.

More options and ray tracing with Ansys EnSight

Back in 2017, 3 years ago, if you don’t account for COVID-19 time dilation, Ansys, Inc. acquired a company called Computational Engineering International. They had a product called EnSight, which was the best post-processing tool on the market. Many FLUENT, CFX, and LS-DYNA users would use EnSight to do advanced result interrogation and output. Its capabilities focus on doing complex visualization and automation. Along with real engineering tools and support for an extensive range of tools, it also makes really nice plots. For this post, we will focus on that part. This is an amazingly capable tool, and I’ll only cover the bare minimum that you need to know to get a result from Ansys Mechanical in and plotted. See the help or online training for more on this fantastic tool.

Ansys EnSight is its own stand-alone program. It can be licensed on its own or as part of various CFD bundles. If you are a larger company that does CFD, you probably have one or more seats.

The program reads Ansys Mechanical APDL result files. These are created when you run Ansys Mechanical and are stored in your project directory under dp0/SYS/MECH and is called file.rst or file.rth. I like to copy the result file from that directory to a folder where I’m going to store my plots and also rename it so I know what it is. For our impeller model, I called it impeller-thin-modal-1.rst.

Once you have your rst file, go ahead and launch EnSight.

Setting up images in Ansys Ensight

That brings up a blank sessions. To get started click File > Open

This will bring up a dialog box for specifying a results file. If you click on the “File type:” dropdown you will see the long list of supported files it can work with. Take a look while you are there and see if any other tools you use are listed. Of course, Ansys FLUENT and CFX are listed. This is first and foremost a CVD post-processor.

But the one we want is Ansys Results (*.rst *.rth *.rfl *.rmg). Chose that then go to the directory where you put your Ansys result file.

EnSight will read the file and put it in a Case. It will list the results as Part 0 under Case 1.

The left part of the screen shows what you have to work with, and the right shows your model. The “Time” control, circled in green, is where you specify what time, substep, or mode you want. The “Parts” control lets you deal with parts, which we really won’t use. And the “Variables” control, circled in orange, is how you specify what result you want to view.

We want to plot deflection, which is a vector. Click on the + sign next to Vectors, and you get a list of what values you can show. The only supported result for model analysis is Displacement__Vibration_mode. Click on that. Then hold down the right mouse button and select “Color Part” > All.

This tells the program to use that result to shade the part. You should now see your contour.

Our example is a modal result. If you use a structural result file, you will be able to plot the displacement vector, as well as many stress results under “Scalars”

Next, you will want to clean things up. Go to View and turn things on and off as you see fit. I like to turn off perspective, the Axis triad, and sometimes the legend.

You may notice the “Lighting…” option. If you really want to get fancy, you can specify various lights to get shadows and such. I like to add a spotlight above and slightly off-center from the part. You can waste a lot of time playing with lights, so try to avoid it if you can.

To pick which mode or timestep you want, use the “Time” control. Clicking on the step forward or step back buttons (triangle with a small rectangle at the base) steps you through the results on your file. Or you can drag the slider.

By default, EnSight shows an undeformed object. If you want to see the deflected shape, click on the part then on the “Displacement” icon above the graphics window. Select the vector result you want to use, displacement in this case.

Note, the default displacement factor may not be a good guess, change that till you get the amount of deflection you want.

These are only a few of the dozens of options available. But we can get most of what we need with these, so let’s look at saving the plot.

Saving your image

Now its time to get a rendered plot. Go to File > Export > Image

There is a lot to do in the “Save image” dialog. First, set the format (red circle.) I always use PNG. Then set the filename and path.

Expand the Advanced area and click “RayTrace the scene” (orange circle). Then you need to tell it how many pixels you want. Go big. You can always shrink it later.

Click OK and generate your plot. Check it out, things may be fine.

Leveraging Ray Tracing in Ansys EnSight

If you want to make the plot even better, go back to the Save image dialog and click “Raytrace settings…” and move the Quality slider all the way to the right. Do know that it can take a while to ray trace a large image with lots of surfaces.

And this is what you get. Click on the image to see it larger.

There is are many more options in this tool. Spend some time exploring these features to get even better plots:

  • You can change the shading of the surface by double-clicking on the part in the “Parts” control and then setting the surface lighting parameters. To get there, click on advanced, scroll down, and expand General. I like to up shininess. Play with these to see what works best.
  • You can also create multiple views in the same window. Right mouse clock in the graphics window and select “Viewports” and pick what you want. You can’t ray trace but you can still get output of multiple windows.

Here is what the output looks like, whithot ray tracing. Not bad.

  • Sometimes you may want to make your part transparent. You can set that in the controls under General, where you can change the lighting.

And you get a very cool plot. I’m not sure when you would use it, but if you need it, it is handy. CFD users need this all the time.

The problem with this tool is that it has so many great features, you could burn a lot of time just changing things. But if you stick to the basics, you can take your plot to that next level for your website or brochure.

Plotting a single part in a multi-part file

There is one last detail to mention. What do you do if your model is an assembly but you only want to plot one part. EnSight treats a given RST file as one part. So you can’t really scope to just the part you want.

The solution is to open your RST file in Mechanical APDL and save out the parts you want to plot in a seperate result file. You do this with the APDL command: rsplit

Here are the steps:

  1. Get into APDL
  2. Use “set” to read the results file
  3. Select the elements you want as separate parts for plotting using standard APDL commands or the GUI.
  4. Create element components for them (cm,name,elem, or the GUI)
  5. Use rsplit to write an RST for each part: rsplit,all,all,cmname where cmname is the component name you created in step 4.
  6. This makes an rst file called cmname.rst. Now use this rst file for the above process

Let’s make a movie next

This post and the previous one focused on high-quality 2D plots. What if you want to show motion? Read on to the third post in the series to learn how to create outstanding videos in Ansys Mechanical – “3 – An update on outputting results in Ansys Mechanical: Making Videos

1 – An update on outputting results in Ansys Mechanical: Making High-Resolution Images

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the first of six on what I’ve learned after fiddling around for a while. It is an update to an article I did back in 2009 on the same topic, as well as plotting well in Mechanical APDL

Getting high-quality Pixels in Ansys Mechanical

To get started, let’s meet our sample model, an impeller we were working with a while ago for some Additive Manufacturing simulation. The modal results are good for exploring plotting:

Getting an image file in Ansys Mechanical is pretty simple. You click on the object you want a plot of, then select Home > Insert > Images > “Image to File …”

The default preferences are good for most plots. You basically get what you see on the screen.

This is the dialog where we can start making some simple modifications to increase the quality. here is how it comes out. Click to see full size:

I’m not a big fan of that. It is OK for sticking in an email or small on a PowerPoint. But I like better resolution, not just for marketing, but also to allow zooming.

The simplest change is to up the resolution – the number of dots per inch. First, you have to unclick the “Current Graphics Display.”

Playing with the resolution, here is the same image at the three different resolutions (1:1, 2:1, 4:1) (click to see it full size or look at the zoomed views below)

For most uses, the middle image, 2:1 is good enough. Image quality is driven by the number of color dots, or pixels. The base size is determined by how big the window is on your monitor. For this part the images are:

ScalePixel SizeFile Size
1:1939 x 621140 KB
2:1878 x 1242349 KB
4:13756 x 2484884 KB

But if we zoom in we can see the difference. You really only need the 4:1 for printing, or as we needed, the ability to blow it up for a booth or banner.

1:1
2:1
4:1

The blue-to-white gradient looks good on the screen and cuts down on eye fatigue, but can be a pain for images, especially if you are removing backgrounds or pasting into other documents. So the next thing I always do is change the background to white:

And you get a great picture, here it is 2:1, white background:

With the white background, it is easy to remove it, so you can place things behind it. That is very handy in PowerPoint.

If you are not familiar with that feature in Microsft Office applications, it is under: Picture Format > Adjust > Color > Set Transparent Color. Then click on a white pixel in your image.

This example shows a gray background, but it works with much fancier backgrounds. Here is the impeller in Sedona, Arizona.

I deleted the white background, the key, and the triad in Photoshop. I usally turn off the scale and triad in Ansys Mechanical: Display > Show then pick what you want on your plot.

These plots all use solid colors for each contour band, which is easier to read if you are doing actuall engineer. But if we are making marketing plots, I swap to smouth contours: Result > Display > Contours > Smooth Contours.

With a little Photoshop work you can get somethign pretty snazzy:

The last thing to talk about is what format to save in. This used to make a big difference because some of the formats traded quality for file size. But now the quality of the more efficient files is good.

You chose the format when you specify the file name. The choices are PNG, JPEG, TIFF, Windows Bitmap, and EPS.

As you can see in the closeup below, the different format really don’t lose quality, but their size varies a lot. Take a look at the next image, I can’t spot the difference. I recommend PNG because it is small but doesn’t lose any quality. But if you have a lot of plots and size is an issue, use JPEG. I have no idea why TIFF and especially Windows Bitmap or so large, but unless someone asks you for those formats, I’d avoid them.

Which leads us to the EPS or Encapsulated Postscript format. This is the last option. Now, EPS is usually what we call a vector format – not pixels but actual shaded polygons. The advantage of vector is that you can scale it up and down all you want and nothing is lost. The image is always sharp.

So you may get excited when you see EPS. In Ansys Mechanical APDL it does create a vector file (a way to get vector graphics of your results if you need them. Use /show,PSCR,,,8) But Ansys Mechanical just creates a bitmap image and puts it into Postscript format. It is not vector. You can see this if you open it in Adobe Illustrator. Bummer.

I hope this helps, and for 90% of your plotting needs, these tips should get the job done. But if you want to go further, read on to the next post in the series: “2 – An update on outputting results in Ansys Mechanical: Taking it to the Next Level with Ansys EnSight

Using Ansys Icepak Results in Ansys Mechanical

With Icepak now falling under the umbrella of Electronics products in the Ansys Pro Premium Enterprise licensing scheme, it is easier than ever to obtain conjugate heat transfer simulation results without a dedicated Fluids license. Because of this, we have received multiple requests regarding methods to transfer Icepak’s results to a workbench environment for more accurate thermal and Mechanical results. So, without further ado, I will outline the procedure for four different methods along with their general use-cases. Before that if you want to know about icepak then do visit sustainabilitystreet .

1: Temperature from Classic Icepak

The first, and most straightforward, method is simply transferring body temperature directly from the Icepak (Classic) workbench application. This may be the preferred method for the majority of use-cases where getting thermal CHT results into a mechanical project is the goal. The Icepak node needs to be solved as normal, and then the solution can simply be dragged over to the setup node of another project, such as steady state thermal or static structural. Once this has been linked and updated, the transferred body temperatures are accessed through an “Imported Load” folder where the temperatures for individual bodies can be mapped over. The benefits are that as long as the Icepak simulation is set up as needed, you won’t need to resolve anything on the thermal side, and there is no extra manipulation of data required on the user’s end.

2: Heat Transfer Coefficients from Classic Ansys Icepak

The second method that sits natively within Workbench involves mapping heat transfer coefficients onto surfaces. This of course means that the thermal problem must be solved again, but it does provide extra accuracy over uniform HTC approximations, and some extra flexibility for recalculating body temperatures that result from changing power input conditions. This might be the desired approach if you are working with a forced flow and are looking at thermal stress results across a range of CPU loads, for example. HTC coordinate maps can be exported from Classic Icepak through the “Full Report” command with “Only summary information” disabled. 

The complicating factor for this method is that the file format and information is not compatible with Workbench for External Data mapping in its default form.

I wrote a simple python script for this purpose – it reads in the HTC coordinate data, makes it all positive, rewrites it as a CSV, and adds the necessary reference (ambient) temperature column. It is important to note here that there can be an error in reported HTC sign from Icepak. This is because the sign is determined by the direction of heat transfer, which is reported without consideration to the solid body surface normal direction. So, for entirely convex shapes, the sign will be correct, but for more complicated structures like heatsinks with surfaces facing every which way, the signs will be inconsistent. Once this is done, each column needs to be correctly associated in the external data definition and then mapped to the setup of your thermal simulation. In Mechanical, this causes an Imported Load to show up under Analysis, which you will then insert a Convection Coefficient into. This can be scoped to individual faces, which should of course be included with those chosen when exporting from Icepak.

For reference, the python script may look something like:

############################################
import numpy as np
import sys

##Usage is 'python HTCCleanup.py inputfilepath AmbientTemperature'
inputfile = sys.argv[1]
Temperature = float(sys.argv[2])

#Bring in Icepak data file as argument
data = np.loadtxt(inputfile,skiprows=25)

#Make all HTCs positive
data[:,4] = abs(data[:,4])

#Create and append a reference temperature column
temparray = np.ones([len(data[:,0]),1])*Temperature
data = np.append(data,temparray,axis=1)

#Write to file
np.savetxt('ProcessedReport.csv',data,delimiter=',',fmt='%.5e',header='Node#, x, y, z, HTC, TRef')
############################################

3: Temperatures from EDT Icepak

The electronics desktop version of Icepak is a newer and, in my opinion, a more user-friendly environment for Icepak simulations. However, since it does not integrate directly with Workbench, mapping over result data for further structural simulation is not as straightforward. Luckily for us, other users have already addressed this obstacle via an ACT extension!

This is the “Write Thermal Loads” extension that can be downloaded for free from the Ansys App Store (https://catalog.ansys.com).

Once loaded, the interface looks like this:

Basically, this is a guided wizard that will export an external data file with coordinate defined temperatures according to the EDT bodies you select with the Wizard. The wizard also generates some workbench script files that can be used to automate the import process, but the most important part to know is that the temperature data file is brought in through External Data in essentially the same way as the aforementioned HTC file. For those who are familiar with the EDT environment and want to take thermal results straight into a structural analysis, this is the preferred approach.

4: HTCs from EDT Icepak

This is perhaps the most awkward (and advanced) workflow, but it provides the same flexibility as with Classic Icepak HTCs, without the potential error in HTC sign, and with the benefit of working in the EDT environment. The portion of this flow most likely to contain errors is generating the HTC data file, as we must make use of a normally inaccessible operation in the Field Calculator. After solving an Icepak project and generating results, we should first create a face list including all of the convection faces of interest – this is done by selecting those faces in the GUI and then using the Modeler > List > Create > Face List to generate this face. Once the list is created, open the field calculator (Icepak > Fields > Calculator), and then perform the following steps:

  1. Input > Quantity > Heat Transfer Coefficient
  2. Input > Geometry > Surface > Face List
  3. Scalar > Mean > Undo (ONE TIME)
  4. Output > Write

The single undo operation grants us access to the intermediate step where HTC data is accessible as a “SclSrf: SurfaveValue(Surface,HTC)” datatype, and can also be accessed by performing undo after any other scalar operation on a scalar field definition. (such as integration over a surface or body or a min/max calculation, for example)

The .fld file produced with the write operation is close to usable in workbench, but still must be slightly reformatted and appended with a reference temperature column. I would suggest a python script that is very similar to the one used for Classic HTCs.

One thing to note is that these files generated by EDT can end up being much larger than you may expect. This is because the field calculator essentially forms a list of all the surface elements on the surfaces you have specified, decomposes them into triangular elements if necessary, and then reports the HTC value of that triangular element at each connected corner node. So, you end up with 3 times as many data entries as you have surface elements, multiple HTCs reported for each node that touches more than one surface element, and a correspondingly large file for fine meshes on complicated geometries. Still, Workbench will interpret this whole thing fairly well, and you should end up with a good HTC map to make use of in Mechanical. 

Multibody Dynamics Updates in Ansys Motion 2020 R2 – Webinar

Ansys Motion, now in the Mechanical interface, is a third generation engineering solution based on an advanced multibody dynamics solver that enables fast and accurate analysis of rigid and flexible bodies and gives an accurate evaluation of physical events through the analysis of the mechanical system as a whole.

Ansys Motion uses four tightly integrated solving schemes (rigid body, flexible body, modal & meshfree EasyFlex) that give the user unparalleled capabilities to analyze in any combination imaginable. Large assemblies with millions of degrees of freedom can be studied with the effects of flexibility and contact included. With an integration into Mechanical, users can take advantage of multi-use models resulting in substantial time savings.

Join PADT’s Senior Staff Technologist, Jim Peters for an exploration of what this tool has to offer, and how seamlessly it integrates with the Ansys Mechanical interface.

Register Here

If this is your first time registering for one of our Bright Talk webinars, simply click the link and fill out the attached form. We promise that the information you provide will only be shared with those promoting the event (PADT).

You will only have to do this once! For all future webinars, you can simply click the link, add the reminder to your calendar and you’re good to go!

Introducing Level Up – An Ansys Mechanical Virtual Conference

PADT & Ansys are excited to announce Level Up with Ansys Mechanical, a free virtual technical conference on Wednesday, December 2, 2020 at 10 a.m. EST.

For the past 50 years, Ansys Mechanical continues to be the go-to finite element analysis platform for structural analysis, and they’re just getting warmed up. Join visionary Ansys product development, product management and engineering leaders as they provide expert insights on Mechanical’s technology advances and preview the platform’s future.

From those engineers looking to boot up their simulation experience to those seeking to step up their simulation skills, and even those operating in “beast mode”, who execute large and complex workflows, this action-packed event showcases how Mechanical radically transforms product design.

Highlights include: 

  • Learn the latest with scripting and automation to save valuable time
  • Discover how to lightweight product designs with structural optimization methods
  • Understand how to couple multiple physics to assess performance in the real world
  • And so much more

Catch the thought-provoking plenary presentation, engage with Ansys’ brightest during the live Q&A, and interact with fellow engineers during live polls. 

Register Here

Mechanical Updates in Ansys 2020 R2 – Webinar

From designers and occasional users looking for quick, easy and accurate results, to experts looking to model complex materials, large assemblies and nonlinear behavior, Ansys has you covered. The intuitive interface of Ansys Mechanical enables engineers of all levels to get answers fast and with confidence. Ansys structural analysis software is used across industries to help engineers optimize their product designs and reduce the costs of physical testing.

Ansys Mechanical is the flagship mechanical engineering software solution that uses finite element analysis (FEA) for structural analysis.It covers an enormous range of applications and comes complete with everything you need from geometry preparation to optimization and all the steps in between. With Mechanical Enterprise you can model advanced materials, complex environmental loadings and industry-specific requirements in areas such as offshore hydrodynamics and layered composite materials.

In this webinar, PADT’s Senior Mechanical Engineer & Lead Trainer, Joe Woodward will cover a few key components of this tool and what is newly available for them in Ansys 2020 R2. This includes updates for:

– Mechanical Core

– Mechanical Graphics/Post Processing

– Linear Dynamics

– SMART Fracture

Register Here

If this is your first time registering for one of our Bright Talk webinars, simply click the link and fill out the attached form. We promise that the information you provide will only be shared with those promoting the event (PADT).

You will only have to do this once! For all future webinars, you can simply click the link, add the reminder to your calendar and you’re good to go!

A Simple Adjustment to Fix a Contact Convergence Problem in Ansys Mechanical

As I write this from home during the Covid-19 crisis, I want to assure you that PADT is conscious of many others working from home while using Ansys software as well.  We’re trying to help with those who may be struggling with certain types of models.  In this posting, I’ll talk about a contact convergence problem in Ansys Mechanical.  I’ll discuss steps we can take to identify the problem and overcome it, as well as a simple setting to make which dramatically helped in this case. 

The geometry in use here is a fairly simple assembly from an old training class.  It’s a wheel or roller held by a housing, which is in turn bolted to something to hold it in place.

A close up of a device

Description automatically generated

The materials used are linear properties for structural steel.  The loading consists of a bearing load representing a downward force applied by some kind of strap or belt looped over the wheel, along with displacement constraints on the back surfaces and around the bolt holes, as shown in the image below.  The flat faces on the back side have a frictionless support applied (allows in plane sliding only), while the circular faces where bolt heads and washers would be are fully constrained with fixed supports.

A close up of a logo

Description automatically generated

As is always the case in Ansys Mechanical, contact pairs are created wherever touching surfaces in the assembly are detected.  The default behavior for those contact pairs is bonded, meaning the touching surfaces can neither slide nor separate.  We will make a change to the default for the wheel on its shaft, though, changing the contact behavior from bonded to frictional.  The friction coefficient defined was 0.2.  This represents some resistance to sliding.  Unlike bonded contact in which the status of the contact pair cannot change during the analysis, frictional contact is truly nonlinear behavior, as the stiffness of the contact pair can change as deflection changes. 

This shows the basic contact settings for the frictional contact pair:

A screenshot of a cell phone

Description automatically generated

At this point, we attempt a solve.  After a while, we get an error message stating, “An internal solution magnitude limit was exceeded,” as shown below.  What this means is that our contact elements are not working as expected, and part of our structure is trying to fly off into space.  Keep in mind in a static analysis there are no inertia effects, so an unconstrained body is truly unconstrained.

At this point, the user may be tempted to start turning multiple knobs to take care of the situation.  Typical things to adjust for contact convergence problems are adding more substeps, reducing contact stiffness, and possibly switching to the unsymmetric solver option when frictional contact is involved.  In this case, a simple adjustment is all it takes to get the solution to easily converge. 

Another thing we might do to help us is to insert a Contact Tool in the Connections branch and interrogate the initial contact status:

This shows us that our frictional contact region is actually not in initial contact but has a gap.  There are multiple techniques available for handling this situation, such as adding weak springs, running a transient solution (computationally expensive), starting with a displacement as a load and then switching to a force load, etc.  However, if we are confident that these parts actually SHOULD be initially touching but are not due to some slop in the CAD geometry, there is a very easy adjustment to handle this.

The Simple Adjustment That Gets This Model to Solve Successfully

Knowing that the parts should be initially in contact, one simple adjustment is all that is needed to close the initial gap and allow the simulation to successfully solve.  The adjustment is to set the Interface Treatment in the Contact Details for the contact region in question to Adjust to Touch:

This change automatically closes the initial gap and, in this case, allows the solution to successfully solve very quickly. 

For your models, if you are confident that parts should be in initial contact, you may also find that this adjustment is a great aid in closing gaps due to small problems in the CAD geometry.  We encourage you to test it out.

ANSYS Mechanical: Mesh Time Metric Display

The things you find out from poking around the Enhancement Request list…

Did you know that you can get ANSYS Mechanical to report the amount of time that the meshing takes? I didn’t until I stumbled across this little gem on the request to show mesh time metrics.

This option is already available for many releases now. Users can turn performance diagnostics by setting to Tools -> Options -> Miscellaneous -> “Report Performance Diagnostics in Messages” to Yes inside Mechanical.

So, of course, I tried it out.

This was in version 2020R1, but it says that the option has been there since R19.0.  Now they just need to add it to the Statistics section of the Mesh Details so that we can use it as an output parameter.