Four Different Ways to Add Customization to ANSYS Mechanical

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.

image 27

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.

image 28

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.

image 29

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.

padt SIMCUST Cusomization Brochure Pic

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

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

Technical Expertise to Enable your Addictive Manufacturing Success.

PADT Pulse Newsletter Screen Grab from March 2023

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

Upcoming Events

05/31/2023

Driving Automotive Innovation with Additive - Webinar

05/24/2023

Hill Air Force Base Tech Expo

05/24/2023

Structural Updates in Ansys 2023 R1 (3) – Structural Optimization & Ex

05/23/2023

CROSSTALK 2023: Emerging Opportunities for Advanced Manufacturing Smal

05/10/2023

Signal & Power Integrity Updates in Ansys 2023 R1 - Webinar

04/26/2023

Additive Manufacturing Updates in Ansys 2023 R1 - Webinar

04/20/2023

38th Space Symposium Arizona Space Industry

More Info

04/19/2023

38th Space Symposium
Arizona Space Industry

04/19/2023

Additive Aids for Manufacturing - Webinar

04/18/2023

38th Space Symposium
Arizona Space Industry

04/17/2023

38th Space Symposium

04/13/2023

Venture Madness 2023

04/12/2023

Fluid Meshing & GPU-Solver Updates in Ansys 2023 R1 - Webinar

03/29/2023

8th Thermal and Fluids Engineering Conference

03/29/2023

Structural Updates in Ansys 2023 R1 - Composites, Fracture & MAPDL

03/28/2023

8th Thermal and Fluids Engineering Conference

03/27/2023

8th Thermal and Fluids Engineering Conference

03/26/2023

8TH Thermal and Fluids Engineering Conference

03/24/2023

Arizona BioPreneur Conference | Spring 2023

03/22/2023

2023 Arizona MedTech Conference

03/22/2023

Optimize Jigs & Fixtures with Additive - Webinar

03/15/2023

3D Design Updates in Ansys 2023 R1 - Webinar

03/08/2023

Competitive Advantages of 1D/3D Coupled Simulation - Webinar

03/01/2023

High Frequency Updates in Ansys 2023 R1 - Webinar

02/22/2023

Additive Advantages in Aerospace - Webinar

02/15/2023

Structural Updates in Ansys 2023 R1 (1) - Webinar

02/09/2023

IME 2023: MD&M | WestPack | ATX | D&M | Plastek

02/08/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

02/07/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

01/27/2023

Arizona Photonics Days, 2023

01/26/2023

Arizona Photonics Days, 2023

01/26/2023

TIPE 3D Printing | 2023

01/26/2023

Venture Cafe Phoenix Talent Night - Job Fari

01/26/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/25/2023

Arizona Photonics Days, 2023

01/25/2023

Building A.M.- Utah: Kickoff!

01/25/2023

TIPE 3D Printing | 2023

01/25/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

TIPE 3D Printing | 2023

01/18/2023

2023 AZ Tech Council Golf Tournament

12/21/2022

Simulation Best Practices for 5G Technology - Webinar

12/14/2022

Digital Twins Updates in Ansys 2022 R2 - Webinar

12/08/2022

Tech the Halls - AZ Tech Council Holiday Mixer

12/07/2022

Electric Vehicle and Other Infrastructure Update Panel

11/30/2022

SPEOS Updates in Ansys 2022 R2 - Webinar

11/23/2022

Simulation Best Practices for Electronics Reliability - Webinar

11/16/2022

Discovery Updates in Ansys 2022 R2

11/10/2022

VentureCafe Phoenix Panel: Venture Capital in AZ

11/08/2022

2022 GOVERNOR’S CELEBRATION OF INNOVATION AWARDS + TECH SHOWCASE

11/03/2022

VentureCafe Phoenix Panel: Angel Investment in AZ

11/02/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R2

10/26/2022

Simulation Best Practices For Chip-Package-System Design & Development

10/20/2022

Nerdtoberfest 2022

10/19/2022

2022 Southern Arizona Tech + Business Expo

10/19/2022

LS-DYNA Updates in Ansys 2022 R2 - Webinar

10/17/2022

Experience Stratasys Truck Tour - Clearfield Utah

10/14/2022

ASU School of Manufacturing Systems and Networks - Formal Opening Cele

10/14/2022

Experience Stratasys Truck Tour - Midvale Utah

10/12/2022

Experience Stratasys Truck Tour - Littleton Colorado

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

Search in PADT site

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: