Webinar Info: Writing and Compiling a Custom Material Property in ANSYS Mechanical APDL

imageDuring our webinar held at noon on 9/27/2012 we promised to provide a link to the recording, a PDF of the PowerPoint, and some answers to a few questions.  Here is that information:


Presentation PDF is here:

Zip file with the sample USERMAT.f and input file:


imageState Variables

I was a bit confusing on state variables. The problem is with my use of them, not with the variables.  The test model only had one integration point.  My code is still not working right, the default USERMAT is overwriting my flag somewhere and I don’t have time to figure it out. It’s killing me but I have to do some real work.

But anyhow, my assertion that the state variables are per integration point is correct.


I am not aware of any way to use a debugger with ANSYS.  There is nothing in the documentation, and to be honest, I’ve not used a real debugger in years.  So there may be a way to do so, and see your routine in the debugger since you have the source code, but I have no idea on how to do that.  Perhaps someone with more debugging experience can comment below.

Other UPF’s

Someone asked about other routines that are available and we ran out of time before I could go over them.  Here is a list.

UserElem.f User Defined Element that use newer API
UEL100.f – UEL105.f
UEC100.f – UEC105.f
UEX100.f – UEX105.f
User elements defined that access the program database directly
USEROU.f Stores user-provided element output
USERAN.f Modify orientation of material properties
USERRC.f COMBIN37 (control/thermostat/spring/damper/resistor) user routine.
UEIMatx.f Access to an elements matrix or load vector
UTHICK.f Sets thickness at integration points
UsrFictive Sets “fictive” temperature (I have no idea what that is)
UFLEX.f Calculates pipe flexibility for PIPE288/289
UsrShift.f Allows user to specify time shift
UserMat.f User material models
UserHyper.f User defined hyperelasticity models
UserCreep.f User defined creep model
user_tbelastic.f Allows definition of elastic stiffness at a given integration point based on user model.  TB,ELASTIC,,,,USER
USERFC.f User defined failure criteria
USERSWTRAIN.f User defined swelling, for TB, SWELL,,,,USER
USERCK.f Helper routine that passes material properties for a user material in
USERFRIC.f User defined friction calculation.  Not just friction but all values calculated in contact calculations with friction turned on.
USERFL.f Changes scalar field values (temp, fluence, heat generation, moisture content, magnetic virtual displacement), by element.
USERPR.f Calculates element pressure, by element
USERCV.f Calculates element face convection.
USERFX.f Calculates element face heat flux
USERCH.f Calculates element face charge density surface values
USERFD.f Computes complex load vectors for frequency domain logic
USERPE.f Calculate the rotation of an elbow pipe element caused by internal pressure
Modifies the conduction, film coefficient, bulk temp for SURF151/152
userPartVelAcc.f Ocean wave particle acceleration calculation for PIPE288/289
userPanelHydFor.f Calcs hydrodynamic loading on SURF164 from ocean loading
USER Commands
USER01.f-USER10.f Create your own ANSYS commands that are accessed through /UCMD,cmd,num where num refers to the subroutine number and cmd is the command name you want to assign it. Put this in your startxx.ans file to give regular access.

Other Stuff Every User Should Know about Tables in ANSYS Mechanical APDL: Nesting and 4 or 5 Dimension Tables

complicated table design

About a month ago we published an article on “What Every User Should Know About Tables in ANSYS Mechanical APDL”  At the end of that article we had a section on “Other Stuff”  and expressed our hope to cover those subjects in the future. The future is now.  If you are not very familiar with table arrays, make sure you review the previous article before delving into nesting and 4/5 dimension tables in this article. 

By the way, the funky table at the end of the article got a lot of good feedback, so I’ve googled around and found some other interesting tables. The one here at the top is what you get if you google “complicated table”

Nested Tables

As you will remember from memorizing the previous article, a common use for tables is the set them up to give you a value for a given “primary variable” that is determined by the solver at a given point in the solution.  Possible primary variables are: TIME, FREQ, X, Y, Z, TEMP, VELOCITY, PRESSURE and SECTOR. But what if you want to use one of those primary variables to look up a value, then use that value to then interpolate a second value?

A good example is that you have a piece of rotating equipment and the value of the heat transfer coefficient (HF) is a function of RPM and the radius of a given element face.  But RPM varies over time.  What you can do is make the HF table point to and RPM table that is based on the primary variable time:

mycnv(1,1) = .25,4,10
mycnv(1,2) = .35,7,15
mycnv(1,3) = .45,10,28


wrttbl, 'rpm','foo5.txt'


This macro is missing stuff, like a model and selecting the nodes to apply the SF command to.

The tables look like this:

Table: mycnv    RPM      vs X       

| 0.000 1.000 2.000
0.000 |0.2500 0.3500 0.4500
1000. | 4.000 7.000 10.00
0.2001E+08| 10.00 15.00 28.00


Table: rpm      TIME     vs         

0.000 | 0.000
10.00 | 5.000
40.00 | 20.00
60.00 | 30.00

(We’ll cover the wrttbl macro below.)

So at a given substep, the program will take time and figure out what RPM needs to be.  Then it will use RPM and the radius (X in CSYS 1) to figure out the convection coefficient for each node.

As you can imagine, you can get pretty sophisticated with this. The key is that the name of the table you use for the calculated value is input into the variables to interpolate on for the second table, using the *DIM command.

Another common use is scaling tables based on some value. Let say you have a pressure table and the total pressure is scaled over time, based on time.  You would make a pressure table that is dependent on say X and y. It would have two planes. One with 0 values and one with the max values. Then you would make a scale table that scales from 0 to 1 based on time.  It would look like this:

*DIM,pscl,table,5,,,time    !Row label is CPTAB, the table of Cps
pscl(1,1) = .25,.5,1,1,.333

ptab(1,1,1) = 0,0,0,0
ptab(1,2,1) = 0,0,0,0
ptab(1,3,1) = 0,0,0,0
ptab(1,4,1) = 0,0,0,0
ptab(1,1,2) = 72,48,97,123
ptab(1,2,2) = 53,48,88,98
ptab(1,3,2) = 43,38,77,88
ptab(1,4,2) = 33,28,55,77



As always with tables, double check things and make sure you have your  rows and columns correct.  Start simple, and then add more detail. Testing out on a 2×2 or 3×3 tables is a good way to start.

4 and 5 Dimension Arrays and Tables

This section applies to both arrays and tables, so it is a bit beyond the scope of the title, but I hope you will forgive me.

Most users will simply use a one, two, or even three dimension array or table (row, column, plane). However, both arrays and tables support two more dimensions: books and shelves. Because this capability is a later addition to the program, it behaves a little differently. You need to add values for the size of the book (KMAX) and the shelf (MMAX) as well as variable names for each: VAR4 and VAR5

The first difference is in the *DIM command. For normal arrays and tables you use:

*DIM, Par, ARRAY, IMAX, JMAX, KMAX, Var1, Var2, Var3, CSYSID 

*DIM, Par, TABLE, IMAX, JMAX, KMAX, Var1, Var2, Var3, CSYSID

For 4 dimension arrays or tables you use:


For 5 dimension arrays or tables you use:


It is important to be aware of this because if you look at the manual entry for *DIM it only lists the 3 dimension version of the command, and these variations are covered in the notes.

Once the array or table is defined you have to fill it using APDL commands, this size is not supported in the user interface. The same commands are used, but instead of supplying one, two or three indices values, you supply four or five.

The following is an example of defining a table in terms of location (X,Y,Z), Time, and Temperature. This is the most common usage of a five dimension table:

*dim,ldval,tab5,3,3,3,3,3,X,Y,Z,TIME,TEMP    ! table
*taxis,ldval(1,1,1,1,1),1,-2.3,0,3.4 ! X Range
*taxis,ldval(1,1,1,1,1),2,-1.2,0,1.8 ! Y Range
*taxis,ldval(1,1,1,1,1),3,-3.6,0,4.5 ! Z Range
*taxis,ldval(1,1,1,1,1),4,0,5,10 ! Time Range
*taxis,ldval(1,1,1,1,1),5,32,320,500 ! Temp Range

!silly made up equation to fill the table with
ldval(ii,jj,kk,ll,mm) = ii*.123+jj/.2+ll*kk+mm*JJ*JJ

sancal-elipse-floating-coffee-table-rafa-garcia-11Writing a Table to a File

For simple 2D tables with up to 10 columns, I use a cheesy macro I wrote called wrttbl.mac. It was used above.  It is a bit of a brute force method, because it has code blocks for from 0 to 10 columns.  A more general approach would build the actual *VWRITE commands with *VWRITES… It should also be expanded to do Planes.  Maybe for a future article.

Anyhow, here it is, maybe you will find it useful.

ttbl = arg1
fname = arg2

nmcl = nint((ncl*10)/2)
nmrw = nint(nrw/2)


('Table: ',A,' ',A,' vs ',A)
(10x,'|',10('-')) |
*vwrite,%ttbl%(ii,0),%ttbl%(ii ,1)
(10x,'|',20('-')) |
(10x,'|',30('-')) |
(10x,'|',40('-')) |
(10x,'|',50('-')) |
(10x,'|',60('-')) |
(10x,'|',70('-')) |
(10x,'|',80('-')) |
(10x,'|',90('-')) |
(10x,'|',100('-')) |

And with that, I think we have beaten the table topic to death.


Get to Know VCollab, and Geomagic Training

VCollab_Shaded_Logo_FinalPADT is proud to announce that it has added the VCollab 3D Visual Collaboration Software for CAE (http://www.vcollab.com) to its software product offerings. PADT will offer VCollab along with VCollab’s facilitating CAX file format to deliver on the growing need for smaller simulation result files and increased efficiency in data transfer to its customers in Arizona, New Mexico, Colorado, Utah and Nevada.  You can read more at on our press release.

What does this mean to you the ANSYS user?  Well it means you can share your models and results in 3D with others: over the web, imbedded in MS Word or PowerPoint, from within EKM, or as a stand alone file.  The tool converts your monster ANSYS result file into a lightweight file that only has the results you want to share.  We like it because of the small file size and the fact that we can send one 3D “image” instead of a bunch of different 2D images to our customers.

imageYou can learn more about it at our next Webinar

Using VCollab to Share 3D ANSYS Results
September 13, 2012
12:00 – 1:00 MST

You can also try it out yourself by signing up to get the free viewer:


Register and they will email you a login. Once you log in you can download the viewer (Download tab) and also look at some sample models they have.

Note: You need to set the following Environment Variable:

Value    :   1

You can also look at the one we use in the Webinar:

We will be sharing more on this tool as time goes by.

Geomagic_200x42We announced that we were a Geomagic reseller when we rolled out our 3D Laser and Cross Sectional Scanning hardware offerings. Although we added this as a tool for our scanning customers, we have found many ANSYS customers that are interested in it or that already had it in house. 

If you don’t know Geomagic, it is a suite of tools that take scan or faceted (yes, meshes are included) and allows you to repair them, wrap them, compare them, or convert them to usable CAD solid geometry. Yes, this is the tool you have been looking for to take your distorted FEA mesh and convert it into a usable CAD model.

So we wanted to let everyone know that we are now certified to offer training on the Geomagic suite.  As always, we can offer training when your want it and where you want it, or you can sign up for one of PADT’s scheduled classes.  The first two are in October:

10/17/2012 – 10/19/2012      Geomagic Studio     PADT’s Tempe Office
10/22/2012 – 10/24/2012      Geomagic Qualify   PADT’s Tempe Office

Click on the course names to get more information on the content and to register, or simply contact us at 480.813.4884 or training@padtinc.com.

Look for some Focus articles on Geomagic, or a seminar for ANSYS users, later in the year when we get caught up on our backlog and Joe has some time to prepare something.

Composite Sketching, ANSYS Style: Copying a Sketch from One DesignModeler Session to Another

Recently a customer approached me and told me that he had a sketch in one DesignModeler database that needed to be copied over to another DesignModeler database and asked me if it would be possible to do so. My initial reaction was, “No way, dude be trippin’,” because that’s how I talk in professional settings. But, I really wasn’t ready to assert its impossibility without first digging into it a bit, so that’s what I did.

Clicking around the DesignModeler menus (Ever wonder how we ANSYS support professionals figure things out? Now you know.) I found something that had flown under my radar previously. Under the File menu are a couple of selections indicating the ability to write and read sketch scripts. Pay dirt.

So, what is it that these wonderful scripts can do for us? Let’s take a look. Say, for example, you have two separate sketches in two separate DesignModeler sessions. I have labeled these sessions “Face” and “Head.” See if you can figure out which is which.


(Side note: It may be hard to believe, but this is not the original geometry the customer was working with)

Now, keeping in mind that these are two completely different DesignModeler databases, how can I copy the Face sketch, including dimensions, and paste it on top of the Head sketch? The answer is simple. First highlight the DesignModeler plane containing the Face sketch.


Next, click File > Write Script: Sketch(es) of Active Plane. You will be prompted for a file name and location of the resulting jScript file. Specify those and click [Save].


Note that all of the sketches on the selected plane will be written to the jScript file. If there are any sketches you don’t want to keep, you can always delete them later.

Next, move over to the Head model. Highlight the plane you would like to copy the Face sketch to. In this case, it is the XYPlane again, but you can pick whatever plane you want; it doesn’t have to be the same plane between sessions. The sketch will maintain its position relative to the origin of whichever plane you select.


Next click File > Run Script and select the jScript file that was written previously. Click [Open].



More than likely, you will get a warning about modifying the feature number to avoid duplicates. This is normal. It simply means that it’s renumbering the imported sketch to avoid having, for example, two “Sketch1” objects. Click [OK].

You will now see the Face sketch, dimensions and all, overlaid on the Head sketch. The Sketch object has been renumbered and placed onto the XYPlane.


And, as you can see, everyone is happy.

ANSYS 14.0 Service Pack Summary

You may have noticed there are several official service packs available for ANSYS 14.0. In case it’s not clear to you what each of these service packs is for, here is a brief explanation to hopefully allow you to determine which of them you may need for your particular application of ANSYS products.

ANSYS140.0.1: Service Pack 1:

This fixes a rare scenario in which the ANSYS Mechanical database can be overwritten with a zero size file on exiting ANSYS Workbench by clicking the close window icon. This is recommended for all Workbench Mechanical Users.

ANSYS140.0.3: Service Pack 3:

This fixes a problem causing a potential solver error for ANSYS Mechanical APDL ("classic") for large modal superposition harmonic analyses. The definition of large is on the order of half a million degrees of freedom. If you are an ANSYS Mechanical APDL user, this service pack is recommended.

ANSYS140.0.8: Service Pack 8:

This fixes a list of issues with ANSYS Icepak. If you are a user of Icepak 14.0, this service pack is recommended.

ANSYS140.0.10: Service Pack 10:

This fixes a performance (speed) issue with ANSYS Composite PrepPost 14.0. As of this writing the service pack is only available for Windows 64 bit platforms. This service pack also includes service pack 1.

All other service packs are available for Windows 32 bit, Windows 64 bit, and Linux 64 bit systems. All service packs and more info on the service packs can be obtained on the ANSYS Customer Portal in the software download area. Click on the hyperlink for a given product’s "Last Update" date. That will bring up documentation on the available service packs for that product.

Running an APDL Command Snippet for Every Load Step in ANSYS Mechanical

This week went by very fast, and I never got time to do the more advanced article on tables to follow up on last week’s article.  So I was going to give up till someone stopped by my office to ask a question and I thought my simple and clever answer would make a nice quick, but useful, posting.

What he need to do was apply fairly complicated loading over multiple substeps. Do some *get’s, calculate some stuff, then apply a load. I immediately thought of a trick we used in the early days of ANSYS Mechanical (before it was called ANSYS Mechanical) where we would put in a script that redefined the solve command as nall (*abbr,solve,nall).  You then used your own code to do the solves.

This made us feel very smart and clever.

However, something in the corner of my brain was saying “dumb and silly.” So I fired up 14.0 and realized that my brain was right, you don’t have to trick ANSYS Mechanical any more. The developers now allow you  to specify load steps and such for preprocessing command objects.  I should know this because I did a seminar on APDL Command Objects. .

Darn no article for this week, it was already covered. 

But just to make sure I looked through the PowerPoint and found that the ability wasn’t covered. Yipee! I have an article, now to stretch it out make it look important!

If you insert a command object into your model setup:


You end up with a Details view like so:


Under definition you can set “Step Selection Mode”  This simply lets you determine if the APDL code in the command object is applied every load step (All), at the first (First), at the last (Last), or if the command object is only applied to a specific load step number (By Number). 

  If your complicated loading/modification to your model is the same commands for every load step, pick All and enter your commands. If it varies by load step in some way, you have two choices. You can write a set of commands for each load step, or you can write a macro that uses a *get,nmstp,active,,solu,ncmls and then use logic to figure out what you need to do.

So, pretty simple, but it opens up a lot of possibilities when you need to do some simple tweaks during a multi-step solve.

There, now I don’t feel like a looser for not doing an article this week.

What Every User Should Know About Tables in ANSYS Mechanical APDL

I was having a discussion with a user who is very experienced with a FEA tool other than ANSYS. He wanted to define some properties with respect to time and his rotational speed and wanted to know how hard it would be to write a custom routine in ANSYS to do that.  I immediately explained that it was not that hard, as long as you have the right compiler. Then I realized that you did not need to compile any code. Unlike that other software, we have tables in ANSYS and you can use those to interpolate data relative to some other value.  And, now that it is Friday morning and we still do not have a FOCUS article for the week, I thought it would be a good time to review the basics of Tables in APDL.

ANSYS Mechanical (Workbench) users, do not leave and go back to reading TMZ.  This is useful to you as well because you can use code snippets in ANSYS Mechanical to define some very sophisticated loads without ever getting into Mechanical APDL.  One of those cool powerful things you can do in Mechanical. In fact, if you look at the input file that ANSYS Mechanical sends to the solver, it is often full of tables that ANSYS Mechanical makes.

This article will just touch on the simple aspects of tables that every user should know. There is a lot more you can do with tables, but we will save that for future articles.

The Basics

The APDL language has three type of parameters: variables (single numbers or 8 character strings), arrays, and tables.  variables and arrays are just like variables and arrays in most programming languages.  But tables are unique in that the indices are real numbers rather than integers.  And when you refer to a value in a table the program does a linear interpolation between the numbers you supply to get the value at that location. Think of it as a graph where instead of points you have a line:


What makes it even better, is that the table can be multiple dimensions. So you can make a value dependent on a location in 3D space, val(x,y,z), space and time, val(x,y,z,t), or even some input you need to use, val(x,y,z,t,myVal). 

You get an interpolated value by simply using it in a formula:

x = 2.4
y = 1.66
z = 23.5
frc = frc_tbl(x,y,z)

Also, many commands in ANSYS Mechanical APDL take a table as an argument. And the solver will input proper index values at solve time.  The simples example of this is a nodal force using the F command:


For each substep, the solver will interpolate a force value for node 47 in the X direction based the value of things like time, frequency, position, temp, and such for the current substep. More on how to define what values to use as an index below.

One other key thing to know about tables before we get into the details is the way they work.  What ANSYS does is take an actual array, and add a 0 column, row or plane to the array. So instead of going from 1 to 10, the array goes from 0 to 10.  And the index values are stored in this 0 row, column, or plane.  So to see the values using the *STATUS command, you have to tell it to start listing at 0 with the IMIN, JMIN, or KMIN arguments:


Another good way to look at a table is using the *VEDIT (Parameters->Array Parameters->Define/Edit->Edit.)


Defining a Table

The hardest part of defining a table is defining the index and values.  Arrays are simple, you just define you r size with a *DIM and then supply a value for each integer index value:

val(1) = 12.4,15.6,18.5,12.4,12.4,5,3.2





For tables, you need three steps: define the table with *DIM, define the indices (the axes), then provide the values.

val(1) = 12.4,15.6,18.5,12.4,12.4,5,3.2

Note that in the *DIM command, you have to specify that this is a table with TABLE.  For array’s you can say ARRAY or leave it blank, because ARRAY is the default. 

The next command, *TAXIS, is the important one. It does not call several cabs to pick you up.  It defines the Table AXIS… get it, TAXIS.  The first argument is the name of the table you want to fill, with the index put in for the row you want to start on, and the second is the index you want to fill.  Then you give the actual values.

Finally we supply the actual values just like in an array, but each value corresponds to the index values specified in the *TAXIS command.

The above example results in:




This example is for a 1D table. A 3D table works the same, you just need to define 3 axes and 3 columns of values.  Note that the first argument on the *TAXIS command is the column number that the axis refers to.

temptab(1,1,1) = 10,100,10
temptab(1,2,1) = 12,150,10
temptab(1,3,1) = 10,90,7
temptab(1,1,2) = 12,120,12
temptab(1,2,2) = 15,180,15
temptab(1,3,2) = 17,90,12
temptab(1,1,3) = 20,200,20
temptab(1,2,3) = 22,250,20
temptab(1,3,3) = 20,290,27

This will produce:


If you find the code a bit confusing, we recommend that you use Parameters->Array Parameters->Define/Edit->Add… to create your tables, then look at the log file to get the commands.

Using Tables with Loads

The real value of tables is their use with commands that accept a table as a value, and this is usually some sort of load.  The help for a given command will tell you if it takes a table as an argument. If it does not, simply put the command in a *do-loop.

When you specify a table, you need to tell the command interpreter that it is a table and not variable or a string by placing the command in side percent signs:  f,frc_nodes ,fx ,%fx_load%.

But how do you tell the solver what solver values your indices refer to?  If you want the force applied based on the X,Y,Z position of the nodes in the component frc_nodes, you need to say which column in your table is X, Y, and Z.  You do that with the *DIM command:

*DIM, Par, Type, IMAX, JMAX, KMAX, Var1, Var2, Var3, CSYSID

Var1, Var2, and Var3 are predefined keywords that are called Primary Variables.  The possible values are:

FREQ Frequency
X X location of entity
Y y location of entity
Z z location of entity
TEMP Temperature
SECTOR Cyclic sector number

So to define loads that vary with Z position and time you would do:

val(1,1) = 12.4,17,10.5
val(1,2) =8.3,7.4,12.8

At each substep the program will go through each node in FRCNDS and get its Z location and the current time and interpolate a force and apply it to that node.  I do not know about you, but I think that is pretty slick.

The obvious next question is how do I deal with a different coordinate system?  The last argument on *DIM is CSYSID. You supply a local coordinate system number here and the program will use that coordinate system to figure out the position of the entity it is applying a load to.

Other Stuff

We strongly recommend you look at the *DIM and *TAXIS commands in the help. Also read section 3.10 of the ANSYS Parametric Design Language Guide, specifically the section on Table Type Array Parameters.

Some other things you can do with tables that we hope to cover in the future, but that you can also figure out on you own using the help are:

  • You can create 4 and 5 dimension tables using TAB4 and TAB5 for TYPE in the *DIM command.  Other things need to be done as well, it gets complicated. You can find an example at:

    // Basic Analysis Guide // 2. Loading // 2.5. Applying Loads

  • You can nest tables inside tables.  So you can have one table calculate a value based on primary values (X,Y,Z, FREQ, TIME, etc) then use the result of that interpolation to interpolate from another table.   One use of this would be if a load varies with rotational velocity, and rotational velocity varies with time.  So you define an RPM table that is dependent on TIME, then use the table to get a load.  (maybe that will be next weeks article…)

And we will finish with a picture of a really cool table and bench I found on line:  I want to get this for my patio.

smooth 4 660x396

An Ocean in the Desert: What is AQWA?

Maybe you’ve seen AQWA show up in the list of ANSYS products to be installed on your computer, or maybe you’ve seen it as a topic in the ANSYS Help System and you otherwise wondered about it.  Is it related to Aqua Man or perhaps Aqua Lung?  Not at all.  If you are not familiar with it, AQWA is a tool for simulating wave and current as well as wind loads on marine vessels and structures.

Truthfully, although we are located in the Sonoran Desert, we have some great lakes within a short drive of Phoenix, let alone Tempe Town Lake just a few miles from PADT, and lakes Powell and Mead up on our northern and western borders with Utah and Nevada offer miles and miles of incredible scenery.  However, most of our rivers are dammed for water storage and irrigation so it’s not uncommon to see river beds with no water in them for most of the year.  A standard joke is that Arizona is the place where rivers and bodies of water are not associated with each other.


The bottom of the Salt River, aka Rio Salado, which flows through Phoenix (Sometimes)



The Nav System Knows it as a River


Yes, it does rain in Phoenix.  Just not often.  This storm caused over an inch of rain in some places:


This is more of a typical day.  No rain in sight:


You may be wondering why  we have an interest in AQWA here in the Sonoran Desert.  The short answer is that we support an organization working on alternative energy sources, including offshore wave power. As a result, we’ve had to become familiar with the ANSYS AQWA suite of tools.

Interaction Between Waves and a Floating Structure

Incident Waves on a Moving Ship:


At version 14.0, the main part of AQWA, hydrodynamic diffraction, is integrated with ANSYS Workbench.  In a hydrodynamic diffraction analysis, we are calculating the response on our structure due to incoming and receding waves.  The effects on the water due to its interaction with the structure are also included.  It’s also possible to perform a hydrodynamic time response analysis within the Workbench framework.  Interaction with permanent structures such as piers and breakwaters can be included as well.

The use of Workbench means we can use ANSYS DesignModeler to construct and edit our geometry, including a slice at the waterline and formation of a multi-body part, both of which are needed for AQWA.  It is somewhat integrated with Workbench Mechanical, in that it’s possible to map pressure and inertia loads from AQWA into Mechanical for a detailed structural analysis, but it’s somewhat of a manual process currently.  For those familiar with the ANSYS APDL command language, it’s fairly straightforward.

Geometry Split at the Water Line in DesignModeler:


AQWA can also be run in stand-alone mode, which opens up additional capabilities while still taking advantage of DesignModeler surface geometry or another source.  The various modules have creative names such as AQWA-Line, AQWA-Librium, AQWA-Fer, AQWA-Drift, and AQWA-Naut.  Besides hydrodynamic diffraction, one can look at the effects of mooring lines, cables and tethers and varying wave and wind loads on structures.  Special elements are included which facilitate the simulation of ‘stingers’ or articulated trusses which are used to connect underwater piping to floating vessels.  Fenders can also be modeled to allow for interaction between floating and floating or floating and permanent structures that may come into or out of contact.

Geometry of the structures modeled consists of surface models which are meshed with shell elements.  Meshes must be relatively coarse compared to what most of us who normally perform structural analyses are used to.  Small geometric details usually need to be omitted to keep the mesh sizes down, but that’s not really a problem as we are trying to accurately predict interaction between the fluid and the structures, not stress concentrations or other localized results within AQWA.

In addition to plots and animations of interacting waves and pressure distributions, many other results quantities are available including cable forces, RAO’s (response amplitude operators), drift coefficients, shear force and bending moments, and other quantities used in the industry. These quantities are useful to those developing sea-going vessels as well as for those in the oil and gas industry involved in developing Floating Production, Storage, and Offloading (FPSO) structures and Tension Leg Platforms (TLP’s), etc.

Forces on Two Mooring Lines vs. Time:


Floating Structure Lateral Position vs. Time:


If any of this looks like a tool that would be useful for the types of projects you work on, by all means contact your local ANSYS provider for more information.  You’ll want to plan on taking the AQWA training class, which we have found very useful.

One of the lakes along the Salt River.  Indeed there is water in the desert, if no ocean:


Node Interaction in Mechanical, Part 4: Scoping Results to Nodes

This article is the eagerly awaited fourth and final installment in my series on interacting with nodes in ANSYS Mechanical. To review, the previous three articles covered picking your nodes, creating named selections from nodes, and applying boundary conditions to nodes.  I know some of you were wondering why it took a while for this final article to come out. Well, I’d been sent to my home state of Indiana for business and decided to take a few extra days to visit relatives—living and not-so-living.


Great-great-great-great-great grandpa!

Now on to business. Our discussions so far have centered on preprocessing and solution processing operations with nodes. Now we’ll conclude the series by covering postprocessing operations with nodes in Mechanical. Much the same way that you can scope boundary conditions to nodes, you can also scope results to nodes. There is one key difference however: whereas nodal boundary conditions can only be scoped to named selections, nodal results can be scope to geometry or named selections.

Scoping results to nodes based on geometry selection is accomplished using the same procedure as scoping results to any other geometry: simply select the nodes of interest, and insert results.



Likewise, for named selections, simply insert the results object of interest, set the Scoping Method to Named Selection and choose the appropriate named selection.



Does something appear a bit unusual about that last figure? Notice that the results are plotted as continuous contours, with the nodes emphasized, rather than just appearing as discrete points. When all of the nodes on an element are selected, such as in this example, the results are displayed as a continuous contour across the face. Here’s an example showing what happens when some element faces have all their nodes selected, and others have only a few.



Beyond the standard analysis results, you can perform some additional nodal orientation verification as well. Remember how in the third article in this series I sent the Mechanical modal over to Mechanical APDL and turned on the nodal coordinate systems there to verify their orientations? Now you do, because I linked you to it. Well, as it turns out, you can get the same information in Mechanical. Let’s see how.

As an example we’ll start with the same valve with a cylindrical coordinate coordinate system located at the center of the outlet flange. The nodes on the outlet flange face (Named Selection: Outlet Flange Nodes) have been rotated into this cylindrical coordinate system and a 0.01” displacement applied to them in the Y (theta) direction. The inlet flange is fixed.


After solving the model, highlight the Solution branch and click on the Coordinate Systems pulldown, way on over to the right of the Solution toolbar, next to the Command Snippet button.


Using this pulldown menu, you can display nodal coordinate triads and nodal rotation angles. The Nodal Triads pick displays the nodal coordinate systems, equivalent to executing /PSYMB,NDIR,1 in Mechanical APDL.


The Nodal Euler Angles display the amount of nodal rotation in each plane from the original position. Here’s a plot of the Nodal Euler XY Angles of the outlet flange nodes.


Wait a second. Don’t those contours seem a little “off” to you? They’re not lined up radially, and the zero and 180 degree rotation values aren’t quite located where I expect them to be. Wait, I think I know what the problem is. Let’s set the displacement scaling to 0.0 (Undeformed) and see what happens.


There, that’s better.

Note that you can also display element triads and Euler angles, for rotated element coordinate systems, but that’s a topic for another day.

This completes the nodal interaction series for R14.0 ANSYS Mechanical. We will be sure to keep you informed of further improvements to finite element interaction capabilities in Mechanical as future versions are released.

Solution Information: Monitoring your Solves in ANSYS Mechanical

There is a folder with a big fat exclamation point on the top of the Solutions branch in ANSYS Mechanical. It is called “Solution Information.”  Most users click on it after their run is done and maybe look at the output from the ANSYS Mechanical APDL solve. 


And it is very handy to check your output when your job is done:


But this feature has an exclamation point on its folder icon for a reason! It is a very useful tool! While doing tech support we have found that users often do not take advantage of the information displayed here, and if they did so their ANSYS Mechanical experiences would be more efficient and even more enjoyable.

Solver Output

When you click on the Solution Information branch in Solution, the graphics window turns to the worksheet window and you see Solver Output.  This is the jobname.out file that ANSYS Mechanical APDL creates as it solves, and it is full of useful information.  The window updates at a user defined interval, the default of 2.5 seconds seems to work well. 

It is a good idea, even for a static run, to watch this window as things solve.  It tells you where the solver is in the solver process, shows any warnings that might pop up, and lists the key information about your model and solver settings.

At first the information may seem a bit overwhelming. But give it time, study it, understand what each piece of information is and what it is telling you.  Users who watch and understand the Solver Output when they solve understand their models better, and debug problems much faster.

Non-Linear Graphs

The down side of the solver listing is that it is a text file. Text files are great for showing information at a certain portions of your run, but are not so great for comparing multiple points.  But graphs are.  And the same command can be changed to show all sorts of useful information about non-linear runs.


The list of available graphs varies depending on what type of solve you are doing.  The most common values to look at are the Force Convergence for structural. 


Take a look at this image.  As you can see there are two graphs. The top one plots the convergence information you want to see vs. the number of iterations.  The bottom graph shows time vs cumulative iterations.  Notice that there is data being graphed, force convergence and criteria in this case.  But there are also vertical dashed lines.  These give you feedback on what events happen and at what iteration they occurred.  Mostly they tell you that a substep or a load step converged. 

You can watch these non-linear graphs while your model is running, or after the run to see what actually happened.  I like to watch them as I solve because, honestly, it seems like the runs go faster. You find yourself watching that magenta line go up and down hoping it will go under the light blue line, and cheering when it does.

Take a look at the other types of non-linear graphs you can view and think about the impact of the data towards your run.  As an example, if you see a lot of vertical lines indicating that you are bisecting, then you should look at setting up more substeps on each loadstep.  The same thing if you see the convergence taking a long time.  Such information can not only help converge a model that is having problems, but it can help you set up future runs such that they converge faster.

If you click on an item that there is no data for, you get a nice “No data to display” message. You will also get this before the data is available.


Result Tracker

When you click on the Solution Information branch you will notice a “Solution Information” ribbon bar show up at the top of the window. 


This allows you to define information you want to track while solving, things like displacement, gap on contacts, or energy.  The values update as the problem is being solved, providing some nice insight into what your model is doing. 


To use it, RMB on Solution Information or pull down the Result Tracker menu.  Only results that are applicable to your solve will be available.  Once you pick the ones you want, you need to specify the geometry you want to apply it to, if applicable. Usually it needs to be a vertex or a contact/joint. Do this in the normal way then fill out the rest of the detail view. As an example, if we want the deflection on the corner of an object, you pick the vertex on the corner then specify the axis you want the information in.

Note: You can not add a result tracker object during or after a solve, you have to do it up before you solve. So do not think about using this capability as a probe.

You can select as many of the objects as you want and plot them all at the same time, which is very handy. Once the run is done, you can save the graph as an image or export the data to a comma delimited file or as an Excel file.

We recommend you always set up a Result Tracker for tricky contact pairs and for any significant deflection that tells you a lot about your model.

FE Connection Visibility

The last feature in the Solution Information branch is really not solution information, but it kind of is.  If you click on the branch you will notice a “FE Connection Visibility” area in the detail view. You will also find a “Graphics” tab under the Worksheet tab:


You use these tools to see things like beams, constraints and springs that are added to your model before the solve in ANSYS Mechanical APDL.  So they can only really be seen as post processing entities.  By default, all types are shown. But you can change the selection under “Display” in the details view to just show specific ones.  You can also change the thickness of the display and do lines or points. 

What is especially important about this is that beams, Constraint Equations and springs that you add in code snippets will also show up.

To see the entities, simply click on the Graphics tab:image

Conclusions and Recommendations

It is probably true that you could use ANSYS mechanical your whole career and never use this feature. but your career will be much more stressful and much less enjoyable than if just make their use part of your normal everyday process.  It can save hours of trial and error debugging.

Plus, the reality is that while you are solving you could watch Justin Bieber videos on YouTube, or you can watch your model converge.  That sounds like a much better way to go… watching the model convergence, of course… yea… cause Justin Bieber is lame… and… well, you know.


Surface Projection Based Contact Detection

The ANSYS Mechanical APDL solver has a lot of contact options.  KEYOPT(12) this and KEYOPT(4) that.  I’m sure we all read Chapter 3.9 of the Contact Technology Guide to understand and remind ourselves on all these options.  I know here at PADT we always do so on the third Tuesday of every month… OK, maybe not.

But as fate would have it I was looking something up in there the other month and came across one of the newer options: Surface Projection Based Contact.  It is on of those little options that can make a big difference, so I thought I would put it on the list of potential Focus articles, and it just bubbled to the top.

Contact and Contact Detection

The way contact works in an FEA program is that you define a contact and a target. The program goes in and calculates if a point on the contact surface is near, touching, or inside the surface or point that is the target. If they are touching or inside forces are calculated acting on the contact points in the normal and tangential (friction) directions.  You use a slew of options to determine what that algorithm looks like. But hey all need to know what the gap or penetration is between the contact and target surfaces.

What is important for this article is how the program chooses those contact points to look at and, if needed, calculate forces on.

The default (KEYOPT(4) =0) is to use the gauss points on the elements.  Here is a great illustration from the online help:


Gauss points are good because there are more per element than nodes and calculations are done at the gauss points anyhow. The down side is that if you have a lot of curvature or even a corner, the true surface of your contacting part can penetrate into the target.

For those times when you do need to control things at the nodes, you can use KEYOPT(4) = 1 or 2. 


The down side is that the program now has to do a lot more calculations to make things happen at the nodes, and it has to calculate normals for the contact or target surface. Plus there are fewer points.  But the worst thing that can happen is node drop off if your mesh is not refined enough:


KEYOPT(4) = 3

Sometimes using points for contact results can cause problems. The node penetration or drop off being good example. it can also be an issue if there is a lot of “overhang” on an element.  So the developers at ANSYS have added a third option, the Surface Projection Based Contact Method, or KEYOPT(4) = 3.  What the method does is look at the element faces on each side of the pair, contact and target, and calculate the union of each.  If we look at the following example you can see it.  The green mesh are the contact surface elements, the cyan mesh is the target.  If we put them on top of each other, each unique area becomes a surface projected contact area, shown in the third image.


 image             image


So instead of calculating penetration/gap at each integration point or node, it calculates an average value for each overlapping area.  This can really make a big difference when you have the contact hanging off of the target, as shown in this illustration:



So the three big advantages of this approach are:

  1. In most cases it provides a more accurate calculation of contact traction and stresses for the underlying elements.
  2. It is less sensitive to which side you designate as the target and which ones you designate as the contact surface. This is because you end up with the same projected areas.
  3. Moment equilibrium is satisfied if there is an offset between the target and contact surface and friction is turned on.
  4. Contact forces do not “jump” when a contact node slides off of the edge of a target surface.


No surprise, it is not perfect or it would be the new default. The disadvantages are:

  1. The method is computationally more expensive because you usually have more contact areas then you would have contact points with the other method, especially if the target mesh is refined giving you more areas.
  2. The penetration or gab is an average value so when a model has corner or edge contact, the nodes on the edge or corner will penetrate into the target surface.  This is similar to what you see with the gauss point detection method. More refinement usually solves this.
  3. Free thermal surfaces don’t work with it. (What is a free thermal surface, I forgot as well.  It is a feature in thermal contact, Chapter 7.1 of the Contact Technology Guide. It is now on the Focus to-do articles list)
  4. You can not use a primitive for a rigid target. This makes sense if you think about it. If you use a primitive there are no element faces to find the overlap on.
  5. 3D contact and target elements can not have partially dropped midside nodes.  They either all have to be there or none.

ANSYS Mechanical

Although we have been talking about how things work in the solver, and the KEYOPTs used in Mechanical APDL, you can still access this through ANSYS Mechanical.  Any contact par will have an Advanced portion of its details view. In there you can access most of the KEYOPTs, including the Detection method, which is KEYOPT(4).


And here is the drop down for Detection Method. The last one, Nodal-Projection Normal from Contact is actually Surface Based Contact Projection:




The best way to get a feel for this is to find a couple of models you have already run with one of the other contact methods and run them with this option turned on and take a look at run time per iteration,  number of iterations for convergence and the resulting stresses in the contact area.    If you have flat, fairly refined contact/target meshes with no overhanging, you should just see things take longer.  But if you do have a curvy surface, a corner, or a coarse mesh you should see better performance and accuracy.

Node Interaction in Mechanical, Part 3: Nodal Boundary Conditions

This article is Part three in a four-part series about taking advantage of the new nodal interaction capabilities in Workbench 14.0. In Part 1 I discussed how to pick nodes and retrieve information about them. In Part 2 I covered various methods of creating nodal Named Selections. In this installment I’ll address the procedures for applying loads and constraints to mesh nodes, as well as rotating them into different coordinate systems.

All of the nodal boundary conditions, including nodal rotations (which I realize isn’t a boundary condition, per se, but it does affect how boundary conditions are applied) may be found in the Direct FE pull-down menu when the Analysis branch is highlighted.


One key thing to note about all of the nodal boundary conditions is that they may only be scoped to Named Selections, not Geometry Selection. So before you continue, make sure you’re well versed in nodal Named Selection creation.

Stepping through the Direct FE commands in menu order, the first item we come to is Nodal Orientation. This is how we rotate a node to another coordinate system. Of course, to be able to reorient a node to another coordinate system, we will have to create one first. Once that’s done, select Nodal Orientation from the Direct FE pull-down menu.

In this case, we will rotate the nodes belonging to the named selection EndNodes to a cylindrical coordinate system I created at the end of the tube called Cylindrical Coordinate System (because I’m original like that).


Click Direct FE > Nodal Orientation. In the Details window set the Named Selection to EndNodes and Coordinate System to Cylindrical Coordinate System. Easy peasy. Note that the Scoping Method cell is grayed in with “Named Selection,” indicating that you can’t change it.


Just as in Mechanical APDL, all forces and constraints are applied in the nodal coordinate system, defined by the Nodal Orientation. In this example, I applied FE Displacement constraints in the X (radial) direction and Nodal Forces in the Y (theta) direction and verified them in Mechanical APDL.


One thing to keep in mind is that Nodal Orientation is rarely necessary, since loads and constraints applied to solid model entities may be applied in user defined coordinate systems and Frictionless Supports rotate nodes to be normal to the surface.

Moving along, for the Nodal Force example we will apply a downward force to the 12 nodes contained in the Named Selection EndFaceNodes.


Following a similar procedure as before, click Direct FE > Nodal Forces. Set the Named Selection to EndFaceNodes and enter –1200 lbf for the Y Component of force. Note that Nodal Coordinate System is set in gray for the Coordinate System selection. The key item to note, however, is the Divide Load by Nodes option. If set to Yes, the load will be split evenly between the nodes, in this case 1200 lbf/12 or 100 lbf per node, for a total of 1200 lbf applied. If set to No, the full load is applied to each node in the Named Selection, giving a total applied load of 1200 lbf x 12 = 14,400 lbf total.


Here are the Probes of the Reaction Loads with the Divide Load by Nodes option set to Yes and No.

Divide Load by Nodes = Yes


Divide Load by Nodes = No


To applied pressures to nodes, click Direct FE > Nodal Pressure and specify the Named Selection and pressure value. Note that the pressure can only be applied in the normal direction to nodes. Also note that, at a minimum, the nodal Named Selection has to consist of all the corners on an element face for the pressure to have any meaning.



Apply constraints directly to nodes by clicking Direct FE > FE Displacement. Specify the Named Selection and enter the displacement values in the nodal coordinate system X, Y, and Z direction (or leave Free).


Nodal rotations (Direct FE > FE Rotation) may only be applied to nodes attached to elements with rotational degrees of freedom, such as beams and shells. The rotations themselves can only be fixed (i.e. zero degrees) or free. At this time there is no capability to impose a finite nodal rotation.


In the next and final installment, I will discuss how to scope results to nodes and verify nodal and element orientations. Get ready to be thrilled.

Node Interaction in Mechanical, Part 2: Nodal Named Selections

This is the second entry in a thrilling saga about interacting with nodes in ANSYS Mechanical. In Part 1, I addressed the various methods for picking and querying nodes in a Mechanical model. In this entry, I discuss various methods for creating nodal Named Selections. Creating nodal Named Selections is a key step in executing the processes I’ll address in my next two entries: Applying nodal boundary conditions and scoping results to nodes.

I’ll start with the easy stuff. To create a Named Selection from picked nodes, simply pick the nodes you’re interested in as described in Part 1, right-click, and select Create Named Selection (or, in the Named Selection toolbar, click the Create Named Selection) and give it a name.


Note that the “Apply geometry items of same:” option does not work with nodes yet. However, there is another option: The Worksheet. The worksheet will allow you to define nodes based on location, node number, and attachment to solid model entities.

To activate the Worksheet mode, highlight the Named Selection branch (add it from the Model toolbar if necessary) and insert a new Named Selection. In the details window, change the Scoping Method from Geometry Selection to Worksheet.


The Selection worksheet appears.


To begin the selection process, right click on the first row and select Add Row.



The Add action is similar to selecting “from full” or “also select” in Mechanical APDL and is most likely the first action you will take in the selection process. Select Mesh Node from the pull-down menu under Entity Type.


For the criterion, select either Location X, Y, or Z or Node ID (node number).


Then select the appropriate Operator from the pull-down menu. Available options for both Location and Node ID are Equal, Not Equal, Less Than, Less Than or Equal, Greater Than, Greater Than or Equal, and Range. Options for Location additionally include Smallest and Largest.


Next, fill in the Value, Lower Bound, and/or Upper bound as appropriate. Also select the appropriate coordinate system when using one of the Location criteria.


When complete, click the Generate button to execute. The Geometry entry in the details will indicate the number of selected nodes. Click on the Graphics tab to verify the selection.



If desired, add additional selection actions. The Add action at this point behaves as “also select.” Remove behaves as “unselect.” Filter acts as a “reselect” operation. In this example, we will Filter the selection to nodes between Y = 0 and Y = 2.5 inches. (I also could’ve simply done Y > 0, but I wanted to show the Range Operator here.)



At this point, you’ve probably noticed that the Named Selection is named “Selection.” Simply rename it by right clicking on the Selection object and selecting Rename.

So now you know how to create nodal Named Selections based on location and node number, but how do you create a named selection from nodes attached to a face or some other solid model entity. That’s a little more complicated, but I’m here to take you through it. It’s not really difficult once you know the steps.

First, create a Named Selection from the geometric entities containing the nodes you want to select.


Then create a new Named Selection with the Worksheet scoping method. In the first row set Add as the Action. Set the entity type equal to the entity type the Named Selection was created from in the previous step. Set the Criterion to Named Selection and the Operator to Equal. Select the Named Selection created in the previous step from the pull-down menu under Value.


“Criminy, Strain! We’re just selecting the same Named Selection that we create in the previous step! What’s the point?! You’re wasting my time!” Read on; there’s another step here.

Add another row to the Worksheet. Set the Action to Convert to and the Entity Type to Mesh Node. Then click Generate and verify the selection in the graphics window. There, don’t you feel silly for getting so upset in the previous paragraph?



In these first couple of parts, we’ve spent a lot of time learning how to simply select the nodes. Now wouldn’t it be nice to actually do something with them? In the next two parts, we’ll do exactly that. First, we’ll see how to apply loads and constraints directly to nodes, and rotate them into different coordinate systems. For the last installment, we’ll discuss how to scope results to nodes.

Webinar Files: Moisture Diffusion Modeling with ANSYS at R14 and Beyond

On May 24, 2012 Matt Sutton gave a well attended webinar on the new moisture diffusion modeling capabilities in ANSYS Mechanical APDL at R14.


Although we didn’t get a successful recording for this one (Matt has been chastised and done his penance for forgetting to turn on the recording…) we do have a PDF of the PowerPoint and a copy of the sample macro he used:

Node Interaction in Mechanical, Part 1: Picking Your Nodes

NosePicking1In version 14.0 of ANSYS Mechanical, ANSYS has rolled out its first capabilities for interacting with the underlying finite element model in addition to the geometry. In this version, the user can select nodes, create named selections from nodes, apply loads and constraints to nodes, and scope results to nodes. And it is glorious. In this posting, the first part in a four-part series on interacting with nodes in Mechanical, I will start of with the basics: selecting nodes in ANSYS Mechanical.

The default picking mode in Mechanical is to Select Geometry. In order to select nodes you will first need to display the mesh by either highlighting the Mesh branch or by clicking the Show Mesh (image) button. Next, switch the select mode to Select Mesh under the Select Type pull-down.


At this point you will be able to pick nodes in the same manner that you pick vertices. Note that the entity filter is automatically set to Vertex when you’re in Select Mesh mode, so you may need to reset the filter once you go back to Select Geometry mode.


You can also box select or lasso select nodes under the Select Mode pull-down. Note that there are two options for each: plain ol’ box and lasso select, and box and lasso volume select.


I’ve found that volume select vs. regular select is best illustrated using flat surfaces, so here we go: an example with flat surfaces.


Regular box or lasso select only selects nodes on the faces closest to the viewer.



Note: To lasso select, simply click and drag the cursor around in a loop.

On the other hand, volume select selects all the nodes throughout the depth of the model.



A related question that has come up when I demonstrate the new nodal interaction capabilities is, “Node numbers! Where are my node numbers? I want to see node numbers! Give me my node numbers!” OK, you can view node numbers now. (You can also view information about other entities, but this is a blog post about nodes, so I’m going to talk about nodes.) To view node information, first make sure you’re in node-picking mode, select the nodes of interest, and then click on the toolbar button featuring the blue ‘i’ with a black arrow next to it.  image (You can also do this in reverse order. Whatever floats your boat.) When you do this, the Selection Information will display the node X, Y, and Z location and Node ID in the lower left corner of the GUI.


If you had picked two nodes, it would also show the distance between those nodes. You can customize the display by clicking the green check box, though you probably won’t want to change anything with the node display.

In the next installment I will show you how to create nodal Named Selections starting with simple picking and moving on to such criteria as location, node number range, and nodes attached to solid model entities. This knowledge will come in handy for applying boundary conditions to nodes and scoping results to them, which I’ll cover in the third and fourth installments. Happy node picking!