## Using Probes to Obtain Contact Forces in ANSYS Mechanical

Recently we have had a few questions on obtaining contact results in ANSYS Mechanical. A lot of contact results can be accessed using the Contact Tool, but to obtain contact forces we use Probes. Since not everyone is familiar with how it’s done, we’ll explain the basics here.

Below is a screen shot of a Mechanical model involving two parts. One part has a load that causes it to be deflected into the other part.

We are interested in obtaining the total force that is being transmitted across the contact elements as the analysis progresses. Fortunately this is easy to do using Probes in Mechanical.

The first thing we do is click on the Solution branch in the tree so we can see the Probes button in the context toolbar. We then click on the Probe drop down button and select Force Reaction, as shown here:

Next, we click on the resulting Force Reaction result item under the Solution branch to continue with the configuration. We first change the Location Method from Boundary Condition to Contact Region:

We then specify the desired contact region for the force calculation from the Contact Region dropdown:

Note that the coordinate system for force calculation can either be Cartesian or Cylindrical. You can setup a coordinate system wherever you need it, selectable via the Orientation dropdown.

There is also an Extraction dropdown with various options for using the contact elements themselves, the elements underlying the contact elements, or the elements underlying the target elements (target elements themselves have no reaction forces or other results calculated). Care must be taken when using underlying elements to make sure we’re not also calculating forces from other contact regions that are part of the same elements, or from applied loads or constraints. In most cases you will want to use either Contact (Underlying Element) or Target (Underlying Element). If contact is non-symmetric, only one of these will have non zero values.

In this case, the setting Contact (Contact Element) was a choice that gave us appropriate results, based on our contact behavior method of Asymmetric:

Here are the details including the contact force results:

This is a close up of the force vs. ‘time’ graphs and table (this was a static structural analysis with a varying pressure load):

***** SUMMATION OF TOTAL FORCES AND MOMENTS IN THE GLOBAL COORDINATE SYSTEM *****

FX = -0.4640219E-04
FY = -251.1265
FZ = -0.1995618E-06
MX = 62.78195
MY = -0.1096794E-04
MZ = -688.9742
SUMMATION POINT= 0.0000 0.0000 0.0000

We hope this information is useful to you in being able to quickly and easily obtain your contact forces.

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

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.

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.

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.

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.

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:

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…

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.

The 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:

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.

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

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.

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

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.

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:

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.

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

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:

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.

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:

Solve and postprocess as usual in the Mechanical editor.

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.

## Some Tips on Configuring RSM as a User

If 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:

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:

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

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

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

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.

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:

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:

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.

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.

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:

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:

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:

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.

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:

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:

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.

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:

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.

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.

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.

## ANSYS, Inc. Unleashes New ACT Extensions for Version 15.0

If you haven’t noticed, ANSYS, Inc. has been making quite a few ACT extensions available for ANSYS 15.0 on the ANSYS Customer Portal. If you are not familiar with ACT (ANSYS Customization Toolkit) Extensions, please see our earlier blog entry, “There’s an Extension for That,” here.

As of this writing, there are 20 ACT extensions available for download from the Customer Portal for version 15.0. There is also a set of training files available from the same link.

Among the new additions is an extension allowing the use of Mechanical APDL User Programmable Features in the Mechanical editor. Previously this could only be done in MAPDL. You will still need to install the customization files as part of the ANSYS installation, and you will still need the proper versions of the FORTRAN compiler and Visual Studio. However, this extension unleashes a significant capability within the Workbench Mechanical tool that wasn’t there previously, access to UPF’s.

The documentation states that it works with both versions 14.5 and 15.0 of ANSYS.
To get to the 15.0 ACT Extensions download area, login to the ANSYS Customer Portal and navigate through Downloads > Extension Library > 15.0. We urge you to browse the list of available extension available from the Customer Portal to see which might have benefits to your simulations.

Here is a list of all of the current extensions:

ACT Intro Training_R150_v1

ACT Introductory Training Materials

ACT Templates for DM_R150_v1

Templates for educational purpose; demonstrates most common scenarios of ACT-based development needs in DesignModeler

ACT Templates for DX_R150_v1

Templates for educational purpose; demonstrate integration of external optimizers

ACT Templates_R150_v1

Templates for educational purpose; cover most common ACT-based development needs

Acoustics Extension R150_v42

Expose 3D acoustics solver capabilities

Convection Extension_R150_v4

Expose convection with pilot node capability in steady-state and transient thermal analyses

Coupled Diffusion_R150_v3

Introduce coupled diffusion analysis (structural diffusion, thermal diffusion, and structural thermal diffusion) in both static and full transient analysis

Coupled Field Physics Extension_R150_v1

Expose piezoelectric, thermal-piezoelectric and thermal-structural solver capabilities

DDAM_R150_v2

Expose the Dynamic Design Analysis Method (DDAM) in Mechanical interface

Design Modeler Utility_R150_v1

Expose some useful functions in DM interface

Distributed Mass_R150_v2

Add distributed mass (rather than a point mass) to a surface as either “total mass” or “mass per unit area”

Enforced Motion_R150_v3

In Mode-Superposition Harmonic and Transient Analyses, allows applying base excitation (displacement or acceleration). Excitation can be either constant or frequency/time dependent

FE Info Extension_R150_v9

Expose node and element related information

Map temperature and pressure loads (from a CFD calculation) to a multi-step Mechanical analysis for transient one-way FSI. Includes CFD-Post macros

Create follower forces and moments to follow geometric deformation

Hydrostatic Fluid_R150_v5

Expose hydrostatic fluid elements in Mechanical

MATLAB_Optimizers_for_DX_R150_v1

Expose MATLAB optimization algorithms and user programs in the Optimization component of ANSYS DesignXplorer

MatChange_R150_v2

Change material ID to user specified value for the selected bodies

Offshore_R150_v4

Expose the MAPDL offshore features in Mechanical

Piezo Extension_R150_v8

Expose piezo-electric solver capabilities

UPF Extension_R150_v1

Allow for the use of User Programmable Features (UPF) within Workbench

## ANSYS 15.0: Summary of Available Updates as of 3/11/14

Since the release of ANSYS 15.0 in December, 2013, ANSYS, Inc. has released 4 updates.  Here are details on each, so you can decide if you need to install them or not:

## 15.0.1

This update fixes a defect related to CFD models with zero thickness walls (baffles).  The problem in the initial 15.0 release was that baffles do not display properly in ANSYS (Workbench) Meshing when viewing the mesh on Named Selections, and the baffles are not output correctly to CFX, Fluent, or Polyflow.  This update is available for Windows 32 bit, Windows 64 bit, and Linux 64 bit.

## 15.0.3

This update fixes a problem in the initial 15.0 release in which ANSYS LS-DYNA could fail with a stack overflow problem on Windows machines.  This update is available for Windows 32 bit and Windows 64 bit.

## 15.0.4

This update fixes a license problem with the initial ANSYS 15.0 TurboGrid tool, in which TurboGrid on 64 bit Windows systems could check out a license for both TurboGrid and ICEM CFD.  This update is available for Windows 64 bit.

## 15.0.5

This update addresses problems in the initial ANSYS 15.0 release with ANSYS Mechanical Rigid Body Dynamics as well as any mechanical models that include joints.  Data from the Mechanical Redundancy Analysis tool was not being updated after redundancy analyses were performed, so the code could not identify redundant or inconsistent constraints.  This update is available for Windows 32 bit, Windows 64 bit, and Linux 64 bit.

## Utilizing a Thermal Contact Conductance Table in ANSYS ANSYS Mechanical

We recently had a tech support request from a customer, asking for the ability to define a spatially varying thermal contact conductance (TCC) on a contact region in ANSYS Mechanical. We came up with a solution for ANSYS 14.5 via an example which includes a couple of verification plots.

The test model consists of two solids, connected via a contact region. The thermal contact conductance at the contact region was defined as a table, with the rows and columns of the table corresponding to local coordinates within the plane of the contact surface. The table was defined and implemented using Mechanical APDL commands in the Mechanical tree.

Low values of TCC were used for testing purposes. This helped verify that the tabular values were actually being used as intended. A constant temperature was applied to the face at one end of the model, while a different constant temperature was applied to the face at the extreme other end of the model. This temperature differential caused heat to flow through the contact region, subject to the resistance defined via TCC values.

The coordinates in the plane of the contact surface were Y and Z. Thus, the table of TCC values varied in the Y and Z directions, as shown here:

Z
Y |  0.0        1.0
0.0 | 0.0001    0.0005
1.0 | 0.0005    0.0002

Three ANSYS Mechanical APDL command objects were inserted into the tree in the Mechanical editor. The first command object simply added a scalar parameter to keep track of the contact element type/real constant set number for use later:

The second command object was placed in the analysis type branch, meaning this set of commands would be executed just prior to the Solve command. This command object does three things:

1. Defines the TCC table vs. Y and Z coordinates.

2. Reads the table in as an MAPDL real constant for the contact elements identified in the first command object.

3. Issues the command, “rstsuppress,none”. More on this later.

This is how the second command object was defined:

That third step mentioned above was a key to getting this technique to work in 14.5. The rstsuppress command is not documented currently, but Al Hanq of ANSYS, Inc. has told me that it will be documented in the future. The default setting turns off contact results from being written to the results file in a thermal analysis. The idea is to help keep results file sizes from getting excessively large, especially for transient thermal runs. In this case, we actually wanted the thermal contact results in the results file, so we issued “rstsuppress,none” so the thermal contact results were not suppressed.

The final command object was for verification of the applied TCC values. This set of commands generates two plots using MAPDL postprocessing commands. The first plot is of heat flux going through the contact elements. The second plot displays the TCC values for node ‘i’ of each contact element (averaged).

Here is the third command object:

Both of these plots show up in the tree, labeled as Post Output and Post Output 2 in the image above.

This is the resulting thermal flux at the contact surface:

Here is the applied thermal contact conductance, as mapped from the table defined in the second command object:

In summary, we took advantage of Mechanical APDL command objects to apply thermal contact conductance values that vary along the contact region. We also used MAPDL commands to create two plots that help verify that the TCC values were applied as intended. Hopefully this is a helpful example.

## Corrupt ANSYS Mechanical Database? You Might Be Able to Recover

Most of the time ANSYS Mechanical does a great job of keeping track of all our input and output files needed for a particular simulation. Every once in a while though, a glitch can happen which could lead to a corrupt database that gives you errors, say, if you try to reopen the ANSYS Mechanical editor. If you suspect that somehow your project database for a Mechanical model (or any other model that uses the same interface as ANSYS Mechanical) has been corrupted, you just might be able to recover it using these steps:

1. Copy any .mechdb files from the project directory to a different location. Rename them to a .mechdat extension. These will be named SYS.mechdb, SYS-1.mechdb, etc. The easiest way to find these files is to click on View > Files from the Workbench window, then scroll through the list until you find the .mechdb file or files. Then right click on each one and select “Open Containing Folder.” This will open Windows Explorer in the directory in which the file resides. You can then copy the files to a new location and rename them to .mechdat extensions.

2. Copy any .agdb (DesignModeler) files or other geometry files from the project directory to a different location. These will be named SYS.agdb , SYS-1.agdb, etc. (for DesignModeler) and can be found using View > Files as I described above. No need to rename these.

3. Start a new Workbench session.

4. Click File > Import. Set the type of file to import to “Importable Mechanical File”. Browse to the two .mechdat files created in step 1 (by renaming the copied .mechdb files) and import each.

5. If needed for geometry files, in the resulting Project Schematic in the Workbench window, right click on the first block’s geometry cell and select Replace Geometry > Browse. Browse to the copied SYS.agdb file or other geometry file from step 2. Repeat any additional analysis block in similar fashion.

6. Then save the project with a new name and directory.

This should allow you to recreate a Workbench project that allows you to continue working. We hope this suggestion is helpful if the need ever arises to use it.

(Artwork by Eric… Ted does much nicer smiley faces)

## Linearized Stress – Using Nodal Locations for Path Results in Workbench Mechanical 14.5

Postprocessing results along a path has been part of the Workbench Mechanical capability for several rev’s now. We need to define a path as construction geometry on which to map the results unless we happen to have an edge in the model exactly where we want the path to be or can use an X axis intersection with our model. You have the option to ‘snap’ the path results to nodal locations, but what if you want to use nodal locations to define the path in the first place? We’ll see how to do this below.

The top level process for postprocessing result along a path is:

• Define a Path as construction geometry
• Insert a Linearized Stress result
• Calculate the desired results along the path using the Linearized Stress item

The key here is to define the path using existing nodes. Why do that? Sometimes it’s easier to figure out where the path should start and stop using nodal locations rather than figure out the coordinates some other way. So, let’s see how we might do that.

• First, turn on the mesh via the “Show Mesh” button so that it’s visible for the path creation

• From the Model branch in Mechanical, insert Construction Geometry
• From the new Construction Geometry branch, insert a Path

• Note that the Path must be totally contained by the finite element model, unlike in MAPDL.
• If you know the starting and ending points of the path, enter them in the Start and End fields in the Details view for the Path.
• Otherwise, click on the “Hit Point Coordinate” button:

• Pick the node location for the start point, click apply

• Pick the node location for the end point, click apply

• In the Solution branch, insert Linearized Stress (Normal Stress in this case); set the details:
• Scoping method=Path
• Select the Path just created
• Set the Orientation and Coordinate System values as needed
• Define Time value for results if needed

Results are displayed graphically along the path…

…as well is in an X-Y plot and a table

Besides normal stresses, membrane and bending, etc. results can be accessed using these techniques. So, the next time you need to list or plot results along a path, remember that it can be done in Mechanical, and you can use nodal locations to define the starting and ending points of the path.

## CFX Expression Language–Part 5: Using CEL for Solution Monitoring

In four previous entries we introduced CFX Expression Language, CEL:

After a break to teach some ANSYS classes in beautiful northern Utah we’re back to conclude our series on CFX Expression Language.

In our fifth and final installment on CEL we will discuss the use of CEL in monitoring items of interest while the CFX solution is progressing. Back in the first installment in this series, we showed how to create expressions for results quantities in CFD Post. By creating expressions in similar fashion for results quantities in CFX Pre, we can use these expressions to monitor items during solution.

Here is an example. In CFX Pre we have defined three expressions which are really extracting and operating on results data.

forceX1 = resulting force on one face of the structure
forceX2 =resulting force on another face of the structure
fdiffx = the difference between these two values or the net force acting on the structure

This shows these three expressions in the CFX Pre outline tree:

Still within CFX Pre, click on Insert > Solver > Output Control. That will add an Output Control tab on the left side of the CFX Pre window. Click on the Monitor tab, expand Monitor Points and Expressions, and then click on the button near the right of the window below that to add a monitor point:

Set the Option to Expression and in the Expression Value box left click then right click to select from your list of defined expressions:

The CFX Pre tree will now have one or more Monitor Points listed under Output Control:

When we initiate the solution, these user-defined monitor points will be available for real time display in addition to the normal Momentum and Mass and Turbulent kinetic energy monitors. All we need to do is click on the User Points tab during solution to view our expressions as monitors. In the example shown below, Monitor 1 is forceX1, Monitor 2 is forceX2, and Monitor 3 is fdiffx, the difference between the first two quantities. These could have been renamed during their definition to make it easier to understand the monitor plot. Here is a snapshot of the quantities being monitored during the solution:

So, as we have seen in the last 5 CFX Expression Language blog entries, CEL exposes a lot of powerful capability to CFX users (and to Fluent users within CFD Post). In this case we have seen how to add additional items to monitor during the solution process. The advantages of this are to help us determine on the fly if the solution is progressing as expected and to give us an idea of the values of certain results quantities before the solution is fully completed.

We certainly hope you now have a better understanding for how CEL can be used to increase the capabilities and useful information available from CFX and CFD Post.

## CFX Expression Language–Part 4: Applying Ramped and Stepped Boundary Conditions Using CEL

In three previous entries we introduced CFX Expression Language, CEL:

In this fourth installment we will demonstrate the use of CEL to apply ramped or stepped boundary conditions. In certain circumstances we might want to ramp a load rather than apply it all at once. For example, convergence difficulties can sometimes arise when a fast rotation rate is applied initially in rotating machinery simulations. Starting off with a smaller value of load and ramping it to the final value can aid in convergence in these circumstances.

Note that the rate of load application can be manually changed during the solution in the solver manager, but why not take advantage of CEL and do it automatically? As we will see, this is fairly easy to do.

The ability to ramp a load makes use of a built-in CEL variable labeled “aiturn”, which is the accumulated value of the iteration number. If we assign an expression for the number of iterations we want, we can then create a combined expression for the ramped load:

In the above list of expressions, Flow999 is our desired full amount of flow at the end of ramping. Iter is defined to have a value of 100. Both of those are names that we picked. We then defined expression flowapplied, which is the value of Flow999 times the built-in expression aitern (the current solver iteration number) divided by the total number of iterations desired for the ramping, Iter. Once aitern = 100, then the value of flowapplied will equal Flo999 or 9.99 ft/sec in this case.

Here is a plot of the expression flowapplied for values of aitern between 0 and 100. The plot is in m/s but the peak works out to be 9.99 ft/sec.

As we have seen in prior entries in this series, we plug in the expression name for the input in the appropriate field. In this case, the name of the expression flowapplied is entered in the Normal Speed field in the Inlet boundary details.

After solution, we can verify that at the end of the solution the applied inlet velocity had reached the full value of 9.99 ft/sec. in CFD Post:

The next step might be rerun the solution while maintaining a constant value of the applied load for an extended period of time. This can be accomplished by modifying the expression which defines the load so that it has some additional values:

In the above expression we have added a step() function, which can either be typed in or added by right clicking, Functions > CEL > step. This causes the ramped load to peak at the value of Flow999 when aitern reaches the previously defined value of Iter at 100, then drop to zero after that. This happens because if Iter-aitern is greater than one, step=1, but if Iter-aitern is less than one, step=0. Here is the resulting plot in CFX Pre:

That’s not quite what we want, but if we tweak the expression a bit more, we can get it to ramp to the full value then remain constant.

Now we have another term involving the step() function, but with the expression names inside the step function reversed. This means that once aitern exceeds the value of Iter, the first term becomes zero and the second term takes over with a constant value of the load equal to Flow999, as shown here:

By using similar expressions involving time, we can create a load history that turns off and on at desired time points.

Hopefully by now you’re starting to see the value of CEL. We are just scratching the surface here, but once you start using it you will find that CEL has a lot of potential powerful uses. In the next installment we’ll cover some additional capabilities available in CEL.

## CFX Expression Language–Part 3: Applying Boundary Conditions Using CEL

In two previous entries we introduced CFX Expression Language, CEL:

Part 1: Accessing CFD Simulation Information in CFX (and FLUENT)

Part 2: Augmenting Material Property Assignments in ANSYS CFX

In this third installment we will see how to use CEL to apply boundary conditions as equations rather than constant values. For example, if a non-constant velocity profile can be defined as an equation, we can use CEL to define as well as apply the profile.

Let’s look at an example in which the velocity profile is a function of y coordinate:

u(y) = 6 * Umax * y / H * (1 – y/H) (m/s)

Using the procedure we learned in part 1 of this series, in CFX Pre we have defined expressions for H and Umax. We then defined the equation for the velocity profile as Uprofile:

Next we go to the Plot tab within the Expressions editor to verify that our velocity profile matches expectations:

To use our new expression in CFX Pre, we just enter the expression name in the appropriate field when defining the inlet velocity:

Finally, this velocity plot from CFD Post shows that indeed our desired velocity profile was applied at the inlet.

Hopefully this demonstrates how easy it can be to use CFX Expressions to define non-constant boundary conditions. In the next part of the series, we will look at using expressions to ramp or step apply loads.

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

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

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

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

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

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

m = K * gn-1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### Design Optimization – Design Point Studies.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The bottom line:

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

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

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

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