HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
128 stars 51 forks source link

can the mesh file format generated by comsol be used? #173

Open xinchenee opened 6 years ago

xinchenee commented 6 years ago

according to https://github.com/HomerReid/scuff-em/blob/master/doc/docs/reference/Geometries.md, it says comsol meshing works. But we use mesh file format, .mph, .mphbin, .mphtxt, .mphphb supported by comsol, but none of them can be read by scuffem.

HomerReid commented 6 years ago

Could you supply a minimal working example with a .mphtxt file to illustrate what you are trying to do and what is not working as you expect? I'd be happy to take a look.

drabujetas commented 5 years ago

I normally use Comsol to create meshes, but before to use it on Scuff I need to "process it". I export the mesh as a .stl and later I use another program (gmsh in my case) to covert it to .msh.

martikj2 commented 5 years ago

Exporting mesh as binary stl from Comsol and then converting that to *.msh with gmsh seemed to work for me. I had initially a problem with "invalid mesh topology: edge 2 of panel 0 also belongs to panels 0 and 0" with Comsol generated mesh, but I suspect it had to do with me using SI units in making a small nano-particle in Comsol. Presumably should have used micrometer as length unit also in Comsol since the problem went away when particle was "scaled" bigger in Comsol.