Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Full 3D Mesh Import with Topology Preservation

Please login with a confirmed email address before reporting spam

Dear all,

I need to import custom meshes into Comsol, and I have to write my output routine. The choice is now about what format I should output, so that Comsol will import it as it is.

A very strict requirement is that the topological information of the mesh must be conserved: I need to match tetrahedrons, vertices, and connectivity at all levels between different meshes. All the meshes I will produce have the same topology, and cannot be changed/remeshes.

What do you suggest I could output to ease the import? I've read in the forum about STEP, and I have also read about mphtxt, but I don't know if any format will be processed and I will lose information.

Thanks, Franco


3 Replies Last Post 2020年6月11日 GMT-4 10:31
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2020年6月11日 GMT-4 09:01

Hello Franco,

The COMSOLMultiphysics Mesh Import and Export Guide discusses the various formats available to you.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Franco, The [COMSOLMultiphysics Mesh Import and Export Guide](https://www.comsol.com/model/comsol-multiphysics-mesh-import-and-export-guide-72351) discusses the various formats available to you. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2020年6月11日 GMT-4 10:05

Hi Jeff,

thanks for the answer. I found the COMSOL_MeshImportExportGuide.pdf very helpful! Thank you!

I just have to be sure not to write the wrong format... In the PDF I see that

When importing volumetric mesh data, COMSOL Multiphysics can retain the original mesh, such as a tetrahedral mesh, and use the mesh data in any type of physics analysis, regardless of the intent of the original imported mesh.

The "can" is a little scary to me, as I do really need to make analyses on different meshes retaining the very same underlying topology.

So if I write a mphtxt file I will always retain in Comsol all vertices and cell indices, and connectivity?

I am sorry to ask such a pedantic question, but without a complete bijection between meshes the solutions won't make any sense...

Thank you very much! Franco

Hi Jeff, thanks for the answer. I found the COMSOL_MeshImportExportGuide.pdf very helpful! Thank you! I just have to be sure not to write the wrong format... In the PDF I see that > When importing volumetric mesh data, COMSOL Multiphysics can retain the original mesh, such as a tetrahedral mesh, and use the mesh data in any type of physics analysis, regardless of the intent of the original imported mesh. > The "can" is a little scary to me, as I do really need to make analyses on different meshes retaining the very same underlying topology. So if I write a `mphtxt` file I will always retain in Comsol all vertices and cell indices, and connectivity? I am sorry to ask such a pedantic question, but without a complete bijection between meshes the solutions won't make any sense... Thank you very much! Franco

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2020年6月11日 GMT-4 10:31
Updated: 4 years ago 2020年6月11日 GMT-4 10:41

Hi Franco,

If you import the mesh and then don't convert that mesh into a geometry that you then remesh, then yes, COMSOL will use the mesh you imported. I am not an expert on the topic so I can't guarantee you that the nodes and elements don't get renumbered.

BTW, you don't have to take my word for it: after a computation, you can export the mesh and nodal post-processing data out of COMSOL and double-check that it matches what you imported.

Best regards,

Jeff

-------------------
Jeff Hiller
Hi Franco, If you import the mesh and then don't convert that mesh into a geometry that you then remesh, then yes, COMSOL will use the mesh you imported. I am not an expert on the topic so I can't guarantee you that the nodes and elements don't get renumbered. BTW, you don't have to take my word for it: after a computation, you can export the mesh and nodal post-processing data out of COMSOL and double-check that it matches what you imported. Best regards, Jeff

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.