Page 1 of 1

Extraction of Node Stresses During Post-Processing

Posted: Tue Jul 21, 2026 4:06 pm
by Alessandro2016
Dear STKO team,
I have a question and would appreciate your help. As far as I can tell, the current STKO calculation results only display stress values at Gauss points. I would like to further extract the stress calculation results at nodes. To that end, I’ve been learning how to use the Python API through webinars and the Python package for STKO v.2.0. I’ve now written some preliminary code to process the MPCO calculation results, as shown below:

Code: Select all

from PyMpc import *
from PyMpc import MpcOdbVirtualResult as vr
App.clearTerminal()
doc = App.postDocument()
db = doc.getDatabase(1)
stress = db.getElementalResult('stress',  match = MpcOdb.Contains)
s22_gauss = vr.comp(stress, 1)
db.removeNodalResult('Sigma 22')
s22 = vr.toNode(s22_gauss)
s22.setDisplayName('Sigma 22')
s22.setComponentLabels(['Sigma 22'])
db.addVirtualResult(s22)
s22 = db.getNodalResult('Sigma 22')
However, I’ve encountered an issue and am unable to determine the exact cause. When using STKO version 3.2.0, this code successfully retrieved the node stress results. However, when using a newer version of STKO, while the stress contour plot displays correctly, as shown in Figure 1, the “chart data” section remains empty, and the following error message appears:

Code: Select all

Error: (MpcOdbReaderMakeScalarFieldHistory) Could not find the following nodes in the field data:
5331, 
Abort Command: ExtractChartData
Could you please offer some advice? Is this code capable of effectively extracting node stress results, or how should I modify it to make it compatible with newer versions of STKO?

I hope I’ve explained my question clearly and look forward to your response.
figure1:
figure 1.jpg
figure 1.jpg (138.35 KiB) Viewed 202 times
Best regards

Re: Extraction of Node Stresses During Post-Processing

Posted: Mon Jul 27, 2026 8:19 am
by STKO Team
Dear user,
Thank you for letting us know. We're resolving the bug soon, and the fix will be available with the next stko version.

In the meantime, you can extract a value at a node, ora emulate the extract chart data via python code (look at our first webinar on python api)
As far as I can tell, the current STKO calculation results only display stress values at Gauss points. I would like to further extract the stress calculation results at nodes.
Actually any gauss result, when visualized in a surface plot, is extrapolated to the nodes, and optionally (with a checkbox) can be smoothed

Re: Extraction of Node Stresses During Post-Processing

Posted: Mon Jul 27, 2026 1:42 pm
by Alessandro2016
Dear STKO team,

Thank you for your reply. I'll try the method you suggested.

Best regards!