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

imageI 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.

image

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:

image

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

image

Now you have your first tag:

image

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:

image

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

image

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. 

image

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”

image

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:

image

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.

image

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.”

image

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.

image

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.

image

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.

imageThere 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.

ICEM-CFD-System-ANSYS-Workbench

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.

image

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.

image

I then blocked it out:

image

And specified meshing sizes:

image

And generated the mesh:

image

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:

image

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:

image

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

image

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:

dp0_000

and here are the results. Exciting:

dp0_001

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

image

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:

DesignPoints_ICEM-CFD-1

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.

Happy Holidays and Merry New Year from The Focus

Here we are again. At the end of another year.  It has been a big year for The Focus, PADT, and for ANSYS in general.  It is our last full week of work for 2012 here at PADT so we always like to finish up the year with a summary article, looking back and looking forward.

VibratingSnowFlake3The Focus

We published 48 articles to The Focus blog in 2012, well 49 if you count this one.  That brings the total on the blog to 194, but the real number is higher because the old newsletters show up as one posting, and not the 3-4 articles per issues that they contain.

Which reminds me, a big THANK YOU to everyone who sends emails or leaves comments thanking us for doing The Focus.  We do enjoy doing it and getting a note now and then is frosting on the cake.

The biggest change to The Focus was the fact that it has a new home and it is no longer alone. With the launch of our new website we moved to a WordPress server for our blog, and we have added other non-ANSYS topics to the blog. So now our customers in the product development and rapid prototyping world can enjoy our immature wit and pseudo-wisdom.

We were also able to get more than a few Webinars out there.  In fact, we did 16 Webinars on topics from new tools we resell (VCollab and Flownex) to introductions on EKM and how to do a user routine in ANSYS Mechanical APDL.  All of the webinars can be viewed as recordings.

VibratingSnowFlake4PADT

The year of 2012 was not a year of big changes for PADT, but a lot of little ones that added up.  We continued to grow our presence in our corner of the US with growth at our Colorado office and salespeople in New Mexico and Utah.  We also completed all of the modifications to our main facility in Tempe, AZ and have been enjoying an almost construction free work environment for most of the year.

The big change was our new website.  But I mentioned that already…

It has been a good year for compute power at PADT.  Our sales of CUBE HVPC systems has been picking up and we have added more of these awesome systems to our own pool of servers.  It was a bit of a risk to start building custom computers for simulation users, but we have been able to make our customers happy and deliver some truly fast boxes for very reasonable prices.

We continue to see growth across all three of our business units: Simulation, Product Development, and Rapid Prototyping. Our prototyping group had a true breakout year with record numbers of prototypes delivered to customers and big growth in the sales of our Support Cleaning Apparatus.  We also completed a couple of very large injection molding jobs that we helped set up.

On the community front we continue to support STEM education efforts, with some new efforts in the Denver area and more support Arizona. We have also participated in more Angel investments and PADT is now a regional sponsor of the Cleantech Open.  We are also proud of our very own Jen Ayers who has stepped up to be the president of the local chapter of the Society of Manufacturing Engineers.

VibratingSnowFlake2ANSYS

We started out 2012 getting up to speed with ANSYS 14.0, which was introduced at the end of 2011.  There was so much new stuff that we barely got it all under our built when we got 14.5 last month.  We have been very pleased with the efforts of the development teams during the year, especially in meshing, load mapping, and advanced blade row capabilities, just to name a few.

And ANSYS, Inc. as a company did well, they started 2012 at $57.39, look to be finishing at around $70 with a worst at $55.21 and a peak of $74.37.  22% growth if it finishes at $70/share. Not a bad year, better than the DJI or NASDAQ.  This puts the market capitalization at around $6,400,000,000. I put the zeros in there for effect.  It is very impressive for those of us who were around when they  first went public.  Their 10 year performance is far and away above any other company in the space.

And speaking of growth, ANSYS, Inc. acquired Esterel Technologies, expanding their footprint in simulation to simulating imbedded systems.  We also saw further integration of all of the acquired products under the Workbench and organizationally.  The thing that still amazes us is that with all this growth we still see the same vision and focus, and still the attention to the little features and functions that users ask for.  We deal with a lot of software companies and have seen a lot of acquiring. No one stays as focused as ANSYS, Inc.

VibratingSnowFlake12013

This coming year is looking good.  Here in the US we may finally get out of our slow growth period and see some robust expansion… if our politicians can stop fighting and end the uncertainty.  PADT is ready for some good growth and we hope to get into some new technologies, meet some new customers, and see some new business.

The folks at ANSYS, Inc. are working away at ANSYS 15.0, which is going to be another major release. We will be here for our customers as we all learn 14.5 and funnel feedback to the proper channels to help make 15.0 even better. We also hope to see a growth in our usage of other physics in 2013 and more advanced materials, it seems like our customers are headed that way so we want to get there first.

And for The Focus, expect more of the same. We have a whole list of posting ideas and will try and hit the ground running when we get back from the holiday break. Maybe in 2013 we can break that 50 article threshold.

W want to wish you, your co-workers, your family, and your friends a very happy holiday season and we hope to prosper with you in the new year.

Webinar Info: New and Cool Stuff in ANSYS R14.5 Mechanical Products

 

This Wednesday we had our last PADT ANSYS Webinar Webinar of 2012 on the cool stuff in the just released 14.5 version of the ANSYS Mechanical products.  As promised, here are links:

The recording can be found at:
https://padtincevents.webex.com/padtincevents/lsr.php?AT=pb&SP=EC&rID=6160237&rKey=0a380a100d1db557

And a PDF of the presentation can be found at:

PADT-Webinar-R145_Important_Stuff-Mechanical-2012_12_12.

Enjoy!

Beware the ARGS, Matey!!

Pirate Joke:
One day me ARG says, “ARG, go to ARG and get the ARG to ARG the mainsail.” I says to me ARG, “ARG went yesterday. The ARG is over yonder by the ARG and the rum! Ha-ha-ha-ha-ARG!!”

Yeah… pirate jokes don’t work so well when the same ARG is used in too many places. The same goes for command snippets.

Summary Note: This article got longer than I intended, so here is a summary of the important points.

1. When using multiple Command Objects in a single mechanical session, the ARG variables initialized in earlier scripts are still active in later snippets if the ARG values for that snippet are not filled in the details window. Don’t assume the ARG values are zero, unless you set them to zero.

2. Output arguments are evaluated at the end of the MAPDL run. If the same variable name is used in multiple command objects, all the snippets will show the same output value, which is the value of that variable at the end of the solution process.

Now you can keep reading if you’re bored, or curious, or just confused. Smile

Up until a few days ago, I was under the impression that each command snippet that was added to a Workbench Mechanical had it’s own set of ‘ARG’ variables, like MAPDL does for macros, since each one has a details window with it’s own set of ARG Variables. Well, they don’t.

image

When you hit the ‘Solve’ button in Mechanical, it builds one large input file that it sends to MAPDL. This input file contains all the nodes and elements, loads and supports. It also contains any command snippets that you have in the model. All command snippets are run in the main namespace. ARGS from one snippet carry over to another.

As an example I set up a small command snippet with the details from the above picture. It uses two arguments, ARG1 and ARG2.  Below shows exactly what get added to the overall input file.

image

 

The first two lines are added by Workbench to initialize the variables. All looks good and works fine, until I add another command snippet.  This one is even simpler and just stores the ARG variable to defined variables that Workbench will then read back to the details window, which is discussed below.

image

As you can see below, the ARG1 and ARG2 variables are left blank, but the two output variables match what was set in the previous command snippet.  This is because the*SET commands that Workbench adds, are only added when the details window has values given. So ARG1 and ARG2 are never overwritten from the previous command snippet.  The way to avoid the overlapping of input variables is to fill in the Input Arguments with zeros whenever using multiple command snippets.

image

image

Which brings up another point, about output variables. As many of you know, but some may not, each command snippet has a “Parameter Search Prefix”, which is set to “my_” by default. This allows Mechanical to search through your snippet and find any variables that you define that start with “MY_”. In the example above, the output variables are MY_ARG1 and MY_ARG2. (Remember that MAPDL stores all variable in uppercase.) The values of these variables are then pulled out of the MAPDL database and shown in the details window for that command snippet.  The values are taken at the end of the solution phase, and not at the time they are defined. So this means that if two or more command objects use the same output variable names, whatever value the last command object set for the variables, that is going to be the same value read back in and displayed for all of the command objects using that variable. The best way to avoid this is to use different output variable names in each command object.

Since I already gave you the good points in the summary, I won’t restate them here. I will just add that command objects are great for adding functionality to your Workbench Mechanical runs. Just be cautious ARGS when using multiple objects. (Or pirate jokes, for that matter.)

Visualizing Nodal Connectors in Mechanical

As I noted in my series on nodal interactions in Mechanical, ANSYS has been exposing more capabilities to interact with the underlying finite element model over the past couple of versions. Additionally, Mechanical’s visual verification capabilities have improved as well, as it is now possible to view nodal connectors created by remote forces and displacements, weak springs, and MPC contact.

To demonstrate this, I’ve modeled a ball valve as shown below.

image

The model is set up with the following options and boundary conditions. (Don’t try to make real-life sense of these; I’m just demonstrating capabilities here.)

  • Weak springs are turned On under Analysis Settings.
  • The bonded contact between the handle and shaft is set to MPC behavior (the bonded contact between between the valve body and ball is kept as Program Controlled).
  • A 50 lb remote load is applied just off the end of the handle and scoped to the end face of the handle (B in the figure above).
  • A 5 degree Z-rotation is applied as a remote displacement and scoped to the front face of the valve body (C in the figure above).

Now, you won’t be able to view the “spider webs,” “bicycle spokes,” etc. generated by the nodal connections yet. The weak springs, MPCs, and beams are not created until the matrices are assembled. So, at this point you will want to solve the model.

When the solution is complete, highlight the Solution Information folder in the Model tree. You will see two tabs at the bottom of the graphics window: Graphics and Worksheet. Click on the Graphics tab.

image

You will now see all the nodal connections displayed for your finite element edification, and they are glorious. Note: Constraint equations (CEs) include multi-points constraints (MPCs).

image

Click the Show Mesh button for the full finite element display.

image

The “clumping” of the MPCs on the front face of the valve body might look a little odd, and it is—you’re not imagining it—but it deflects the way I expect it to, so I’m good with it.

Now right about now, you’re yelling at me through your monitor and I can hear what you’re saying. “Hey, Strain, I don’t have the luxury of working with these little Mickey Mouse sample models that you create for sales demos or training courses or Focus articles! The models I make are real-life models that take hours or days to solve. Do you really expect me to wait for hours or days before I can verify that my connectors are correct?” Fret not, dear ANSYS user; there is a simple workaround to this. When the Solution Status says “Solving the mathematical model,” simply click [Stop Solution] and continue to display the connectors as described above. Maybe give it a minute or two first, though, just to make sure the matrices have been assembled and the connectors generated.

image

The default is that you see everything, displayed as lines, but if you take a look at the Solution Information details, you’ll see that you have some additional display options under FE Connection Visibility.

image

By default, we see All FE Connectors, but we can switch the Display option to CE Based, Beam Based, or Weak Springs. (We can also change it to None, but that would defeat the purpose of this article.) Here is the same model with Display set to Weak Springs.

image

image

By default, the connections for all nodes are displayed, but you can isolate the display to a nodal named selection under the Draw Connections Attached To option. For example, here is the connector display for the front valve body face nodes, named “front face nodes.” (Note: I’ve turned all FE connectors back on.)

image

image

Finally, if you want a bit more visual clarity, you can change the Display Type to Points instead of Lines.

image

image

This is another example of direct finite element interaction being enabled in Mechanical. With this capability, the user will no longer need to export the model to Mechanical APDL for visual node connector verification. Expect even further finite element interaction capability in future versions; ANSYS is on a roll in this area.

Some Stuff ANSYS Users Should Know about Excel

imageWhat is the software tool that us numerical simulation types use almost as much as ANSYS products, maybe even more?  Most of you will answer Microsoft Excel.  We all use it almost every day for a variety of things. Every time I see someone doing something sophisticated with Excel, I learn something new, a tool I can use to be more efficient. 

For this week’s The Focus posting I will be sharing some stuff in Excel, tips and tricks, that ANSYS users should find useful.  I am using Microsoft Excel 2010 and the assumption is that the reader is a good user of Excel, maybe not an expert, but good.  I have tried to pick things that have a direct impact on user efficiency.  You may already know some or even most of these things, but hopefully you will find some of it useful.  If you have something to share, please add it to the comments.

Take the Time to Setup Tables

I love tables.  I’m always getting made fun of because I always convert what I’m working on into tables.  Why are they so great? 

    • They auto-format
    • They have filtering built in
    • You can refer to the table, columns, rows, and cells in equations with names rather than ranges
    • When you add a formula in a column, it automatically copies it to the whole table (my favorite)
    • It does automatic totals, averages, etc…

Making a table is easy:

    1. Select the columns you want in your table
      1. It is a good idea to have the headers defined
    2. Go to the Insert Tab
    3. Click on Table

image

That give you:

image

Click on the downward facing triangle icons to filter.  Use the options in the Table Tools > Design tab to set the name, remove duplicates, turn on the total row, and change the basic formatting (color).  Once you have played with these for a while, you will find you can not live without them and people will ask you why you use tables so often.

Concatenation

One of the ways that we use Excel is to convert some sort of text data in row/column form into a command, mostly MAPDL commands.  A key to this is the ability to concatenate text strings and the values of cells.  I’ve even seen someone write a NASTRAN to ANSYS translator in Excel.

To do so you create a formula (start with =) and string together the text you want with ampersands: &

As an example, if we want to add a column to the table we used above to create N commands we simply click on any of the cells in the empty column next to our table and enter:

=”n, “&[@N]&”, “&[@X]&”, “&[@[Y ]]&”, “&[@Z]

Because we are using a table, the command uses the column reference [@name] from the tables rather than cells.  In a non table the command would look like:

=”n, “&$A6&”, “&$B6&”, “&$C6&”, “&$D6

Either way you are stringing the values in your cells together with text to make a command:

image

That column can be pasted into a text file, an ANSYS Mechanical code snippet window, or saved to a file.

Text to Columns

After tables, the next most useful feature in Excel for the analyst is the ability to convert the text in a column into multiple columns. This is a lot like the text import window that opens up when you open a text file, but it can be used at any time on any column in your spreadsheet.  To use it, simply select the column you want to convert:

image

Then go to the Data tab and click on “Text to Columns”

image

This will bring up the wizard that steps you through the process:

image

If you are working with a NASTRAN type input file, formatted with fixed columns, you can chose “Fixed Width” here. If not, choose delimited.  Click next.

For fixed, you get a ruler that you can drag the column lines back and forth on till you get what you want. Pretty simple.

For delimited, you get the delimiter screen.  Specify your delimiter here.  In the example, we will use a comma. But it can be spaces, tabs, or any other character. When you specify the delimiter, it shows you how Excel will break it up. 

image

I usually click finish here because the next screen is formatting and I usually play with that once I have the data in Excel.

That is it. Very simple.

image

One thing to note, it converts to columns by overwriting columns to the right. So if you have data in those columns, you should insert enough blank columns before you use this command, so you don’t overwrite anything.

Names

Usually you refer to a cell or a range of cells with the old LetterNumber syntax: A3, B7:NN2145, etc…  That can be a real pain to deal with and it really doesn’t tell you what the data in that range is.  A better way to deal with chunks of information, or critical cells, is to use names. 

Creating names is very easy.  The simplest is to click on the cell or cells you want to name and then type in the name you want in the input box in the upper left corner:

image

Now, if you want to know the max value of those numbers, you can use the formula =max(MyData)

image

If I have a lot of constants I want to define, I can use the “Create from Selection” tool in the Formulas tab:

image

This command brings up a dialog box and you can tell Excel where to grab your names from. Three or Four clicks and you have named parameters instead of cell locations.  This is very useful if you have a group of key parameters you want to use in your calculations.  Now when you look at your formulas, the descriptive name of the parameters are there rather than a reference.

image

Use the Name Manager in the same Formulas tab to view, edit, and delete your names.

Dynamic Range

A related trick for Excel is creating dynamic ranges. What do you do when you name a range and then the amount of data in that range changes? You have to redefine your range.  Nope, you don’t. You can define the range using a formula that changes as the length of the column, or row, changes. 

The name can be defined for a column as: =OFFSET(startCell,0,0,COUNTA(column)-1)

Or for a row: =OFFSET(startCell,0,0,0,COUNTA(row)-1)

This may be the most time saving trick I know in Excel.

You put the formula into the “Define Name” dialog box found on the Formulas tab:

image

Now, no matter how long the column of data is, MyVals will always contain it.  A big time saver.

Relative Reference on Record Macro

How many times have you gotten data in Excel, or imported data into Excel, where you want to make a small change to every line. But you have several thousand lines. If you do a “Record Macro” that doesn’t work because you have to click down to the next line, then run the macro and repeat that over and over again. Wouldn’t it be great if you could simply record a macro with some sort of relative reference. 

For years (maybe decades) I didn’t know you could do that. There is an option under the Developer Tab called “Relative Reference.”  Click that before you record your macro and you are good to go.

image

As an example, take a look at this data. Nodal coordinates on one line, rotations on the second. 

image

I want to grab the rotations, paste them on the same line as the coordinates, delete the rotation line, then move to the next node.

Here is a video that shows the process:

That is all fine and dandy if you have a few dozen lines, but your fingers will get tired CTRL-e’ing that many times.  I quick fix is to go into the macro and add a simple loop.  First we use CountA() to see how many nodes we have, then we loop on that with a for statement:

Sub Macro3()

'

' Macro3 Macro

'

' Keyboard Shortcut: Ctrl+e

'

    cnt = Application.CountA(Range("a:a"))

    For i = 1 To cnt

    ActiveCell.Offset(1, 1).Range("A1:C1").Select

    Selection.Cut

    ActiveCell.Offset(-1, 3).Range("A1").Select

    ActiveSheet.Paste

    ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select

    Selection.Delete Shift:=xlUp

    ActiveCell.Select

    Next i

End Sub

Of course you could have done this with *VREAD’s in MAPDL, or python. But sometimes Excel is just faster.

The Files View in ANSYS Workbench

image

When you watch someone work with a tool as complex as ANSYS Workbench, you quickly realize that they use different tools and features than you do.  One thing I noticed the other day was someone really using the Files View.  So I thought, I should really make sure I know what is there and take advantage of it.  In looking into it I found a few things I was not aware of, and I needed an article, so here we are.

Philosophy of Files in Workbench

Before we get started, you have to realize that the way ANSYS Workbench thinks about files is unique, and you should understand it.  The idea originally was that the program itself would manage all your files. You just had to worry about the project file and the directory tree it points to.  Therefore the directory structure in that tree is pretty complex, and the user can not change the name of a file being used. That is all managed by the program. Times have changed and there are a lot of programs that run in the Workbench that require the user to know about the files, especially some of the legacy solvers.  So we have the Files View to help us with that.

It is very important that you do not go in and rename, delete, or move files around.  ANSYS Workbench has no way of knowing that you have done that. You should just use it to find files, edit their content, and deal with files that non-workbench type solvers (FLUENT, MAPDL, Etc…) use that are not managed by the Workbench.

The Files View

You see your files through view by toggling it on and off. Under the View menu there is Files item.  Click on it to turn on the Files View and click on it again to make it go away.

image

If you see the check and not the view, then use View->Reset Window Layout

image

As with any window in the ANSYS Workbench GUI you can drag the bar at the top of the view, or click the thumbtack in the upper right corner, to break it out as its own window, and drag it anywhere you want. I have two monitors so I like to do that, and have a full size graphics window.

If you look at what is in the view, there are no real surprises.  Like a lot of Workbench applications, the information is presented in a spreadsheet from.  If we take a look at each column we can learn some things:

image

Name:
Nothing spectacular here. The icons are kind of nice to let you know what type of file you are dealing with.

Cell ID:
This one is kind of handy.  It shows you where in your project the file in question is used.  This helps with complex models where you have multiple systems.  If you don’t change the names on your files, then things get confusing quickly.  The Cell ID helps sort it out.

image

Take a look at the Cell ID and the associated project schematic. You can see that the geometry is used in two systems, and that the material properties are used in the Static Structural system.  As you review this, you can see how useful these references can be.

Also notice how some of the files only have a letter for the Cell ID. These are usually solver related files that really apply to the whole system, and not to any one particular cell in the system.

Size:
Not much to say here.  One nice use is to see if your result files are large enough to indicate a successful solve.

Type:
This tells you what type of file you are dealing with, often including the tool that uses it.  What is cool about it is that you can sort on it and you can filter on the file type.  More on that below.

Date Modified:
Always useful for finding out what files were, or were not created and what the most recent work is.

Location:
Again, not much to say here. This is where your files are.  Sometimes you can tell a bit more about where the file is used by looking at what directory it is in.

Interacting with the Files View

You can do some cool stuff in the Files View. The most obvious, is you can click on the upside down triangles and sort by any of the columns: Ascending or Descending.

image

You can also choose Sort Settings… and specify multiple columns to sort on.

 

image

Just add columns and set the Ascending flag as needed. Delete by clicking the X or Remove All.

Notice how the triangle now shows the columns that are being used to sort.

image

When you are done using the sorting, you can click on any of the columns being used in the sort, and choose Cancel sorting.

If you right mouse button (RMB) on any of the cells, you get two options.  They both do what they say: open the folder that contains the file or bring up the File Type Filter.

image

Note, just because you can open the folder that does not mean you can go messing around with file names and locations. Only do that on files that are not managed by Workbench.

The File Type Filter will list all of your file types and let you turn on or off the visibility of any of them.

image

This can be very useful for a very complicated project.

Some Suggested Uses

So using this tool is not that hard.  A better question than how is why?  Here are some suggestions:

Finding Output Files
Many of the solvers in the ANSYS family create log, error, journal, and output files. Instead of poking around and trying to find them through the operating system, you can quickly use the type filter and maybe sort by Date Modified to find the files you need. Then open up the folder containing them and view the contents.

Extracting a Solve
Sometimes you need to get into the lower levels of the directory structure and get all the files associated with a particular solve so that you can run them outside of workbench, or give them to a user who does not use Workbench.  Using this too, you can quickly sort by directory, find the one you need, then bring up the OS file browser tool.

Managing Macros and Input files
If I’m writing macros or input files, I really don’t want to dig around through directories. So when I’m ready to save my macro, I copy the directory that my solver uses out of the cell in the Files View, then paste it into my text editor’s Save As… dialog.

Making a File Table
Because the information is presented like a spread sheet, you can copy and paste any of the columns you want right into Excel. This comes in handy for reports because you can add a column where you add your own description or notes. To copy hold down the CTRL key and click on the column label of any columns you want.

Get to Know your Files View

We recommend that you use the Files View all the time, not just when you have to. The more familiar you are with the files the program is using the better you will understand what is going on when you use the program. Black boxes are fine and dandy when you are learning or in a hurry, but if you are going to be spending a good chunk of your life alone with one of the ANSYS, Inc. products, you should be spending some time looking at what file are created and where it stores them.

Webinar Info: Getting Started with ANSYS Engineering Knowledge Manager (EKM)

imageLast Thursday (10/25/2012) Clinton Smith gave a well attended webinar sharing his experience getting the Engineering Knowledge Manager (EKM) up and running for him and how he used it on a project. As promised, the slides from that presentation and a link to the recording can be found here:

PDF of Presentation:

The Recording: https://padtincevents.webex.com/padtincevents/lsr.php?AT=pb&SP=EC&rID=5952687&rKey=eefe3ba0d2f0cbc6

Overcoming Convergence Difficulties in ANSYS Workbench Mechanical, Part II: Quick Usage of Mechanical APDL to Plot Distorted Elements

image

In part I if this series, we saw how to use Newton-Raphson residual plots as an aid to vanquishing convergence difficulties in ANSYS Workbench Mechanical.  In part II, we will see how to quickly launch the ANSYS Mechanical APDL user interface to plot elements that have undergone too much distortion, thereby resulting in a convergence failure.  Several problems can cause convergence failures, but one that can be particularly frustrating is elements that have undergone too much distortion.

Currently there isn’t a way to isolate and view elements that have triggered a convergence failure due to too much distortion within the Workbench Mechanical user interface.  Fortunately we have access to the older ANSYS Mechanical APDL interface, which does allow us to select and visualize elements that have undergone too much distortion.  This can be useful in that it tells us exactly where in the model the elements are failing.  Hopefully we can use this information to take corrective action in Mechanical such as making local mesh modifications, adding more details to geometry, etc.

So, how do we do this?  Rather than try to give a lesson on how to use the Mechanical APDL interface, we’re just going to give the commands needed to be clicked with the mouse or typed in.  We’re following the K.I.S.S. principal, meaning Keep It Simple, Silly. 

The procedure to follow includes these steps:

1.  Identify the directory in which our results file resides.

2.  Launch ANSYS Mechanical APDL.

3.  Point to the results file identified in step 1.

4.  Modify the nodal coordinates so they are in the deflected state at the point of convergence failure.

5.  Plot those error-causing elements.

We will now go into more detail using a model that has convergence trouble.  This model solved successfully for the first 4 substeps, but on the 5th substep the solution failed to converge.  We get this error in the solver output (Solution Information):

*** ERROR *** CP = 2872.649 TIME= 16:29:51
One or more elements have become highly distorted. Excessive
distortion of elements is usually a symptom indicating the need for
corrective action elsewhere. Try incrementing the load more slowly
(increase the number of substeps or decrease the time step size). You
may need to improve your mesh to obtain elements with better aspect
ratios. Also consider the behavior of materials, contact pairs,
and/or constraint equations. If this message appears in the first
iteration of first substep, be sure to perform element shape checking.

Looking at the model, we see we have an indenter that is being pressed into a block of material.  The indenter is steel and the block is aluminum.  Both have nonlinear material properties defined.

image

Total deformation for the last converged substep looks like this:

image

The unconverged results show that we have some elements that have large nodal deflections:

image

So, our error message tells us that one or more elements have become highly distorted.  Which elements are they?  The following procedure will show us how to view those for sure, using Mechanical APDL.

Here are each of the 6 steps mentioned above, in detail:

1. Identify the directory in which our results file resides:

We do this from the Workbench window, by clicking on View > Files.  Scroll down in the resulting list of files until you find file.rst, the ANSYS Result file.  The location will be listed in the resulting information, but the text is not selectable.  To make it easier, right click on the file.rst row and select Open Containing Folder. 

image

From the top of the resulting Windows Explorer window, select the folder path and right click > copy. 

image

2. Launch ANSYS Mechanical APDL:

Click Start > All Programs > ANSYS 14.0 > ANSYS Mechanical APDL Product Launcher.  In the resulting window, paste in the directory path in the Working Directory box:

image

Click the Run button at the bottom of the window.  The Mechanical APDL user interface will start. 

3. Point to the results file identified in step 1:

Click on General Postproc on the left, then Data & File Opts.  In the resulting Data and File Options window, click on the […] button below Read single result file:

image

You should see the result file, file.rst, available in the resulting window.  Click on that file, then click Open.  Click OK in the Data and File Options window.

We need to read in one set of results to load the model into the Mechanical APDL database.  Click General Postproc > Read Results > Last Set.

4. Modify the nodal coordinates so they are in the deflected state at the point of convergence failure:

Let’s plot the elements so we can see the model (this will show the elements with nodes in the original, undeflected positions).  We’ll just have you type in the command to make the element plot:  in the input line near the top of the window, type eplot, then return.

image

 

The plot will show in the default “front” view, looking down the global Z axis.  Note that if weak springs are on in Workbench Mechanical, you will see these as line elements pointing away from the model in a few places.

image

The nodal modification is performed in the preprocessor.  Click on the Preprocessor command on the left side of the window.  Type in this command in the input line to modify the nodal positions to those of the unconverged (last set) of results:

upgeom,,,,file,rst

Plot the elements again.  You should now see the deflected nodal positions.

image

Using the view controls over on the right side, we can rotate and zoom in. A short cut is to use the right mouse button to box zoom and Ctrl + Right Mouse Button to rotate the model.  Now we can better see where the deformations are occurring.  We still have all elements selected and plotted, so the next step will be to filter the plot to show the error-causing elements.

image

5.  Plot those error-causing elements:

Shape checking of elements consists of two levels, warning and error.  The solver will not continue if any elements exceed the error level.  Shape checking is discussed in detail in section 13.1 of the Theory Reference in the ANSYS Help.  We have the ability to plot both warning level elements and error level elements, using this procedure:

On the left side of the window, click on Meshing > Check Mesh > Individual Elm > Plot Warning/Error Messages. 

image

With all boxed checked, this is the resulting plot in the front view.  “Good” elements are displayed in blue, “warning” elements in yellow, and “error” or failed elements are shown in red.image

When the elements are very highly distorted, their surfaces can’t always be displayed and it looks like there is a hole in the model.  This won’t always happen depending on how highly distorted the elements are, viewing direction, etc..

image

image

If we uncheck the Good Elements (blue) box, then only the warning and error elements are displayed.

image

image

When you are done viewing the elements, click on the Quit button near the top, and exit without saving to get out of Mechanical APDL.

So what does all this tell us?  For this model, the elements below the indenter body are experiencing too much deformation (red elements).  Some elements in the indenter body are at the warning level but not the error level (yellow elements).  The fix could be to apply the load more gradually (more substeps), refine the mesh at this location, or maybe a combination of both.  In this case we also changed the Workbench Mechanical shape checking from Standard to Aggressive Mechanical.

image

ANSYS Penetration Model

Webinar Info: An Example of Moving Mesh Modeling of a Valve

imageLast week Clinton Smith gave a webinar showing an example of using moving meshes with ANSYS FLUENT.

If you missed the presentation you can view a Recording here.

Or download a PDF of the presentation here:

As always, you can see which webinars are coming up, and view recordings of past webinars at:

padtincevents.webex.com.

Overcoming Convergence Difficulties in ANSYS Workbench Mechanical, Part I: Using Newton-Raphson Residual Information

image

Unable to converge.  Convergence Failure.  Failure to Converge.  Never nice words to see when you are trying to get your simulation done. 

If you’ve encountered convergence failures while running nonlinear structural analyses in ANSYS Workbench Mechanical, this two part series is for you.  What is a convergence failure?  In a nutshell it means that there is too much imbalance in the system.  The calculated reaction forces do not match the applied loads and even though the program tries hard to make changes to overcome the imbalances, it hasn’t been able to do so and stops.  If we look at the Force residuals under Solution Information, we will see that the solver has been unable to get the force convergence residual, or imbalance force, to drop below the current criterion

image

Test model example:  Newton Raphson Convergence Failure; Solution Stops

We won’t spend a lot of time here explaining the Newton-Raphson method, convergence, and residual plots here, since we wrote a Focus article back in 2002 which discusses them in more detail.  The article begins on p. 7 at this link:

/blog/wp-content/uploads/oldblog/archive/PADT_TheFocus_08.pdf

The context of that article was Mechanical APDL, but the article is directly relevant since solving in Workbench Mechanical is done in Mechanical APDL in batch mode. 

In crayon terms, we want the purple line to drop below the blue line.  When it doesn’t and the solver is out of options to keep trying, the solution stops and we get an error message. 

Now what?  The traditional knobs to turn are to increase the number of substeps, decrease contact stiffness if contact is involved, perhaps add more points to the plasticity curve, etc.  But what if something else is the problem?  How can we identify where the problem is?

In this part I article we will discuss how to plot the Newton-Raphson residuals as contour plots to see where in the model the highest force imbalances are located.  Often this is useful information to help us figure out what is going on so we can take corrective action.  First, be aware that we must turn on the Newton-Raphson residual plots prior to solving.  That means you either have to turn them on and re-solve after a convergence failure, knowing that you’ll get the same failure again, or you need to clairvoyantly (or perhaps just prudently) turn on the residuals prior to attempting the initial solve.  Why aren’t they on all the time, you ask?  Most likely because they slow things down just a bit and also require a bit more disk space than otherwise, although if the solution runs to completion no Newton-Raphson residual plots are saved.

Here is how we turn them on.  In the Details view for the Solution Information branch, change the Newton-Raphson Residuals setting from the default of zero to a nonzero number such as 3 or 4.  That will continuously save the last 3 or 4 Newton-Raphson residual plots for viewing as contour plots after the solution has stopped due to a convergence failure.

image

After the solution has stopped, the Newton-Raphson residual plots will be available under the Solution Information branch.

image

The quantity plotted is actually the square root of the sum of the squares of the residuals in the global X, Y, and Z directions.  So, the plots don’t show us direction information, but they do show where the residuals and hence the force imbalances are the largest.  Below is an example.  The region in red shows where the residuals are the highest.  Since this is a model involving contact between two bodies, apparently the contact regions and specifically contact at the corners of the part on the left is the source of our convergence difficulties.

image

Newton-Raphson Residual Force Plot for the last attempted equilibrium iteration.

So, how do we use this information?  In this case we now suspect that the contact regions, especially at the corners of the smaller part, are the problematic areas.  Using this information we made two changes to the model. 

First, we changed the Detection Method for the contact elements from Program Controlled (at the element Gauss points) to Nodal-Normal to Target.  Many times when contact problems involve touching at corners, the robustness of the contact interface can be improved by changing the detection method from Gauss points to nodes.

Second, we reduced the contact stiffness by changing Normal Stiffness from Program Controlled (factor of 1.0) to a Manual setting of 0.2.  Reducing the contact stiffness can help with contact convergence for a lot of problems.  Too low of a stiffness value can cause problems too, but in this case the resulting penetration is still small so a value of 0.2 seems reasonable.  When in doubt, a sensitivity study can be performed whereby you make changes to the contact stiffness value while tracking your results quantities of interest.  As with most inputs you can vary, your results of interest should not be sensitive to contact stiffness.

These two changes allowed our test model to nicely converge for the full amount of load.

image

Other considerations:

The Newton-Raphson Residual plots are always displayed on the original geometry, not the deflected geometry at version 14.0 of ANSYS Mechanical.  If the deflections are large this can make it harder to ascertain what is causing the high residual values.  In those cases, it can be helpful to compare the total deformation and stress plots for the unconverged solution, along with those plots for the last converged solution, with the 1.0 true scale on the deformation active.  This will show the parts in their deflected state, and that can help in determining why the residuals are high at certain locations.

We recommend creating at least 3 residual plots (set in the details of Solution Information as described above).  Sometimes the location of the imbalance can bounce around a bit from equilibrium iteration to equilibrium iteration, so having more than one or two plots to look at can be beneficial in determining problem locations.

Conclusion

Summing it up, the Newton-Raphson residual plots are one piece of information we can use to determine why we are having convergence difficulties.  They can give us an indication of where the convergence difficulties are occurring in the model, and many times we can use that information to help us know what settings should be modified or what other changes should be made to the model to improve the convergence behavior.

In part II of this article, we’ll look at how to quickly use ANSYS Mechanical APDL to view the elements that have undergone too much deformation.