Replies: 5 comments 3 replies
-
This is also something I'd like to see added. I think you could use the few nearest nodes to interpolate it, but a more appropriate way is to find the element the point lies within and then use it's shape functions to calculate the stress from the elements Gauss points. |
Beta Was this translation helpful? Give feedback.
-
Here's how I made it work on my end:
|
Beta Was this translation helpful? Give feedback.
-
This is something I ran into in testing. Yes, the stresses are in the same order as the mesh point. If you want stress at a specific node, and you know the coordinates of that node, I wrote a simple function that will return the proper index. This works for getting stress peaks at corners, for example, like my Peery tests. As Spectre5 pointed out, the most accurate way to get the stress at any arbitrary point would require using the shape function, since the elements sectionproperties uses are not constant-strain triangles. I'd have to dig up my FE book again, but I believe the CTRIA6 have a def get_node(nodes, coord) -> (int, tuple):
'''
This function will loop over the node list provided,
finding the index of the coordinates you want.
Returns the index in the nodes list, and the coords.
'''
for index,var in enumerate(nodes):
if all(var == coord):
return index, var
else:
continue Then, Edit: I was wrong about the CTRIA6 shape function. Updated my comment above. |
Beta Was this translation helpful? Give feedback.
-
Hi all, Just following up on this thread a few months late with a few comments: For reference, the below is detailed in this document, I have included references for ease of finding the correct section.
This is definitely something that could be implemented in the future if it's deemed useful? At this stage, it would probably be a post v2 implementation, but let me know your thoughts! Robbie |
Beta Was this translation helpful? Give feedback.
-
@scote89, Colin's feature will now plot a Mohr's Circle at any point. If you can't work with that, you can place a point in the geometry there, which will place a node in the mesh, and you can pull the stresses with my function above. If you want the actual code, look at Colin's function source. You basically pull all the data for the stress field, construct an interpolator (he uses a linear interpolator from matplotlib), and solve for whatever combined state you want. The details are frankly beyond me without breaking out my textbooks. Hopefully just having the circles will give you what you want? |
Beta Was this translation helpful? Give feedback.
-
Im interested in getting the cross-section stress at a specific location/point but it does not look like there is a direct function for it right? Any idea how one could achieve this?
Are the mesh points (mesh.points) and the stresses (stresses[0]["sig_zz"]) in the same order? If so, I would imagine having to write an interpolation function between the closest mesh point.
Beta Was this translation helpful? Give feedback.
All reactions