Joined: 21 Apr 2015
|Posted: Tue Aug 18, 2015 3:54 am
I am curious of the bounds of what can be done (and what should never be tried) with APDL scripting. With that in mind, I have a few questions:
What are some of the craziest and/or most complex APDL scripts you have seen written by yourself or others? What was the intended purpose of the script?
Was it effective and efficient? Was it a horror to behold that could wipe your drive clean?
As for me, I would say the craziest script I have created was one for selecting nodes between non-coplanar element faces (aka, like the /EDGE command, but getting the nodes). The script itself ended up being around only 1,100 lines of code...
It works by first coating your 3D mesh with 2D elements. From those 2D elements, it then gets all of the elements attached to each node (like a vectorized ENEXTN function), calculates the element normals, and does dot products between the element normals to get angles. If the angles calculated are more than the input angle, the faces are non-coplanar and the node is selected.
It has worked for some 3D models I have tested so far (<1M nodes) and has run pretty quickly. It would sometimes end up causing some paging, but that was mostly fixed with some VMASK compression.