Access to nodal results on element by element basis
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Access to nodal results on element by element basis
Hi, I want to do some post processing for which I need to cycle through the elements of the result mesh and for each element access the element nodal results and nodal coordinates. So not simply run through all nodes, but access them on an element by element basis. How can I best do that? Thanks. Harry
Re: Access to nodal results on element by element basis
load FEM 3D example
Code: Select all
mesh = App.ActiveDocument.Box_Mesh.FemMesh
for v in mesh.Volumes:
nodes = mesh.getElementNodes(v)
print('volume: {0} --> nodes: {1}'.format(v, nodes))
Re: Access to nodal results on element by element basis
including the displacement result for each element node ...
Code: Select all
mesh = App.ActiveDocument.Box_Mesh.FemMesh
results = App.ActiveDocument.CalculiX_static_results
for v in mesh.Volumes:
nodes = mesh.getElementNodes(v)
print('volume: {0} --> nodes: {1}'.format(v, nodes))
for n in nodes:
print(' node: {0} has displacement: {1}'.format(n, results.DisplacementLengths[results.NodeNumbers.index(n)]))
Re: Access to nodal results on element by element basis
ahh mesh should be the result mesh not the input mesh!
Re: Access to nodal results on element by element basis
Fantastic Bernd, thanks.
I have an idea of how to visualize stress trajectories in a solid. For this I need to integrate principal stress intensity and direction over the full mesh. That's where I needs this.
I have an idea of how to visualize stress trajectories in a solid. For this I need to integrate principal stress intensity and direction over the full mesh. That's where I needs this.
Re: Access to nodal results on element by element basis
What I have in mind is different in that it plots continuous lines, showing the flow of load from application to support ... more like this:
Re: Access to nodal results on element by element basis
Would this be a kind of vector views?
Re: Access to nodal results on element by element basis
No it would be contour lines. The tangent to the line gives the direction of the principal stress and closeness of the lines gives the stress intensity. It's basically a "stress flow" plot.