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

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

So what is External Model?

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

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

 p1

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

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

 p4

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

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

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

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

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

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

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

p14p5

 p14

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

Some Tips on Configuring RSM as a User

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

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

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

rsm2

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

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

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

rsm3

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

rsm4

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

rsm5

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

rsm6

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

rsma

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

rsmb

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

rsm7

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

rsm8

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

rsm9

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

rsm10

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

rsm11

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

rsm12

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

rsm13

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

rsm14

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

rsm15

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

rsm16

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

rsm17

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

rsm18

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

rsm19

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

rsm20

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

ANSYS, Inc. Unleashes New ACT Extensions for Version 15.0

act_150_1If 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

FSI_Transient_Load_Mapping_R150_v4

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

Follower Loads Extension_R150_v2

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

ANSYS_r15.0Since 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.

image

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:

image

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:

image

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:

image

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:

image

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

image

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.

image

image

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.

image

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.

image

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.

image

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.

image

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

For more information on “picking your nodes”, see the Focus blog entry written by Jeff Strain last year: http://www.padtinc.com/blog/the-focus/node-interaction-in-mechanical-part-1-picking-your-nodes

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

image

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

image

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

image

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

image

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

image

  • 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

image

Results are displayed graphically along the path…

image

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

image

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.

image

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:

image

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:

image

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

image

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

image

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:

image

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:

image

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.

image

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:

image

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:

image

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:

image

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.

image

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:

image

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:

clip_image002

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

clip_image004

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

clip_image006

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

clip_image008

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.

clip_image002

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:

clip_image004

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:

clip_image006

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:

image

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.

clip_image004

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:

clip_image006

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

clip_image008

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

 

image

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.

image

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.

image

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:

image

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

image

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.

image

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

image

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.

4. A multi-core machine, such as one of PADT’s Cube systems. More info: http://www.padtinc.com/products/hardware/cube-hvpc/index.html

In a future article we will look at the use of the HPC Parametric Pack license in conjunction with a design optimization study.

The Cost of ANSYS, Fluent, CFX, Maxwell, ICEM CFD, etc. Training

How much does training cost for ANSYS, Fluent, CFX, Maxwell, ICEM CFD, Icepak, AQWA, etc.? This is a question many engineers and managers often ask when considering training in the ANSYS family of products. The answer is that it can cost anywhere from zero to several thousand dollars, depending on a variety of factors.

How can training be free? If you are a current customer you may find that you can download training files or view some videos on various ANSYS product simulation topics. This training really isn’t free, since you or your company is paying for maintenance of the ANSYS software which gives you access to the customer portal. We at PADT also provide free content, typically in the form of our webinars which can be viewed at http://padtincevents.webex.com. Click on, “PADT ANSYS Webinar Series.”

You might also find some free training out there on the internet. Alternatively, you might find that training is free or reduced but with a catch, such as the need to purchase more software.

That all being said, as I’m sure you are aware, you get what you pay for. Maybe what you find for free is good enough for what you are trying to do. However, you most likely won’t be able to find free training that’s tailored to your needs or your organization’s specific simulation applications. If you have a question about the training material or what the recorded instructor just said, you most likely will not be able to ask about it. You’ll either be left in the dark, or will have to expend extra effort to figure it out on your own. There are costs associated with both of those options.

So, what about the cost of paying for training? If you are attending a class by yourself, you can expect to pay a minimum of about US$500.00 per day for your training class. You may have travel expenses to consider in addition to that.

If you are part of a group that needs training, then group rates come into play which can significantly reduce the cost of training per student. A few thousand dollars to train a group of 8 or 10 engineers will typically be a small investment relative to the cost of the simulation software. Further, at PADT we often customize our training material for our training customers. This is a further benefit of group training.

clip_image001

At PADT group rates kick in at about the 4 students per class size. Using group rates can be a very effective way to get productive training into your organization, especially if travel is involved since only one instructor may need to travel vs. several students. Web-based training is another option. This was discussed by Eric Miller of PADT in a prior blog entry, http://www.padtinc.com/blog/the-focus/ansys-training-face-to-face.

Further, PADT’s customer feedback has consistently shown that our training classes pay for themselves. In other words, increases in productivity due to a quick jump up the learning curve can very quickly return the fees paid for training.

There are other factors to consider in training as well. What is the experience base of the organization providing the training? Do they have real-world experience in using the simulation tools for which they are providing training? What about location, flexibility, and scheduling? Will the provider cancel your class with short notice if there aren’t enough students? These are all things to consider when picking a training provider.

The bottom line is that consideration must be made for the relative benefits of training vs. the amount spent on the training. We at PADT would be glad to answer your questions about training in the ANSYS family of products. You can reach me at ted.harris@padtinc.com. You can view our current training offerings at http://www.padtinc.com/support/software/training.html.

There’s an Extension for That!

My mother in law is still getting used to the concept of a smart phone.

MIL: “Do you have a GPS so you know how to get there?”

Me: “There’s an App for that.”

MIL: “Do you have a flashlight?”

Me: “There’s an App for that.”

MIL: “Do you have a chromatic tuner?”

Me: “There’s an app for that.”

OK, maybe my mother-in-law didn’t ask about the tuner, but there is in fact an app for that.

In similar fashion, now that ACT (ANSYS Customization Toolkit) is a reality, we can start answering questions with, “There’s an Extension for that.” What is an extension? It’s a bit of customized software that you can integrate with ANSYS Workbench to have it do things that aren’t built in to the current menus.

We’ll leave the nuts and bolts of how Extensions work for another article, but please be aware that current ANSYS customers can now download several Extensions from the ANSYS Customer Portal. We’ll take a look at one of these in this blog entry.

To access the currently available extensions, you must have a login to the ANSYS Customer Portal and be current on maintenance (TECS). Within the customer portal, the Extensions are available by clicking on Downloads > Extension Library; then click on ACT Library.

As of this writing there are 12 extensions available for download. These vary from the sophisticated Acoustics Extension for 14.5 to simpler extensions such as the one we’ll look at here which allows you to change the material property numbers of entities in Workbench Mechanical.

Once you have downloaded the desired extension, you’ll need to install it. For use in the current project, you click on Extensions at the menu near the top of the Workbench Window and click on Install Extension.

image

After clicking on Install Extension, you browse to the folder in which you have saved the downloaded extension. The Extension file extension (I’m not making this up) is .wbex. Here is what it looks like when loading the material change extension:

image

Click Open.

Next you must click on Extensions again the Workbench window, and click on Manage Extensions. That will bring up this window.

image

Check the box next to any extensions you want to load, then click Close. If you have already launched the Mechanical editor, you will probably need to exit Workbench and get back in or at least click on File > New and reload for the new extension to show up.

When you open the Mechanical editor, the new extension should show up in the menus. Here is what the material change button looks like after the extension has been loaded:

image

Each time you open a new Workbench session, you’ll need to click on Extensions > Manage Extensions if you want an extension to be loaded into the Mechanical editor.

Alternatively, you can have an extension load every time by clicking on Tools > Options from the Workbench window, followed by a click on Extensions. Enter the name of the desired extension in the box, as shown here.

image

After clicking OK, any new Mechanical editor session will have the material change extension loaded.

So, what good is it? I will now show a simple example of implementation of the material change extension. The idea here is that we have a bolted connection and we want to look at two different conditions by changing the material properties of the washers to see what effect that has on the results. Using the material change extension, I can force the washers (and nuts and bolts too) to have a specific material number rather than the default value assigned by Workbench. The material number is used in the Mechanical APDL batch input file created by Workbench to identify which elements have which material properties.

Now before you APDL gurus get all riled up, yes, I know this can be done with the magic ‘matid’ parameter. That’s how we’ve been doing things like this for years. The material number extension is nicer since it’s an actual button built into the GUI. We’re really trying to show how extensions work here, not necessarily the best way to simulate a model with changing material properties.

That all being said, here is what it looks like. Clicking on the ‘matchange’ button in the menus inserts a new matchange object in the tree under the analysis type branch. In this example, the matchange button has been clicked three times, resulting in three matchange objects.

image

The matchange functionality requires that we create Named Selections for any entities for which we want to change material property numbers. How do I know that? When I downloaded the extension from the ANSYS Customer Portal, a nice read me .pdf file came along with it.

Here I have clicked on matchange 2 in the tree and identified the Named Selection for the entities I want to change, in this case the named selection Washers. I then entered my desired integer material number for these entities, 102.

image

Finally, in order to demonstrate that it works, I added on command snippet under the Static Structural branch, containing these APDL commands:

esel,s,mat,,102 ! select material 102 – washers.
mp,ex,102,15e6
mp,prxy,102,.29
mplist
allsel

Those commands select the washers by my user-defined material number (I could have also selected by named selection). The commands then define new material properties for material 102. Again, there are other ways to do this, but this shows the effect of the extension. Note that this command snippet is set in the details view to only be active for load step number 3. Load step one applies bolt pretension. Load step 2 solves for the operating load with the original material properties and load step 3 solves for the same loads but with the modified material properties for the washers.

This plot shows von Mises stress in the washers vs. loadstep/substep. As you can see in the graph below the stress plot, indeed the von Mises stress is changing due to the material change from step 2 to step 3. This was a nonlinear analysis with large deflection turned on.

image

So, this should give you a taste of what extensions are and what can be done with them. The next time you are asked to do something in Workbench for which there isn’t a built-in menu, you may be able to say, “There’s an extension for that!”