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

Categories:

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 session. To get started click File > Open

image 14 11

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.

image 15 9

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

image 16 7

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.

image 20 5

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”

image 25 3

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.

image 23 4

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

image 24 4

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:

image 6 13

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.

image 4 16

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:

image 5 16

Next, we want to save as PLY.

Go to File > Export > Geomtric Entities.

image 93

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.

image 94

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 that read PLY files and output to other formats, but MeshLab has not let me down yet. It is open source, 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)
image 7 14
  • 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.

Categories

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

03/27/2024

2024 Arizona Space Summit

03/28/2024

SAF Blue Carpet Event

03/28/2024

2024 Arizona Space Summit

04/03/2024

Low Frequency Updates in Ansys 2024 R1 - Webinar

04/03/2024

Venture Madness Conference Reception + Expo

04/03/2024

Stratasys F3300: Game Changing Throughput - Webinar

04/08/2024

39th Space Symposium

04/09/2024

39th Space Symposium

04/10/2024

Discovery Updates in Ansys 2024 R1 - Webinar

04/10/2024

39th Space Symposium

04/11/2024

39th Space Symposium

04/22/2024

Experience Stratasys Truck Tour: Houston, TX

04/24/2024

Structures Updates in Ansys 2024 R1 (2)

04/24/2024

Experience Stratasys Truck Tour: Houston, TX

05/07/2024

Experience Stratasys Truck Tour: Albuquerque, NM

05/08/2024

Fluent Materials Processing Updates in Ansys 2024 R1 - Webinar

05/09/2024

Experience Stratasys Truck Tour: Los Alamos, NM

05/14/2024

Simulation World 2024

05/15/2024

Simulation World 2024

05/16/2024

Simulation World 2024

05/22/2024

Optics Updates in Ansys 2024 R1 - Webinar

06/12/2024

Connect Updates in Ansys 2024 R1 - Webinar

06/26/2024

Structures Updates in Ansys 2024 R1 (3) - Webinar

06/27/2024

E-Mobility and Clean Energy Summit

07/10/2024

Fluids Updates in Ansys 2024 R1 - Webinar

08/05/2024

2024 CEO Leadership Retreat

10/23/2024

PADT30 | Nerdtoberfest 2024

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: