## CFX Expression Language – Part 2: Augmenting Material Property Assignments in ANSYS CFX

In a previous entry we introduced CFX Expression Language, CEL.  You can view that post here

Before we get started, there are some key things to remember:

1. Expressions can be easily created by right-clicking in the Expressions tab after double clicking on Expressions in the CFX Pre object tree.
2. Expressions and their contents are case sensitive.

In this next part of the series, we’ll show how to use CEL to augment your material property definitions in CFX. If material properties are constants then their input is straightforward. However, if the properties are defined as equations, we can use CEL to input those equations in CFX.

For example, if viscosity is defined as a function of shear strain rate, we need to define viscosity using an equation that captures that relationship, such as

m = K * gn-1

Below are shown two ways in which that equation can be captured using CFX Expression Language, visc1 and visc2. The second equation, visc2, is more flexible in that we have defined the constant terms as expressions themselves.

It’s always a good idea to verify the input. Most expressions can be easily plotted by clicking on the Plot tab in the Details view. Here is a plot of the viscosity vs. shear strain rates between 0 and 1, as calculated by expression visc2:

Similarly, the Evaluate tab can be used to evaluate the expression for desired values of the inputs.

So, we have defined an expression for a material property, viscosity in this case. How do we get CFX to use that expression? In the material property input, we click on the expression icon to the right of the particular material property we are defining, then enter the name of the expression, as shown here for expression visc2:

Summing it up, we can use CFX Expression Language to define material property equations for non-constant material values. In the next installment we will look at how to use CEL to define changing boundary conditions, such as a ramped load.

## CFX Expression Language – Part 1: Accessing CFD Simulation Information in CFX (and FLUENT)

This week we are presenting an introduction to CFX Expression Language. If you’re not familiar with CFX, it is one of the two CFD tools available from ANSYS, Inc., the other being Fluent. CFX has been part of the ANSYS family of engineering tools since 2003. It is relatively easy to use and can be run stand-alone or tightly integrated with other ANSYS products within ANSYS Workbench. We have some general information on CFX available at this link.

CFX Expression Language, or CEL, is the scripting language that allows us to define inputs as variables, capture outputs as variables, and perform operations on those variables. Through the use of CEL we can be more efficient in our CFD runs and better capture results that we need. With CEL we can access and manipulate information without needing to recompile code or access separate routines besides the main CFX applications.

Also note that since CEL can be used in CFD Post, it is useful for postprocessing FLUENT solutions in addition to CFX, since CFD Post is common to both CFX and FLUENT. There are some things to be aware of regarding FLUENT In CFD Post. This link in to the ANSYS 14.5 Help system explains it:

// User’s Guide :: 0 // 7. CFD-Post File Menu // 7.15. File Types Used and Produced by CFD-Post // 7.15.10. Limitations with FLUENT Files

If you are a user of APDL, ANSYS Parametric Design Language, what I have written above about CEL should look familiar. One difference, though, is that while Mechanical APDL is dimensionless, CFX is not. Therefore, CEL definitions contain units where appropriate.

CEL is typically used in CFX-Pre and CFD-Post. A handy editor is available to assist in the definition of the expressions. Most of the activity is enabled by right clicking.

Virtually any quantity in CFX that requires a value input can make use of CEL, including boundary conditions and material properties. CEL can also be used to access and enhance results information. Expressions defined in CEL can be used in design point studies in ANSYS Workbench, either as input or output parameters.

So, what kind of things can you do in an expression? In addition to accessing simulation information and storing it as a variable, you can manipulate values using operators such as add, subtract, multiply, divide, and raise to a power. You can also use built-in functions such as sine, cosine, tangent and other trig functions, exponent, log, square root, absolute value, minimum, maximum, etc.

There are many predefined values, including some common CFD constants such as pi, the universal gas constant, and Avogadro’s number. The available options are different in CFX pre vs. CFD Post, with relevant choices for each.

In CFX Pre, expressions are accessed by double clicking on Expressions in the tree. That takes you to the expression editor, as shown here:

Notice how units are defined for each expression, but they can be mixed if desired.

Regarding CFD Post, the example below shows three expressions defined in CFD Post. The expressions within the box are user-defined. The other expressions listed are setup automatically.

The values for forceX1 and forceX2 are calculated by extracting X-direction forces on two different surfaces. The surface names were defined in ANSYS Meshing in this case, as Named Selections. The value fdiffx is calculated by subtracting forceX1 from forceX2. The resulting value, fdiffx, has been specified as an output parameter in Workbench; hence the P-> symbol next to the name.

New expressions are created by right-clicking in the Expressions tab. The new expression value is given a name, then the definition is input, typically by right clicking and selecting from the menus of available quantities, like this:

The location of application for an expression can also be selected by right clicking:

So we’ve got our variables defined using CEL. Now what? Here are some things we can do with CEL variables:

1. Use them as inputs such as material properties or boundary condition values in CFX. If we are running multiple cases, it is typically much easier to define quantities that we want to vary this way. The values can then be changes in the Expression Window, or if defined as a parameter in Workbench, in the parameters view as part of a parameter study.

2. Use them for reporting results quantities of interest, such as forces at a desired location.

3. Use them as input or output parameters in a design point study or design optimization.

Hopefully this brief introduction gives you a glimpse at the power of CEL. In a future article we will look at using CEL for more advanced functionality, such as applying ramped or time varying boundary conditions, using IF statements, and monitoring expression values during solution.

## ANSYS Acquires EVEN, the Makers of the ANSYS Composite PrepPost Tool (ACP)

Good news out there in ANSYS land.  ANSYS, Inc.  just made the relationship with EVEN as close as possible – by acquiring them.  Here at PADT it was love at first sight when we first were introduced to the ANSYS Composite PrepPost (ACP) add-on.  The solver capabilities in ANSYS Mechanical APDL have been very strong for composite modeling for some time.  But the pain and suffering required to set up a complex composite geometry kept many users from accessing those fantastic elements.  ACP solved that problem by providing a tool that takes care of the bookeeping and geometry issues involved in building an accurate model of composite layups.

Here is the official press release.

With this acquisition ANSYS, Inc. has secured the future development of this tool and given all of us in the ANSYS world even better access to the consulting team at EVEN.  You can learn more about the ACP tool on our ACP page.  We also have an older blog posting on ACP when it came out.  We also did a seminar on the last release, here is the recording to that. [probably time to write an updated posting on newer capabilities…].

This is great news, and we can not wait to see further improvements in the composite modeling capabilities for the ANSYS Product family.

## Yes! Concurrent Design Point Solves Using New ANSYS HPC Parametric Pack Licensing

### Design Optimization – Design Point Studies.

These are terms that for many years now have been tossed about as powerful simulation tools. Indeed they are powerful tools, but for anything but relatively small models, the computing resources and time involved to get solutions have been prohibitive in many cases.

We are now in the 2010’s and computing power is far greater than it was just a few years ago. To help us better take advantage of those horsepower increases, ANSYS, Inc. has released a new license product with version 14.5, called the ANSYS HPC Parametric Pack.

How does a six minute turnaround time for 4 design points look when compared to a two hour time for a single design point? If you find that intriguing, please keep reading.

Simply put, the Parametric Pack license allows us to solve simultaneous design points on multi-core systems. For the most part, design point runs have been serial up to now. With Parametric Packs, you can solve several design points at the same time, each running in parallel.

What ANSYS, Inc. has done with the Parametric Pack concept is to allow you to multiply your existing licenses for use in simultaneous solutions of design points. Each Parametric Pack license provides a multiplier on existing licenses. If you currently have one Mechanical or ANSYS CFD license, with a Parametric Pack license it now becomes equivalent to 4 licenses for the purposes of solving concurrent design points. The more parametric pack licenses, the greater the multiplier, as shown in the following table. Note that the maximum allowed number of Parametric Pack licenses for a given study is 5.

 # Parametric Pack Licenses # Simultaneous Design Point Solves 1 4 2 8 3 16 4 32 5 64

The Parametric Pack license multipliers apply in two scenarios. With scenario one, a design point study has been setup in ANSYS Workbench in which there is a set of input parameters and a set of output parameters. A table of various values of the input parameters has been defined for which we want to track the outputs. An example of this is shown below. The other scenario in which Parametric Pack licenses can be used is with design optimization using an ANSYS DesignXplorer license. We will focus on scenario one in this article, while a future article will address scenario two.

The example we will use is a Fluent study. It could just as well be an ANSYS structural or thermal solution, CFX solution, coupled field solution, etc.

In this case, we just have one varying input parameter (inlet velocity) and one varying output parameter (mass flow at the outlet) for the sake of simplicity.

Design point updates with the Parametric Pack license work through the ANSYS Remote Solve Manager, RSM. The runs can be made either on the local machine or on a remote number cruncher, but either way they need to be submitted with RSM. RSM comes with ANSYS automatically, but needs to be configured the first time you use it.

For the example shown here, I set it up to run on one of our Linux PADT Cube systems. The submission to RSM was made from my local Windows box while the solving was done on the remote Cube on PADT’s cluster.

ANSYS has to be told to use an available Parametric Pack license. It also has to be told which licenses to be used on conjunction with the Parametric Pack license. This information is defined from within Workbench, by right-clicking on the Parameter Set box and displaying Properties. Once License Checkout is set to Reserved, we click on the Reserve Licenses link to select the desired licenses to be used:

In the window below you can see I have reserved 1 ANSYS CFD license which allows for 1 Fluent solve. I have also reserved one ANSYS HPC Pack which allows for up to 8 parallel tasks per solve. By also reserving one ANSYS HPC Parametric Pack license, the other two are amplified. As the last column shows, the reported number of concurrent licenses is 4 for the ANSYS CFD license and 4 for the ANSYS HPC Pack license (meaning 4*8 or 32 total cores for 4 simultaneous solves).

More HPC Parametric Packs would amplify the licenses further. It’s important to note that not all ANSYS licenses can be amplified by the Parametric Pack license. In general, the licenses that can’t are products that rely on a third party for some of the technology, such as DesignModeler which uses the Parasolid kernel. That doesn’t mean that DesignModeler can’t be part of a study that utilizes the Parametric Pack licenses, though. It just means that that the DesignModeler tasks will be automatically completed before the jobs are submitted for simultaneous solving.

Getting back to the example, we asked ANSYS Workbench to solve 4 design points. Without Parametric Pack licensing, that would have been done sequentially. On my local Workstation, solving on a single core each design point takes about 2 hours to solve. Using 8 cores on our Cube machine, each design point takes about 6 minutes to solve. What happens when I activate the simultaneous solution with the Parametric Pack license? All 4 design points solve in 6 minutes. This particular Cube has 64 cores, so solving a single design point on 8 cores or four design points concurrently using 32 total cores both take six minutes. That is a very significant speedup. I say it’s a game changing speedup.

Here is a graph of CPU utilization during the concurrent design point solution. 32 processors utilized and the elapsed time was about 6 minutes.

The resulting design point info including the as-solved output parameters:

The bottom line:

What do you need to be able to take advantage of this capability?

1. A regular license enabling the solver you need, such as ANSYS Mechanical, Multiphysics, ANSYS CFD, ANSYS Fluent, ANSYS CFX, etc.

2. ANSYS HPC or ANSYS HPC Pack licenses which allow you to solve on more than two processors/cores for each design point.

3. At least one ANSYS HPC Parametric Pack license which allows the simultaneous design point studies and the amplification of the existing licenses. Talk to your local ANSYS rep or ANSYS Channel Partner for more info.

In a future article we will look at the use of the HPC Parametric Pack license in conjunction with a design optimization study.

## Direct Coupled-Field Elements in Mechanical APDL

We received one of those tech support calls last week that you hate getting.  It was something like “I need to transfer my ANSYS model to this other FEA package, how do I do that?”  We of course asked “Why do you need to go to this other package?” The answer was “Because they have elements that solve for stress and thermal degrees of freedom in the same element.”  Well, so does ANSYS Mechanical APDL, and it has for years.  But as a Workbench user they had only been exposed to Multiphysics that uses Load transfer as the mechanism to solve different domains in the same run

Therefore, a The Focus posting is born.

In this posting we will go over the basics of direct coupled-field elements and simulation to make everyone aware of what is available.

### Direct Coupled-Field vs. Load Transfer

When most people talk about Multiphysics they are talking about Fluid-Structural Interaction (FSI) or some other interaction between two different models where the program solves each physics by itself and transfers the resulting values from one physics as a load on the next physics.  This is called load transfer Multiphysics and it is very useful and powerful.  But it requires a solve for each physics for each step in your solving process, and often more because you have to iterate back and forth between physics till things converge before you can move to the next substep.

There is a whole other way to do Multiphysics if you have the same mesh for each physics: you can modify your finite element equations to cover all the different physics in one set of equations, therefore in one matrix, and therefore in one pass through the solver for each solve.  This capability has been in the ANSYS Mechanical APDL solver for a very long time and has been expanded over time to cover some surprising combinations of physics.

So when should you use one over the other? That depends. Here are some thoughts:

• Your meshes need to be or are different
• Fluid flow with something other then heat-transfer
• Direct Approach:
• The interaction between two physics is strongly coupled
• The interaction is non-linear
• Acoustics is involved
• Piezoelectric is involved
• Porous fluid flow is involved
• Diffusion is involved

In general, if you can use Direct Coupling and you know MAPDL well, it is the preferred way to go, it is just a lot easier to do. But if you are not familiar with MAPDL for running and post processing, you may be better off with the Load Transfer approach.

### The Coupled-Field Elements

You access the coupled-field capabilities in the solver through the use of the coupled-field elements.  Although there are some legacy elements that can be used as well, we will focus on the three standard coupled-field elements. They all have the same capability, and just vary in topology:

• PLANE223: 2D 8 Node Quad
• SOLID226: 3D 20 Node Hex
• SOLID227: 3D 10 Node Tet

All of these support the following physics, DOF’s, forces and reaction loads:

 Field DOF Label Force Label Reaction Solution Structural UX, UY, UZ FX, FY, FZ Force Thermal TEMP HEAT Heat Flow Electric Conduction VOLT AMPS Electric Current Electrostatic/Piezo VOLT CHRG Electric Charge Diffusion CONC RATE Diffusion Flow Rate

You use a combination of KEYOPTS and material properties to enable the various types of coupling.  Take a look at the element documentation to see how it all works.

In addition to these, there are some specialty elements worth discussion. The first are FLUID29/FLUID30. These are the Acoustic field elements. These solve for displacement and pressure. They also can share the displacement DOF’s with structural elements where they touch.

Unfortunately the electromagnetic coupled field elements have been put on legacy status, as ANSYS Maxwell is where the development effort is going in this area. But you can still use them for coupled-field simulation that involves the MAG degree of freedom.  The elements are: PLANE13, SOLID5, SOLID98. ANSYS MAPDL still has actively supported electromagnetic elements, but they are electromagnetic only and do no support displacement or thermal degrees of freedom.

Flow in a fully saturated porous media can be modeled with the Coupled Pore-Pressure elements. These elements: CPT212/213/215/216/217, solve for pressure and deflection and are used for things like modeling nuclear waste issues, soil subsidence, oil well stability, and bone deformation and healing.

We should also mention that ANSYS supports circuit simulation using the CIRCU124 element.  This element can be coupled to other elements that have VOLT, CURR, or EMF capability.

### Running Direct Coupled-Field Multiphysics in ANSYS Mechanical APDL

When I wrote this section heading it seemed like a good idea. But this is supposed to be a short blog entry and not a full one day training class. So I will wimp out and share where you can find more information in the help:

There is a whole manual dedicated to coupled-field analysis: Mechanical APDL // Coupled Field Analysis Guide. Within that guide is the Direct Coupled-Field Analysis section, Chapter 2.  In it you will not only find discussions about how to do what you need to do, but also a whole bunch of simple examples that are very helpful.

In general, you run like any other simulation.  There is really nothing special or unique and you do not have to deal with managing the load transfer like you do with load transfer coupled field simulations.

### Running Direct Coupled-Field Multiphysics in ANSYS Mechanical

This is a question that comes up a lot. Unfortunately only one type of direct coupling is supported, Thermal-Electric.  What we recommend people do is they build their models in ANSYS mechanical for one of the physics, then use code snippets to change the elements to the proper direct coupled-field type and to also do any post processing. It will run when you solve, but it will come back with an error, and you need to post processes via APDL code or you need to post process in MAPDL interactively.

NEW INFO:  Edward points out in the comment below that you can get this to work.  I’ll repeat it here:

“We’ve had some success post-processing U-TEMP-VOLT analyses in Mechanical. Mechanical seems to accept a model as solved, so long as it sees a result file of the correct type in the Solver Files directory. The coupled field analysis in this case output a .rst file, so we used a Static Structural object as the base model.
We could access the structural results directly and used User-defined results to access most of the thermal and electric results.
I seem to recall that we also had success using a Thermal analysis as a base and then changing the result file extension from .rst to .rth, but I can’t find my test model to confirm this.”

I can verify that both of these approaches work. I added a /sys, copy file.rst to file.rth to a code segment for the thermal base.  But it was simpler to just use the structural as the base.  If you do this you can do your post processing for the most part in ANSYS Mechanical. [E. Miller 3/28/2013)

### Thoughts

So this was, as promised, a very high level overview. The fact of the matter is that there are a significant number of users, especially in the MEMS industry, that use these direct coupled-field elements all the time.  They are powerful and robust with as many uses as you can dream up, truly expanding the reach of what you can model and the accuracy of those models.

Over the years we have found some good tricks for using these elements effectively:

1. Pick one of the physics and get a static run of that physics by itself running first. Debugging your model this way is usually faster and clears out any issues before you deal with the direct coupling issues. If you have more than two physics, add them in one at a time.
2. Pay attention to units. When you start mixing voltage and distance or what not, it is easy to get confused. If you are doing MEMS devices, you need to make sure you are using the MEMS units and that you are consistent.  Unlike ANSYS Mechanical, ANSYS Mechanical APLD is unitless and requires the user to make sure the are consistent across physics.
3. Try not to use the legacy elements if you don’t have to. They may not be around in the future.
4. If you are doing EMAG, you may want to look at using load coupling with Maxwell or MAPDL instead of using the legacy direct coupled elements.  Maxwell and the newer elements in MAPDL have more capabilities and are more efficient.
5. Make sure you really understand how your physics interact. Go through the thought experiment of predicting the interaction on as simple of a problem as you can, while keeping it relevant. Think about what loads interact with what structures and what that interaction implies.

## Introduction to the ANSYS Parametric Design Language (APDL) Book Now Available on Amazon!

PADT’s popular “ANSYS Customization with the ANSYS Parametric Design Language Guide” Has been updated and reformatted as a book and published as “Introduction to the ANSYS Parametric Design Language”  in both softcover and Kindle formats.

This book started life as a class that PADT taught for many years. Then over time people asked if they could buy the notes.  And then they asked for a real book.  The bulk of the content came from Jeff Strain with input from most of our technical staff.  Much of the editing and new content was done by Susanna Young and Eric Miller.

Here is the Description from Amazon.com:

The definitive guide to the ANSYS Parametric Design Language (APDL), the command language for the ANSYS Mechanical APDL product from ANSYS, Inc. PADT has converted their popular “Introduction to APDL” class into a guide so that users can teach themselves the APDL language at their own pace. Its 12 chapters include reference information, examples, tips and hints, and eight workshops. Topics covered include:
– Parameters
– User Interfacing
– Program Flow
– Retrieving Database Information
– Arrays, Tables, and Strings
– Importing Data
– Writing Output to Files

At only \$75.00 it is an investment that will pay for itself quickly.  Even if you are an ANSYS Mechanical user, you can still benefit from knowing APDL, allowing you to add code snippets to your models. We have put some images below and you can also learn more and purchase your copy on Amazon.com.  They can ship anywhere in the world.

## The Cost of ANSYS, Fluent, CFX, Maxwell, ICEM CFD, etc. Training

How much does training cost for ANSYS, Fluent, CFX, Maxwell, ICEM CFD, Icepak, AQWA, etc.? This is a question many engineers and managers often ask when considering training in the ANSYS family of products. The answer is that it can cost anywhere from zero to several thousand dollars, depending on a variety of factors.

How can training be free? If you are a current customer you may find that you can download training files or view some videos on various ANSYS product simulation topics. This training really isn’t free, since you or your company is paying for maintenance of the ANSYS software which gives you access to the customer portal. We at PADT also provide free content, typically in the form of our webinars which can be viewed at http://padtincevents.webex.com. Click on, “PADT ANSYS Webinar Series.”

You might also find some free training out there on the internet. Alternatively, you might find that training is free or reduced but with a catch, such as the need to purchase more software.

That all being said, as I’m sure you are aware, you get what you pay for. Maybe what you find for free is good enough for what you are trying to do. However, you most likely won’t be able to find free training that’s tailored to your needs or your organization’s specific simulation applications. If you have a question about the training material or what the recorded instructor just said, you most likely will not be able to ask about it. You’ll either be left in the dark, or will have to expend extra effort to figure it out on your own. There are costs associated with both of those options.

So, what about the cost of paying for training? If you are attending a class by yourself, you can expect to pay a minimum of about US\$500.00 per day for your training class. You may have travel expenses to consider in addition to that.

If you are part of a group that needs training, then group rates come into play which can significantly reduce the cost of training per student. A few thousand dollars to train a group of 8 or 10 engineers will typically be a small investment relative to the cost of the simulation software. Further, at PADT we often customize our training material for our training customers. This is a further benefit of group training.

At PADT group rates kick in at about the 4 students per class size. Using group rates can be a very effective way to get productive training into your organization, especially if travel is involved since only one instructor may need to travel vs. several students. Web-based training is another option. This was discussed by Eric Miller of PADT in a prior blog entry, http://www.padtinc.com/blog/the-focus/ansys-training-face-to-face.

Further, PADT’s customer feedback has consistently shown that our training classes pay for themselves. In other words, increases in productivity due to a quick jump up the learning curve can very quickly return the fees paid for training.

There are other factors to consider in training as well. What is the experience base of the organization providing the training? Do they have real-world experience in using the simulation tools for which they are providing training? What about location, flexibility, and scheduling? Will the provider cancel your class with short notice if there aren’t enough students? These are all things to consider when picking a training provider.

The bottom line is that consideration must be made for the relative benefits of training vs. the amount spent on the training. We at PADT would be glad to answer your questions about training in the ANSYS family of products. You can reach me at ted.harris@padtinc.com. You can view our current training offerings at http://www.padtinc.com/support/software/training.html.

## There’s an Extension for That!

My mother in law is still getting used to the concept of a smart phone.

MIL: “Do you have a GPS so you know how to get there?”

Me: “There’s an App for that.”

MIL: “Do you have a flashlight?”

Me: “There’s an App for that.”

MIL: “Do you have a chromatic tuner?”

Me: “There’s an app for that.”

OK, maybe my mother-in-law didn’t ask about the tuner, but there is in fact an app for that.

In similar fashion, now that ACT (ANSYS Customization Toolkit) is a reality, we can start answering questions with, “There’s an Extension for that.” What is an extension? It’s a bit of customized software that you can integrate with ANSYS Workbench to have it do things that aren’t built in to the current menus.

We’ll leave the nuts and bolts of how Extensions work for another article, but please be aware that current ANSYS customers can now download several Extensions from the ANSYS Customer Portal. We’ll take a look at one of these in this blog entry.

To access the currently available extensions, you must have a login to the ANSYS Customer Portal and be current on maintenance (TECS). Within the customer portal, the Extensions are available by clicking on Downloads > Extension Library; then click on ACT Library.

As of this writing there are 12 extensions available for download. These vary from the sophisticated Acoustics Extension for 14.5 to simpler extensions such as the one we’ll look at here which allows you to change the material property numbers of entities in Workbench Mechanical.

Once you have downloaded the desired extension, you’ll need to install it. For use in the current project, you click on Extensions at the menu near the top of the Workbench Window and click on Install Extension.

After clicking on Install Extension, you browse to the folder in which you have saved the downloaded extension. The Extension file extension (I’m not making this up) is .wbex. Here is what it looks like when loading the material change extension:

Click Open.

Next you must click on Extensions again the Workbench window, and click on Manage Extensions. That will bring up this window.

Check the box next to any extensions you want to load, then click Close. If you have already launched the Mechanical editor, you will probably need to exit Workbench and get back in or at least click on File > New and reload for the new extension to show up.

When you open the Mechanical editor, the new extension should show up in the menus. Here is what the material change button looks like after the extension has been loaded:

Each time you open a new Workbench session, you’ll need to click on Extensions > Manage Extensions if you want an extension to be loaded into the Mechanical editor.

Alternatively, you can have an extension load every time by clicking on Tools > Options from the Workbench window, followed by a click on Extensions. Enter the name of the desired extension in the box, as shown here.

After clicking OK, any new Mechanical editor session will have the material change extension loaded.

So, what good is it? I will now show a simple example of implementation of the material change extension. The idea here is that we have a bolted connection and we want to look at two different conditions by changing the material properties of the washers to see what effect that has on the results. Using the material change extension, I can force the washers (and nuts and bolts too) to have a specific material number rather than the default value assigned by Workbench. The material number is used in the Mechanical APDL batch input file created by Workbench to identify which elements have which material properties.

Now before you APDL gurus get all riled up, yes, I know this can be done with the magic ‘matid’ parameter. That’s how we’ve been doing things like this for years. The material number extension is nicer since it’s an actual button built into the GUI. We’re really trying to show how extensions work here, not necessarily the best way to simulate a model with changing material properties.

That all being said, here is what it looks like. Clicking on the ‘matchange’ button in the menus inserts a new matchange object in the tree under the analysis type branch. In this example, the matchange button has been clicked three times, resulting in three matchange objects.

The matchange functionality requires that we create Named Selections for any entities for which we want to change material property numbers. How do I know that? When I downloaded the extension from the ANSYS Customer Portal, a nice read me .pdf file came along with it.

Here I have clicked on matchange 2 in the tree and identified the Named Selection for the entities I want to change, in this case the named selection Washers. I then entered my desired integer material number for these entities, 102.

Finally, in order to demonstrate that it works, I added on command snippet under the Static Structural branch, containing these APDL commands:

esel,s,mat,,102 ! select material 102 – washers.
mp,ex,102,15e6
mp,prxy,102,.29
mplist
allsel

Those commands select the washers by my user-defined material number (I could have also selected by named selection). The commands then define new material properties for material 102. Again, there are other ways to do this, but this shows the effect of the extension. Note that this command snippet is set in the details view to only be active for load step number 3. Load step one applies bolt pretension. Load step 2 solves for the operating load with the original material properties and load step 3 solves for the same loads but with the modified material properties for the washers.

This plot shows von Mises stress in the washers vs. loadstep/substep. As you can see in the graph below the stress plot, indeed the von Mises stress is changing due to the material change from step 2 to step 3. This was a nonlinear analysis with large deflection turned on.

So, this should give you a taste of what extensions are and what can be done with them. The next time you are asked to do something in Workbench for which there isn’t a built-in menu, you may be able to say, “There’s an extension for that!”

## The Importance of Updating Graphics Drivers

Users of graphics-intensive software like the ANSYS family of products occasionally encounter problems caused by graphics or video drivers. It’s important to keep your drivers up to date. In this entry we will summarize some of the symptoms of driver problems and will let you know how to find and install the latest drivers if needed.

Recently I found two issues with my software tools that ended up getting fixed by simply updating the graphics driver. I first noticed the problem with ANSYS Maxwell. While Maxwell had displayed on my machine with no trouble in the past, I found after installing the latest version that it would not load past the initial splash screen. Older versions now had the same problem as well. Also possibly related, I noticed that certain plots in ANSYS DesignXplorer were showing up as big red X’s rather than the response surface plots I was expecting. Most software and plotting worked just fine. There were just a couple of things that were not working. With some input from the helpful staff at ANSYS, Inc., the Maxwell problem was diagnosed as a probable graphics driver issue. Sure enough, once I downloaded and installed the latest driver for my graphics card, goodness was restored and both Maxwell and DesignXplorer were back to normal on my computer.

How can you obtain the specs on your graphics card so you can determine if you have the latest driver or not? On Windows 7, one way to do it is to open up the Control Panel. In the View By setting at upper right, specify Small icons. Then click on Performance Information and Tools. Next click on the link labeled “View and print detailed performance and system information.” The resulting window will have a Graphics section which will list your display adapter type (graphics card manufacturer and model) along with the version number of the installed driver.

There are a couple of ways to check on whether the driver you have is the latest or not. One way is to use Windows Update, although keep reading to see why this is not recommended. On Windows 7 this can be done by right clicking on the desktop and selecting Screen Resolution, then Advanced Settings, then Properties on the Adapter tab, then Driver tab, Update Driver. However, as the helpful staff at ANSYS, Inc. has pointed out to me, Windows Update is not always aware of the absolute latest drivers available. I ended up learning that one the hard way.

Therefore, the recommended method of checking on your graphics driver version is to go to the manufacturer’s website. My graphics card happens to be an AMD FirePro V5900. A web search on AMD FirePro easily gets me to the AMD website page for FirePro professional graphics cards. There is a “Find a Driver” link at upper right. Using that link and knowing the model number of my card, I can easily find the latest driver version and download and install it if it’s newer than the version currently installed. Similarly, the nVidia website has a prominent “Drivers” link on their home page.

The bottom line: it’s always a good idea to make sure you have the latest driver installed for your graphics card. Certainly if you notice that your software is not displaying correctly or just hanging for no reason, one of the first and easiest things to check is whether or not you have the latest graphics driver installed.

## Legacy Training Material: Tcl/Tk for ANSYS Mechanical APDL

The Graphical User Interface (GUI) for ANSYS Mechanical APDL is written in a toolset called Tcl/Tk. This is actually the same GUI toolset that ICEM CFD uses.  Way back in the days when dinosaurs roamed the earth and the .com bubble was bursting, PADT wrote and Advanced Customization class for what was then just called ANSYS.  We still use a large portion of that class today, but one area that has really been mothballed is the chapter on Tcl/Tk.

But some users may find some value there so we present it here, in its un-edited and un-verified totality as a resource for the community.

ANSYS Mechanical APDL Tcl/TK Legacy Training

Use it with success, but at your own risk.

## Monster in the Closet: PADT Goes Live with 512 Core HVPC CUBE Cluster

There is a closet in the back of PADT’s product development lab. It does not store empty boxes, old files, or obsolete hardware.  Within that closet is a monster.  Not the sort of monster that scares little children at night.  No, this is a monster that puts fear into the heart of those who try to paint high performance computing as a difficult and expensive task only to be undertaking by those who are in the priesthood.  It makes salespeople who earn fat commissions by selling consulting services and unnecessary add-ons quake in fear.

This closet holds PADT’s latest upgrade to our compute infrastructure: a 512 core CUBE HVPC Cluster.  No data center, no special consultants, no expensive add-ons. Just 512 cores chugging away at solving FLUENT and CFX problems, and pumping a large amount of heat up into the ceiling.

Here are the specifics:

CUBE C512 Columbia Class Cluster

• 512 AMD 2.4GHz Cores (in 8 nodes, 4 sockets per node, 16 cores per socket)
• 2TB RAM (256 GB per node of DDR3 1600 ECC RAM)
• Raid Controller Card (1 per node)
• 24TB Data Disk Space (3TB per node of SAS2 15k drives in RAID0)
• Infiniband (8 Port switch, 40 Gbps)
• 52 Port GIGE switch connected to 2 GIGE ports per node
• 42 U Rack with thermal convection ducting (chimney)
• Keyboard, monitor, mouse in drawer
• CENTOS (switching to RedHat soon)

We built this system with CFD simulation in mind.  The original goal was to provide a proof of concept to expand our CUBE HVPC offering, showing that you can create a cluster of this size, with very good speed, for a price that small and medium sized companies can afford.  We also needed a way to run large problems for benchmarks in support of our ANSYS sales efforts and to provide faster technical support our FLUENT and CFX customers.  We already have a growing queue of benchmarks waiting to get into the machine.

The image above is the glamour shot.  Here is what it looks like in the closet:

Keeping with our theme of High Value Performance Computing we stuck it into this closet that was built for telephone equipment and networking equipment back at the turn of the century when Motorola had this suite.  We were able to fit a modern rack in next to an old rack that was in there. We then used the included duct to push the air up into our ceiling space and moved the A/C ducting to duct right into the front of the units.  We did need to keep the flow going into the rack instead of into the area under the networking and telephone switches, so we used an old video game poster:

Anyone remember Ratchet and Clank?
Best PS2 games ever.

It works well and adds a little color to the closet.

So far our testing has shown some great numbers. Not the fastest cluster out there, but if you look at the cost, it offers incredible performance.   You could add a drive array over Infiniband, faster chips, and some redundant power. And it will run faster and more reliably, but it will cost much more.  We are cheap so we like this solution.

Oh yea, with the parts from our old CFD cluster and some new bits, we will be building a smaller mini-cluster using INTEL chips, a GPU or two, and a ton of fast disk and RAM as our FEA cluster.  Look for an update on that in a couple of months.

Interested in getting a cluster like this for you computing pleasure?  A system configured like this one will run about \$150,000 (video game poster is extra). Visit our CUBE page to learn more or just shoot an email to sales@padtinc.com.  Don’t worry, we don’t sell these with sales people, someone from IT will get back with you.

## The Reality of Simulation Driven Product Development

A note to our regular readers: This is not a normal Focus post. No info on how to use an obscure new ANSYS command. This may be something our regular readers (the people who do simulation) might find useful to share with their management. And maybe a CEO/CTO/COO or two might stumble across it and “see the light” that we have all been working in for years.

I’ve been involved in planning or attending a couple of what we call “C” level visits in the past month or so. A “C” level visit is where we talk with the CEO, CFO, CTO, COO, or some sort of high level executive at a company.  These visits are very different than sitting in a room with a bunch of engineers showing off what ANSYS software can do, or talking about what services PADT can offer.

In the “C” level visits we are there for two reasons. The first is to understand what the high level product development needs are for the company from a business perspective.  Once we know that, we like to articulate how the products we sell or the services we offer can help the company meet those goals faster and with less effort and cost. And when simulation fits into their needs, we talk about Simulation Driven Product Development (SDPD).

Many people in the simulation software business talk about SDPD a lot.  They use SDPD as buzz word and they surround it with buzz words: time to market, rapid product development, stage gates, decision tree, etc…  In such a discussion you talk about the vagaries of “enabling your enterprise” and “collaborative global solutions.”  All of this is oriented towards a single message: buy our tools.

### The Real World

PADT is fortunate enough to not only be a company that sells simulation tools, we use them as a service to help our customers drive product development. We also use simulation to drive product development that we do here at PADT. (WAH? PADT does product development? Yes we do. And rapid prototyping. Click the links to learn more.)

Top this off with the technical support and mentoring that we offer our simulation customers and we are able to get a pretty good idea about the reality of SDPD. And that reality is that SDPD really works, it can make a huge difference in many areas.  But the reality is also that SDPD needs to be done correctly to make it effective.

### Why SDPD is Effective

To understand the real world impact of SDPD you have to step back and look at what developing a product is about. There are a lot of different processes, and people get all “burn the heretic at the stake” over there particular flavor.  But they all share some common characteristics:

1. Define what you want the product to do (specifications)
2. Come up with and capture all of the things that define the product (design)
3. See if you ideas work (test)
4. Fix stuff that didn’t work (iterate)
5. Make it (manufacture)

Every step in the process involves people asking questions and answering them.  How big, how strong, how long, how much this or that?  And each question can be answered in many different ways. Things like experience, calculations, comparison to existing solutions, statistical studies, testing, and many more.  The cost and correctness of how those questions are answered has a direct impact on the cost and speed of a development project.  Also, many studies have shown that the sooner in the schedule that you answer those questions, the more efficient your project is.

What is great about simulation is that it allows you to answer questions quickly and accurately.  Working in a virtual environment on the computer you can combine comparisons, testing, calculations, and statistics in one place with speed and very little capital investment. The fact that you can do it so fast also allows you to avoid making assumptions and simplifications that reduce the accuracy of the answer.

The most comprehensive study on the effectiveness of simulation for driving product development can be found in “The Impact of Strategic Simulation on Product Profitability” from the Aberdeen Group.  It shows that best-in-class companies across industries are companies that use simulation to drive their product development.

The study finds that:

There is no point in the design process where companies do not profit from intelligent decision-making. By integrating simulation analysis from the earliest stages of design, the Best-in-Class are able to make better decisions through the process. This enables these leaders to drive higher quality and lower cost products, as well as deliver the innovations and features that differentiate their products.

### Making SDPD Effective for Your Organization

So companies make more money using simulation to drive their product development.  It would be nice if it was true that all companies that use simulation automatically see a benefit.  But we are talking about the reality of SDPD and that reality is you have to have the proper simulation tools, and you have to use them effectively.

#### The Right Tools

As far as tools go, you should know where I stand.  ANSYS, Inc’s products. If you are reading this you are probably an ANSYS, Inc. product user or you got this posting from someone who is.  Why are these tools the leaders across the industry? Because they have breadth and depth so you are not limited by your simulation tools, they are accurate, and they work together so you do not have to jump through hoops to work as a team.  That is really all there is to it.

If you can not use this tool set for some reason, say your senior manager is married to the competition’s local rep (which is maybe one of the few valid reasons) you still need to make sure you stay high end.  Do not cheap out on a CAD based tool or a low end tool that is “good enough for what we need.”  Anything other than a full function tool suit will limit your ability to get accurate solutions, or to model your product completely.  That \$20,000 you saved will get eaten up in about a week of fumbling around trying to get useful information.

Yes these tools cost a lot more than the low cost or CAD based alternatives. But there is a reason for that.  It is the army of developers, support engineers, and product managers that work day in and day out to improve the speed, accuracy, and capability of their simulation tools.  The reality of simulation is having 80% is only good 80% of the time. When you need that extra 20% of functionality, you need it. And when you do not have it, your project bleeds cash.

#### Effective Application

Deciding to drive you product development with simulation: easy.  Deciding on the right tool set: a bit of work, unless you just go with ANSYS products, then it is easy.  Now you have to make it work.

This is such a big topic that we did a seminar on it about two years ago.  I’ve uploaded a PDF of the presentation if you would like more details.

The gist of it is the following four rules:

1. Establish goals for SDPD in general and establish goals for each project that uses simulation.  Without goals it is easy to do too much simulation or to do the wrong simulation.
2. You must have the right type of users doing the right tasks: experts and mainstream users. Also, do not turn good engineers into bad users by violating the other rules.
3. Use the right tools. Not just the simulation software, we covered that.  You need the right hardware, the right support, and the right utility software to support your efforts.
4. Design the right flexible process for your team and constantly improve on it.

### Mainstream

I have been driving product development with simulation for over 25 years, and many people who read this blog have been doing it for longer. Once a secret of the aerospace and automotive industry, SDPD is now mainstream. We have customers that use it to design ear buds, mining equipment, coolers for organ transplants, and toys.  It is used to make almost every electronic device around us more reliable, cooler, and faster.  And we still have people that use it to design Turbine Engines, space craft, and automotive components.

In fact the industries that are long time users are increasing their seat count and the size of the computing systems.  Many that we know of are making multi-million dollar investments every year and growing that investment year over year for a simple  reason, they see results from driving more and more of their design process with simulation.

If you are not using simulation, or some portion of your company is not using simulation, than something is wrong. You or they are literally leaving money on the table and giving a competitive edge to the competition.  If you would like to learn more about how PADT and many of our customers have been successful with simulation, feel free to contact me. Or just get out there and start evangelizing something that has already been proven to work.

## Tags and Filters in ANSYS Mechanical 14.5

I have been doing this simulation thing for too long. I actually got giddy when I saw a new icon in 14.5.  That usually is enough to get me going. Then when I saw it allowed me to put tags on items in my model tree, the OCD part of me got very interested. When it became apparent that it all worked with filtering I got down right joyful.  These are the sort of little tools that can make your analysis process a lot more enjoyable and efficient. And to be honest, these are the things that we used to use APDL to control in the old days, and that we have been needing a GUI equivalent for in ANSYS Mechanical.  In this weeks posting we will look at the new tagging, and then take an in-depth look at what you can do with filtering.

Both of these tools are ways for you to get a handle on larger models.  When you have one or two parts in an assembly, and maybe four or five loads and boundary conditions, you can see all of your model in the tree in one quick glance. But when you are dealing with a big assembly, with dozens if not hundreds of parts, contacts, boundary conditions, etc… it can become overwhelming and you spend all of your time looking through the tree. And thanks to the hard work of the ANSYS development team,  Filters and Tags come to the rescue.

### Tags

So the cute new little icon is a picture of a tag, and it is used to tag things. I like it when things are that literal. Do note that it is used to tag items in your model outline, not geometric entities. Why? Because you have named selections for that.  This is for grouping things that are not groupable with named selections.

When you click on the Tag icon it brings up the Tags window.  It looks like the default state for this window is free and floating. I found that it goes nicely under the details window, or as a tab under the model tree itself. If you are not familiar with how to move windows around in ANSYS Mechanical, here is a short video:

When you first bring the window up it will be blank.

To create a tag you go to your Outline and select (CTRL-Click to select more than one) the items you want to group. For this first example I am going to put all my size controls in a group:

Then go to the Tags window and click Add icon (tag with a green plus) and give it a name:

Now you have your first tag:

The way tags work is that the checkbox next to the name is there to add an entity to a tag, remove it from a tag, or to show that it is currently part of the tag.  To see this we can click on something that is not in the tag group and note that the check box is un-checked:

Then if we click on one of more of the edge sizes, the check box is checked:

If I want to remove one or more of the entities from the tag, select them and un-check the box. The same goes if I want to add an entity, click on it, then check the check box.  Easy as can be.

The only other thing you should know is that if you want to delete a tag completely, click on it and RMB->Delete Tag(s) or click on the delete icon (tag with a red minus sign). To rename a tag, click on the rename tag icon, which is just a picture of a tag with now fancy additions.

The other interaction you should be aware of is the ability to select items in the tree by Tag.  You can do this with filters, which we will cover next, or by doing a RMB on the tag and choosing “Find Items with selected tag”

In a huge model, this can really speed up finding things in the tree.

You may have noticed by now that Tags are non-exclusive.  A tag can refer to more than one entity, and a given entity can have more than one tags. Because of this you can get real fancy and select entities that belong to any selected tags, or only those that belong to all the selected tags. In this example I have selected any entities belonging to Sizes2 and TopNSs:

You can find the union of two or more groups by choosing “Find items with all selected tags”  This can become very handy in complex models.

One thing to remember is to be careful when you are  clicking around in the Tags window. I found that I was checking and unchecking the boxes when I meant to just select a tag in the list.  So my grouping was getting muffed up a bit.

### Filtering

The close cousin to tagging for managing a big tree is the ability to filter what is in visible from your tree. Again, if you have a simple model as far as item count goes, you may never need this. But if you have a complicated tree, Filtering can be a life saver.

It exists at the top of the Model Outline window.  You do have to expand the window it sits in a bit more than I normally do to see all the controls. Not a big deal, but be aware of it.

The interface is pretty intuitive.  You specify what you want to filter on, choose some sort of filter value, refresh the tree applying the new filter, and clear the filter. The final icon, Expand on Refresh, expands your tree to show every selected entity. On a huge tree you may want to turn this off and manually expand the tree where you need to.

Fort filter types your options are Name, Tag, Type, and State. For Name and Tag, it looks for the string you specify anywhere in the name or tag of each entity.  So you don’t need to use wildcard characters.  “siz” and “size” will both filter any string with size in the name… and any with just siz if you use “siz.”

If you want to filter on Type the text box turns into a drop down and you have two choices: all or results.  I’m guessing that will expand over time, but right now the way you would use it is to just hide everything in your model tree but your results.  I have often in the past found myself scrolling the tree window to the bottom to get to my results, use the Type = Results to avoid this.

The State filter can be helpful in checking out or debugging a model.  It can filter on the state of each entity: Suppression, Underdefined, or Not Licensed.

As you muck around with a big model you are constantly suppressing and unsupressing things. The icon next to a suppressed item turns into one with a little X next to it, but in a big model these might be hard to spot. Use the “Not suppressed” and “Suppressed” options to find what is and what is not suppressed. On a big model you may surprise yourself and find something suppressed that you thought was active.

The Underdefined is just as useful. In a complicated model you may see the dreaded “underdefined” question mark high up on a branch, but become overwhelmed as you look for the source in a big tree.  The answer is to simply filter and show only Underdefined entities in the tree.

There are two things you should know about when using the Filter options.  The first is that I found that it was really important for me to remember to hit the clear button when I was done doing what I wanted to do with the filter. If I did not, then I would work with a filtered tree and miss important information.  The second is that you

can avoid having to hit the refresh button for filter types Name and Tag by pressing the enter key when you are done typing your string in.  It automatically does a refresh when you do so. It also automatically does a refresh when you choose an item from the drop down for State and Type.

### Thoughts

There is not much else to say about these two productivity tools.  They are handy and well thought out.  If you have been using ANSYS Mechanical for a while, you just need to get used to having them by using them as often as possible.  Once you do so, you will find it difficult to work on your models without them.

## ICEM CFD as a Data Compliant System in ANSYS Workbench

ICEM CFD is probably the most capable mesher on the planet. Not only do we here at PADT use it as our preferred tool for creating complex hex meshes, it has a whole host of other capabilities and controls that make it the power users choice. But one thing that has been frustrating for some time is that we could not easily add it into a project that automatically updates. At 14.5, ICEM CFD is now data compliant and you can use it in a project with parameters.

If you know ICEM CFD well you know that there are many aspects of it that do not fit into a project flow, but the most commonly used capabilities do: read in geometry, mesh it, output nodes and elements into a solver or node/element based pre-processor. Because it is node/element based it does not work with ANSYS Mechanical or other tools that require surface or solid geometry, but it does work with FLUENT, CFX, ANSYS Mechanical APDL (MAPDL) and Polyflow, the ANSYS solvers that can work directly with nodes and meshes. Once put into your system, you can modify geometry or ICEM CFD parameters and then update your system to get a new solution.

In this article we will focus on using ICEM CFD with ANSYS MAPDL. That is because 1) most of our readers are ANSYS Mechanical/MAPDL users and 2) it is what I know best. But most everything we are talking about will work with FLUENT, CFX, and Polyflow.

### Why is this a Big Deal?

For the vast majority of users, this is not such a big deal because they can do all their meshing with ANSYS MAPDL, ANSYS Mechanical, ANSYS Meshing, or FLUENT (with TGrid meshing). But if you can not, then this is an awesome new capability. This is especially true if you need to use the blocking based hex meshing built into ICEM CFD.

### Getting Started and Things to Know

Frist thing we recommend you do is read the help on the ICEM CFD System:

Workbench User Guide // User’s Guide // Systems // Component Systems

Click on ANSYS ICEM CFD and read the whole thing. There are lots of little details that you should be aware of.

The first thing you should note is that if you want to use it with Mechanical APDL you need to turn on Beta Features: Tools>Options>Appearance scroll down and check “Beta Options” to be on.

The next thing is to realize that from a project standpoint, you can feed an ICEM CFD system with any system that has a geometry module. Although ICEM CFD will read a mesh in and use the external surface of that mesh as geometry, that capability is not currently implemented in Workbench. This means if the source mesh changes, you can not automatically update your mesh if the “geometry” mesh changes. See below for a work around.

You do need to make sure that your ICEM CFD model is setup to output to your solver type. Make sure you check this when you are setting up your mesh.

If you have worked in Workbench with legacy mesh you know that named selections can be very important. I did not have enough time to play with all the different options, but it looks like named selections come in from DesignModeler, and if they define a solid, the resulting nodes that are in that solid get written as a component that goes to the MAPDL solver. However, surface, edge, and vertex named selections do not seem to get passed over at this time. I am contacting ANSYS, Inc. to see if there is a way to turn that on.

It also looks like if you are using blocking only the solid elements are written, and no corner, edge, or surface elements are output. I will also be checking on this.

The last, and most important thing to know, is that your ICEM CFD model needs to be robust. Anyone that spends a lot of time in ICEM CFD already knows this. If you make a change to geometry or a parameter, then it needs to update reliably. The key to success with this is to just do your meshing with updates in mind and make it as simple and flexible as possible, especially if you are blocking with HEXA.

### A Simple Example

I made a very silly model, because these Focus articles are always about silly models, that sort of shows the process you can use. It is not a flat plate with a hole in it, but it is a block with a cylinder on top.

Nothing too fancy. I made the block dimensions, the cylinder diameter, and its offset parameters.

This system feeds the ICEM CFD system where it comes in as points, lines, and surfaces.

I then blocked it out:

And specified meshing sizes:

And generated the mesh:

Like I said, a simple model.

Parameters are supported for meshing controls, any user parameters you want to make that you will use in Tcl scripts, or meshing diagnostics.

I made the number of nodes across the width a parameter:

Values that you can make into parameters have little white boxes next to them. To make them workbench parameters click on the box and you get the “Blue P” that everyone should know and love from all of the other ANSYS, Inc. applications.

I also wanted mesh parameters so I went to Settings->Workbench Parameters->Workbench Output Parameters and set some of those:

Now when I go back to my project and check out the parameters for my ICEM CFD system I get:

Now it is time to add the ANSYS Mechanical APDL system. You will want to write a macro that defines material properties, constraints, and loads. Mine also has some output parameters and makes some PNG plots.

This is the mesh I get in MAPDL:

and here are the results. Exciting:

To try the whole thing out I made a design study:

Everything updated just fine and I got all my output parameters and my plots in my MAPDL directory for each design point (remember to tell it to save all the design points or it deletes them, or use a macro like the one discussed in the bonus article from this posting).

I made an animated GIF of the different meshes for fun:

Here is a link to an archive of the project I used:  ICEM-wb-1.wbpz

### Doing more with ICEM CFD in a Project

This was a basic example. But the cool thing about the implementation is that it will do much more. If there is a replay file, it will execute the file and run whatever scripts you specify in the file. This is how you can get it to work with existing meshes as geometry. And you can do whatever else you want to do.

On an update ICEM CFD does the following:

1. Update geometry if Tetin file changed
2. Runs tetra default meshing, if no blocking file and no replay file
3. If a replay file, run the replay file
4. Runs Hexa default meshing if a Blocking file exists
5. Convert any blocked mesh to unstructured mesh file
6. Convert unstructured mesh file to solver input file
7. Save the project

So you just need to be aware of this order and plan accordingly. There really is no limit to what you can do.

### Next Steps

If there was ever a place to use Crawl-Walk-Run this is it. Make yourself a very simple model and get a feel for things. Then work with your real geometry doing some simple meshing, maybe just blowing a TET mesh on it, then set up you full run. Also, keep the simple model around to try stuff out when you are working with the big model.

The help was very helpful, I recommend that you read it once then reread it after you have played around with this feature a bit.

## Saving Mechanical APDL Plots in a Design Study

One of the cool features in the ANSYS Workbench is the ability to set up a design study and kick off a bunch of runs that bring back key parameters.  This is great for a design exploration but sometimes you actually would like a result plot, or maybe the info in a text file as well.  When a design study is done, unless you tell Workbench to save all your run files, it deletes all the files.

To do the posting on ICEM CFD in the workbench project page, I needed to do just that, so I thought I would share my method in case others want to use it.

The way I do it is pretty simple:

• Use a /INQUIRE to get the directory the run is running in
• Use some string functions to get the name of the design point from the directory name
• Temporarily change the jobname
• Save my plots
• Change the jobname back to file
• Copy the files to the User_Files directory.

Here is what it looks like:

`   1: /post1`

`   2: set,last`

`   3: finish`

`   4: /inquire,aa,directory`

`   5: ii = strpos(aa(1),'\dp')`

`   6: ij = strpos(aa(ii+1),'\')-1`

`   7: dpn = strsub(aa(1),ii+1,ij)`

`   8: dpn = strcat(dpn,'_')`

`   9: /file,dpn`

`  10: /post1`

`  11: /view,1,1,1,1`

`  12: /vup,1,z`

`  13: /show,png`

`  14: eplot`

`  15: plnsol,u,sum`

`  16: /show,close`

`  17: /sys,copy *.png ..\..\..\user_files`

`  18: finish`

`  19: /file,file`

See how it uses /inquire to get the directory, then strpos(), strsub(), and strcat() to get the design point name.  Then it simply changes the file name, does a /show,png and plots. The results are copied using a system command.

Two important things to note:

1. You have to do the set command before you change the jobname, otherwise your RST files will not work
2. This version is written for windows, you need to use forward slashes and cp for Linux.

You can attach this to a MAPDL system or as a code snippet.