Four Different Ways to Add Customization to ANSYS Mechanical

By: Eric Miller
– May 22, 2019
Categories:

ANSYS Mechanical is a very powerful tool right out of the box.  Long gone are the days when an FEA tool was just a solver, and users had to write code to create input files and interpret the results.  Most of the time you never have to write anything to effectively use ANSYS Mechanical. But, users can realize significant gains in productivity and access greater functionality through customization. And it is easy to do.

Before we talk about the four options, we need to remember how the tool, ANSYS Mechanical, is actually structured.  The interface that users interact with is a version of ANSYS Workbench called ANSYS Mechanical. The interface allows users to connect to geometry, build and modify their model, set up their solution, submit a solve, and review results. The solve itself is done in ANSYS Mechanical APDL. This is the original ANSYS Multiphysics program. 

When you press the solve button ANSYS Mechanical writes out commands in the languages used by ANSYS Mechanical APDL, called the ANSYS Parametric Design Language, or APDL.  Yes, that is where ANSYS Mechanical APDL got its name. We like to call it MAPDL for short. (Side note: years ago we started a campaign to call it map-dul. It didn’t work.) Once the file is written, MAPDL is started, the file is read in, the solve happens, and all of the requested output files are written. Then ANSYS Mechanical reads those files and shows results to the user.

Customization Tool 1: Command Snippets for Controlling the Solver

Not every capability that is found in ANSYS Mechanical APDL is exposed in the interface for ANSYS Mechanical.  That is not a problem because users can use the APDL language in ANSYS Mechanical to access the full capability of the solver.  These small pieces of code are called Snippets and they are added to the tree for your ANSYS Mechanical model.  When the solver file is written, ANSYS Mechanical inserts your snippets into the command stream.  Simple and elegant.

PADT has a seminar from back in 2011 that lays it all out.  You can find the PowerPoint Presentation here. We do have plans to update this webinar soon.

This approach is used when you want to access capabilities in the solver that are not supported in the interface but you want to get to those features and keep track of them from inside your ANSYS Mechanical Model.

If you are not familiar with APDL, find a more “seasoned” user to help you. Or you can teach yourself APDL programming with PADT’s Guide to APDL .

Customization Tool 2: ANSYS Customization Toolkit (ACT) for Controlling the User Interface and Accessing the Model

As mentioned above, ANSYS Mechanical is used to define the model and review results.  The ANSYS Customization Toolkit (ACT) is how users customize the user interface, automate tasks in the interface, add tools to the interface, and access the model database. This type of customization can be as simple as a new feature, presented as an app, or it can be used to create a focused tool to streamline a certain type of simulation – what we call a vertical application.

image
A Vertical Application Written in ANSYS ACT by PADT for Automating the Design of Turbine Disks

Unlike APDL, ACT does is not have its own language. It uses Python and is a collection of Application Programmer Interface (API) calls from Python. This is a very powerful toolset that increases in capability at every release.  PADT has written stand alone applications using ACT to reduce simulation time significantly. We have also written features and apps for ourselves and users that make everyday use of ANSYS Mechanical better. 

Do note that ACT is supported in most of the major ANSYS products and more capability is being added across the available programs over time, not just in ANSYS Mechanical. You can also use ACT to connect ANSYS Mechanical to in-house or 3rd party software.

Because this is a standard environment, you can share your ACT applications on the ANSYS App Store found here. Take a look and you can see what users have done with ACT across the ANSYS Product suite, including ANSYS Mechanical.   PADT has two in the library, one for adding a PID controller to your model and the other is a tool for saving your ANSYS Mechanical APDL database.

Another great aspect of ACT is that it is fully documented.  If you go to the Customization Suite documentation in the ANSYS help library you can find everything you need.

Customization Tool 3: APDL for Automating the Solve  

With Code Snippets we talked about using APDL to access solver functions from ANSYS Mechanical that were not supported in ANSYS Mechanical.  You can also use APDL to automate what is going on during the solve.  Every capability in the ANSYS solver is accessible through APDL.

The most common usage of APDL is to create a tool that solves in batch mode. APDL programs are used to carry out tasks without going back to ANSYS Mechanical.  As an example, maybe you want to solve a load step, save some information from the solve, export it, read it in to a 3rd party program, modify it, modify some property in your model, then solve the next load step. You can do all of that with APDL in batch mode.

This is not for the faint of heart, you are getting into complex programming with a custom language. But if you take the time, it can be very powerful.  All of the commands are documented in the ANSYS Mechanical APDL help and details on the language are in the ANSYS Parametric Design Language Guide.  The PADT Blog is full of articles going back over a decade on using APDL in this way.

Customization Tool 4: User Programable Features in the Solver

One of the most powerful capabilities in the ANSYS Mechanical ADPL solver is the ability for end-users to add their own subroutines.  These User Programable Features, or UPF’s, allow you to create your own elements, make custom material models, customize loads, or customize contact behavior.

There are other general purpose FEA tools on the market that heavily publicize their user elements and user materials and they try to use it to differentiate themselves from ANSYS. However, ANSYS Mechanical APDL has always had this capability.  Many universities and companies add new capability to ANSYS using this method.

To learn more about how to do create your own custom version of ANSYS, consult the Programer’s Reference in the ANSYS Help. PADT also has a webinar sharing how to make a custom material here.

Next Steps

The key to successful customization ANSYS is to know your options, understand what you really want to do, and to use the wide range of tools you have available. Everything is documented in the help and this blog has some great examples.  Start small with a simple project and work your way up.

Or, you can leverage PADT’s expertise and contract with PADT to do your customization. This is what a half-dozen companies large and small have done over the years.  We understand ANSYS, we get engineering, and we know how to program. A perfect combination.

Regardless of how you customize ANSYS Mechanical, you will find it a rewording experience.  Greater functionality and more efficient usage are only a few lines of custom code away.

Categories

Certified Elite Channel Partner

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Product Development
Platinum Partner

Technical Expertise to Enable your Addictive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: Phoenix Analysis and Design Technologies, 7755 S. Research Dr., Tempe, AZ, 85284, https://www.padtinc.com. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Share on twitter
Share on facebook
Share on linkedin
Share on pinterest

Upcoming Events

10/06/2022

Fluids Updates in Ansys 2022 R2 - Webinar

10/05/2022

Experience Stratasys Truck Tour - Colorado Springs

09/29/2022

White Hat Life Science Investor Conference - 2022

09/28/2022

2022 AZBio Awards

09/28/2022

Simulation Best Practices for Rotating Machinery Design & Development

09/21/2022

ExperienceIT NM 2022

09/21/2022

Additive Updates in Ansys 2022 R2 - Webinar

09/14/2022

Rocky Mountain Life Sciences Investor & Partnering Conference

09/08/2022

Ansys Optics Simulation User Group Meeting - Virtual

09/08/2022

Ansys Optics Simulation User Group Meeting

09/07/2022

SI & PI Updates in Ansys 2022 R2 - Webinar

08/31/2022

Simulation Best Practices for Developing Medical Devices - Webinar

08/24/2022

Mechanical Updates in Ansys 2022 R2 - Webinar

08/10/2022

Tucson after5 Tech Mixer: Ruda-Cardinal

08/05/2022

Flagstaff Tech Tour, 2022

08/02/2022

2022 CEO Leadership Retreat

08/01/2022

2022 CEO Leadership Retreat

07/27/2022

Thermal Integrity Updates in Ansys 2022 R1 - Webinar

07/20/2022

Simulation Best Practices for the Pharmaceutical Industry - Webinar

07/14/2022

NCMS Technology Showcase: Corpus Christi Army Depot

07/13/2022

NCMS Technology Showcase: Corpus Christi Army Depot

07/13/2022

Additive & Structural Optimization Updates in Ansys 2022 R1 - Webinar

07/07/2022

Arizona AADM Conference, 2022

06/29/2022

LS-DYNA Updates & Advancements in Ansys 2022 R1 - Webinar

06/23/2022

Simulation Best Practices for Wind Turbine Design - Webinar

06/15/2022

MAPDL Updates & Advancements in Ansys 2022 R1 - Webinar

06/01/2022

Mechanical Updates in Ansys 2022 R1 - pt. 2 Webinar

05/26/2022

Modelling liquid cryogenic rocket engines in Flownex - Webinar

05/25/2022

SMR & Advanced Reactor 2022

05/25/2022

05/24/2022

SMR & Advanced Reactor 2022

05/19/2022

RAPID + tct 2022

05/19/2022

Venture Cafe Roundtable: AI & Healthcare

05/18/2022

Tucson after5 Tech Mixer: World View

05/18/2022

RAPID + tct 2022

More Info

05/18/2022

Signal & Power Integrity Updates in Ansys 2022 R1 - Webinar

05/18/2022

Simulation World 2022

05/17/2022

RAPID + tct 2022

05/11/2022

Experience Stratasys Manufacturing Virtual Event

05/04/2022

Mechanical Meshing Updates in Ansys 2022 R1 - Webinar

04/27/2022

04/22/2022

12TH ANNUAL TUCSON GOLF TOURNAMENT

04/21/2022

04/20/2022

Additional Fluids Updates in Ansys 2022 R1

04/20/2022

Experience Stratasys Tour – Tempe Arizona

04/18/2022

Experience Stratasys Tour - Flagstaff Arizona

04/14/2022

D&M West | MD&M West

04/13/2022

D&M West | MD&M West

04/13/2022

Experience Stratasys Tour - Albuquerque New Mexico

04/12/2022

D&M West | MD&M West

04/12/2022

Experience Stratasys Tour - Los Alamos New Mexico

04/12/2022

Optimizing Engineering Workflows f​​​​or Propulsion System Design

04/07/2022

Experience Stratasys Tour - Austin Texas

04/07/2022

37th Space Symposium - Arizona Space Industry

04/06/2022

Transforming Digital Engineering with Ansys Discovery 2022 R1

04/06/2022

37th Space Symposium - Arizona Space Industry

04/05/2022

37th Space Symposium - Arizona Space Industry

04/04/2022

37th Space Symposium - Arizona Space Industry

03/30/2022

Simulation Best Practices for Vehicle Engineering - Webinar

03/23/2022

03/23/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R1

02/24/2022

Arizona Technology Council After 5 Tech Mixer "Pandemic Pivot Pizza Pa

02/23/2022

SciTech Festival: Spend an Hour with 3D Printing Experts

02/11/2022

Webinar: Mechanical overview for Ansys 2022 R1

More Info

02/09/2022

Webinar: Product Development 101 (FAKE)

02/08/2022

Webinar: Navigating the Additive Landscape

01/27/2022

Arizona Technology Council 1st Quarter VIP Tech Mixer

More Info

01/26/2022

Simulation Best Practices for Gas Turbine Design & Development - Webin

More Info

01/19/2022

Arizona Photonics Days

More Info

11/04/2021

ExperienceIT, New Mexico

More Info

11/03/2021

Additive Manufacturing & Structural Optimization in Ansys 2021 R2 - We

More Info

11/03/2021

Optics Valley Technical Series: The Future of Simulation in the Optics

More Info

11/02/2021

SBIR Liftoff AZTC Virtual Breakfast Series

More Info

10/10/2021

Stratasys Mobile Truck Stop - Tucson Arizona

More Info

Search in PADT site

1h

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: