General Update on the Blog and News

Well, we are now a couple of weeks into this blog experiment and it is going well.  As part of being more "bloggy" and less "newslettery" we are going to stick in little updates and news items like this.

First off, thanks to a few dedicated users who requested a better way to print out the articles. We found a chunk of code that we added in to the templates for the postings and you should now see a "Print" option down in the lower right corner (with Permalink and comments) of each posting.  this brings the posting up in a separate window that is more printer friendly.  Just print this from your browser and you have hard copy.

The next thing we are going to work on are comments.  We had it turned on for about two days when we went live and received some incredible offers to visit sights where we could: 1) increase our "size" in a few weeks, 2) obtain various drugs very cheaply, 3) meet a very nice girl that wants to show off her new webcam, and 4) help the widow of a former Nigerian minister of the interior get some money back from where the a bank is holding it.  So we turned off commenting. We are looking at a couple of open source tools that have spam filters for commenting and will hook up to one of those to get comments working.

In the area of news, we are very happy to report that our last seminar on Geometry Tools in ANSYS, Inc. Products had 145 people signed up and about 90 attendees.  We’ll post upcoming seminars in the right column of this blog, or you can subscribe to receive invites by using the same subscription service that controls your e-mail about this blog.  Click the arrow to the right to manage your subscriptions.

Thanks!

Using the ‘Worksheet’ Page in Mechanical

One of the least used, but most powerful, features within ANSYS Mechanical is the Worksheet page.  In versions older that R12.0, this was accessed by clicking a separate tab on the Graphics Window, at R12.1 it moved to a button on the toolbar. 

What the Worksheet does is show you a tabular summary of a particular branch.  Here’s a quick summary of the ‘big items’ shown for each branch:

Geometry Branch Material, Volume, # Nodes
Coordinate Systems Origin and Axis Data for all coordinate systems
Connections Behavior, Formulation, Stiffness Update
Mesh

Mesh control type, Active/Suppressed Status

Analysis Settings Solution controls for every load step
Solution Element table results available (only for R12 and newer)
Solution Information ANSYS Solver Output window

Here’s a picture showing what it actually looks like:

 

In addition to listing out a large amount of information, you can also sort by any column heading.  You’re probably thinking, “wow, that’s awesome…I can list and sort information about various levels of my model, but how come I can’t edit anything in the worksheet?”  Great question, and this is where the power of ‘Go To’ (see my previous article, err…blog) comes into play.  Simply select the rows that you want to edit, then Right-Mouse-Button > Go To Selected Items.  This will go through and highlight all the corresponding items in the Outline Tree.  Settings can then be changed in the Details Window, and will be propagate to all selected items. 

So let’s say you have a bunch of contact pairs in your model, some of which are defined as being frictional and need to have the same coefficient of friction applied.  Simply click on the ‘Connections’ branch, then select ‘Worksheet’, then select the ‘Type’ column to group all of the frictional pairs together. 

Next, hold down shift and do a flood-selection of all of the frictional pars, RMB > Go To Selected Item. 

Finally, type in the coefficient into the details window.  Done…all frictional contact pairs now have that value defined.

Long story short, by combining the ‘Go To’ capability with the Worksheet view, you can become the feared “über-efficient Voltron of ANSYS Users”.  Well, maybe nothing that cool, but you’ll at least got a lot of work done.

Side note:  According to Wikipedia, Voltron is owned by Sony Pictures Television.  This was a cartoon I remember watching as a kid where a giant robot was formed by connecting five robot lions piloted by the heros of the show.  I even had the toys to go along with the show, and yes, they joined together to form awesomeness in its purest form, I mean, the fists were spring-launched lion heads!!!  It was a sad day when I found that I had lost one of the lions heads…I believe that’s when my childhood officially ended.

ANSYS Mechanical Scripting: HOWTO Part 1

Background

Over the past 10+ years, ANSYS has steadily migrated more and more functionality into the DesignSpace, wait Workbench… no I mean Workbench Simulation or rather now ANSYS Mechanical product line.  If you’ve used ANSYS in the last 5 years you’ve probably come to know this interface as Workbench, and you’ve probably delineated it in your mind as standing in opposition to the old interface, “Classic” or Mechanical APDL.  Perhaps these qualities of each interface come to mind for you as they do for me

Mechanical APDL is:

  1. Old looking and visually clunky.
  2. Quirky, but powerful.
  3. The only thing “real” analyst use.
  4. Scriptable, Scriptable and More Scriptable. 

ANSYS Mechanical is:

  1. Cool, slick looking user interface
  2. Super easy to use when your analysis is supported out-of-the-box.
  3. Great meshing and geometry support.
  4. Not scriptable.

Fortunately for us the margin in capabilities between Mechanical APDL and ANSYS Mechanical is narrowing at each release and so more and more “real” analyst are turning to ANSYS Mechanical for their simulation needs.   However, one glaring difference between the two products that has remained virtually unchanged since the beginning is in the area of scripting.   Mechanical APDL is scriptable at its core.  In fact, that is the only way I personally interact with the program, which I’m sure is true for many of you as well.  ANSYS Mechanical on the other hand appears as though it is just an impenetrable black box.  It does what it does and that is that.  Fortunately, that is only partially true.  The reality is there is a whole underworld that exists in ANSYS Mechanical that is scriptable, it is just very cleverly and discretely hidden.  (i.e. It isn’t documented)  ANSYS, Inc. plans to keep it that way the best I can tell.  However, I’ve spent the last few months of my life painstakingly pulling back the layers and peeking inside.  So, I hope to show you some interesting tidbits I’ve found along the way.

Anatomy of DesignSpace

Why am I going back to calling ANSYS Mechanical DesignSpace?  Well, as you might imagine, developers aren’t quite as flexible as the marketing types, so a lot of the code that is ANSYS Mechanical still carries the moniker DesignSpace, or DS.  You can imagine the mutiny that would occur, if every time a suit got the bright idea to change a product name, all the developers were required to rewrite their code to reflect the new name.  It ain’t happening.

So, what does DS look like on the inside?  Well, the best I can tell it is architected this way:

ApplicationArchitecture

The outer shell (aka the impenetrable black box) is the GUI.  Obviously, this is how the user typically interacts with the program.  However, the GUI itself is not a statically compiled piece of executable code.  It is more like an interpreter that builds itself every time you launch ANSYS Mechanical. (You may be asking yourself, “Self, is this why it takes so bloody long to load…”  Self replies “Perhaps…  BTW, I need more coffee.”)  So, the next logical question is “How does it know what to build?”  I’m glad you asked, because this turns out to be one of the keys to unlocking the black box.  The structure of the ANSYS Mechanical GUI is described in a handful of XML files.  This is important for a couple of reasons:

  1. XML is just text, so you don’t have to put on your binary glasses to read it.
  2. XML has structure. Brains really like structure.

It may seem like I’m getting nowhere fast with this, but hang with me.  Where we are at now is that the structure of the GUI is described by an XML file.  So what that means is that the text associated with all of the menus and buttons in the GUI; whether a GUI entity is a toolbar, or a toolbar button or a menu item; all of that is described textually inside these XML files.  However, a GUI that doesn’t interact with the user is just a G.  How does the UI come into play? 

I’m glad you asked that as well.  The interactive part of the ANSYS Mechanical UI is handled primarily through the use of javascript.  Javascript is an interpreted scripting language that is most popular in the context of web development.  It is text based, i.e. it isn’t compiled.  The way it works is that there is a javascript interpeter built into the ANSYS Mechanical executable.  Almost all of the core functionality of ANSYS Mechanical is implemented as a set of C++ libraries.  These are just great big pieces of code like meshing, or virtual topology, or graphics or geometry selection that expose a set of routines that hook into the javascript interpreter.  All of these functional pieces are then glued together with javascript.  Thus, it turns out that the UI part of the ANSYS Mechanical GUI is just a whole bunch of javascript code juggling all of these big pieces of functionality that are implemented in C++.  It is not completely unlike Mechanical APDL, where a function like ASBW hides a complex surface-to-surface intersection routine followed by a BREP patchup; however, we simply know it as “Divide these areas by the working plane.”   In the same way there are various javascript calls that a script can issue that will insert a new boundary condition, for example. Or, perhaps, change a mesh control and re mesh.

Finally, I’ll leave you with one last piece of the puzzle for this post, then we’ll pick it up with examples in the next post.   You remember that I said that the GUI is cooked up each time using an XML file as the recipe.  Inside that XML file are definitions for javascript functions that are called whenever a user clicks on a button, or selects a menu item.  This provides the link between the static GUI structure and the dynamic user interaction.  This is how we turn the key to unlock the black box.  By searching in the xml file to find a GUI object that does what we want, we can then determine the javascript function that is called when the user interacts with that GUI object.  By finding the javascript function name, we can find the function implementation inside the ANSYS installation directory.  By finding the implementation, we can study it and figure out what it does. 

Stay tuned for the next installment to see this in action.

Learning about blogging

Update: 4:50,

For any of you who are blogging or thinking of it, I just tried out the free tool from Microsoft: Windows Live Writer.  It works very well.  I will try the next couple of articles that way.

– Eric

 

Well, it seems that it is a bad idea to paste from MS Word into the Blog editing tool.  Funny enough, you can view such an entry on Firefox or Chrome, but it doesn’t work on MS Internet Explorer ?!?!

So this wednesday’s post has been fixed with a new version that was pasted as text then formated in the blog editor.  Live and learn.

 

– Eric Miller

FE Modeler Part 1: Translating Meshes with ANSYS FE Modeler

Ever get thrown an old NASTRAN model or been asked to convert your model into ABAQUS? Did you spend hours scouring the internet for a free translator?  Did you know that ANSYS software came with a translator for FLUENT, CFX, ABAQUS, NASTRAN , STL files and a host of other formats?  Well it does and it comes free with most products. It is one of the least known jewels in the ANSYS product family.

FE Modeler is a module developed to handle some of the mesh based capabilities found in Mechanical APDL that don’t really fit into the paradigm of what is now called ANSYS Mechanical.  Over the years it has grown to be a very useful tool for translating models, reviewing meshes, morphing meshes, and even converting meshes into geometry that can be re-meshed.  In this article we will talk about the translators and quality tools and will address the morphing and geometry-from-mesh tools once R13 comes out in November.
The first thing to know is how to get to this useful tool.  On the workbench page, it is in Toolbox under Component Systems with the name Finite Element Modeler.  Figure 1 shows where it is located.

Figure 1:  Location of FE Modeler Tool

There are a couple of ways to use the tool.  The first is to drag it onto a mesh that already exists in your project.  This is the best way to proceed if you meshed with Workbench meshing or a system that uses Workbench Meshing (Mechanical, FLUENT, CFX, etc…). You can also connect it to the Setup block on an ANSYS Mechanical system.  You can of course connect to an FE Modeler system by right clicking on a mesh and choosing “Transfer Too New… -> Finite Element Modeler” Figure 2 shows some examples of what it looks like once you have connected.

Figure 2: Connecting to a Workbench Mesh or Model

If you are not starting with a Workbench related mesh or model, you can still use the tool.  This is the most common method for reading in NASTRAN or ABAQUS meshes.  Simply drag and drop the Finite Element Modeler System to a blank spot on the Project Schematic.  Once there you can specify your input file in one of two ways: double-click on the Model (brute force, take charge, throw caution to the wind approach) or right click on the Model and choose “Add Input Mesh” (take your time, make sure it is right, no risks approach).  And yes, it says “Add” because you can specify multiple meshes, an added bonus. Figure 3 shows an example of what this will look like.

Figure 3: Stand Alone FE Modeler Systems


When you are in the browser dialog you can see the various formats that are supported (Figure 4).  These are also summarized in Table 1:

Figure 4: Input Options

Table 1: Supported Input File Summary

ABAQUS (*.inp) MAPDL (*.cdb)
CFX (*.def, *.res) NASTRAN (*.bdf, *.dat, *.nas)
ANSYS WB Meshes (*.cmdb, *.meshdat) Mechanical (*.dsdb, *.mechdat)
Fluent (*.msh,*.cas) STL (*.stl)
ICEM CFD (*.uns)

Now you have a mesh defined.  The next step is to read it in to FE Modeler.  You can do this by double clicking on the model or RMB->Edit.  The program will now read in your file, and display a nice animated spinning gear to keep you occupied.   The numbers in feedback in the Import Summary (the default view) also update as the file is read.Once in FE Modeler you will see a pretty standard layout for a Workbench application.  The tree on the left, Details view on the lower left, and a graphics window.  To start with Import Summary will be selected in the tree and a description of what was read in is shown.  There is a lot of useful information in this view. Take some time to look at each table and see if it makes sense.  Probably the most important table is Table 4.  It shows feedback from the import.  If the reader ran into any entities it didn’t recognize or any lines it could not read, you will see feedback here.  This is important because there often are not one-to-one mappings between programs so some entities will not read in.  You will be able to see those in this table.  Figure 5 shows the output from reading in a basic test model from a NASTRAN file.


Figure 5: Typical Feedback from Input

Now, if you want to see your model, you can click on other branches in the tree.  The Element Types allows you to view by element topology and Bodies will show the contents of a given file.  You can also interrogate the mesh, selecting nodes, external faces, or elements and viewing their position. Take a look at the icon bar, it is pretty standard for Workbench and everything is self explanatory. You can see mesh metrics by choosing Insert from the menu and then picking Mesh Metrics.  Once it is in the tree, click on it and change the options in the details view.  Figure 6 shows the test model and some quality metrics.

Figure 6: Mesh Metrics

The last step is the best part, writing out in the new format that you want.  Find the “Target System” drop down at the top of the icon bar, and choose from Mechanical APDL, ABAQUS, NASTRAN, and STL.  Then select “Generate Data” in the model tree and the program will create an output file in the format you want.  This can take a while for a large model.

Figure 7: ABAQUS Output

If you are an expert in the program you are writing to, you can check this file out and see what is in there.  If you like what you see, or don’t care and just want your output file, click on the “Write Solver File” button on the top icon bar.  Specify a file name, and you are done.
There is one last important thing to mention. If you want to control your import a little, go back to the project page and click on the model.  RMB and choose “Manage Input Meshes”. This will then bring up the outline for the schematic and you will be able to set options for each file you specified for input. (Figure 8) For most files the only things you can change are units, how to group bodies and how to number things.

Figure 8: Options for Inputting of Files

Nothing too complicated, it does what it does and it does it fast.  To learn more play with it and read the help.  We hope you find this hidden tool as useful as we have in the past.


‘Go To’…like using the LHC to find a needle in a haystack… except you don’t run the risk of creating a black hole that destroys us all.

 

When you couple ANSYS Workbench’s automation features, ease of use, and advances in computer resources, it typically results in some rather large models.  When I first started using ANSYS, I remember fighting tooth and nail to avoid using contact and keep the model size under 200k nodes.  Fast forward to a recent consulting job that included 70 contact regions, 30 kinematic joints, and a total model size around 700k nodes, and I barely batted an eye.

Some problems you run into with models at this size and complexity is figuring out “what am I looking at?”, “what’s connected to this?”, “why is the mesh doing that?”, just to name a few.  The brute force way to figure most of these out is to go through each tree item, one at a time, until the part you’re looking at lights up.  This is probably okay for a single component or small assembly, anything larger and it becomes a daunting task.  Luckily, there’s an easy way around this, simply click the right mouse button (RMB) and select the ‘Go To’ branch.  This will fire up the Large Hadron collider and help you find what you’re looking for (sans the risk of singularities and destruction of all mankind).

The image shown was taken in R12.1 (note that if you’re still using v11 some of these options are not available…time to upgrade!).  While most of these options seem self-explanatory, I get paid for each word I write (just kidding), so here’s a quick summary for all the options shown:

Corresponding Bodies in Tree Highlights selected body in geometry branch – allows you to change material properties of selected parts, note that you can have a vertex, line, area, or body selected…either way it’ll bring you to the ‘parent’ body
Bodies Without Contacts in Tree  Regardless of what’s currently selected, it will highlight all bodies in the geometry branch that do not have a contact pair – handy for chasing down the ‘max DOF incremenet’ error caused by an unconstrained body
 Contacts for Selected Bodies  Selects all contacts for the selected body – first place I check when I get odd stress results on my parts, typically because of an ‘accidental’ contact pair
 Contacts Common to Selected Bodies Selects only contact pairs between selected parts – Note that you must have >1 part selected or this won’t work, nice way of figuring out how two parts are connected
 Joints for Selected Bodies Similiar to ‘Contacts for Selected’, only with kinematic joints
Joints Common to Selected Bodies Similiar to ‘Contacts Common to…’, only with kinematic joints – again a very nice feature to figure out how two parts are connected
 Springs for Selected Bodies  Similiar to the ‘Contacts for…’ or ‘Joints for…’, only you guessed it, will show user-defined springs that attach to the body
 Mesh Controls for Selected Bodies Shows all mesh controls for the body currently selected – nice for answering the question “why is the mesh doing that?” type of issues

As noted in the description list, it does not matter what part of the body you have selected when you use the ‘Go To’ feature.  You can have a vertex, line, area, or the entire body highlighted.  ANSYS Mechanical understands what your selection belongs to, and takes you to the appropriate item.  So let’s say you have 5 different components that you need to change the material properties for.  Highlight a face on each body, RMB > Go To > Corresponding Bodies in Tree, then make the material change in the Details Window.  The change will be applied to all selected bodies.

The ‘Go To’ functionality is also available within ANSYS DesignModeler, the CAD creation/simplification/modification/etc moduls within Workbench.

Within DesignModeler, you have two options:

Go To Feature Takes you to where the selected feature (vertex, line, area, body) was created, handy in finding out where a surface patch or ‘stranded’ line was created
Go To Body Takes you to the body within the parts-list at the bottom of the tree window, helpful in assigning thicknesses to surface bodies or renaming parts

As noted above, I use the ‘Go To Feature’ to identify where surface patches or stranded lines (line imprinted through part of an area) come from.  Depending on the body status (active or frozen) and the filtering used for certain operations, you can accidentally create imprints in unintended regions (the new ‘Projection’ tool, available in R12, is a big help in preventing this because it doesn’t ‘care’ if a body is active or frozen).

Using the picture above, if I wanted to figure out where that circular area came from, I would select it > RMB > Go To Feature and it would highlight this operation in the model tree:

In the Details Window I would see that this Body Operation was set to ‘Imprint Faces’.

So, to summarize, there is no need to go blind and suffer from carpal tunnel when trying to find out details of your model.  Just remember the ‘Go To’ function!

As a side note, I realize that the likelihood of the LHC producing a black hole capable of destroying the universe is extremely small.  Any black holes that could be generated would be short lived, and require so little negative mass to neutralize that we need not worry.

10 Things Every ANSYS Mechanical APDL (MAPDL) User Should Know:

Providing tech support to users of Mechanical APDL gives us a wide exposure to a varied set of users.  And through the years we have discovered that there are some simple, basic, but important things every MAPDL users needs to know.  The ten most important things every user shoudl know are:

1.    /SHOW,3D
2.    /EFACET,2
3.    Picking window reset button
4.    Hot Spots for Picking and Press and Hold
5.    Displaying More than 9 Results Contours
6.    CNCHECK
7.    Copy and Paste into Input Window
8.    /EOF for Input File Debugging
9.    Use the Log File
10.   Making Results Plot Files

/SHOW,3D

This command tells ANSYS Mechanical APDL to use your computer’s video card to control dynamic rotations of your model, rather than use software to rotate the model.  The big difference is that you’ll see a shaded image of your model during dynamic manipulation of the view, rather than shaded > wireframe while rotating > shaded.  For some users, switching to this option is like getting a color TV after years of watching just black and white.

To active this option from the Mechanical APDL Product Launcher, go to the Customization/Preferences Tab and change the Graphics Device Name to 3D.
If you are running ANSYS from the command line, you can use the –d 3D option after the ANSYS executable specification.

/EFACET,2

If you are running with mid-side noded elements, you’ll most likely want to include results for the midside nodes, and also make results plots which include any curvature of the element edges.  The default, however, is to not include midside noded results in listings or plots and to only give one facet per element edge in results plots.  The fix for that is to set the number of facets to 2 (or even 4) on the /EFACET command.  Note that Powergraphics needs to be on for this to work.

Picking Window Reset Button

If you have spent a lot of time working interactively in ANSYS Mechanical APDL, you have probably encountered the scenario in which you click on a command that is supposed to activate a picking window, but no picking window shows up.  No matter how many times you click on the command, you won’t get the needed picking window.  My understanding is this is due to a glitch in the Tcl/Tk GUI language used by ANSYS, Inc. to create the Mechanical APDL user interface.  Earlier versions had a fix implemented which was somewhat primitive:  while in the ANSYS session, simultaneously press Control-Shift-Delete.  This would reset the picking window so we could click on the desired command again and successfully get the needed picking window.  The last couple of releases of ANSYS have had an improvement over that, namely the Reset Picking button.  This button resides near the upper right corner of the user interface, in between the Raised Hidden “Cheese Sandwich” button and the Contact Manager button.

Hot Spots for Picking and Press and Hold

This is really two things, but they are closely related so we’ll consider them as one.  Have you  ever have trouble using the mouse to pick the entity you want?  You click where you think you’ll be picking the desired entity but some other entity gets highlighted.  If this happens a lot, you’re probably not familiar with how ANSYS uses Hot Spots for picking, nor with the Press and Hold left mouse button behavior.

First we’ll discuss hot spots, which are locations on each geometric entity.  Areas and volumes each have one hot spot, at or very near the centroid.  Lines have three hot spots, one at the middle of the line and one close to each end.  When you click a location in the graphics window to select an entity, the entity which has a hot spot closest to the picking location is the one which gets picked.  Note that hot spots can be outside of an entity (think of an annulus, for example).  That means you might click on an entity, but another entity might have its hot spot closer to where you clicked, so that’s the one the is selected.  Thinking about where hot spots are can assist greatly in selecting the entities we want.

Second, another useful tool for ensuring we actually pick entities we want is to press and hold the left mouse button while picking.  If you press and hold, the entity that’s going to be picked will be highlighted.  If you press and hold and drag the mouse around in the screen, different entities can be highlighted, the idea being you press, hold, and drag until the desired entity is highlighted.  You then release the left mouse button and that entity is now picked.

Displaying More Than 9 Results Contours

By default results plots in /POST1 have 9 color contours.  Sometimes we want more.  If you are using the Win32 or X11 graphics drivers, you can obtain up to 14 color contours by issuing

/show,win32c,,,8  !or /show,x11c,,,8
/contour,,14,auto

Note that if you are using the 3D graphics driver (see above), you can display up to 128 color contours using the same /contour command.  There are other useful options on this command so check the ANSYS help for more info.

CNCHECK

What did we do before CNCHECK?

We attempted a lot more contact debugging solves than are needed today, that’s for sure.  CNCHECK can be used to interrogate one or more contact pairs prior to solving to help us ensure that contact regions are setup appropriately.  Not only does it tell us which contact and target element sets are associated with each other, but it lists all of the ‘calculated’ settings such as the actual value of contact stiffness, penetration tolerance, etc.  If there is an initial gap, it will tell us the gap distance.  If a contact region is supposed to be initially touching but isn’t, CNCHECK will tell us.  We can then hopefully take corrective action before we start the solution.  This can be a huge timesaver.  CNCHECK has other useful capabilities, all discussed in the Help.

Copy and Paste into Input Window

If you work with ANSYS MAPDL commands a lot, you are hopefully familiar with copying commands from a text file or from an editor (PADT’s PeDal editor specifically created for ANSYS input files comes to mind) and pasting them into the ANSYS command window.  ANSYS, Inc. tells us this is not a supported feature, but we at PADT and other users have been doing this for years and it works great.  Whether you are building an input file to automate your process or just checking out a few commands from the Help, you can copy the desired command lines and paste them into the input window.  You then click the Enter key and all of those commands will be executed within ANSYS, in sequence from first to last.  Try it.

/EOF for Input File Debugging

If you routinely build ANSYS MAPDL input files or are just starting to work with them, you should be aware of the /EOF command.  You can place that anywhere in your file and the input will stop being read at that location.  If you have 2000 lines of APDL code and just want to debug the first 20 by reading only those lines in, you just place the line /EOF after those first 20 lines of code, save the file, and read it in.  The remaining 1980 lines will be ignored and you can easily verify the action of those first 20 commands.  You can then delete the /EOF command and place a new one farther down to work in the next section.  Hopefully you now see the value of /EOF.

Use the Log File

The log file (jobname.log) is a running list of all the MAPDL commands you have executed in your current ANSYS session.  It doesn’t matter if you typed them in, pasted them in, or used the GUI, they are there in the log file, sequentially from top to bottom.  Further, if you have multiple ANSYS MAPDL sessions in the same working directory using the same jobname, you’ll have a multiple-session history in your log file, each with its own time and date stamp.

How is this useful?  If you find yourself repeating your steps over and over, you should consider automating those steps using an input file.  An easy way to create an input file is to edit the log file, extract the portion you want to automate, save that into a new file, and perhaps do some further editing to get it to be robust and tailored to your specific application.  How to do all that is beyond the scope of this article (see our APDL training classes at www.padtinc.com/support/training), but a quick set of instructions is to execute a command once using the GUI, then view the bottom of the log file to see how it was used.  Combine that with the ANSYS Help and you are off and running in building your own MAPDL input files.

Making Results Plot Files

A quick way to make a result plot file is to get the plot and view setup the way you want on the screen, then click on Plotters > Hard Copy > To File.  There are several plot file formats available, such as .jpg and .png.  This command will automatically ‘reverse video’ meaning you get black text on a white background in your plot file.  There are other techniques for getting results plots into plot files, but this is a quick and easy way that you will hopefully find helpful.

—That’s 10!

 

Welcome to the New “The Focus”

In January of 2002, Rod Scholl did what a lot of people talk about doing but never actually do.  He published a newsletter for ANSYS users.  Called “The Focus” it was created with a very simple concept: users want a consistent and frequent publication with short, useful articles that will help them use ANSYS better. Tips and Tricks on a regular basis.  Short and to the point was the main purpose, which is why it was called The Focus.  The second concept was also evident in the fact that “The Focus” masthead was a blurred image. We wanted this publication to be fun and poke fun at itself, PADT, and nerds, we mean ANSYS users, in general.

Since then we have published 74 unique issues.  That is 93 months since that first issue, and with 74 issues we met our goal of being almost monthly! Rod really deserves a lot of credit for making sure that we did not do what most companies do when they start a newsletter – put out a few issues then get too busy to continue and let it die.  As of today, we have just over 1,950 registered subscribers, and there is no way to tell how many users around the world access the archives without subscribing. 

But, as time went by we started to make bigger and fancier issues, and took longer and longer between publishings.  We moved to a PDF file that looked fancy but took a lot of time to lay out and publish.  We basically drifted away from that initial concept of short, useful articles that come out often.  We also started feeling like dinosaurs in that we were using a “magazine like” format.  It was time to go 2002 and move to a blog instead of a newsletter.  And here it is, welcome.

The switch has one thing that bothers us.  We now publish articles one at a time, shooting for four a month, hopefully resulting in one a week.  This is great for users but we can no longer number issues.  So there will be no Issue 75, which is sad. Instead, we will count years. The Focus is almost 8 years old now, maybe our grand children will be around for the 75th year?

We have published our first technical article with this welcome.  All 74 previous issues are also available as linked PDF files, so you can search from this site.  If you are a subscriber, you will continue to get e-mails for a while, but we will be moving to RSS feeds (use the subscribe button at the top of this page) or the Newsletter function on this blog.

Thank you to everyone that has passed along their good wishes to us over the years, that is what keeps us going.  And thank you to everyone at PADT who has contributed to this publication and who will contribute in the future.

We hope you all continue to find it useful.

 – PADT’s Technical Support Staff

 


Banishing the Bad Geometry Blues with Design Modeler

(NOTE: This article is a reprint from the final PDF version of The Focus, Issue 74.  We used it to prove out the new blog format.)

We have all been there before.  You are poised in front of your computer, you just read in your geometry and you throw on a quick mesh to see what you have and how much effort this will take.  Next thing you know you are getting errors or red lines are showing up on your geometry.  You got bad geometry and now you need to clean it up.

There are a lot of options available including: 1) going back to the original CAD and fixing that, 2) using a repair tool like CADFix, 3) using some intermediate geometry tool that is good at repair like SpaceClaim or IronCAE, or 4) meshing in ICEM CFD which is much more forgiving with bad geometry.  All of these work and may be the way you have dealt with this situation in the past.  But you should also be aware that ANSYS DesignModeler has an array of tools purpose build to help you solve this problem.

The first things to try are the options when you read your geometry in to DesignModeler.  Figure 1 shows the appropriate details view.

Figure 1: Import Options

You can have the program simplify geometry, simplify topology, heal the body or clean the body.  It can also try and replace any missing geometry.  By the way, the options available change based upon where your geometry came from so if you do not see all of them, that is normal. Heal geometry is on by default, as is clean.  Sometimes you may not want them on.  Play with simplifying as well.  Sometimes modifying these options can clean everything up.

If the automatic stuff does not work , it is time to look at the tools available to you in DM.  The first to look at is the “Small Entity Search” Just as the name implies, it goes out and identifies where you have small entities and gives you their size.  You access the command a little differently in that it is not something you insert into the tree.  Go to Tools > Analysis Tools > Small Entity Search. This will bring up the Details View shown in Figure 2.

Figure 2: Small Entities

Pick one or more bodies you want checked and set the options, although the defaults are usually good.  Then, this is the strange part, change the option next to “Go!” to “Yes” It will do the search and present the results down below.  Click on any item listed and you will be able to see it on the screen.  This should help you understand where you might have problems before you go in and start fixing things.

Our favorite repair tool in DM is the Merge tool.  It takes edges or surfaces that are connected without any sharp corners and merges them into new smooth entities.  Figure 3 shows a typical example for edges and Figure 4 shows the same for surfaces. 

Figure 3: Merge Edges

Figure 4: Merge Faces

You can do an automatic merge or pick entities that you want merged.  The automatic is a great way to get rid of small slivers without having to hunt them down.  This tool is also useful for simplifying your geometry in order to get a better mesh.  Figure 5 shows how you can really clean up a fillet and the suction side of a turbine blade. 

Figure 5: Merge Faces Ceanup

Sometimes you just want to de-feature your model by deleting holes, fillets, bosses, etc…  You can do most of that with the Edge and Face Delete commands.  They can be found under Tools and they work as you would expect. You simple identify the face or edge you want removed and the program takes it out and heals the solid.  Figures 6 through 8 show examples.  We find that this is the most efficient and controlled way to disfeature a model and get rid of tiny geometry that is causing issues.

Figure 6: Delete Faces to Remove Fillets

Figure 7: Remove Edges

Figure 8: Remove Faces to Remove Features

If, after using the tools mentioned above, you still have the bad geometry blues you can get down and dirty with a set of repair tools that address the most common  issues.  They can all be found under Tools-> Repair.  The names are pretty self-explanatory.  There are tools for removing slivers, spikes, small edges, small faces, seams, holes, and sharp angled surfaces.  Most of them work the same way – you can specify a size and any features under that size get cleaned, or you can pick on geometry. The remaining figures show examples of the various options.

Figure 9: Repair Tools

One small side note before we finish, most of the options available in the menu can be displayed as icons in the tool bars if you go to Tools->Options->Toolbars. If you are doing a lot of repairs, we recommend that you add the tools you are using to the toolbars.  Another important thing that users should know is that you can repair geometry and save it as an ANSYS ANF file, the native file format for ANSYS Mechanical APDL. So even if you are not meshing and pre-processing in Workbench, you can still use this tool to clean up your geometry.
After spending years repairing bad geometry we are thrilled to have these tools in our main software product, removing the need to jump out to other programs.  Taking the time to learn these tools, when they work and when they don’t and understanding their options has paid off in chasing away our bad geometry blues.

The Focus Newsletter Archive Issue 74

PADT_TheFocus_74.pdf

  • Maximizing the ROI on your CAE Investment
  • Modeling Cracks with ANSYS – Part 2
  • Thin Sweep: Sweeping Away Sweep Mesh Restrictions
  • Banishing the Bad Geometry Blues with Design Modeler

The Focus Newsletter Archive Issue 73

PADT_TheFocus_73.pdf

  • ACP: Realistic Composite Models Without the Sparkly Costume
  • Modeling Cracks with ANSYS
  • Going “Over the Top” with Joint Simulation in ANSYS Mechanical
  • Passing Entity Attributes from NX to ANSYS MAPDL

NOTE: The Zip file for the article on crack modeling can be found here: http://www.padtinc.com/blog/wp-content/uploads/oldblog/focus%20crack%20article.zip

 

 

The Focus Newsletter Archive Issue 72

PADT_TheFocus_72.pdf

  • Jet Tour Release 12.1
  • Exploring the New Immersed Boundary Solver in ANSYS FLUENT
  • Modeling Cyclic Symmetry in ANSYS Mechanical R12.1
  • The Workbench is Flat: Using the Parametric Manager
  • PeDAL: The Editor for ANSYS APDL Users

The Focus Newsletter Archive Issue 71

PADT_TheFocus_71.pdf

  • What’s New in Workbench Meshing
  • Implementing Fluid Pressure Penetration
  • Announcing PADT’s First Web Based Class: Workbench Mechanical
  • PeDAL: The APDL Editor
  • Faster Fourier! Kill! Kill!
  • The Top 10 Most Important New Features in Workbench 12.0

The Focus Newsletter Archive Issue 70

PADT_TheFocus_70.pdf

  • Changing Name with Release 12
  • The Top 10 Most Important Features in ANSYS Mechanical APDL R12.0
  • Getting to Know R12 Licensing
  • Navigating the WB 2.0 Project Schematic

The Focus Newsletter Archive Issue 69

PADT_TheFocus_69.pdf

  • Face/Off: Finally Having Fun with Slivers
  • Shell-Solid: Further Studies
  • Shell-Solid: A Further Further Look
  • Commerical Software Tools
  • Accessing Table Array Indices
  • Awesome APDL: Material Property Contour Plots