I'm playing with scoping in combination with skin mesh, and see something unexpected.
In this script
from ansys.dpf import post
rst_path = r"D:\beam_2_mat.rst"
simulation = post.StaticMechanicalSimulation(rst_path)
simulation._model.metadata.meshed_region.plot()
# get an elemental named selection
scoping = simulation._model.metadata.meshed_region.named_selection(
'X_MIN_SOLID_ELE'
)
seqv_ns_full = simulation.stress_eqv_von_mises_elemental(element_ids=scoping.ids)
seqv_ns_full.plot()
seqv_ns_skin = simulation.stress_eqv_von_mises_elemental(skin=scoping.ids)
seqv_ns_skin._fc[0].meshed_region.plot()
seqv_ns_skin.plot()
I get this (correct) plot for the field on the solid mesh
but this one on the skin
The same rst file also contains other named selections that can be used for comparison. For instance MG_BODY_ELE and MG_BODY_NODES are named selections covering the same region with elemental and nodal location, respectively. The same applies to ALU_BODY_ELE and ALU_BODY_NODES.
Would be good to validate these kind of comparisons:
# get an elemental named selection
scoping = simulation._model.metadata.meshed_region.named_selection(
'MG_BODY_ELE'
)
seqv_ns_full = simulation.stress_eqv_von_mises_elemental(element_ids=scoping.ids)
seqv_ns_full.plot()
seqv_ns_skin = simulation.stress_eqv_von_mises_elemental(skin=scoping.ids)
seqv_ns_skin._fc[0].meshed_region.plot()
seqv_ns_skin.plot()
# get a nodal named selection
scoping = simulation._model.metadata.meshed_region.named_selection(
'MG_BODY_NODES'
)
seqv_ns_full = simulation.stress_eqv_von_mises_nodal(node_ids=scoping.ids)
seqv_ns_full.plot()
seqv_ns_skin = simulation.stress_eqv_von_mises_nodal(skin=True, node_ids=scoping.ids)
seqv_ns_skin._fc[0].meshed_region.plot()
seqv_ns_skin.plot()
Before submitting the issue
Description of the bug
I'm playing with scoping in combination with skin mesh, and see something unexpected. In this script
I get this (correct) plot for the field on the solid mesh
but this one on the skin
The same rst file also contains other named selections that can be used for comparison. For instance
MG_BODY_ELE
andMG_BODY_NODES
are named selections covering the same region with elemental and nodal location, respectively. The same applies toALU_BODY_ELE
andALU_BODY_NODES
.Would be good to validate these kind of comparisons:
The rst file: beam_2_mat.zip
Steps To Reproduce
-
Which Operating System are you using?
Windows
Which DPF/Ansys version are you using?
Ansys 2023 R2
Which Python version are you using?
3.10
Installed packages
-