TAGGED: ansys-apdl
-
-
August 10, 2022 at 5:04 pm
mer153
SubscriberHi Everyone,
I'm working with ANSYS MAPDL. I want to kill all elements that have higher strain levels compared to a predefined value at the end of a time step and then modify their properties for the next time step. Can we define such a condition using the ESEL command to get the elements IDs that have high strain levels and then apply EKILL to kill these elements?
To do some simplifications I tried to replace the mentioned condition with a simple condition on the time variable as presented below. However, when the time is greater than 50 sec, nothing happens. It seems the EKILL command is competely ignored.
*IF,TIME,GE,50,THEN
EKILL,2
*END
Would you please let me know why this is not working?
Thank you in advance.
-
August 11, 2022 at 2:13 pm
Chandra Sekaran
Ansys Employee- The above *IF statement looks correct. What is the response to the EKILL command? I would recommend running in batch mode so you can check the output file.
- Please check out doc for ESEL and NSEL commands for how to select based on results. ESEL can be used to select ETABLE items which are stored at element level. NSEL can be used to select nodes based on result quantities. Once you have the nodes you can get the elements.
- Something to note is that when you use distributed solver, you may be required to go to /POST1 and issue SET command to get the stress/strain type result quantities. This means you will need to do a RESTART when you enter /SOLU module again for the next time step.
-
August 14, 2022 at 4:00 pm
mer153
SubscriberDear Chandra,
Thank you for your attention and help. I needed a few days to work on the problem using your comments.
I have a few more questions and would appreciate any help that you can provide.
The conditional statement simply ignores the EKILL command. In the standard output, there is no EKILL command. I can see just the first and the third lines of the statement. I have no idea why this is happening. In other coding languages, I usually check if the defined logical expression (*IF, TIME, GE,50,THEN) allows compiling the statement by asking the algorithm to print a string like “Checked” in the output. Is there any command in APDL that can let me print something in the output?
Using the ESEL command, I could create a table containing all elements that have high strain values only after the solution is completed, i.e., after the /POST command, which comes after the /SOLU command. However, I want to do this after each time step. So, I expect the solver solves one time step, creates the mentioned table, applies the required functions to the selected elements in the table, and then by considering these modifications, goes to the next time step. This process should be repeated till the simulation is completed (all time steps are converged). I think we shouldn’t create the mentioned table in the /POST section because when we enter this section the simulation is already completed while we need to do this after each time steps. Should I do this in the /SOLU section using a do loop? How can we get the solution information for each time steps in this section?
Is there any section in the APDL documentation or the ANSYS customer portal that I can use to learn how to write such a script? I have an ANSYS customer portal account so please let me know if I need to ask this question there.
Many thanks in advance.
-
August 14, 2022 at 4:16 pm
peteroznewman
Subscriber@mer153
The Explicit Dynamics solver automatically removes elements whose strain exceeds a threshold value after each time step, no programming required. Look under Analysis Settings in the Erosion Controls branch. Erosion is the term used to describe removing elements.
-
August 14, 2022 at 4:26 pm
mer153
SubscriberDear Peter,
Thank you for your response.
I want to use the multiphysics solver so I have to use the ANSYS Mechanical. Is there any way to do this in ANSYS Mechanical (MAPDL)?
Also at some points during the simulation, I need to revive some elements, which Explicit Dynamics should not be able to do using the Erosion algorithm. Please correct me if I am wrong.
Thank you.
-
August 19, 2022 at 8:44 pm
mer153
SubscriberHi Everyone,
I am still trying to do this analysis using the ANSYS MAPDL. I would appreciate any help that you can provide.
Regards,
-
- The topic ‘How to define conditional statements to select specific elements’ is closed to new replies.
-
6625
-
1906
-
1469
-
1311
-
1022
© 2026 Copyright ANSYS, Inc. All rights reserved.