Can't Export both Volumes and Boundaries from Salome

Mesh generators, CAD programs, and other tools
Post Reply
jlema
Posts: 3
Joined: 17 May 2023, 08:58
Antispam: Yes

Can't Export both Volumes and Boundaries from Salome

Post by jlema »

Hello. I am trying to create a simple model of a conducting electrode in a semi-conducting material. I am using Salome Shaper / Geometry to create the model and to mesh (see attached model). Depending on how I set up the model, I can get either volumes out or boundaries out, but not both. What is the best way to set up Salome model groups etc. to get both volumes and boundaries in a .unv mesh that will be recognized when opening in Elmer or importing to Elmer?

Also note that I used the Smash function in Shaper to get the two volumes. The result was exported to Geometry where I used the "Explode" function to extract the subordinate solids. I plan to investigate voltage due to current injected in the surface at the top of the electrode. The lower surface of the hemisphere will be ground potential. All other surfaces are electrically insulating.
Attachments
ElectrodeInSemiconductor.zip
Salome .hdf file
(26.36 KiB) Downloaded 55 times
ModelComponents.png
(83.65 KiB) Not downloaded yet
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Can't Export both Volumes and Boundaries from Salome

Post by kevinarden »

The best way is to create groups in geometry by selecting the desired volumes and surfaces.
Then the geometry groups become groups of volumes and groups of surfaces in the mesh.
groups.PNG
groups.PNG (31.62 KiB) Viewed 1289 times
In Elmer the groups of volumes become bodies and the groups of surfaces become boundaries
elmer.PNG
(72.21 KiB) Not downloaded yet
jlema
Posts: 3
Joined: 17 May 2023, 08:58
Antispam: Yes

Re: Can't Export both Volumes and Boundaries from Salome

Post by jlema »

Thank you for the quick reply. I have tried this and get the same problem I had before. When I open the mesh in Elmer the volumes are not properly represented - they show up as body properties, but appear only to be surfaces associated with the bodies (see Screenshot1). I have attached the Elmer project file and the updated Salome hdf file in which I created the groups. I seem to get the same behavior whether I open the .unv mesh from within Elmer Gui or if I first import the .unv mesh with netgen to an Elmer mesh format. Any additional suggestions?
Attachments
Screenshot1.png
Screenshot1.png (85.92 KiB) Viewed 1285 times
ElmerProjectFile.zip
(611.08 KiB) Downloaded 52 times
ElectrodeInSemiconductorWithGroups.zip
(193.11 KiB) Downloaded 56 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Can't Export both Volumes and Boundaries from Salome

Post by kevinarden »

There is not anything wrong with your mesh, or boundaries. They will work find in the ElmerSolver.
The problem is ElmerGUI displays bodies by showing their associated boundary elements, not the body itself.
If you want to see the volume elements of the body there is a view option in ElmerGUI for that.

Because of the way you have created the boundary elements, and associated them with the volume elements, ElmerGUI is not actually showing body 1 when body 1 is selected, it is showing boundaries associated with body 1.

Your model and mesh is fine, if those are the bodies and boundaries you need.

This happens because a boundary element can be associated with more than 1 body. However, ElmerGUI will only display the first body the boundary is associated with, not the secondary body it is associated with. It is possible, but not necessary to manage the boundary grouping so it looks better in ElmerGUI.

As long as you realize that displaying a body in ElmerGUI, is really only the the boundary surface associated with that body. Then the rest of Elmer will work fine.

You also have 4 groups of volumes for two bodies, i.e. two are duplicates.
jlema
Posts: 3
Joined: 17 May 2023, 08:58
Antispam: Yes

Re: Can't Export both Volumes and Boundaries from Salome

Post by jlema »

Thank you, that helps and I was able to get the model to work. One other thing for the benefit of anyone reading this thread - in order to prep the Salome .unv mesh export for Elmer, I had used "Explode" in Salome to get the solids and faces that I wanted to be able to access in FEM. However, I had initially exploded solids from the Shaper Smash result, then exploded faces from those solids (see ThisApproachDidntWorkWell.png). In the end, what worked best for me was to explode the solids from the Smash result, then separately explode the faces from the same Smash result. That way, all solids and faces I wanted to access were at the same level under the Shaper Smash result (see BestApproachForPreppingForUnvMeshExport.png). Grouping could then be used if desired, but this method worked fine without any groupings. After creating and exporting the .unv mesh, Elmer GUI behaved visually as expected when selecting volumes or boundaries.
Attachments
ThisApproachDidntWorkWell.png
ThisApproachDidntWorkWell.png (14.83 KiB) Viewed 1238 times
BestApproachForPreppingForUnvMeshExport.png
BestApproachForPreppingForUnvMeshExport.png (11.38 KiB) Viewed 1238 times
Post Reply