Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distance integration points surface

Status
Not open for further replies.

NC2020

Mechanical
Feb 15, 2020
4
Hi everyone,

I am new in the forum and I have a problem I am trying to solve for weeks, maybe you can help me. After my simulation in Abaqus, once I have exported the stress at each integration point with the respective coordinate, I need to calculate for each integration point the distance from the closest surface. Of course, the geometry can be arbitrarily complex. I do not know if there is a simple way to do it directly from Abaqus or this should be done in the post processing of the data. If you have any idea on how can I solve the problem, please do not hesitate to make suggestions.

Thanks in advance.
 
Replies continue below

Recommended for you

This will require the use of Python scripting. Location of each integration points is stored in COORD variable so your script will have to loop through these points. You should also create a surface or set object for the outer surface of your model so that the script knows the second target for distance calculation. Then you could use coordinates of the nodes belonging to this surface/set.
 
So, if I create a set object with the outer surface of the model then I can export the coordinates of the nodes that belong to this set, right? And after that with the coordinates of the integration points how can I proceed? By the way, really thank you for the quick reply
 
There is a plug-in called Find Nearest Node that you could use for this purpose. An example of the Python code that does similar thing can be found in this thread:


In your case you should add loop to find nearest node (belonging to predefined set) for each integration point. Just note that this will work for undeformed coordinates only.
 
Thank you very much. It works very well. By chance do you have also an idea on how to extract the coordinates that belong to the outer surface? I could create a set before but the idea is to do everything after the simulation. I tried with this piece of code:

p = mdb.models[name].parts[name]
surf_nodes = []
for face in p.elementFaces():
if len(face.getElements()) == 1:
# Then the face has only one associated element, ie it's on the surface.
# Get the nodes on the face:
surf_nodes.extend([node for node in face.getNodes() if node not in surf_nodes])

The problem is that when I launch the script I receive this message:

TypeError: MeshFaceArray object is not callable.

Do you know how can I solve this??

Thanks in advance.
 
MeshFaceArray object is accessed via elementFaces in for loop within your code. So that’s where the error is located. I think that this empty bracket is unnecessary here since elementFaces is an object, not a method (function related to object).

So try this:
...
for face in p.elementFaces:
...
 
it worked, thank you very much :) I also tried, as you suggested, to make a loop for all the integration points to calculate the distance from the points detected on the surface. And as expected in terms of computational effort it takes really long. Now what I wanted to do is start to make this calculation only on the integration points in the elements exposed on the surface. The problem is that with the script above I know the nodes that belong to the surface but not the elements. Is there a way to have also this information or to know directly given a certain node, all the elements in which that node is present?
Thank you in advance for your help :)
 
So it works as expected and returns only outer surface nodes ? Did you change something ? Because you said that it also picks some nodes inside the model.

This can be done with node.getElements(). It’s a method that returns elements sharing given node.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor