Recommended Free Utilities for the ANSYS User’s Toolbox

free-stuffWhat do you have in your toolbox? The ANSYS suite of tools is pretty comprehensive.  But an efficient user always has a collection of utilities that they use with ANSYS products to automate processes, convert data, and scrub results.  In 2008 we published a list of free and commercial tools that we were using at PADT, and web results show that it is one of our more popular posts. So we thought it was a good time to revisit and update those lists.

We will start with the free tools, well because everyone loves something for free. This is by no means a comprehensive list, these are simply the tools we currently use here at PADT. If you have alternative suggestions, please leave them in a comment.  I tried to put them in some logical grouping, but failed.  So here they are, in no particular order:

untitled python
Scripting Language
www.python.org

Every good simulation user needs scripting.  We spend a lot of time dealing with large amounts of data and setting up all sorts of complicated processes.  Scripting can be used to create, modify, sift through, or translate text versions of our models, loads, and results.  Some users like to stick with APDL and never leave ANSYS, some know Matlab very well.  Others may use newer languages like Lua or older ones like perl.
Here at PADT we have found that python is the best tool for scripting outside of ANSYS MAPDL (we use APDL if we are in the program).  Not only is it easy to learn and use, it has hundreds of free libraries that do almost anything you want. Lots of people know it, and you are not dependent on some other piece of software. Python also works on Linux and Windows. In addition, most CAE tools these days support python scripting.  This is certainly true of the Workbench project page and ANSYS ACT for ANSYS Mechanical. 

Alternatives: perl, Lua, linux shell scripts.

vtk VTK
Visualization Library
www.vtk.org

Did you ever wish there was a toolkit out there that you could use to quickly build a visualization tool?  I know I spent days of my early career writing simple tools from scratch, and spending most of my time on graphics stuff.  Well, VTK is that toolkit.  It consists of C++ class libraries, and includes interpreters for Tcl/Tk, Java, and python.  With python, you can create little applications very quickly without having to know a full object oriented programming language.  The resulting graphics are fast and attractive. If you are going to be writting your own vertical application that works with your FEA or CFD tool, use VTK for the graphics.

paraview ParaView
Visualization Tool
www.paraview.org 

The first time you use ParaView, your response will most likely be OMG. It is a visualization tool written in VTK.  It reads most FEA and CFD formats, along with pretty much any faceted geometry data format.  [Unfortunately it is not reading the current ANSYS ds.dat file that ANSYS mechanical writes (or a cdb file)  I’ll try and submit a bug report. ]  But it does read a CGNS file, which you can export to from Workbench. 

But we don’t use it for working with ANSYS files so much, we have tools for that. We use it to deal with other file formats like STL, NASTRAN, CGNS, ExodusII, etc…  Very handy and intuitive to use. It is also an example of how powerful VTK is.

Alternatives: OpenCascade

notepad  Notepad++
Source Code Editor
notepad-plus-plus.org 

This is a great text editor.  Newer than most, it builds on the dozens of previous text editors out there.  It does syntax highlighting and auto completion for many languages. For ANSYS users, it has a powerful column editing mode, very sophisticated search and replace, and macro recording and playback.  I’m not aware of an APDL syntax highlighter, but you have PeDAL for that. There are a lot of text editors out there, and this one has bubbled to the top as the most popular at PADT.

Alternatives: Notepad, PSPad, TextPad, UltraEdit, and dozens more

vim Vim/GVim
VI Text Editor
www.vim.org 

Some people love VI, the old Unix text editor.  I’m one of those people. I’ve been using VI for over 30 years.  So I have to have a VI editor on my machine and I use it instead of Notepad++ or other text editors. Because I don’t want to touch a mouse, I want to [Esc] jjjj llll .  instead.  Vim is really the only good VI tool out there anymore, and it comes standard on most Linux installs instead of the old Vi.  The windows version works great.

Alternatives: Elvis, Vile, Lemmy

openoffice OpenOffice
Word Processor, Spreadsheet, Slide Shows, Database
www.openoffice.org 

Let’s be honest, MS Office dominates this type of tool. It works, everyone has it, and everyone knows it.  But sometime you don’t want to fork over cash to those guys in Seattle. Or maybe you spend your day on Linux.  OpenOffice is about 90% of what MS Office does, and it is free. It kind of died at Sun when they got bought by Oracle.. Since Apache has taken up the market, it has seen a lot of enhancements.

Many people just think about the word processor, but remember it has a simple drawing tool, an equation editor, a a very good database program.

Alternatives: GoogleDocs, LibreOffice

latex LaTeX
Document Perpetration System
www.latex-project.org 

How do you tell an engineer with an advanced degree from one who just has a BS?  The one with the MS or PhD like LaTeX.

Traditionally the tool of thesis writers, LaTeX has significant utility for the ANSYS user.  It allows you to create nice looking documents by imbedding tags in the document.  A pain when we have WYSIWYG editors, but very useful if you want to use scripting to create a document.  It is also a great way to create very good looking equations and tables.  Think of it as HTML for nice looking documents.

Alternatives: Word Processors

cutepdf CutePDF
PDF Creator/Writer
www.cutepdf.com 

This tool is not as important as it once was, since many programs write to PDF for you. But every once in a while you run across one that does not.  It installs like a printer, so anything program with a print command allows you to save as PDF. 

Alternatives: Adobe Online PDF Creator, PDF reDirect, PDFCreator, and a ton more.

adobe-reader-logo Adobe Reader
PDF Viewer
get.adobe.com/reader 

I almost left this off the list, but to be fair I included this. If you don’t have Acrobat Reader, you must live in a cave.  It is pretty much required to do business in this day and age.

ghostscript

Ghostscript
Ghostview
GSView

PostScript Tools
pages.cs.wissc.edu/~ghost 

Ghostscript is an old Gnu project that contains tools for working with PostScript.  Ghostview is the viewing tool on Linux, although it has been replaced by GV.  GSView is a viewer for Windows.  Look at the website to learn about which tool you should be using.

If you just look at PDF’s, then Adobe Reader is all you need. But if you have an older program that output PostScript directly, or you want to write a tool that create PostScript, then this toolset is for you.

windows-snipping 

Windows Snipping Tool
Screen Capture Tool
en.wikipedia.org/wiki/Snipping_Tool 

This comes with all modern Window’s operating systems.  And, to be honest, this is the one free utility most of us use more than any other.  Who saves images to files any more, we just snip them!  If you don’t have it in your task bar, put it there and get used to using it. 

Your Linux Desktop Environment will have a similar tool: KSnapshot or GNOME Screenshot

camstudio

CamStudio
Screen Capture Tool
camstudio.org 

CamStudio is an open source tool for capturing video and audio off your screen.  Now one may want this to create screen grabs of “Lost in Space” reruns… but what does an ANSYS user need this for.  We use it to make tutorials for other users.  It is a great way to capture what you are doing on your screen for training or to share with co-workers.

Alternatives:  We mostly use commercial tools for this… see the next article.

gimp-logo

GIMP
Image Editing Tools
www.gimp.org 

I hate the name of this product. The politically-correct-Berkley-grad in me finds it very distasteful. But it stands for Gnu Image Manipulation Program.  It is not Adobe PhotoShop, but every release it gets closer. And in some areas it is better. It runs on Linux and Windows, always a plus.  We use it on our Unix machines to crop and clean up images. It can also be used to combine a series of images into an Animated GIF.  It is not bad at deleting backgrounds to make images with transparency for presentations as well.  It also has a fairly good vector creation layer.

We used to recommend a mixture of free tools to deal with image manipulation and editing, but now we feel that GIMP does it all.

Alternatives; ImageMagick, MS Paint

Movie to GIF MovieToAniGif
Make Animated GIF’s from AVI’s
www.evanolds.com/movtogifsimple.html

Everyone uses Microsoft PowerPoint to do presentations, and for most things it works great. But one thing is really sucks at is animations: you have to keep the movie files you are showing in the same directory because you can not embed them.  The simplest solution to this problem is to convert your animations into animated GIF files. Then insert those in your presentation. It also solves the problem of putting animations on your website without using YouTube or Flash.

The tool we use mostly is Move to Animated GIF Converter.  It is old, the last version came out in 2010, but it still works just fine.  Not much to it, point it at an AVI file and then save it as an animated GIF.

Alternatives: There are a bunch of tools out there, we have not used any so can’t really recommend an alternative.

engauge-digitizer Engauge
Converts Images of Graphs into Data
digitizer.sourceforge.net

Have you ever asked someone for material properties and you get a scan of a phototcopy of a book page back?  It happens less these days than it used to but you still sometimes get an image of a graph rather than a spreadsheet file.  Have no fear, Engauge is here!  It takes your image and allows you to identify the axis and the scale, then the data.  With a few clicks you have a table of useful data. 

Alternatives: A ruler.

Gnuplot Gnuplot
Plotting Tool
www.gnuplot.info

Most FEA tools have their own 2D and 3D Graphing options, and of course Excel does a pretty good job. But sometimes you need more, or you want a plotting tool you can script. Gnuplot is that tool. It has been around forever and has about every type of graph imaginable. As a command line based program with its own scripting language, it can be generated by your programs to get the exact plot that you want.

Alternatives: Python’s matplotlib or PyQtGraph, Scilab

scilab Scilab
Numerical Computation Tool
www.scilab.org

We don’t us a lot of Matlab here at PADT, we try and beat it out of new grads when we hire them… no not really.  It is a tool that our younger engineers are used to using.  The problem is it is kind of expensive when you use it every once in a while. Scilab is a nice open source alternative.  It works well and runs on Linux and Windows. 

Alternatives: Julia, Sage.

Remote_desktop_connection_icon

Windows Remote Desktop
Remote Desktop Tool
Built in to Windows Operating Systems

This is another “free” utility that comes with the windows operating system. Strictly speaking, it is not free because you paid for Windows, but it is so important, I thought it it was worth mentioning. 

Accessing your a windows computer remotely was something we can now do all the time, even from a mobile device. And internet connections are fast enough to where you can do real work from a coffee shop, home, or even from an airplane with WiFi. 

More importantly, in March of 2014, Microsoft released apps for iOS, Android, and Mac that work really, really well. We had been using 3rd party apps that were OK, but the new MS apps are great and I log on to my desktop all the time from my iPad and work fairly productively.

vnc

VNC
Remote Desktop Tool
www.tightvnc.com
www.realvnc.com

Remote Desktop works great for Windows boxes.  But if you want to do a remote desktop thing with Linux, or cross platform, we recommend VNC.  There are a ton of VNC tools out there, we seem to use tightVNC, and realVNC.  You need a server on the remote machine, and a viewer on the machine you are using. The viewers are free, not all servers are free.  There are also apps for iOS and Android for VNC viewers.

We recommend using VNC only if you are connecting to a Linux machine from a Windows machine and you don’t want to mess with an X11 server on your Windows Machine (See below for X11 servers for Windows).  VNC does a pixel copy across the network, which is not as fast as X11 or Remote Desktop that send primitives back and forth.

We have not had time to investigate VNC tools like TurboVNC that use VirtualGL and other tools to speed up the sending of the graphics window back and forth. NX (see below) uses VirtualGL

Alternatives: Tons, just google.

NX

NX
Remote X11 Desktop Client and Server
www.nomachine.com

Above we talk about Remote Desktop and VNC as ways to see remote machines.  If you want to see a Linux machine the best free way we have found is to use NX. This is one of those open source tools that is free and not free, and can get confusing.  It works like VNC in that you need a server on your remote machine, and a client on your machine. The client from www.nomachine.com is free.  The server is something you need to load on the remote machine, and probably comes in your Linux distribution. FreeNX seems to be the most popular.

You should get very nice performance for 3D graphics on your internal internet, and not bad over the internet either.  We recomend NX over Cygwin if you don’t need a full unix clone on your windows machine, if you are just logging in to a LInux box, use NX.

(and yes, we hate that the name is the same as the CAD/PLM tool… causes great confusion)

Alternatives: Cygwin, VNC

cygwin cygwin
Linux on Windows
www.cygwin.com

If you need more than visualization on a remote Linux machine from your Windows box, you actually want to run Linux on top of Windows without rebooting or using a virtual machine, then you need cygwin.  It is a fairly full linux distribution that runs on Windows, including full X11 capability.  We don’t recommend it for people who are not Linux savvy, but if you are and you want to work in that environment, then it works very well.

putty putty
ssh Tool
www.putty.org

The best, and most secure, way to connect to a Linux machine is through SSH. If you have NX or cygwin you just open up a terminal and connect. But what if you just want a text connection. Putty is a simple tool that will store your connections and let you log right in and provide you with that terminal.  Better yet, it has an SCP tool (ssh copy) that is very handy for transferring files between machines.

dropbox dropbox
File sharing Tool
www.dropbox.com

There are a ton of “cloud” tools out there that let you load a file up on a server in the sky, backing it up or sharing it with others.  We use Dropbox at PADT for a couple of reasons.  The first is that it is more than a cloud solution, the files you put on Dropbox get copied to all of the computers you have that are connected to your Dropbox.  I keep all the essential files I need every day, and for whatever project I’m working on in a Dropbox folder and I have access to it at home, on my laptop, even on my iPad. 

I also use it to transfer files to other people who don’t know what FTP is.

Alternatives: Box, Copy, GoogleDrive (with Sync)

filezilla filezilla
FTP Tool
www.filezilla-project.org

Real simulation users FTP from the command line… and waste time doing so.  FileZilla is a great tool that uses a GUI to connect to FTP servers and transfer files by dragging and dropping.  It makes finding files, transferring multiple files, and monitoring those big transfers a breeze.

Alternatives: ftp command line, cURL,lftp

7zip 7-Zip
File Compression Tool
www.7-zip.org

This is the most capable windows based compression tool we have found.  For many people the built in compression in Windows is fine, but if you want other options, and the ability to work with formats besides .ZIP ( including TAR, GZIP, RAR, LZH) this is the preferred tool.

Alternatives: windows compression, we have not used any other free tools for this

Encryption

I was going to recommend two tools for encryption: TrueCrypt and PGP.  But it looks like both tools are in flux right now. 

TrueCrypt makes virtual drives as files. When you decrypt them they show up as a drive on your machine. Very handy for achieving any special security concerns you may have.  But in march it was mysteriously shut down. They recommend that you use BitLocker which comes free with Windows.  We have not tried it so we can’t recommend it. Too bad, it was a great tool.  An alternative is PGPDisk, but that costs money or you have to compile it yourself.

PGP encrypts files and had great email plug-ins. It was a nice tools for sending customer data back and forth in a secure way.  It was purchased by a series of companies and ended up sort of becoming static. You can read about it on Wikipedia. The good news is that there is an open source version called PGP, available on www.pgpi.org.  You want the GnuPG version which is free.  There are links here to PGPDisk source code as well.

Bottom line, if you need to encrypt, you might as well pay for a commercial version that is supported.

So, that is all of the tools we could think of, a very diverse list.  Remember, put any other suggestions you have in the comments below.

Slide Rules, Logarithms, and Compute Servers

If any of you have been to PADT’s headquarters in Tempe, Arizona, you probably noticed the giant slide rule in the middle of our building.  You can see a portion of it in the picture below, at the top of our Training, Mentoring, and Support group picture.

PADT-TechSupport-Team-Prop

This thing is huge, over 6 feet (2 m) from side to side, in its un-extended position hanging on the wall.

In theory a gigantic slide rule could provide more accuracy, but our trophy, a Kueffel & Esser model 68 1929 copyrighted 1947 and 1961, was intended for teaching purposes in classrooms.  Most engineers had essentially pocket size or belt holder sized slide rules, also known as slip sticks. 

For the real thing, here is a picture of a slide rule used by Eric Miller’s father Col. BT Miller while at West Point from 1955 to 1958 as well as during his Master’s program in 1964.

Burt-Miller-SlideRule-D2

Why do we care about the slide rule today?  Have you ever seen World War II aircraft, submarines, or aircraft carriers?  These were designed using slide rules and/or logarithms.  The early space program?  Slide rules were used then too.  Some phenomenal engineering was accomplished by our predecessors using these devices.  Back then the numerical operations were just a tool to utilize their engineering knowledge.  Now I think we have a tendency to focus on the numerical due to its ease of use and impressive presentation, while perhaps forgetting or at least de-emphasizing the underlying engineering.  That’s not to say that we don’t have great engineers out there; rather it’s a call to energize you all to remember, consider, and utilize your engineering knowledge as you use your simulation tools.

By contrast, here is a picture of PADT’s brand new server room, with cluster machines being put together in the big cabinets.  Hundreds of cores.

servers

What about the giant slide rule?

My father found a thick book at an estate sale a few months ago.  There are a lot of retirees living in Arizona, so estate sales are quite common and popular.  They occur at a life stage when due to death or the need for assisted living, folks are no longer able to live in their home so the contents are sold, clearing out the home and generating some cash for the family.  This particular estate sale was for a retired engineer.  The book caught my father’s eye, first because it was quite thick and second because the title was, Mechanical Engineers’ Handbook.  Figuring it was a bargain for the amazing price of $1.00, he bought it for me.  This book is better known as Marks’ Handbook.  It’s apparently still in publication, at least as late as the 11th Edition in 2006, but the particular edition my father bought for me is the Fifth Edition from 1951.

marks-handbook

Although the slide rule is mostly a curiosity to us today, in 1951 it was state of the art for numerical computation.  While Marks’ has a couple of paragraphs on “Computing Machines”, described as “electrically driven mechanical desk calculators such as the Marchant, Monroe, or Friden”, the slide rule was what I will call the calculator of choice by mechanical engineers at the beginning of the 2nd half of the 20th century. 

As an aside, these mechanical calculators performed multiplication and division, using what I will describe as incredibly complex mechanisms.  Here is a link to a Wikipedia article on the Marchant Calculator:  http://en.wikipedia.org/wiki/Marchant_Calculator

Marks’ Handbook devotes about 3 pages to the operation of the slide rule, starting with simple multiplication and division and then discussing various methods of utilization and various types of slide rules.  It starts off by stating, “The slide rule is an indispensable aid in all problems in multiplication, division, proportion, squares, square roots, etc., in which a limited degree of accuracy is sufficient.” 

The slide rule operates using logarithms.  If you’re not familiar with using logarithms then you are probably younger than me, since I recall learning them in math class in probably junior high in the late 1970’s.  The slide rule uses common logarithms, meaning the log of a number is the exponent needed to raise a base of 10 to get that number.  For example, the common log of 100 is 2.  The common log table in the 1951 edition of Marks shows us that the common log of 4.44 is 0.6474.  For the sake of completeness, the ‘other’ logarithm is the natural log, meaning the base is the irrational number e, approximated as 2.718.

log-table

Getting back to common (base of 10) logs, the math magic is that logarithms allow for shortcuts in fairly complex computations.  For example, log (ab) = log a + log b.  That means if we want to multiple two fairly complicated numbers, we can simply look up the common log of each and add them together.  Similarly, log (a/b) = log a – log b. 

Here is an example, which I will keep simple.  Let’s say we want to multiple 0.0512 by 0.624.  On a calculator this is simple, but what if you are stranded on a remote island and all you have is a log table?  Knowing the equations above, you can look up the log of 0.0512 which is 0.7093-2 and the log of 0.624 which is 0.7952-1.  We now add:
adding_numbers

Writing that sum as a positive decimal minus an integer is important to being able to look up the antilogarithm or number whose log is 0.5045 – 2.

Looking up the number whose log is 0.5045 we get 3.195, using a little bit of linear interpolation.  The “-2” tells us to shift the decimal point to the left twice, meaning our answer is 0.003195.  Thus, using a little addition, some table lookup, a bit of in the head interpolation, and some knowledge on how to shift decimal points, we fairly easily arrive at the product of two three digit fractional numbers.  Now you are free to look for more coconuts on the island.  Or maybe get back to a hatch in the ground where you need to type in the numbers 4, 8, 14, 16, 23, and 42 every 108 minutes.  Oops, I’m really becoming Lost here…

sliderule-book

Getting back to the slide rule, one way to think of it is a graphical representation of the log tables.  In its most basic form, the slide rule consists of two logarithmic scales.  By lining up the scales, the log values can be added or subtracted.  For example, if we want to multiply something simple, like 4 x 6, we simply look from left to right on the scale on the ‘fixed’ portion of the slide rule to get to 4, then slide the moving portion of the slide so that its 1 lines up with the 4 found above on the fixed portion.  We then move left to right on the movable scale to find the 6.  Where the 6 on the movable slide lines up with on the fixed portion is our solution, 24.  What we’ve really done is add the log of 4 to the log of 6 and then find the antilog of that result, which is 24.  Now that we’ve found 24, we’re not Lost

We don’t intend to give detailed instructions on all phases of performing calculations using slide rules here, but hopefully you get the basics of how it is done.  There are plenty of online resources as well as slide rule apps that provide all sorts of details.  Besides multiplication and division, slide rules can be used for squares and square roots.  There are (were) specialty slide rules for other purposes.  Note that with additional knowledge and skill in visually interpolating on a log scale, up to 3 or even 4 significant digits can be determined depending on the size of the slide rule.

ted-slide-ruleThe author, attempting to prove that 4 x 6 is indeed 24

After having studied the Marks’ section on slide rules, experimenting with a slide rule app on an iPad as well as the PADT behemoth on the wall, I conclude that it was a very elegant method for calculating numbers much more quickly than could be done by traditional pencil and paper.  It’s must faster to add and subtract vs. complicated multiplication and long division.  My high school physics teacher actually spent a day or two teaching us how to use slide rules back in the early 1980’s.  By then they had been made functionally obsolete by scientific calculators, so looking back it was perhaps more about nostalgia than the math needed.  It does help me to appreciate the accomplishments made in science and engineering before the advent of numerical computing.

The preparation of this article has made me wonder what the guys and gals who used these tools proficiently back in the 1930’s, 40’s, and 50’s would think if they had access to the kind of compute power we have available today.  It also makes me wonder what people will think of our current tools 50 or 60 years from now.  When I first started in simulation over 25 years ago, it would have seemed quite a stretch to be able to solve simultaneously on hundreds if not thousands of compute cores as can be done today.  Back then we were happy to get time on the one number cruncher we had that was dedicated to ANSYS simulation.

Incidentally, this article was inspired by my colleague David Mastel’s recent blog entry on numerical simulation and how PADT is helping our customers take compute servers and work stations to the next level:

http://www.padtinc.com/blog/the-focus/launch-leave-forget-hpc-and-it-ansys

If you are ever in our PADT headquarters building in Tempe, don’t forget to look for the giant slide rule.  Now you will know its original purpose.

IGES Can’t Stand IGES Anymore!

Users:

I got some errors when I imported my geometry.
I have some holes and stray surfaces in my geometry.
The edges are twisting around on my geometry import.
ANSYS blows up when I’m trying to mesh my imported geometry.

Me:

What geometry format are you using?

Users:

IGES.

IGEEEEEEESSSSSS!!!

The vast majority of the time, geometry import errors are attributable to the choice of geometry format. And that choice is IGES. To understand the problems with IGES, it helps to know a little bit of IGES history.

IGES, which stands for Initial Graphics Exchange Specification, was released in 1980 as a neutral format for sharing data between CAD systems. The most recent version, 5.3 came out in 1996.

2009_09_21_izzy

IGES: The “Izzy” of geometry formats

Besides being old, there are a few other problems with this format:

  • IGES only contains surface information. When the IGES file is read in, ANSYS has to take the additional step of creating a volume from the region enclosed by the surfaces. The IGES file contains no additional information about how the surfaces should be stitched together, so ANSYS has to figure it out, leading to possible errors, particularly with assemblies.
  • Each CAD application has its own tolerances when exporting to IGES, and loose tolerances are more likely to lead to errors in the ANSYS import.
  • Somewhat related to the previous bullet point, IGES is a middleman between the CAD system and ANSYS, creating two paths for error propagation: Exporting from CAD to the IGES file and importing the IGES file into ANSYS.

Generally speaking, IGES is typically the worst geometry format to import into ANSYS.

Now that I’ve trashed IGES, here is what I recommend:

Native Geometry

ANSYS offers several native geometry readers, such as Connections for Pro/E, NX, Solidworks, SolidEdge, etc. that bring in geometry directly from the CAD modeler. There are two advantages here:

  1. Geometry comes over directly from the CAD tool, therefore no tolerance errors propagating through a neutral geometry format “middleman.”
  2. CAD readers allow for bi-direction associativity between the CAD tool and Workbench, so a Workbench model can be refreshed to reflect updated geometry which still retaining mesh settings, loads, etc. Also, the CAD model can be refreshed based on updated geometry in Workbench.

The only catch when it comes to native geometry readers is that they require a separate license. However, about 90% of the tech support calls I’ve received about IGES import errors are from people who have licenses for native geometry readers and just aren’t using them.

Even if you have a native geometry reader license, you’ll need to be sure to check the box to install the reader during ANSYS installation. You may also need to use the CAD Configuration Manager (found in the Utilities folder in the ANSYS start menu) to configure the CAD reader if you didn’t do so during installation.

The one unfortunate exception to this is CATIA. The CATIA kernel is a bit more guarded than the other CAD kernels, and this is frequently noted in CATIA geometry import errors. Also, you can only import CATIA geometry, not associate to it as with other CAD tools.

Neutral Files That Aren’t IGES

Your ANSYS installation comes with the capabilities to import both IGES and STEP files without having to purchase an additional geometry connection license. Of the two, STEP is typically the better option. There are two reasons for this:

  1. STEP (which stands for “Standard for the Exchange of Product model data,” because these people do not bow down to society’s piddly  rules of acronym construction) contains true 3D volume definitions, instead of having to construct volumes between enclosed surface regions post-import, so the solid model definition ends up being more robust.
  2. STEP was first developed in 1984 and continues to be developed, even as recently as 2011, so export/import errors are regularly addressed, unlike with IGES.

You may also have licenses for Parasolid and/or ACIS readers, which can lead to some confusion as to which format to use. This is easily addressed by considering the underlying geometry kernel for the originating CAD tool*.

I said geometry kernel, not…oh never mind… mmmm… fried chicken….

For example, SolidEdge, NX, and Solidworks all use the Parasolid kernel. Therefore the most robust neutral format for geometry exported from these tools will generally be Parasolid (.x_t or .x_b extension), of course. Likewise, AutoCAD uses the ACIS kernel, indicating that ACIS (.sat file) will usually be the best neutral geometry format in this case. For CAD tools that use neither of these kernels, STEP will typically be the best neutral format.

As you can see, even though the IGES people know how to make acronyms, IGES is typically the last geometry format you want to try when importing or associating geometry to ANSYS. This doesn’t mean that IGES is always the worst option for reading in CAD files (especially compared to the CATIA connection), just that it usually is.

*Hat tip to Robin Steed of ANSYS, Inc. for this tip

why does no1 respon to my request for help (Some Pointers to Students Looking for Help on Forums, Social Media, and Blogs)

xansys.org[Note: I know I misspelled respond… that is the point] As many of you know, PADT hosts a very successful mailing list and forum called XANSYS.org. It is one of the most successful online community help places I have ever seen.  There are a lot of reasons for that success, but the biggest is the moderators and how strongly they enforce rules for those posting.  Especially on using complete sentences, punctuation, showing that you have tried, and fully identifying yourself.

I bring this up because I’ve seen several posts on Facebook and LinkedIn groups for ANSYS users that just don’t get many responses, or don’t get the quality of response that posts on XANSYS get. I thought it might not be a bad idea to make some comments on the subject and share this post on some of those other forums.  Although I’ll focus on the ANSYS community, what is said applies to any community that supports engineering and technology tools.

Show Some Effort 

The thing that posters need to remember is that they are often asking industry experts to take time out of their busy day to help them.  Those experts want to see some effort put in to the question.  It is very important that the requester form the question in proper English, or whatever language the forum uses.  Even if the poster is not a native speaker, an effort needs to be made to use full and complete sentences, even if grammar is a bit off. (I won’t comment about speling, because that is a my weakest area… so I’ll forgive others on that one)

The easiest way to show a lack of respect to the people you want to answer your question is to not use capitalization or punctuation. As someone commented one time on XANSYS

“If you can’t find the time to use a shift key, I don’t have the time to answer your question.”

Do your own Homework/Work 

The most famous “bad post” on XANSYS was something along the lines of:

“i have been told to model a turbine blade in ansys, can someone show me how to do this”

Needless to say, no one helped them.  Before you post a question you need to try and figure things out yourself. Read the manual, search the internet, talk to co-workers. Most importantly, just try it.  Trial and error is a great learning experience. If you can’t get that to work or you still can’t find the information you need, then post your question. But, make sure you let people know what you have already done and tried.

The people who can help you on forums want to help, they don’t want to do your homework or your work for you.

Ask about a Single Item 

The quote above is not just notorious  because it is asking someone to do their work for them, it is also well known because the question is insanely too general.  Questions that are very specific are the ones that are answered the quickest and with the most useful information.  Even if you have lots of questions, break them up – solve one, then try and solve the next.  

Identify Yourself 

Saying who you are and where you go to work or school is huge. It is a professional courtesy that says “I have nothing to hide.”  When you hide your identity, people assume you are trying to get someone else to do your work and that you don’t want your professor or boss to know. Or, more seriously, you could be posting from an embargoed country or using illegal copies of the software. 

Give Back

This is obvious.  Many people who answer a lot of questions also ask a lot of questions. Even if you are new to the tool you are asking about, share what you learned on the thread when you get it all working. And as you get better, go back and answer some other people’s questions. Remember, it is a community.

Learn More

If you want better help from online communities, here are some great links to give you pointers:

The moderators on XANSYS have developed a great set of rules that really work. Follow these and you will do well on almost any site: www.xansys.org/rules.html

A resource that has been around since the dawn of the internet is “How To Ask Questions The Smart Way” by Eric Steven Raymond: www.catb.org/~esr/faqs/smart-questions.html

And the Venerable Guy Kawasaki has a famous post on emails, that has a lot of tips that apply to online posts as well: blog.guykawasaki.com/2006/02/the_effective_e.html 

Check out the posts on Xansys.org/forum.html and CFD-Online . They are both vibrant and intelligent communities with good posts.

“Launch, Leave & Forget” – A Personal Journey of an IT Manager into Numerical Simulation HPC and how PADT is taking Compute Servers & Workstations to the Next Level

fire_and_forget_missileLaunch, Leave & Forget was a phrase that was first introduced in the 1960’s. Basically the US Government was developing missiles that when fired would no longer be needed to be guided or watched by the pilot. The fighter pilot was directing the missile mostly by line of sight and calculated guesswork off to a target in the distance. The pilot often would be shot down or would break away too early from guiding the launch vehicle. Hoping and guess work is not something we strive for when lives are at stake.

So I say all of that to say this. As it relates to virtual prototyping, Launch, Leave & Forget for numerical simulation is something that I have been striving for at PADT, Inc.
Striving internally and for our 1,800 unique customers that really need our help. We are passionate and desire to empower our customers to become comfortable, feel free to be creative and able to step back and let it go! Many of us have a unique and rewarding opportunity to work with customers from the point of design/or even the first to pick up the phone call. Onward to virtual prototyping, product development, Rapid Manufacturing and lastly on to something you can bring into the physical world. A physical prototype that has already gone through 5000 numerical simulations. Unlike the engineers in the 1960’s who would maybe get one, two or three shots at a working prototype. I think it is amazing that a company could go through 5000 different prototypes before finally introducing one into the real world.

clusterAt PADT I continue to look and search for new ways to Launch, Leave & Forget. One passion of mine is computers. I first started using a computer when I was nine years old. I was programming in BASIC creating complex little FOR NEXT statements before I was in seventh grade. Let’s fast forward… so I arrived at PADT in 2005. I was amazed at the small company I had arrived at, creativity and innovation was bouncing off the ceiling at this company. I had never seen anything like it! Humbled on more than one occasion as most of the ANSYS CFD analysts knew as much about computers as I did! No, not the menial IT tasks like networking, domain user creation, backups. What the PADT CFD/FEA Analysts communicated sometimes loudly was that their computers were slow! Humbled again I would retort but you have the fastest machine in the building. How could it be slow?! Your machine here is faster than our webserver in fact this was going to be our new web server. In 2005 then at a stalemate we would walk away both wondering why they solve was so slow! Over the years I would observe numerous issues. I remember spending hours using this ANSYS numerical simulation software. It was new to me and it was complicated! I would often knock on an Analysts door and ask if they had a couple minutes to show me how to run a simulation. Some of the programs I would have to ask two or three times, ANSYS FEA, ANSYS CFX, FLUENT on and on. Often using a round robin approach because I didn’t want to inconvenience the ANSYS Analysts. Probably some early morning around 3am the various ANSYS programs and the hardware, it all clicked with me. I was off and running ANSYS benchmarks on my own! Freedom!! Now I could experiment with the hardware configs. Armed with the ANSYS Fluent, and ANSYS FEA benchmark suites I wanted to make the numerical simulations run as fast or faster than they ever imagined possible! I wanted to please these ANSYS guys, why because I had never met anyone like these guys. I wanted to give them the power they deserved.

“What is the secret sauce or recipe for creating an effective numerical simulation?”

This is a comment that I would hear often. It could be on a conference call with a new customer or internally from our own ANSYS CFD Analysts and/or ANSYS FEA Analysts. “David, all I really care about is When I click ‘Calculate Run’ within ANSYS when is going to complete.” Or “how can we make this solver run faster?”

The secret sauce recipe? Have we signed an NDA yet? Just kidding. I have had the unique opportunity to not just observe ANSYS but other CFD/FEA code running on compute hardware. Learning better ways of optimizing hardware and software. Here is a fairly typical situation of how a typical process for architecting hardware for use with ANSYS software goes.

Getting Involved Early

When the sales guys let me I am often involved at the very beginning of a qualifying lead opportunity. My favorite time to talk to a customer is when a new customer calls me directly at the office.

Nothing but the facts sir!

I have years’ worth of benchmarking data. Do your users have any benchmarking data? Quickly have them run one of the ANSYS standard benchmarks. Just one benchmark can reveal to you a wealth of information about their current IT infrastructure.

Get your IT team onboard early!

This is a huge challenge! In general here are a few roadblocks that smart IT people have in place:

IT MANAGER RULES 101

1) No! talking to sales people
2) No! talking to sales people on the phone
3) No! talking to sales people via email
4) No! talking to sales people at seminars
5) If your boss emails or calls and says “please talk to this sales person @vulture & hawk”. Wait about a week. Then if the boss emails back and says “did you talk to this salesperson yet?” Pick up the phone and call sales rep @vulture & hawk.

it1What is this a joke? Nope, Most IT groups operate like this. Many are under staffed andin constant fix it mode. Most say and think like this. “I would appreciate it if you sat in my chair for one day. My phone constantly rings, so I don’t pick it up or I let it go to voicemail (until the voicemail box files up). Email constantly swoops in so it goes to junk mail. Seminar invites and meet and greets keep coming in – nope won’t go. Ultimately I know you are going to try to sell me something”.

Who have they been talking to? Do they even know what ANSYS is? I have been humbled over the years when it comes to hardware. I seriously believed the fastest web server at that moment in time would make a fast numerical simulation server.

If I can get on the phone with another IT Manager 90% of the time the walls come down and we can talk our own language. What do they say to me? Well I have had IT Managers and Directors tell me they would never buy a compute cluster or compute workstation from me. “Oh well our policy states that only buy from big boy pants Computer, Inc., mom & pop shop #343,” or the best one was ‘the owner’s nephew. He builds computers on the side.”. They stand behind their walls of policy and circumstance. But, at the end of the calls they are normally asking us to send a quote to them.

repair

So, now what?

Well, do you really know your software? Have you spent hours running different hardware configurations of the same workstation? Observing the read/writes of an eight drive 600GB SAS3 15k RPM 12Gbps RAID 0 configuration. Is 3 drives for the OS and 5 drives for the Solving array the best configuration for the hardware and software? Huh? What’s that?? Oh boy…

Color 3D Printing ANSYS ANSYS Mechanical and Mechanical APDL Results

[updated on 6/18/14 with images of an optimized bracket]

When we announced that Stratasys had released a color 3D Printer, I promised that I would figure out a way to get an ANSYS Mechanical or Mechanical APDL solution printed in 3D as soon as possible. Here it is:
3D-Color-FEA-Plot
Pretty cool.  I posted this picture on our social media and it got more retweets-shares-comments-likes-social media at’a boys than anything we have ever posted.  So there is definitely some interest in this. Now that the initial “WOW!” factor is gone, it is time to talk technical details and share how to get a plot made.

Stratasys Objet500 Connex3

There have been some machine around for some time that can print colors. Unfortunately they used a process that deposited a binding agent (fancy name for glue) into a bed of powder. The glue could be died different colors, allowing you to mix three base colors to get a color part. The problem with that technology is that the parts were faded and very fragile. On top of that the machines were messy and hard to run.  

With the Objet500 Connex3 from Stratasys, we now have a machine that makes robust and usable prototypes, that can be printed in color. The device uses inkjet print heads to deposit a photopolymer (a resin that hardens when you shine ultraviolet light on it) one layer at a time. This machine has four print heads: one for support, one for a base material, and two for colored material.   The base material can be black, white, or clear.  Then you can mix two colors in to get a 46 color pallet on a given run.  Download the brochure here for more details on the device, or shoot us an email.

As an example of how to use this technology, we took the results from a modal analysis on a simple low-pressure turbine blade (from a jet engine) and plotted out the deflection results for the 1st, 3rd, and 7th mode. The 7th mode also includes the exaggerated deflected shape.

Turbine-Blade-Modal-s

[Added 6/18/14]  

We recently combined ANSYS and Stratasys products for an optimization test case for a customer. We used Toplogoical optimization to remove chunks of material from an aerospace mounting bracket.  Then we 3D plotted the results to share with the international team looking at using this process to design parts that are lighter because they are not constrained by traditional manufacturing requirements. Here is what the first pass on the part looked like:
TopoOptMount_7

Getting a Printable File 

Almost every Additive Manufacturing machine, from 3D Printers to Manufacturing Systems, use an STL file as the way to define a part to be made.  The file contains triangular facets (a mesh) on the surface. The problem is that this file does not have a standard for defining colors.  The way that we get around this is you make an STL file for each color you want, sort of an STL assembly. Then when you load the files into the machine, you assign colors to each STL object.  That is great if you are printing an assembly and each solid object in you Model is a different color, but gets a bit dicey for a results contour.

So, we need a way to get an STL file for each color contour in your plot.  Right now non of the ANSYS products output an STL file.  Needless to say we have been talking with development about this and we hope there will be a built in solution at the next release.  In the interim, we have developed two methods.

Method 0: Have PADT Print your Part

Before we go over the two methods, we should mention that we offer almost every RP technology as a service to customers, including the new Objet500 Connex3. We have written a tool that converts ANSYS MAPDL models into STL’s that represent color bands.  It comes in two parts, a macro that you run to get the data, and a program we have that turns the data into STL files.

  So the easiest way to get a Color 3D Plot of your results is to:

  1. Download the macro ans2vtk.mac and run it. Instructions are in the header.
  2. Upload the resulting *.vtk file to PADT. Find instructions here.
  3. Email rp@padtinc.com and let us know the name of the file, that you want a Color 3D Print, and what units your part is and scale factor, if any, to apply to your part.  
  4. We will generate a quote.  
  5. You give us a PO or a credit card
  6. We pre-process the part and show you the resulting contours, making sure it is what you want
  7. We print it, then ship it to you.

This is a screen shot of the model in our internal tool:

3d-printing-ansys-results-valve-vtk

Method 0.5: Use the PADT Script

If you own a Connex3 and are not a service provider, we would be happy to share the internal script that we use with you.  You would follow the same process as above, but would run the script yourself to make the STL files. You will need to install some opensource tools as well. Email me to discuss.

Method 1: RST to CFD-Post to Magics 

This is how we did the first sample models, because it works out of the box and required no coding.  To use it you need to have a licence of  ANSYS CFD-Post and Magics from Materialise.  CFD Post outputs a color facet file in the VRML2 format, and Magics can convert that into a bunch of STL file.

NOTE: For this to work you need Magics and your contours need to be pretty simple. A complex part won’t work  because Magics won’t be able to figure out the STL volumes. 

We start by attaching a CFD Post object to our model:

project-page

Open up CFD Post and make a plot you like. If you don’t know ANSYS CFD Post, here is an article we did a while back on how to use it to post ANSYS Mechanical and Mechanical APDL results. 

Set the number of contours to a smaller number. You can have up to 46 colors, but that means you have to make 46 separate STL files by hand. I picked 7 contours, which gives me 6 colors:

plot_in_cfdpost

Now simply go to File > Save Picture and select VRML as your format. Note, it will bury the plot way down in your project directories, so I like to change the path to save it at the top level of the directory:

save-wrl

The next step is to read the file in to Magics.

WRL File in Magics_Color Code

In Magics, you can select facets by color and write each one out as a separate STL file.

Once you have done that, go in to the Objet Studio Software that came with your printer and assign colors to each STL file. We just kind of eyeball the closest color to the original plot:

FEA Objet studio

You can see here that we actually printed 3 at a time, just made copies and we only had to define colors on the original.  Then Print.

Here is what it looks like in the printer when it finished. We ran some other parts next to the three valves:
printing

You’ll notice it looks all yellow. That is the support material. It is water soluble and we just wash it off when the part is done. 

Method 2: Macro for Element Based Contours

That method kind of was a pain, so we decided it would be a good idea to write a little macro in APDL that does the following:

  1. Specify number of colors and value to plot.  (It uses the current selected nodes/elements.)
  2. Select elements by contour range
  3. Create surface elements on those elements
  4. Convert those surface elements in to an STL file for each contour.

The advantage of this approach is that ANSYS MAPDL directly creates the STL files and all you have to do is read that into Objet Studio and assign colors.  The disadvantage is that it is plotting element faces, so if a contour changes across a face, it doesn’t capture it. The way it works now is that the face color is represents the contour color for the lowest value on that face.  Not ideal, but I only had about 3 hours to write something from scratch and that is as far as I got.

This is what it looks like in Objet Studio:

macro-1-in-studio

Here is the macro: mkcolstl_mac.zip

Just run in in MAPDL or put it in ANSYS Mechanical as a post processing command snippet.

3D-plots-table

PADT to Exhibit at NAFEMS Americas Conference 2014

nafems2014

Since this years NAFEMS Americas conference is in PADT’s back yard in Colorado Springs, Colorado, we obtained a booth this year.  Our Colorado simulation team will be there to talk about all things ANSYS, CUBE Simulation Computers, and Flownex.  

If you are gong to be there, stop on by and say hello.  We will be in booth #28.

You can learn more about the conference here: http://www.nafems.org/2014/americas/

Using External Model to Utilize Legacy Mechanical APDL Models in ANSYS Workbench

For many years we’ve been asked, “Can I use my old Mechanical APDL/ANSYS ‘classic’ model in Workbench?”  Up until version 15.0 our answer has been along the lines of, “Uh, not really, unless you can just use the IGES geometry and start over or use FE Modeler to skin the mesh and basically start over.”  Now with version 15.0 of ANSYS there is a new option that makes legacy models more usable in both functionality and level of effort required.

So what is External Model?

  • A new capability at ANSYS 15.0 to use legacy MAPDL models in Workbench
  • Reads the .cdb file (coded database) created from /PREP7 in MAPDL (CDWRITE command)
  • Builds exterior skin geometry from the existing MAPDL mesh
  • Creates solids from the skin geometry
  • Retains the MAPDL mesh
  • May have trouble for complex meshes, although we’ve been impressed in a couple of trials
  • Has limitations on what is transferred into Mechanical  
  • No material properties, loads, or constraints
  • May give you very large surfaces, making it difficult to apply loads on faces, but you can bring in nodal components from Mechanical APDL as Named Selections in Mechanical as an alternative load application method
  • Allows us to apply new BC’s using geometry in Mechanical

Here is a representative Mechanical APDL Model.  It’s a simple static structural run with loads and constraints.

 p1

p2
p3
To use External Model, we’ll need a .cdb file from Mechanical APDL.  If you’re not familiar with using the CDWRITE command, here are the menu picks in the MAPDL Preprocessor:

Preprocessor > Archive Model > Write.  Enter a name for the .cdb (coded database) file being written and click OK.  Don’t worry about the .iges file.

 p4

Next, launch Workbench 15.0 and insert an External Model block from the Toolbox:

 p5
Next right click > Edit or double click on the Setup cell in the External Model block.  Click on the […] button under Location to browse to your .cdb file created in MAPDL.
p6p7
There is a Properties window (View > Properties) in which units can optionally be modified or a coordinate system transformation can be specified.
Next, click on the Workbench Project tab near the top of the Workbench window.  Right click on the Setup cell and choose Update.  You should now have a green check mark next to Setup:
p8
Insert a new (standalone) analysis type to continue your simulation in Mechanical.  Here we inert a Static Structural analysis.  For some reason you can’t drag and drop the new analysis onto the setup cell, so we establish the link in a separate step shown below.p9

Drag and drop the Setup cell under External Model to the Model cell under the new analysis block:
p10

Note that the Model cell Properties contain a Tolerance Angle that can be adjusted to help with exterior skin geometry creation from the MAPDL mesh.  Use this to help control where one skin surface starts and stops based on angles between element faces.

The two blocks are now linked as shown by the blue curve connecting Setup to Model:
p11
Double click the Model cell in the new (Static Structural) analysis block to open the Mechanical editor.  It should create geometry over the existing mesh, which is retained.
p12
p13
Although the mesh comes across, no material properties, loads, or constraints, etc. are retained from the MAPDL model

  • These must be entered separately in Workbench/Mechanical
  • There is no ability to remesh or modify the existing mesh

You can apply (or reapply) loads and constraints directly on geometry, or on nodal components that were defined in MAPDL which become Named Selections in Mechanical:

p14p5

 p14

Solve and postprocess as usual in the Mechanical editor.
p15
In conclusion, ANSYS 15.0 gives us new and enhanced capability for utilizing legacy models, particularly those from MAPDL saved as .cdb file format.  Although not everything is retained, this capability does provide us with additional tools to reuse existing models without having to start from scratch.

ANSYS Acquires SpaceClaim


Big news this morning in the ANSYS world: ANSYS, Inc. has acquired SpaceClaim, makers of a very powerful 3D Solid Modeling tool that has been an add-on for ANSYS products for some time.

Here is the official press release: 

finance.yahoo.com/news/ansys-acquires-spaceclaim-corporation-leading-111400173.html

Here at PADT we have been long time users of the SpaceClaim products, and big fans. This will certainly secure the focus of the SpaceClaim development team on continuing their work on providing simulation users with the tools they need to create, modify, and add intelligence to their geometry.  The debate of DesignModeler vs. SpaceClaim seems to be settled!

This is a great technology fit, and there seem to be some nice business advantages as well.

Still Time to Attend an ANSYS User Group Conference

conference-2014-logoApril is almost over, and you know what that means? It’s time for the ANSYS Convergence Regional Conference to begin.  These free events are held once a year and are an opportunity for the entire spectrum of ANSYS users to get together for one day. Each event is a bit different, but the goal is the same:  Users share presentations on what they have done and the experts from ANSYS, Inc. share what is new and exciting with the products.  

These events are technical in nature, with a general session followed by specific technical tracks.  

conf2And PADT will be at the Santa Clara and Houston events this year, highlighting our services and products and presenting in Santa Clara.

The four US events are:

There are also 12 events in Asia, 12 in Europe, 7 in Latin America, and 7 in  the Africa/Middle East region.
See the full list here.

Remember, it’s free and always educational.  Even in our modern world of blogs, forums, and webinars, it is valuable to just spend some time talking with experts and other users.

PADT is a “Silver Sponsor” so we would love to see you there!

Some Tips on Configuring RSM as a User

rsm1If you’re not familiar with it, RSM is the ANSYS Remote Solve Manager.  In short, it allows you to submit solutions from various ANSYS tools so they can be solved remotely, such as on a compute cluster, remote number cruncher, or perhaps just another computer that isn’t being used very much.  Note that there is no additional licensing or installation is required (other than perhaps ANSYS HPC licensing to take advantage of multiple cores).  RSM is installed automatically when ANSYS is installed; it just needs to be configured to be activated.

According to PC Revive, in version 14.5 and 15.0, there is a nicely documented Setup Wizard that helps with the setup and configuration of RSM on compute servers.  This setup wizard as well as the rest of the RSM documentation in the ANSYS Help does a great job of explaining RSM and what must be done to setup and configure it.  This Focus entry assumes that your crack IT staff has installed RSM on your compute machine(s) and has decided where the Compute Server will be (can be on your local machine or on your ‘number cruncher’ or on a different machine).  So, our focus here is on what needs to be done as a user to send your solutions off to the remote solver using RSM.

As an example, we have RSM 15.0 configured with the Compute Server on a remote computer named cs3a. The first time running RSM, using Start > All Programs > ANSYS 15.0 > Remote Solve Manager > RSM 15.0, we get the window shown here:

rsm2

Notice that it only shows our local machine (My Computer) and nothing about the actual remote computer on which we want to solve.

Therefore, we need to add the information on our cluster node which contains the compute server.

To do this, click on Tools > Options.  This is the resulting window.  Notice the Add button at lower left is grayed out:

rsm3

What it’s waiting for us to do is type in the name of our desired remote computer, like this:

rsm4

Now that a new name has been typed in the Name field, the Add button is active.  After clicking Add, we get this:

rsm5

After clicking OK, we will now see that the new remote computer has been added in the RSM window:

rsm6

The next step is to set your login password for accessing this computer.  Right click on the new hostname in the RSM window in the tree at left, and select Set Password.

rsma

Then enter your network login and password information in the resulting window:

rsmb

If your accounts are fully setup, at this point you can run a test by right clicking on the localhost item in the tree under the remote computer name and selecting Test Server:

rsm7

If the test is successful, you will see that the test job completed with a green checkmark on the folder icon in the upper right portion of the RSM window:

rsm8

If your login is not configured properly, you will likely get an error like this one shown below.  Notice that the upper right portion now states that the job has failed and there is a red X rather than a green checkmark on the folder icon.  By clicking on the job in the upper right panel, we can see the job log in the lower right panel.  In this case, it says that the login failed due to an incorrect password.

rsm9

The fix for the password problem is to ensure that the correct login is being accessed by RSM on the remote computer.  This is done from the RSM window by right clicking on the remote computer name and selecting Accounts.

rsm10

If your account and/or password are different on the remote computer than they are on your local machine, you will need to establish an alternate account so that RSM knows to use the correct login on the remote computer.  Right click on your account in the Accounts pane, and select Add Alternate Account:

rsm11

Enter your username and password for the remote computer in the resulting window.  Next, we need to associate that login with localhost on the remote computer.  This is down by checking the localhost box in the Compute Servers pane, like this:

rsm12

Another problem we have seen is that the user doesn’t have permission for ANSYS to write to the default solve directory on the remote computer.  In that case, the test job log will have an error like this:

rsm13

This fix in this case is to establish a solve directory manually, first by creating one on the remote computer, if needed, and second by specifying that RSM use that directory rather than the default.  The second step is accomplished in the RSM window via right clicking on the localhost item for the remote computer, then selecting Properties.  On the General tab, you should be able to change the Working Directory Location to User Specified, then enter the desired directory location as shown in the image below.  If that option is greyed out, either your password for the remote machine has not been entered correctly, or you are not part of the admin group on the remote computer.  In the case of the latter, either your RSM administrator has to do it for you, or you have to be granted the admin access.

rsm14

At this point, if the test server runs have completed successfully you should be ready to try a real solution using RSM.  We’ll use Mechanical to show how it’s done.  In the Mechanical editor, click on Tools > Solve Process Settings.  Here we will need to specify the remote computer and queue we’ll be using for the solution.  Click on the Add Remote button:

rsm15

In the resulting Rename Solve Process Settings button, type in a name for your remote solve option that makes sense to you.  We called ours RemoteSolve1.  This new option will now show up on the left side of the Solve Process Settings window:

rsm16

The next step is to type in the name of the Solve Manager over on the right side.  In our case, the Solve Manager is on computer cs3a.  Any queues that are available to RSM for this Solve Manager will show in the Queue field, after a brief period of time to make the connection.  In our case, the only queue is a local queue on cs3a.

rsm17

We are now ready to solve our Mechanical model remotely, using RSM.  Instead of clicking the Solve button in Mechanical, we will click on the drop down arrow to the right of the solve button.  From the dropdown, we select the remote solve option we created, RemoteSolve1:

rsm18

Assuming the solution completes with no errors, this job will show up in the RSM window with a status of Finished when it is done.

rsm19

The final step in this case is to download the results from the remote computer back to the client machine.  In the Mechanical editor, this is done by right clicking on the Solution branch and selecting Get Results as shown below.  Also note that you can monitor a nonlinear solution via Solution Information.  You’ll just need to right click during solution to have a snapshot of the nonlinear diagnostics brought back from the remote computer.

rsm20

We hope this helps with the setup and utilization of RSM from a user perspective.  There are other options and applications for RSM that we didn’t discuss, but hopefully this is useful for those needing to get ‘over the hump’ in using RSM.

Getting to know ANSYS – Rigid Body Dynamics (RBD)

This video is an introduction to ANSYS RBD – an add on module to ANSYS Mechanical for analyzing rigid mechanisms.

Pictures and Reflections from PADT’s 20th Anniversary Party

PADt-20-Logo-Rect-500wPADT held our 20th anniversary party at our primary offices in Tempe Arizona on April 10th. Despite the record high temperatures, around 400 people stop by to help us celebrate.  There was good food, good entertainment, and most importantly, good people.  

A highlight of the event is that April 10th was proclaimed PADT day in Tempe!  That was an unexpected honor.  

The only problem was not enough time to talk with everyone.  If you could not make it, no worries. We have several events planned throughout the year.

Here are some images that we captured:

Most of these pictures were taken by Aaron Moncur from PipelineDesign.

#padt20

ACT Extension for a PID Thermostat Controller (PART 2)

(View part one of this series here.)

So, I’ve done a little of this Workbench customization stuff in a past life. My customizations involved lots of Jscript, some APDL, sweat and tears. I literally would bang my head against Eric Miller’s office door jamb wondering (sometimes out loud) what I had done to be picked as the Workbench customization guy. Copious amounts of alcohol on weeknights helped some, but honestly it still royally sucked. Because of these early childhood scars, I’ve cringed at the thought of this ACT thingy until now. I figured I’d been there, done that and I had zero, and I mean zero desire to relive any of it.

So, I resisted ACT even after multiple “suggestions” from upper management that I figure out something to do with it. That was wrong of me; I should have been quicker to given ACT a fair shot. ACT is a whole bunch better than the bad ol’ days of JScript. How is it better? Well, it has documentation… Also, there are multiple helpful folks back at Canonsburg and elsewhere that know a few things about it. This is opposed to the days when just one (brilliant) guy in India named Rajiv Rath had ever done anything of consequence with JScript. (Without him, my previous customization efforts would simply have put me in the mad house. Oh, and he happens to know a thing or two about ACT as well…)

Look Ma! My First ACT Extension!

In this post we are going to rig up the PID thermostat boundary condition as a new boundary condition type in Mechanical. In ACT jargon, this is known as adding a pre-processing feature. I’m going to refer you primarily to the training material and documentation for ACT that you can obtain from the ANSYS website on their customer portal. I strongly suggest you log on to the portal and download the training material for version 15.0 now.

Planning the Extension

When we create an ACT extension we need to lay things out on the file system in a certain manner. At a high level, there are three categories of file system data that we will use to build our extension. These types of data are:

  1. Code. This will be comprised of Python scripts and in our case APDL scripts.
  2. XML. XML files are primarily used for plumbing and for making the rest of the world aware of who we are and what we do.
  3. Resources. These files are typically images, icons, etc… that spice things up a little bit.

Any single extension will use all three of these categories of files, and so organizing this mess becomes priority number one when building the extension. Fortunately, there is a convention that ACT imposes on us to organize the files. The following image depicts the structure graphically.

image

We will call our extension PIDThermostat. Therefore, everywhere ExtensionName appears in the image above, we will replace that with PIDThermostat in our file structure.

Creating a UI for our Load

The beauty of ACT is that it allows us to easily create professional looking user experiences for custom loads and results. Let’s start by creating a user interface for our load that looks like the following:

clip_image004

As you can see in the above user interface, all of the controls and inputs for our little PID controller that we designed in Part 1 of this blog series are present. Before we discuss how we create these user elements, let’s start with a description of what they each mean.

The first item in the UI is named Heat Source/Sink Location. This UI element presents to the user a choice between picking a piece of geometry from the model and specifying a named selection. Internal to the PID controller, this location represents where in the model we will attach the control elements such that they supply or remove energy from this location. ACT provides us two large areas of functionality here. First, it provides a way to graphically pick a geometric item from the model. Second, it provides routines to query the underlying mesh associated with this piece of geometry so that we can reference the nodes or elements in our APDL code. Each of these pieces of functionality is substantial in its size and complexity, yet we get it for free with ACT.

The second control is named Temperature Monitor Location. It functions similarly to the heat source/sink location. It gives the user the ability to specify where on the model the control element should monitor, or sense, the temperature. So, our PID controller will add or remove energy from the heat sink/source location to try to keep the monitor location at the specified set point temperature.

The third control group is named Thermostat Control Properties. This group aggregates the various parameters that control the functionality of the thermostat. That is, the user is allowed to specify gain values, and also what type of control is implemented.

The forth control group is named Thermostat Setpoint Properties. This group allows the user to specify how the setpoint changes with time. An interesting ACT feature is implemented with this control group. Based on the selection that the user makes in the “Setpoint Type” dropdown, a different control is presented below for the thermostat setpoint temperature. When the user selects, “User Specified Setpoint” then a control that provides a tabular input is presented. In this case, the user can directly input a table of temperature vs time data that specifies how the setpoint changes with time. However, if the user specifies “Use Model Entity as Setpoint” then the user is presented a geometry picker similar to the controls above to select a location in the model that will define the setpoint temperature. When this option is selected, the PID controller will function more like a follower element. That is, it will try to cause the monitor location to “follow” another location in the model by adding or removing energy from the heat source/sink location. The offset value allows the user to specify a DC offset that they would like to apply to the setpoint value. Internally, this offset term will be incorporated into the constraint equation averaging method to add in the DC offset.

Finally, the last control group allows the user to visualize plots of computed information regarding the PID controller after the solution is finished. Normally this would be presented in the results branch of the tree; however, the results I would like to present for these elements don’t map cleanly to the results objects in ACT. (At least, I can’t map them cleanly in my mind…) More detail on the results will be presented below.

So, now that we know what the control UI does, let’s look at how to specify it in ACT

Specifying the UI in XML

As mentioned at the beginning, ACT relies on XML to specify the UI for controls. The following XML snippet describes the entire UI.

<extension version=“1” name=“ThermalTools”>

  <guid shortid=“thermaltools”>852acb16-4731-4e91-bd00-b464be02b361</guid>

  <script src=“thermaltools.py” />

 

  <interface context=“Mechanical”>

    <images>images</images>

    <callbacks>

      <oninit>initThermalToolsToolbar</oninit>

    </callbacks>

    <toolbar name=“thermtools” caption=“Thermal Tools”>

      <entry name=“PIDThermostatLoad” icon=“ThermostatGray”

             caption=“PID Thermostat Control”>

        <callbacks>

          <onclick>createPIDThermostatLoad</onclick>

        </callbacks>

      </entry>

    </toolbar>

  </interface>

 

  <simdata context=“Mechanical”>

    <load name=“pidthermostat” version=“1” caption=“PID Thermostat”

    icon=“ThermostatWhite” issupport=“false” isload=“true” color=“#0000FF”>

      <callbacks>

        <getcommands location=“solve”>writePIDThermostatLoad</getcommands>

        <getcommands location=“post”>writePIDThermostatPost</getcommands>

        <onadd>addPIDThermostat</onadd>

        <onremove>removePIDThermostat</onremove>

        <onsuppress>suppressPIDThermostat</onsuppress>

        <onunsuppress>unsuppressPIDThermostat</onunsuppress>

        <canadd>canaddPIDThermostat</canadd>

        <oncleardata>cleardataPIDThermostat</oncleardata>

      </callbacks>

      <property name=“ConnectionGeo”  caption= “Heat Source/Sink Location”

                control=“scoping”>

        <attributes selection_filter=“vertex|edge|face” />

      </property>

      <property name=“MonitorGeo”  caption= “Temperature Monitor Location”

                control=“scoping”>

        <attributes selection_filter=“vertex|edge|face|body” />

      </property>

      <propertygroup name=“ControlProperties” caption=“Thermostat Control Properties”

                     display=“caption”>

        <property name=“ControlType” caption=“Control Type”

                  control=“select” default=“Both Heat Source and Sink”>

          <attributes options=“Heat Source,Heat Sink,Both Heat Source and Sink”/>

        </property>

        <property name=“ProportionalGain” caption=“Proportional Gain”

                  control=“float” default=“0”/>

        <property name=“IntegralGain” caption=“Integral Gain”

                  control=“float” default=“0”/>

        <property name=“DerivativeGain” caption=“Derivative Gain”

                  control=“float” default=“0”/>

      </propertygroup>

      <propertygroup name=“SetpointProperties” caption=“Thermostat Setpoint Properties”

                     display=“caption”>

        <propertygroup name=“SetpointType” display=“property” caption=“Setpoint Type”

                       control=“select” default=“User Specified Setpoint”>

          <attributes options=“User Specified Setpoint,Use Model Entity as Setpoint”/>

          <propertytable name=“SetPointTemp” caption=“Thermostat Set Point Temperature”

                         display=“worksheet” visibleon=“User Specified Setpoint”

                         control=“applycancel” class=“Worksheet.PropertyGroupEditor.PGEditor”>

            <property name=“Time” caption=“Time” unit=“Time” control=“float”></property>

            <property name=“SetPoint” caption=“Set Point Temperature”

                      unit=“Temperature” control=“float”></property>

          </propertytable>

          <property name=“SetpointGeo”  caption= “Setpoint Geometry”

                    visibleon=“Use Model Entity as Setpoint” control=“scoping”>

            <attributes selection_filter=“vertex|edge|face|body” />

          </property>

        </propertygroup>

        <property name=“SetpointOffset” caption=“Offset” control=“float” default=“0”/>

      </propertygroup>

      <propertygroup name=“Results” caption=“Thermostat Results” display=“caption”>

        <property name=“ViewResults” caption=“View Results?” control=“select” default=“No”>

          <attributes options=“Yes,No”/>

          <callbacks>

            <onvalidate>onViewPIDResults</onvalidate>

          </callbacks>

        </property>

      </propertygroup>

    </load>

  </simdata>

</extension>

Describing this in detail would take far longer than I have time for now, so I’m going to direct you to the ACT documentation. The gist of it is fairly simple though. XML provides a structured, hierarchical mechanism for describing the layout of the UI. Nested structures appear as child widgets of their parents. Callbacks are used within ACT to provide the hooks into the UI events so that we can respond to various user interactions. Beyond that, read the docs!! And, hey, before I hear any whining remember that in the old days of Jscript customization there wasn’t any documentation! When I was a Workbench Customization Kid we had to walk uphill, both ways, barefoot, in 8’ of snow for 35 miles… So shut it!

Making the Magic Happen

So, the UI is snazzy and all, but the heavy lifting really happens under the hood. Ultimately, what ACT provides us, when we are creating new BCs for ANSYS, is a clever way to insert APDL commands into the ds.dat input stream. Remember that at its core all Mechanical is, is a glorified APDL generator. I’m sure the developers love me reducing their hard labor to such mundane terms, but it is what it is… So, at the end of the day, our little ACT load objects are nothing more than miniature APDL writers. You thought we were doing something cool…

So, the magic happens when we collect up all of the input data the user specifies in our snazzy UI and turn that into APDL code that implemented the PID controller. This is obviously why I started by developing the APDL code first outside of WB. The APDL code is the true magic. Collecting up the user inputs and writing them to the ds.dat file occurs inside the getcommands callback. If you look closely at the XML code, you will notice two getcommands callbacks. The first one calls a python function named: writePIDThermostatLoad. This callback is scheduled to fire when Mechanical is finished writing all of the standard loads and boundary conditions that it implements natively and is about to write the first APDL solve command. Our commands will end up in the ds.dat file right at this location. I chose this location for the following reason. Our APDL code for the PID thermostat will be generating new element types and new nodes and elements not generated by Workbench. Sometimes workbench implements certain boundary conditions using surface effect element types. So, these native loads and boundary conditions themselves may generate new elements and element types. Workbench knows about those, because it’s generating them directly; however, it has no idea what I might be up to in my PID thermostat load. So, if it were to write additional boundary conditions after my PID load, it very well might reuse some of my element type ids, and even node/element ids. The safer thing to do is to write our APDL code so that it is robust in the presence of an unknown maximum element type/real constant set/node number/etc… Then, we insert it right before the solve command, after WB has written all of its loads and boundary conditions. Thus, the likelihood of id collisions is greatly reduced or eliminated.

Note, too, that ACT provides some utility functions to generate a new element type id and increment the internal counter within Workbench; however, I have found that these functions do not account for loads and boundary conditions. Therefore, in my testing thus far, I haven’t found them safe to use.

The second getcommands callback is setup to fire when Workbench finishes writing all of the solve commands and has moved to the post processing part of the input stream. I chose to implement a graphing functionality for displaying the relevant output data from the PID elements. Thus, I needed to retrieve this data from ANSYS after the solution is complete so that I can present it to the user. I accomplished this by writing a little bit of APDL code to enter /post26 and export all of the data I wish to plot to a CSV file. By specifying this second getcommands callback, I could instruct Workbench to insert the APDL commands after the solve completed.

Viewing the Results

Once the solution has completed, clicking on the “View Results?” dropdown and choosing “Yes” will bring up the following result viewer I implemented for the PID controller. All of the graphing functionality is provided by ACT in an import module called “chart”. This result viewer is simply implemented as a dialog with a single child control that is the ACT chart widget. This widget also allows you to layout multiple charts in a grid, as we have here. As you can see, we can display all of the relevant output data for the controls cleanly and efficiently using ACT! While this can also be accomplished in ANSYS Mechanical APDL, I think we would all agree that the results are far more pleasing visually when implemented in ACT.

clip_image006

Where Do We Go from Here?

Now that I’ve written an ACT module, my next steps are to clean it up and try to make it a little more production ready. Once I’m satisfied with it, I’ll publish it on this blog and on the appropriate ANSYS library. Look for more posts along the way if I uncover additional insights or gotchas with ACT programming. I will leave you with this, however. If you have put off ACT programming you really should reconsider! Being mostly new to ACT, I was able to get this little boundary condition hooked up and functioning in less than a week’s time. Given the way the user interface turned out and the flexibility thus far of the control, I’m quite pleased with that. Without the documentation and general availability of ACT, this effort would have been far more intense. So, try out ACT! You won’t be disappointed.

Getting to know ANSYS – Icepak

As part of our “Getting to know ANSYS” video series, this video is an introduction to ANSYS Icepak – an electronics thermal analysis package in the ANSYS Product Suite.