3D Printing Ansys Mechanical Results with PADT’s “AM Result Printer” Ansys ACT Extension

One of the first things PADT did when we got our first multi-color 3D Printer was figure out how to convert a result in Ansys Mechanical to something to be printed. If you go back to earlier blog posts (2014, 2020) on the topic and find that our earlier methods were – well cumbersome would be kind. There was no easy way to get Ansys Mechanical results into a file that contained color contour information on the surface that could then be printed with a color Additive Manufacturing system.

That is when our Matt Sutton stepped up and used Ansys ACT skills and knowledge on graphics programming to create simple plugin that converts any result object on a solid object in Ansys Mechanical into a 3D Manufacturing Format (3MF) file: AM Result Printer. The 3MF file can be read by Stratasys Grab CAD, the standard tool for Stratasys color systems and, because 3MF is an accepted platform across systems, it should work with any newer color additive manufacturing system.

The plugin is available at the Ansys Store here. It is free, and the download file contains installation and user instructions, or read on to learn more.

Installation

Instaillation is simple. For each installation of Ansys Mechanical, do the following:

  1. Download the ZIP file from the Ansys store
  2. Extract the files in some scratch location
  3. Go into 2021_09_00-3MF-Writer\AM_Result_Printer_v1\Incoming
  4. Then also expand the bianary.zip file. This contains the plugin for various versions of Ansys Workbench
  5. You need the right Visual C++ Redistributable package, so doublick on “vcredist_x64.exe” to make sure its installed. Follow the prompts until its done.
  6. Add the extension through Ansys Workbench. On the project page, go to Extensions > Install Extensions

Go into the binary folder and find the “Additive Manufacturing Result Exporter.wbex” in the proper version folder.

Then to into Extensions > Manage Extensions and click the check box for the Additive Manufacturing Result Exporter.

Now, when you got into your model in Ansys Mechanical, you should see the extensions listed at the top, and if you right-mouse-click on the Solution part of you model, it should be a choice.

How to use it

Make sure you insert any result objects you want to 3d Print and scope them to the things you want printed. Then, for each 3MF file you want, insert an “AM Result Export” into the tree. Then select the result you want a file for, they type of contour, and the number of bands.

When everything is ready, Generate the model to create the file or files.

How it works

This little tool is a great example of using Opensource libraries with the Ansys ACT interface. Matt used the VTK and lib3mf libraries. When you generate the object, the following happens:

  1. Converts the mechanical mesh scoped to the result body to a VTK unstructured mesh.
  2. Export out the result data from the result object as nodal values to a temporart file.
  3. Apply these nodal values to the VTK mesh.
  4. Contour using an appropriate VTK algorithm.
  5. Extract the VTK contour data as a series of triangular facets.
  6. Group the facets by color for banded, or extract the individual vertex colors for smooth.
  7. Write that data to the .3mf format using the lib3mf library.

Need more information?

If you would like more information or have any questions or need support on the tool, please email info@padtinc.com or give us a call at 480.813.4884.

This is also a great example of the type of custom application that PADT creates for a wide variety of customers to improve and enhance their simulation experience. If you have any questions on software development or customization needs around simulation, please reach out to info@padtinc.com or call 480.813.4884 as well.


Press Release

This article is getting posted as we also do a press release on the V1 posting of the program to the Ansys Store. You can also find the official press releases as a PDF and HTML.

Free Extension Designed to Export Ansys Mechanical Results as Color 3MF Files for Additive Manufacturing Released by PADT

Custom Plugin Allows Users to Create 3D Printed Full-Color Models with Results Contours

TEMPE, Ariz., August 31, 2021 PADT, a globally recognized provider of numerical simulation, product development, and 3D printing products and services, is pleased to announce the initial release of the Ansys Mechanical extension, AM Result Printer.  Written by PADT’s Scientific & Technical Computing team in the Ansys Customization Toolkit (ACT), AM Result Printer allows users to select any Ansys Mechanical results they have extracted from their model and output a 3D manufacturing format[, or 3MF, file. The extension is available on the Ansys Store today.

“PADT is an industry leader in off-the-shelf and custom 3D printing and simulation tools and products,” said Tyler Shaw, PADT’s VP of Engineering. “When customers requested a way to export Ansys Mechanical results as color 3MF files, we saw an opportunity to develop a custom program and share it with our community for free.”

The PADT Scientific & Technical Computing team work on small extensions like the AM Result Printer, large standalone programs, and a multitude of tools that make simulation more efficient and useful. The AM Result Printer extension was written by Matt Sutton, PADT’s Lead Developer for Scientific & Technical Computing using the tools provided by Ansys through their API and several publicly available libraries for working with tessellated geometry and the 3MF format.

Any Ansys Mechanical user can install the extension for free by first downloading it from the Ansys Store where it is listed as “AM Result Printer.”  The download includes installation instructions. Once installed, users can easily add an AM Result Object to any result object and then create the 3MF file. This file can then be used in any additive manufacturing system that support the 3MF format and prints in full color, like the Stratasys J55, J826, J835, and J850 PolyJet systems.

“This simple program is a fantastic example of how our software experts, who are also Ansys experts, create applications that greatly enhance the already strong capabilities of Ansys products,” said Sutton. “We’re proud to make this powerful tool available to the Ansys user community.”

For more information on how to customize Ansys programs or to speak to PADT for help with writing custom tools and programs, please visit the PADT website at www.padtinc.com, contact info@padtinc.com or call 480.813.4884. 

About PADT

PADT is an engineering product and services company that focuses on helping customers who develop physical products by providing Numerical Simulation, Product Development, and 3D Printing solutions. PADT’s worldwide reputation for technical excellence and experienced staff is based on its proven record of building long-term win-win partnerships with vendors and customers. Since its establishment in 1994, companies have relied on PADT because “We Make Innovation Work.” With over 90 employees, PADT services customers from its headquarters at the Arizona State University Research Park in Tempe, Arizona, and from offices in Torrance, California, Littleton, Colorado, Albuquerque, New Mexico, Austin, Texas, and Murray, Utah, as well as through staff members located around the country. More information on PADT can be found at www.PADTINC.com.

# # #


Mechanical Updates in Ansys 2021 R2: Post processing/graphics & MAPDL Updates – Webinar

Ansys Mechanical delivers features to enable faster simulations, easier workflows, journaling, scripting and product integrations that offer more solver capabilities. The Ansys finite element solvers enable a breadth and depth of capabilities unmatched by anyone in the world of computer-aided simulation.

In 2021 R2, Structures products continue to deliver new features that enable flexibility, robustness and efficiency. The integration of products through Ansys Workbench enables users to leverage additional technology to broaden their scope of simulation.

Join PADT’s Application Engineer Robert McCathren to discover the new features that have been added to Ansys Mechanical in the second webinar covering the 2021 R2 release. This presentation focuses on updates regarding:

  • Post-processing & Graphics
  • MAPDL Interface
  • MAPDL Elements
  • MAPDL Contact
  • MAPDL Materials
  • And much more

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!

Welcome to a New Era in Electronics Reliability Simulation

Simulation itself is no longer a new concept in engineering, but individual fields, applications, and physics are continually improved upon and integrated into the toolbox that is an engineer’s arsenal. Many times, these are incremental additions to a particular solver’s capabilities or a more specialized method of post processing, however this can also occasionally be present through new cross-connections between separate tools or even an entirely new piece of software. As a result of all this, Ansys has now reached critical mass for its solution space surrounding Electronics Reliability. That is, we can essentially approach an electronics reliability problem from any major physics perspective that we like.

So, what is Electronics Reliability and what physics am I referring to? Great question, and I’m glad you asked – I’d like to run through some examples of each physics and their typical use-case / importance, as well as where Ansys fits in. Of course, real life is a convoluted Multiphysics problem in most cases, so having the capability to accommodate and link many different physics together is also an important piece of this puzzle.

Running down the list, we should perhaps start with the most obvious category given the name – Electrical Reliability. In a broad sense, this encompasses all things related to electromagnetic fields as they pertain to transmission of both power and signals. While the electrical side of this topic is not typically in my wheelhouse, it is relatively straightforward to understand the basics around a couple key concepts, Power Integrity and Signal Integrity.

Power integrity, as its name suggests, is the idea that we need to maintain certain standards of quality for the electrical power in a device/board/system. While some kinds of electronics are robust enough that they will continue to function even under large variations in supplied voltage or current, there are also many that rely on extremely regular power supplies that only vary above certain limits or within narrow bounds. Even if we’re looking at a single PCB (as in the image below), in today’s technological environment it will no doubt have electrical traces mapped all throughout it as well as multiple devices present that operate under their own specified electrical conditions.

Figure 1: An example PCB with complex trace and via layouts, courtesy of Ansys

If we were determined to do so, we could certainly measure trace lengths, widths, thicknesses, etc., and make some educated guesses for the resulting voltage drops to individual components. However, considerably more effort would need to be made to account for bends, corners, or variable widths, and that would still completely neglect any environmental effects or potential interactions between traces. It is much better to be able to represent and solve for the entire geometry at once using a dedicated field solver – this is where Ansys SIwave or Ansys HFSS typically come in, giving us the flexibility to accurately determine the electrical reliability, whether we’re talking about AC or DC power sources.

Signal integrity is very much related, except that “signals” in this context often involve different pathways, less energy, and a different set of regulations and tolerances. Common applications involve Chip-signal modeling and DDRx virtual compliance – these have to do with not only the previous general concerns regarding stability and reliability, but also adherence to specific standards (JEDEC) through virtual compliance tests. After all, inductive electromagnetic effects can still occur over nonconductive gaps, and this can be a significant source of noise and instability in cases where conductive paths (like board traces or external connections) cross or run very near each other.

Figure 2: Example use-cases in virtual compliance testing, courtesy of Ansys

Whether we are looking at timings between components, transition times, jitter, or even just noise, HFSS and SIWave can both play roles here. In either case, being able to use a simulation environment to confirm that a certain design will or will not meet certain standards can provide invaluable feedback to the design process.

Other relevant topics to Electrical Reliability may include Electromagnetic Interference (EMI) analysis, antenna performance, and Electrostatic Discharge (ESD) analysis. While I will not expand on these in great detail here, I think it is enough to realize that an excellent electrical design (such as for an antenna) requires some awareness of the operational environment. For instance, we might want to ensure that our chosen or designed component will adequately function while in the presence of some radiation environment, or maybe we would like to test the effectiveness of the environmental shielding on a region of our board. Maybe, there is some concern about the propagation of an ESD through a PCB, and we would like to see how vulnerable certain components are. Ansys tools provide us the capabilities needed to do all of this.

The second area of primary interest is Thermal Reliability, as just about anyone who has worked with or even used electronics knows, they generate some amount of heat while in use. Of course, the quantity, density, and distribution of that heat can vary tremendously depending on the exact device or system under question, but this heat will ultimately result in a rise in temperature somewhere. The point of thermal reliability basically boils down to realizing that the performance and function of many electrical components depends on their temperature. Whether it is simply a matter of accounting for a change in electrical conductivity as temperature rises or a hard limit of functionality for a particular transistor at 150 °C, acknowledging and accounting for these thermal effects is critical when considering electronics reliability. This is a problem with several potential solutions depending on the scale of interest, but generally we cover the package/chip, board, and full system levels. For the component/chip level, a designer will often want to provide some package level specs for OEMs so that a component can be properly scoped in a larger design. Ansys Icepak has toolkits available to help with this process; whether it is simplifying a 3D package down to a detailed network thermal model or identifying the most critical hot spot within a package based on a particular heat distribution. Typically, network models are generated through temperature measurements taken from a sample in a standardized JEDEC test chamber, but Icepak can assist through automatically generating these test environments, as below, and then using simulation results to extract well defined JB and JC values for the package under test.

Figure 3: Automatically generated JEDEC test chambers created by Ansys Icepak, courtesy of Ansys

On the PCB level of detail, we are likely interested in how heat moves across the entire board from component to component or out to the environment. Ansys Icepak lets us read in a detailed ECAD description for said PCB and process its trace and via definitions into an accurate thermal conductivity map that will improve our simulation accuracy. After all, two boards with identical sizing and different copper trace layouts may conduct heat very differently from each other.

Figure 4: Converting ECAD information into thermal conductivity maps using Ansys Icepak, courtesy of Ansys

On the system level of thermal reliability, we are likely looking at the effectiveness of a particular cooling solution on our electronic design. Icepak makes it easy to include the effects of a heat exchanger (like a coldplate) without having to explicitly model its computationally expensive geometry by using a flow network model. Also, many of today’s electronics are expected to constantly run right up against their limit and are kept within thermal spec by using software to throttle their input power in conjunction with an existing cooling strategy. We can use Icepak to implement and test these dynamic thermal management algorithms so that we can track and evaluate their performance across a range of environmental conditions.

The next topic that we should consider is that of Mechanical Reliability. Mechanical concepts tend to be a little more intuitive and relatable due to their more hands-on nature than the other two, though the exact details behind the cause and significance of stresses in materials is of course more involved. In the most general sense, stress is a result of applying force to an object. If this stress is high compared to what is allowed by a material, then bad things tend to happen – like permanent deformation or fracture. For electronic devices consisting of many materials, small structures, and particularly delicate components, we have once again surpassed what can be reasonably accomplished with hand calculations. Whether we are looking at an individual package, the integrity of an entire PCB, or the stability that a rigid housing will provide to a set of PCBs, Ansys has a solution. We might use Ansys Mechanical to look at manufacturing allowances for the permissible force used while mounting a complicated leaded component onto a board, as seen below. Or maybe, we will use mechanical simulation to find the optimal positioning of leads on a new package such that its natural vibrational frequencies are outside normal ambient conditions.

Figure 5: A surface component with discretely modeled leads, courtesy of Ansys

At the PCB level, we face many of the same detail-oriented challenges around representing traces and vias that have been mentioned for the electrical applications. They may not be quite as critical and more easily approximated in some ways, but that does not change the fact that copper traces are mechanically quite different from the resin composites often used as the substrate (like FR-4). Ansys tools like Sherlock provide best in class PCB modeling on this front, allowing us to directly bring in ECAD models with full trace and component detail, and then model them mechanically at several different levels depending on the exact need. Automating a materials property averaging scheme based on the local density of traces may be sufficient if we are looking at the general bending behavior of a board, but we can take it to the next level by explicitly modeling traces as “reinforcement” elements. This brings us to the level of detail where we can much more reliably look at the stresses present in individual traces, such that we can make good design decisions to reduce the risk of traces peeling or delaminating from the surface.

Figure 6: Example trace mapping workflow and methods, courtesy of Ansys

Beyond just looking at possible improvements in the design process, we can also make use of Ansys tools like LS-DYNA or Mechanical to replicate testing or accident conditions that an existing design could be subjected to. As a real-world example, many of us are all too familiar with the occasional consequences of accidentally dropping our smart phones – Ansys is used to test designs against these kind of shock events, where impact against a hard surface can result in high stresses in key locations. This helps us understand where to reinforce a design to protect against the worst damage or even what angle of impact is most likely to cause an operational failure.

As the finale for all of this, I come back to the first comment of reality being a complex Multiphysics problem. Many of the previous topics are not truly isolated to their respective physics (as much as we often simplify them as such), and this is one of the big ways in which the Ansys ecosystem shines: Comprehensive Multiphysics. For the topic of thermal reliability, I simply stated that electronics give off heat. This may be obvious, but that heat is not just a magical result of the device being turned on but is instead a physical and calculable result of the actual electrical behavior. Indeed, this the exact kind of result that we can extract from one of the relevant electronics tools. An HFSS solution will provide us with not only the electrical performance of an antenna but also the three-dimensional distribution of heat that is consequently produced. Ansys lets us very easily feed this information into an Icepak simulation, which then has the ability to give us far more accurate results than a typical uniform heat load assumption provides.

Figure 7: Coupled electrical-thermal simulation between HFSS and Icepak, courtesy of Ansys

If we find that our temperatures are particularly high, we might then decide to bring these results back into HFSS to locally change material properties as a function of temperature to get an even more accurate set of electrical results. It could be that this results in an appreciable shift in our antenna’s frequency, or perhaps the efficiency has decreased, and aspects of the design need to be revisited. These are some of the things that we would likely miss without a comprehensive Multiphysics environment.

On a more mechanical side, the effects on stress and strain from thermal conditions are very well known and understood at this point, but there is no reason we could not use Ansys to bring the electrical alongside this established thermal-mechanical behavior. After all, what is a better representation of the real physics involved than using SIwave or HFSS to model the electrical behavior of a PCB, bringing those result into an Icepak simulation as a heat load to test the performance of a cooling loop or heat sink, and then using at least some of those thermal results to look at stresses through not only a PCB as a whole but also individual traces? Not a whole lot at this moment in time, I would say.

The extension that we can make on these examples, is that they have by and large been representative cases of how an electronics device responds to a particular event or condition and judging its reliability metrics based on that set of results, however many physics might be involved. There is one more piece of the puzzle we have access to that also interweaves itself throughout the Multiphysics domain and that is Reliability Physics. This is mostly relevant to us in electronics reliability for considering how different events, or even just a repetition of the same event, can stack together and accumulate to contribute towards some failure in the future. An easy example of this is a plastic hinge or clip that you might find on any number of inexpensive products – flexing a thin piece of plastic like in these hinges can provide a very convenient method of motion for quite some time, but that hinge will gradually accumulate damage until it inevitably cracks and fails. Every connection within a PCB is susceptible to this same kind of behavior, whether it is the laminations of the PCB itself, the components soldered to the surface, or even the individual leads on a component. If our PCB is mounted on the control board of a bus, satellite, or boat, there will be some vibrations and thermal cycles associated with its life. A single one of these events may be of much smaller magnitude and seemingly negligible compared to something dramatic like a drop test, and yet they can still add up to the point of being significant over a period of months or years.

This is exactly the kind of thing that Ansys Sherlock proves invaluable for: letting us define and track the effect of events that may occur over a PCB’s entire lifecycle. Many of these will revolve around mechanical concepts of fatigue accumulating as a result of material stresses, but it is still important to consider the potential Multiphysics origins of stress. Different simulations will be required for each of mechanical bending during assembly, vibration during transport, and thermal cycling during operation, yet each of these contributes towards the final objective of electronics reliability. Sherlock will bring each of these and more together in a clear description of which components on a board are most likely to fail, how likely they are to fail as a function of time, and which life events are the most impactful.

Figure 8: Example failure predictions over the life cycle of a PCB using Ansys Sherlock, courtesy of Ansys

Really, what all of this comes down to is that when we design and create products, we generally want to make sure that they function in the way that we intend them to. This might be due to a personal pride in our profession or even just the desire to maximize profit through minimizing the costs associated with a component failure, however at the end it just makes sense to anticipate and try to prevent the failures that might occur under normal operating conditions.

For complex problems like electronics devices, there are many physics all intimately tied together in the consideration of overall reliability, but the Ansys ecosystem of tools allows us to approach these problems in a realistic way. Whether we’re looking at the electrical reliability of a circuit or antenna, the thermal performance of a cooling solution or algorithm, or the mechanical resilience of a PCB mounted on a bracket, Ansys provides a path forward.

If you have any questions or would like to learn more, please contact us at info@padtinc.com or visit www.padtinc.com.

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.

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.

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