Mechanical DPF -> Scope on FACE of a solid body
Hello all,
I am using pyAnsys and pyDPF to post-process a structural model that I built in Workbench Mechanical. The geometry is a mixture of solid and surface bodies, thus the mesh contains both surface and solid elements.
For the post-processing, I am selecting the geometry of interest using Named Selections, see below:
Note:
1- I have various surface bodies and the Named Selection is scoping on their face
2- I have one solid body and the Named Selection is scoping only on one of the faces
I am opening the result file with pyDPF, and getting the results of both the full model and also of the named selection. See snippet below:
`
NamedSelectionText = "PIPE"
Opening the Ansys Data
dataSources = dpf.DataSources(result_path=ansysResultFilePath)
model = dpf.Model(dataSources)
ansysMeshAll: dpf.MeshedRegion
ansysMeshAll = model.metadata.meshed_region
Reads the displacements of all the model
dispResultsAll: FieldsContainer
dispResultsAll = model.results.displacement().eval()
The scoping on the named selection
nSelScopingOpt = ops.scoping.on_named_selection(named_selection_name=NamedSelectionText, data_sources=dataSources, requested_location="Nodal")
meshNamedSelScopingOpt = ops.mesh.from_scoping(mesh=ansysMeshAll, scoping=nSelScopingOpt)
meshNamedSel = meshNamedSelScopingOpt.outputs.mesh()
meshNamedSel.plot()
Reads only the results of the named selection
dispResultNamedSelOpt = ops.result.displacement(data_sources=dataSources, mesh_scoping=nSelScopingOpt, mesh=meshNamedSel)
dispResultNamedSel = dispResultNamedSelOpt.eval()
dispResultNamedSel.plot()`
The issue is that the meshNamedSel MeshedRegion is coming with the full mesh (the solid elements). See below:
And the dispResultNamedSel FieldContainer strangely does contain only the results of the scoped Named Selection - but the entire mesh is still there. See below:
The assistance I am looking for is how to get the mesh of only the scoped faces? I need this down the line because I am transforming it to vtk and applying some section planes for post-processing.
Thank you for your help!
Comments
-
Now this is getting weird. I saw that the mesh: from scoping filter has a property called inclusive.
- inclusive
- (int32)
- if inclusive == 1 then all the elements/faces adjacent to the nodes ids in input are added, if inclusive == 0, only the elements/faces which have all their nodes in the scoping are included
If I set to 0 , the output data is filtered in this way:
The region that stays after the scoping is a region in which I have a contact setup.
What does this contact have to do with the scoped surface in the named selection? How should I scope to get the regions I want?
0 -
Can someone from @AKD-Scripting-Team help here? Many thanks
0