Hi
I am working on script that have to extract data - node ids, coordinates, displacement and Von misses stress to csv. As coordinates and displacement works fine, stress seems to be working differently, order of output is different - not sorted by node ids.
below is part of the code that is extracting stress.
stress_von_mises = ops.result.stress_von_mises(data_sources=model)
# Restrict scoping to named selection
stress_von_mises.inputs.mesh_scoping.connect(nodal_scope)
stress_von_mises.inputs.time_scoping.connect(LS)
stress_von_mises.inputs.requested_location.connect('Nodal')
fields_stress=np.asmatrix(stress_von_mises.outputs.fields_container.get_data()[0].data)
While i am using above method first element of array is not a stress at first node that i am extracting from scoping with method as below.
node_ids=nodal_scope.ids
While i am using same methodology for displacement it works fine. I don't understand why this is happening with stress.
displacement = ops.result.displacement(data_sources=model)
# Restrict scoping to named selection
displacement.inputs.mesh_scoping.connect(nodal_scope)
displacement.inputs.time_scoping.connect(LS)
fields_disp=np.asmatrix(displacement.outputs.fields_container.get_data()[0].data)
Do you know how i can retrieve the order that stress are written into the field ?
as the code need to be efficient i can't use extraction with for loop and extracting by one node at the time (get_entity_data_by_id for example)