Hi,
I have a pyAnsys dpf core script that extracts the mesh and nodal stress tensor from a Mechanical rst file and converts it for an upstream task. The model I am using has a non-linear adaptive region (remeshing), I am interested in the adapted mesh and stresses at the end of the analysis (post remeshing).
The mesh is extracted using a mesh provider, and the adapted mesh is retrieved ok for the last step. However, the stress tensor is not exported as expected. It seems, at least with the code I have been using (pasted below) that the nodal stress in the adaptive region are not retrieved. I looked at a test case where a model was analysed with and without an adaptive region defined. For the case with the adaptive region defined no remeshing occurs (low load). The stress tensor converts fine for the whole model when there is no adaptive region, however when an adaptive region is defined the stress tensor for nodes within that region is not retrieved.
I expect I am using the wrong operators, I am not long using pyAnsys. Any help is appreciated.
Thanks, Barry
retriving stress tensor
stress_op = dpf.operators.result.stress()
stress_op.inputs.data_sources.connect(model.metadata.data_sources)
stress_op.inputs.time_scoping.connect([last_set])
stress_op.inputs.bool_rotate_to_global.connect(False)
stress_fc = stress_op.outputs.fields_container()
avg_op = dpf.operators.averaging.to_nodal_fc()
avg_op.inputs.fields_container.connect(stress_fc)
stress_fc = avg_op.outputs.fields_container()
stress_field = stress_fc[0]
nodal_stress = stress_field.data