Conformal meshes from ANY cad program - a cry for help?!

Mesh generators, CAD programs, and other tools
Post Reply
madstamm
Posts: 37
Joined: 07 Apr 2010, 09:56

Conformal meshes from ANY cad program - a cry for help?!

Post by madstamm »

Hello All,

I am very frustrated - after trying for several nights to get conformal meshes made, from models made in Blender or Freecad. I normally just try a simple cube as "air", and a simple sphere or cylinder inside the "air" as "material X". Then I try to import to netgen or gmsh. The closest I got was using freecad, making a booloean subtraction of a cylinder from a cube, adding a new cylinder, then exporting as STEP, and using the "stp doctor" tool in netgen to try to sew together the surfaces of the two bodies. However, I have never been successful in getting the "stp doctor" tool to truly merge the surfaces.

Has anyone been successful in making conformal meshes of multiple-body models and getting them into elmer?


(The text-based modeling for netgen or gmesh does not count!)

I would really, really appreciate some help... and I think im not the only one...

Thank you!

Mike
madstamm
Posts: 37
Joined: 07 Apr 2010, 09:56

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by madstamm »

And here are the files...

Freecad:
freecad_air_cyl.zip
(16.49 KiB) Downloaded 627 times
Object 1 - Aircube with cylinder removed
Object 2 - Cylinder

Step file, used for netgen import:
air_cyl.zip
(5.51 KiB) Downloaded 719 times
madstamm
Posts: 37
Joined: 07 Apr 2010, 09:56

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by madstamm »

bump - is this not required for electro-magnetics?

I cant imagine im the only one who is interested?!

Mike
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by mzenker »

Hi Mike,

this is an annoying problem indeed. I have started to write a tool that

* takes a 2D mesh made in gmsh,
* detects and merges duplicated surfaces,
* writes a cleaned 2D msh file and a geo file so that the volumes are recreated using the merged faces.

A 3D mesh can then be created in gmsh.
This works for not too complicated geometries, but it fails in many cases when there are partially overlapping faces.
As soon as I have it in a reasonably mature state, I will post it here.
I have tried my tool on your case - it works. I have attached the result files here.
But i imagine that you will want to treat more complicated geometries. In the case you have posted, a manual healing within gmsh would also be possible with reasonable effort.

Did you try Salome? It is said to have tools to solve this kind of problem.
However, the Windoze version is considered to be not very stable.

HTH,

Matthias
Attachments
air_cyl.zip
(284.83 KiB) Downloaded 542 times
madstamm
Posts: 37
Joined: 07 Apr 2010, 09:56

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by madstamm »

Dear Matthias,

Thank you! .... it is already good to know someone else is aving this problem... do you agree that a functioning workflow in this matter would make elmer much more attractive for electromagnetics?

Anyway, I am almost finished putting together a linux box, and will install Salome... and learn yet another tool.. after gmsh, engrid, netget... never mind elmer and electrodynamics in the first place!!!

but i still hope that it will be worth it :)

Mike

PS: of course I would still be interested in your program. I do plan on complex geometries however, that is why a good workflow is so important...
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by mzenker »

Hi Mike,
... do you agree that a functioning workflow in this matter would make elmer much more attractive for electromagnetics?
... and for thermal and thermal-electromagnetic simulations as well. YES, I agree!
of course I would still be interested in your program.
As I said, I will post it as soon as I think it is usable for other people. You will need scilab (http://www.scilab.org) or scicoslab (http://www.scicoslab.org) to run it.

Matthias
madstamm
Posts: 37
Joined: 07 Apr 2010, 09:56

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by madstamm »

Ive finally done it!

Howto:

1. Install Ubuntu 10.04 (NOT the latest 11.10, unless you want to compile elmer from source, which is not childs play for windows amateurs like me)
2. Add the openinnovation repository in synaptic package manager, as shown here:
http://www.opennovation.org/ubuntu/
3. install the latest Elmer release for Ubuntu 10.04 (this step currently fails if you have Ubuntu 11.10)
4. Download and extract Salome, "generic Linux Release" here:
http://www.salome-platform.org/downloads/salome-v6.3.1
5. Start Salome and follow the elmer-salome tutorial here:
http://www.elmerfem.org/wiki/index.php/ ... e_to_Elmer
6. be conformal. and happy :)

Mike
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by hazelsct »

Hello Michael,

I'm glad you succeeded. But Salomé is a beast, so for those who don't want to use it, there's also NETGEN the external program. I've been able to define multi-body geometries in FreeCAD, save them in STEP format, import them in NETGEN, mesh them, export them in Elmer format, and use them in Elmer.

Hope this helps,
Adam
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by mzenker »

Hi,

for the records: the Elmer-Salome tutorial is here: http://www.elmerfem.org/elmerwiki/index ... e_to_Elmer, the link above does not work.

Matthias
Bernd_Schmitt
Posts: 12
Joined: 29 Nov 2012, 11:36
Antispam: Yes

Re: Conformal meshes from ANY cad program - a cry for help?!

Post by Bernd_Schmitt »

Hello Adam,

how do you create a multi-body mesh (e.g. just two boxes) in freecad?
just drawing the boxes and exporting to step obviously is not the right way.
what has to be done to get a multi-body structure?

thanks
Bernd
Post Reply