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.

Non-manifold topology

Please login with a confirmed email address before reporting spam

Can COMSOL support non-manifold topologies?

I am unable to import meshes that are non-manifold and was wondering if there was a way to get these meshes into COMSOL. The problem is that there are boundary edges shared by more than two triangular faces (this is the error reported by COMSOL).

Cheers, Nathan

4 Replies Last Post Jan 13, 2011, 1:09 p.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 4, 2011, 3:02 p.m. EST
Hi

there are many discussions around this issue, as COMSOL works first of all on geometrical entities and not on the mesh, with COMSOL the mesh is the final step, in contrary to many other FEM tools. Therefore its complex to load in meshed geometries directly into COMSOL, ideally these should be first grouped to form more complex geometries to allow COSMOL to identify entities where to apply its physics.
There are a few third party programmes specialising in i.e. medical image analysis and regeneration of geometrical entities. Check the COMSOL main site, and do a search on the forum.

--
Good luck
Ivar
Hi there are many discussions around this issue, as COMSOL works first of all on geometrical entities and not on the mesh, with COMSOL the mesh is the final step, in contrary to many other FEM tools. Therefore its complex to load in meshed geometries directly into COMSOL, ideally these should be first grouped to form more complex geometries to allow COSMOL to identify entities where to apply its physics. There are a few third party programmes specialising in i.e. medical image analysis and regeneration of geometrical entities. Check the COMSOL main site, and do a search on the forum. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 4, 2011, 3:42 p.m. EST
Thanks for the comments Ivar,

You are right about the problem as it is related to two closed surfaces sharing an edge which is in turn resulting in 4 surface triangles sharing the edge (two triangles from each closed surface). As I am interested in applying the same boundary condition to each of the closed surfaces I am currently assigning these surfaces the same label.

Your comments suggest that If each closed surface was given a unique label the mesh would then load?

Cheers, Nathan

Thanks for the comments Ivar, You are right about the problem as it is related to two closed surfaces sharing an edge which is in turn resulting in 4 surface triangles sharing the edge (two triangles from each closed surface). As I am interested in applying the same boundary condition to each of the closed surfaces I am currently assigning these surfaces the same label. Your comments suggest that If each closed surface was given a unique label the mesh would then load? Cheers, Nathan

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 5, 2011, 1:34 a.m. EST
Hi

I have a little problem to follow you.
From my understanding of COMSOL's way of treating geometry (and not mesh) is that the geometry entitites = domain, boundaries, edges points are made unique and identified by an unique number (per category) via the geomanalyze() process = passing th "Finish line" in v4.

If you say that your "domain" is 1 mesh element you will end up with very mainy, as COMSOL's "id" numbering is not on the elements but on the higher level entities (most other FEM tools I know about uses the elements as entities). If a node belongs to a higher level domain boundary it inherits the boundary properties. So in union mode a boundary of a 3D domain is a surface and can only have two nabours domains I believe (hence the up and down normal vector in assembly mode when a common boundary is dedoubled). while an edge, in 3D is the intersection of at least two boundaries (but could be more), just as a point is the intersection of at least two edges (but again could be more)

For me again with mesh elements we consider its volume, and end nodes (but not the surfaces) and he extra nodes for "higher order elements" are represented by the "shae functions" in COmsol, that are again defined on the domains first and then inherited by the mesh elements belonging to a domain

This is the way I analyse COMSOl entities and mesh relationship, so when you have another FEM mesh system you need to convert it "back" which is not always a trivial task.

--
Good luck
Ivar
Hi I have a little problem to follow you. From my understanding of COMSOL's way of treating geometry (and not mesh) is that the geometry entitites = domain, boundaries, edges points are made unique and identified by an unique number (per category) via the geomanalyze() process = passing th "Finish line" in v4. If you say that your "domain" is 1 mesh element you will end up with very mainy, as COMSOL's "id" numbering is not on the elements but on the higher level entities (most other FEM tools I know about uses the elements as entities). If a node belongs to a higher level domain boundary it inherits the boundary properties. So in union mode a boundary of a 3D domain is a surface and can only have two nabours domains I believe (hence the up and down normal vector in assembly mode when a common boundary is dedoubled). while an edge, in 3D is the intersection of at least two boundaries (but could be more), just as a point is the intersection of at least two edges (but again could be more) For me again with mesh elements we consider its volume, and end nodes (but not the surfaces) and he extra nodes for "higher order elements" are represented by the "shae functions" in COmsol, that are again defined on the domains first and then inherited by the mesh elements belonging to a domain This is the way I analyse COMSOl entities and mesh relationship, so when you have another FEM mesh system you need to convert it "back" which is not always a trivial task. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 13, 2011, 1:09 p.m. EST
Hi Ivar,

Thanks again for your comments, they are very helpful and are really helping me to understand/think about the way Comsol works with a mesh.

I have always been confused about the up/down pairs and am still a little confused on their meaning. When testing my converter for writing mesh .mphtxt files I found that you could specify 0 as the number of up/down pairs for all of the geometric entities listed in the .mphtxt file which seemed to work, and resulted in me not thinking what this actually means.

Type 0 = vertex (vtx)
Type 1 = edge (edg)
Type 2 = face (tri)
Type 3 = element (tet)

As for importing a non-manifold topology, it seems that this is no problem as long as the surfaces (triangle faces) are identified/grouped/separated correctly. My import error was related to an edge being shared by more than 2 faces. To mitigate this problem I have tried the following:

- Identify the edge shared by more than 2 triangular faces
- Collect all triangular faces sharing this edge
- Give a unique id for each of the surface faces (specified in the domain tags associated with the face data of the .mphtxt file)

This seems like a pretty dirty solution to the problem but to date (knock on wood!) I have been able to import non-manifold meshes. It adds to the number of domains that need to labelled with a boundary condition, but as long as this list is not too large it seems fine.

Cheers, Nathan
Hi Ivar, Thanks again for your comments, they are very helpful and are really helping me to understand/think about the way Comsol works with a mesh. I have always been confused about the up/down pairs and am still a little confused on their meaning. When testing my converter for writing mesh .mphtxt files I found that you could specify 0 as the number of up/down pairs for all of the geometric entities listed in the .mphtxt file which seemed to work, and resulted in me not thinking what this actually means. Type 0 = vertex (vtx) Type 1 = edge (edg) Type 2 = face (tri) Type 3 = element (tet) As for importing a non-manifold topology, it seems that this is no problem as long as the surfaces (triangle faces) are identified/grouped/separated correctly. My import error was related to an edge being shared by more than 2 faces. To mitigate this problem I have tried the following: - Identify the edge shared by more than 2 triangular faces - Collect all triangular faces sharing this edge - Give a unique id for each of the surface faces (specified in the domain tags associated with the face data of the .mphtxt file) This seems like a pretty dirty solution to the problem but to date (knock on wood!) I have been able to import non-manifold meshes. It adds to the number of domains that need to labelled with a boundary condition, but as long as this list is not too large it seems fine. Cheers, Nathan

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.