Page 1 of 1

Gmsh import doesn't show geometry

Posted: 21 Jul 2021, 22:48
by emells99
Hey all,

I've been trying to import my mesh into elmer and I'm nearly there, but something is going screwy in the last step.

What I did:
1) built the geometry in solidworks and exported as a .step file
2) meshed in gmsh (and made some physical groups for boundaries/solid bodies); exported as .unv
3) opened the .unv file in Elmer

The mesh displays just fine, but the CAD model is empty, and when I click on the different body properties nothing highlights, so I can't tell which is which. I've attached the .step and .geo files for reference (the .unv file is too large to upload, so I made a very coarse version of the mesh to upload--it works the same when I import it to Elmer).

What step have I missed in here, or how do I need to modify the geometry/mesh to make it work?

Thanks!

Re: Gmsh import doesn't show geometry

Posted: 22 Jul 2021, 01:06
by Rich_B
Hello,

I opened the .step and .geo files using gmsh.

Then, without changing anything in gmsh, Export, and select gmsh version 2, checked save all elements, then save as 'coil_substrate.msh' using the .msh extension.

Next, run 'elmergrid 14 2 coil_substrate -autoclean', which creates the elmer mesh files. Note that elmergrid can't tolerate any spaces in file names or directory names.

Load in ElmerGUI, and the picture looks nice and there are selectable entries under bodies and boundaries.
coil_substrate.png
(229.15 KiB) Not downloaded yet
Basically, use gmsh to export the mesh in gmsh2 format, then use elmergrid to convert the mesh to elmer format.

Hope this works for you.

Rich.

Re: Gmsh import doesn't show geometry

Posted: 22 Jul 2021, 02:30
by emells99
Thank you so much! This worked perfectly.

Cheers,
E

Re: Gmsh import doesn't show geometry

Posted: 22 Jul 2021, 15:26
by Rich_B
Glad to hear it worked for you.

Would you mind exporting and posting the Solidworks file again, this time in addition to STEP, also in BREP, STL, and IGES?

Just curious to see how all four Solidworks export formats work with both gmsh and ElmerGUI.

Thanks, Rich.

Re: Gmsh import doesn't show geometry

Posted: 23 Jul 2021, 00:37
by emells99
Here is the STL and IGES files. The version of solidworks I'm using doesn't seem to have an export to BREP option, but hopefully these are still useful to you.
Cheers,
E