How to Use Lattice Optimization in ANSYS Mechanical and ANSYS SpaceClaim 19.2

One of the great new features in ANSYS Mechanical 19.2 is the ability to perform a lattice optimization.  Accomplished as an option within Topology Optimization, lattice optimization allows us to generate a lattice structure within our region of interest.  It includes varying thickness of the lattice members as part of the optimization.

Lattice structures can be very beneficial because weight can be substantially reduced compared to solid parts made using traditional manufacturing methods.  Further, recent advances in additive manufacturing enable the creation of lattice structures in ways that weren’t possible with traditional manufacturing.

Here I’ll explain how to perform a lattice optimization in ANSYS 19.2 step by step.

The procedure starts the same as a normal topology optimization in ANSYS Mechanical, with an initial static structural analysis on our original part or assembly.  If you’re not familiar with the process, this earlier PADT Focus blog should be helpful:

For the lattice optimization, I’m starting with a part I created that acts as a corner brace:

At this early point in the simulation, the Project Schematic looks like this:

I used the Multizone mesh method to get a hex mesh on the part:

Simple loads and constraints are recommended especially if you’ll be doing a downstream validation study.  That is because the downstream simulation on the resulting lattice geometry will most likely need to operate on the FE entities rather than geometric entities for load and constraint application. The boundary conditions in this simple model consisted of a fixed support on one side of the brace and a force load on the other side:

After solving, I reviewed the displacement as well as the stress results:

Satisfied with the results, the next step is to add a Topology Optimization block in the Project Schematic. The easiest way to do this is to right click on the Solution cell, then select Transfer Data to New > Topology Optimization:

You may need to re-solve the static structural simulation at this point.  You’ll know if you have yellow thunderbolts in the Project Schematic instead of green checkmarks for the Static Structural analysis. 

At this point, the Project Schematic now looks like this:

The Mechanical window now has the Topology Optimization branch added:

The change to make to enable a lattice optimization is accomplished in the details view of the Optimization Region branch:

We then need to specify some settings for the lattice.  The first of these is the Lattice Type.  The various types are documented in the ANSYS 19.2 Help.  In my example I selected the Crossed option.

The other properties to define are:

  • Minimum Density (to avoid lattice structures that are toothin.  Allowed bounds are 0 and 1)
  • Maximum Density (elements are considered full/solid fordensities higher than this value, allowed bounds are 0 and 1)
  • Lattice Cell Size (used in downstream geometry steps andadditive manufacturing)

Values I used in my example are shown here:

Assuming no other options need to be set, we solve the lattice optimization and review the results.  The results are displayed as a contour plot with values between zero and one, with values corresponding to the density settings as specified above.

Note that at this stage we don’t actually visualize the lattice structure – just a contour plot of where the lattice can be in the structure.  Where density values are higher than the maximum density specified, the geometry will end up being solid.  The lattice structure can exist where the results are between the minimum and maximum density values specified, with a varying thickness of lattice members corresponding to higher and lower densities.

The next step is to bring the lattice density information into SpaceClaim and generate actual lattice geometry.  This is done by adding a free standing Geometry block in the Workbench Project Schematic.

The next step is to drag and drop the Results cell from the Topology Optimization block onto the Geometry cell of the new free standing Geometry block:

The Project Schematic will now look like this:

Notice the Results cell in the Topology Optimization branch now has a yellow lightning bolt.  The next step is to right click on that Results cell and Update.  The Project Schematic will now look like this:

Before we can open SpaceClaim, we next need to right click on the Geometry cell in the downstream Geometry block and Update that as well:

After both Updates, the Project Schematic will now look like this:

The next step is to double click or right click on the now-updated Geometry cell to open SpaceClaim.  Note that both the original geometry and a faceted version of the geometry will exist in SpaceClaim:

It may seem counter intuitive, but we actually suppress the faceted geometry and only work with the original, solid geometry for the faceted process.  The faceted geometry should be automatically suppressed, as shown by the null symbol, ø, in the SpaceClaim tree.  At this point it will be helpful to hide the faceted geometry by unchecking its box in the tree:

Next we’ll utilize some capability in the Facets menu in SpaceClaim to create the lattice geometry, using the lattice distribution calculated by the lattice optimization.  Click on the Facets tab, then click on the Shell button:

Set the Infill option to be Basic:

At this point there should be a check box for “Use Density Attributes” below the word Shape.  This check box doesn’t always appear.  If it’s not there, first try clicking on the actual geometry object in the tree:

In one instance I had to go to %appdata%\Ansys and rename the v192 folder to v192.old to reset Workbench preferences and launch Workbench again.  That may have been ‘pilot error’ on my part as I was learning the process.

The next step is to check the Use density attributes box.  The Shape dropdown should be set to Lattices.  Once the Use density attributes box is checked, we can then one of the predefined lattice shapes, which will be used for downstream simulation and 3D printing.  The shape picked needs to match the lattice shape previously picked in the topology optimization.

In my case I selected the Cube Lattice with Side Diagonal Supports, which corresponds to the Crossed selection I made in the upsteam lattice optimization.  Note that a planar preview of this is displayed inside the geometry:

The next step is to click the green checkmark to have SpaceClaim create the lattice geometry based on the lattice distribution calculated by the lattice optimization:

When SpaceClaim is done with the lattice geometry generation, you should be able to see a ghosted image showing the lattice structure in the part’s interior:

Note that if you change views, etc., in SpaceClaim, you may then see the exterior surfaces of the part, but rest assured the lattice structure remains in the interior.

Your next step may need to be a validation.  To do this, we create a standalone Static Structural analysis block on the Project Schematic:

Next we drag and drop the Geometry cell from the faceted geometry block we just created onto the Geometry cell of the newly created Static Structural block:

We can now open Mechanical for the new Static Structural analysis.  Note that the geometry that comes into Mechanical in this manner will have a single face for the exterior, and a single face for the exterior. To verify that the lattice structure is actually in the geometry, I recommend creating a section plane so we can view the interior of the geometry:

To mesh the lattice structure, I’ve found that inserting a Mesh Method and setting it to the Tetrahedrons/Patch Independent option has worked for getting a reasonable mesh.  Care must be taken with element sizes or a very large mesh will be created.  My example mesh has about 500,000 nodes.  This is a section view, showing the mesh of the interior lattice structure (relatively coarse for the example).

For boundary condition application, I used Direct FE loads.  I used a lasso pick after aligned the view properly to select the nodes needed for the displacement and then the force loads, and created Named Selections for each of those nodal selections for easy load application.

Here are a couple of results plots showing a section view with the lattice in the interior (deflection followed by max principal stress):

Here is a variant on the lattice specifications, in which the variance in the thickness of the lattice members (a result of the optimization) is more evident:

Clearly, a lot more could be done with the geometry in SpaceClaim before a validation step or 3D printing.  However, hopefully this step by step guide is helpful with the basic process for performing a lattice optimization in ANSYS Mechanical and SpaceClaim 19.2.

Extracting Relative Displacements in ANSYS Mechanical

A recurring theme in ANSYS Technical Support queries involves the separation of rigid-body from material deformations without performing an additional analysis. Many users simply assume this capability should exist as a simple post-processing query(or that in any case, this shouldn’t be a difficult operation). “Rigid-Body” displacements implies a transient dynamic analysis (as such displacements should not occur in static analyses), but as we’ll see, there are contexts within static structural environments where this concept DOES play an important engineering role. In static structural contexts, such rigid-body motion implies motion transmitted across multiple-bodies. There are two important and loosely related contexts we’ll look at; zero strain rotations of the CG and those rotations combined with strain-based displacement.

The following presentation explains the issues including the math behind it, offers solutions including useful APDL marcros, and then gives examples.

The models and macros used are in this zip file: PADT-ANSYS-Extract-Dsp-Files


You can also download the PDF here.

Find this interesting? This is just a small sample of PADT deep and practical understand of the entire ANSYS Suite of products.  Please consider us for your training, mentoring, and outsourced simulation services needs.

Effective Engineering Outsourcing

The effective use of outsourced engineering resources is a strategy that many successful companies are learning how to employ and doing it correctly has become a critical competency . Outsourcing allows companies to adjust to variable workloads, infuse their products with new expertise, and accelerate time to market. Unfortunately outsourcing can be very frustrating, and like any core competency, the skills needed to outsource take time and effort for companies to acquire. Here are some simple pointers on how to develop your outsourcing competency with fewer headaches and less time.

When to OutsourceMedical device testing

Urgency – You have insufficient manpower to complete all your projects on time – and they all have important business ramifications. This is a time to consider outsourcing.

Temporary Need – If your lack of manpower seems to be ongoing – then hire permanent heads. If instead, the urgency you are feeling is temporary, consider outsourcing to get you through the crunch.

Expertise – If you would like to incorporate different expertise into your products, and don’t possess that competency as part of your core team, consider outsourcing to bring in fresh expertise or an expert only when you need them.

What to OutsourceSemiconductor equipment target CAD

Non-core activities – You need to keep your team focused on what they do best: your core capabilities. Projects that don’t require your internal expertise are good candidates for outsourcing.

Proof of concept – You would like to explore some novel new concept and don’t want to distract your team, this could be a good project to outsource.

Ancillary products – If you want to develop ancillary products that augment your main product line, this can offer an opportunity to define a well contained project that is good for outsourcing.

How to OutsourceProduct Development Process

Get multiple bids – You need to find outsourcing partners that match your requirements for expertise, speed, and cost. Get proposals from several contenders and remember that these proposals say a lot about how the project will go. Define the project clearly because if you want good results from your partners, you need to clearly define the scope of the project and the outcomes you are looking for.

Crawl, walk, run – Outsourcing is a challenging skill and you should expect to go through a learning curve. To keep your risks low, start with smaller and shorter projects and then work up to more complex ones.

Look Long Term – Find partners that can serve you long-term.

PADT Can HelpReviewing an electronic design

With over 50 engineers and 350 product development projects under our belt, PADT has tremendous experience and expertise to bring to bear on your problems. Let us show you how “We Make Innovation Work”

PADT’s YouTube Videos for Rapid Prototyping

As we get this new blog, The RP Resource, off the ground, we thought we would start with some posting about some videos we have done in the past that people in the RP community might find useful.

We will start off with a simple slide show that shows some of the cool models we have built over  the years:

RP Part Examples Slideshow


Next up is one of our favorite side projects, a clock we made on our Stratasys FORTUS 400 prototyping system.  We took the design for a wooden pendulum clock and modified it to work with our FDM system.  Very cool:

PADT FDM Pendulum Clock


Sometimes the best way to make a prototype is not to print it, but to machine it.  In this video we show off our 3-Axis milling skills:

3-Axis Milling

Our most popular videos are HOW-To videos for working with the Dimension 3D Printers.  In the first video Mario shows how to load material in the Dimension, in the second one he shows how to do the same with a uPrint:

Loading a Stratasys Dimension Printer
Loading a Stratasys uPrint Printer


You can go to PADT’s YouTube page: to see more videos. And subscribe so you will know when we post a new video.