Sifting through the wreckage: Element Birth and Death in Workbench

So the WebEx that expanded upon my article about load vs. sub-step in Workbench ended with me getting booted from the teleconference and unable to rejoin.  I handled as many questions as possible through the chat window, but one of them required a bit more than I was willing to answer via chat window.  That question was “do you have an example of element birth/death using command snippets”. 

It may not have been that bad…and I might not look that cool


I’ll first start by going over element birth and death.  This functionality allows you to remove the stiffness of groups of elements from a load-step (clarification:  it technically reduces the stiffness by the value defined with the ESTIF command, which defaults to 1E-6).  I’ve typically seen it used to analyze some chip-level component where you have multiple assembly steps where the component is heated, stuff poured on it, cooled, heated back up to a different temperature, and so on.  This functionality is accessed by using the ekill and ealive commands, which operate on the currently selected element set.  I should also point out that you can use these commands on contact elements to simulate assembly processes by eliminating contact interfaces from being detected from step to step (PROTIP:  not recommended for MPC-based contact).

Next, how to enact in Workbench.  The command snippets are fairly simple, the real leg work comes in selecting the elements you want to kill.  This is typically done through named selections or selecting elements by material.  The easiest way to use named selections is to scope the named selection to a body:

Note the ‘part1’ is scoped to a body

When a named selection is scoped to a body, the MAPDL input file contains a component consisting of elements.  You can select these elements by using the command “cmsel,s,part1”.  If the named selection is scoped to a keypoint, line, or area, the corresponding component will consist of nodes.  You can ‘fight’ your way to the attached elements by doing a “esln” after you select the component (repeat as many times as you like in a *do loop).  This can get confusing if you’re using surface bodies (meshed with shells) as the surface and body ‘look’ like the same thing…just realize that it’s all in the details (window).

The other way (that I’m willing to discuss in this article) to select the elements is to ‘tag’ the material number in another command snippet.

RMB on the geometry and insert a command snippet
Note the documentation at the top of the snippet
So the trick here is reading the auto-inserted documentation (I know…no one ever reads the instructions).  It states that if you want to interact with the material for this body to use the parameter “matid”.  In the input deck, when the elements for this body are being read in, there is a scalar parameter named “matid” that contains the material property number.  All we need to do is transform that temporary value (it will increment up by one if there was another body after this) by assigning it to a different scalar.  As seen above, all I did was write “part2=matid”.  If we want to select these elements all we need to do is “esel,s,mat,,part2”. 
Now I’ll put this all together into a simple thermal expansion model.  A simple 3-2-1 displacement constraint on 3 corners will be used, and I’ll kill off both inserts.  Here’s the command snippets:
Like I said…the commands are simple

One thing that might happen is the auto-solver settings will have the inappropriate settings to properly support element birth death.  If that happens, you’ll get the dreaded “an unknown error has occurred” in the message window.  Looking into the ‘Solution Information’ window will then show:

Also note the element selection status, the selection logic worked!
So we’ll modify the command snippet using the error suggestion:
Happy now solver?

Here’s a comparison of the results with the command snippet active vs inactive:

Element death results
Standard results

Now if you want to bring elements back into the model, you just need to insert a command snippet and scope it to the proper load step:

Solver Settings
Ekill Command Snippet Details
Ealive Command Snippet Details

The second command snippet just needs to contain the command “ealive,all” in order to bring everything back.  If you want to only bring back part of the model use the same selection logic as before.  I’m not going to show any results, as everything is linear, it’s late, and my dog isn’t very happy about me writing this article.  Hopefully you get the point.

In conclusion, some basic knowledge of MAPDL selection logic and load-step options within Mechanical, you can easily incorporate element birth and death into your model. 


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

Technical Expertise to Enable your Additive 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: . 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


Connect Updates in Ansys 2024 R1 - Webinar


Structures Updates in Ansys 2024 R1 (3) - Webinar


E-Mobility and Clean Energy Summit


Fluids Updates in Ansys 2024 R1 - Webinar


Stratafest - Denver, CO


2024 CEO Leadership Retreat


New Mexico Tech Summit 2024


PADT30 | Nerdtoberfest 2024

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: