If we try to use Von Mises invariant operator, we are getting different values than Mechanical. Why?
As you might know, for getting Von Mises equivalent stresses we make use of Segalman formulation, that's why we should not use the invariant von mises operator. In invariants operators, segalman is included, but dpf does not have access to the mode coefficients. That's why we need to make use of von mises operator to get same results as Mechanical. It is recommended to use Ansys 2025R1 or later.
Below the script to be used:
import mech_dpf import Ans.DataProcessing as dpf mech_dpf.setExtAPI(ExtAPI) #Get the data source (Random Vibration analysis) dataSource = mech_dpf.GetDataSources(1) # Step 2, equals to 3 in MAPDL timeScoping = dpf.Scoping() timeScoping.Ids = [2] #Read stresses using Von Mises stress result s_vm_op = dpf.operators.result.stress_von_mises() s_vm_op.inputs.data_sources.Connect(dataSource) s_vm_op.inputs.time_scoping.Connect(timeScoping) s_vm_op.inputs.requested_location.Connect('Nodal') svm_fields = s_vm_op.outputs.fields_container.GetData() svm_field = svm_fields[0]