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')
Code: Select all
Error: (MpcOdbReaderMakeScalarFieldHistory) Could not find the following nodes in the field data:
5331,
Abort Command: ExtractChartData
I hope I’ve explained my question clearly and look forward to your response.
figure1: Best regards