Errors when importing gmsh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • JonahA
    Member
    • Jun 2018
    • 38

    Errors when importing gmsh

    I've been trying to import a .gmsh mesh file into PreView (file here). However, when I try to import it as geometry, it says that it doesn't recognize the Entities section: "Unknown Section: Entities." If I delete the Entities section from the file, it then gives "Error while reading Nodes section." These two programs should be compatible, right?
  • maas
    Lead Code Developer
    • Nov 2007
    • 3441

    #2
    Hi,

    It looks like this file is a newer version of the gmsh file format that PreView is not familiar with. I'll take a look at what's involved in supporting this version, but if you can export this file to an older gmsh (version 2) or a different file format, that might work too.

    Cheers,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

    Comment

    • JonahA
      Member
      • Jun 2018
      • 38

      #3
      Originally posted by maas View Post
      Hi,

      It looks like this file is a newer version of the gmsh file format that PreView is not familiar with. I'll take a look at what's involved in supporting this version, but if you can export this file to an older gmsh (version 2) or a different file format, that might work too.

      Cheers,

      Steve
      I had to go back to the old gmsh version to do the meshing. However, I'm having some issues doing local mesh refinement on a thin spherical shell in gmsh, since I can't seem to create a mesh that is finer near a point on the surface of a sphere while also having a structured mesh with layers perpendicular to the sphere. Is there any way to refine a mesh locally (near a point) in PreView?

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3441

        #4
        Hi,

        There is a way to refine an element selection PreView. If you select an element near the point of interest, then that might work. This is how you do this:
        1. Import a tetmesh.
        2. Select an element near the point of interest.
        3. Activate the mesh panel and click Tetgen
        4. Set a desired element size, click "split facets" and set the feather to e.g. 5 (which sets the number of element levels used for creating a smooth transition between the refined region and the rest of the mesh). You'll have to play a bit with these parameters. If you don't like the refined mesh, click Edit\Undo first before trying new parameters.

        Let me know if that worked for you.

        Cheers,

        Steve
        Department of Bioengineering, University of Utah
        Scientific Computing and Imaging institute, University of Utah

        Comment

        • JonahA
          Member
          • Jun 2018
          • 38

          #5
          Can I do this with a mesh created in PreView? What if it is not a tet mesh?

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3441

            #6
            Unfortunately, we only have local refinement algorithms for tet meshes, but it works with tet meshes created in PreView too.

            Cheers,

            Steve
            Department of Bioengineering, University of Utah
            Scientific Computing and Imaging institute, University of Utah

            Comment

            • JonahA
              Member
              • Jun 2018
              • 38

              #7
              I don't see the place to set the "feather"? Also, it's weird: when I select a point on a sphere with a tet mesh and follow the process you mentioned, it affects other points on the sphere in a weird mesh refinement pattern.
              Attached Files

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3441

                #8
                Maybe you are using the "Refine Mesh" tool, not the Tetgen tool? (The "Refine Mesh" tool is a template based mesh refinement algorithm. Sometimes it can create streaks of additionally refined sections that are needed to resolve connectivity issues.) If you don't see the Tetgen option, perhaps first convert the model to an Editable Mesh. Then, on the Mesh panel tab, you should find the Tetgen tool, with the options mentioned above.

                Cheers,

                Steve
                Department of Bioengineering, University of Utah
                Scientific Computing and Imaging institute, University of Utah

                Comment

                • JonahA
                  Member
                  • Jun 2018
                  • 38

                  #9
                  Originally posted by maas View Post
                  Maybe you are using the "Refine Mesh" tool, not the Tetgen tool? (The "Refine Mesh" tool is a template based mesh refinement algorithm. Sometimes it can create streaks of additionally refined sections that are needed to resolve connectivity issues.) If you don't see the Tetgen option, perhaps first convert the model to an Editable Mesh. Then, on the Mesh panel tab, you should find the Tetgen tool, with the options mentioned above.

                  Cheers,

                  Steve
                  I think I am using Tetgen. This is what I see (with nothing that mentions feathers):

                  tetgen.JPG

                  Comment

                  • maas
                    Lead Code Developer
                    • Nov 2007
                    • 3441

                    #10
                    That's interesting. Are you using the most recent version of PreView? I checked our release version (which should be the one up on the web), and it has that feather option. So, perhaps try installing the latest version on the web and see if in that version the feather option appears.

                    Steve
                    Department of Bioengineering, University of Utah
                    Scientific Computing and Imaging institute, University of Utah

                    Comment

                    • JonahA
                      Member
                      • Jun 2018
                      • 38

                      #11
                      It does show up in the most recent version of PreView, although those streaks are still there.

                      Comment

                      • JonahA
                        Member
                        • Jun 2018
                        • 38

                        #12
                        Originally posted by maas View Post
                        That's interesting. Are you using the most recent version of PreView? I checked our release version (which should be the one up on the web), and it has that feather option. So, perhaps try installing the latest version on the web and see if in that version the feather option appears.

                        Steve
                        The pattern is particularly strange when I try to refine an element in a thin sphere of finite thickness (using tetgen, obviously). It seems to try to refine the whole thing.

                        Comment

                        • maas
                          Lead Code Developer
                          • Nov 2007
                          • 3441

                          #13
                          It occurred to me that Tetgen will also improve the mesh based on the quality criterion. It applies that to the whole mesh, even if you are only refining it locally. Try setting the "minimum radius-edge ratio" to a large value (e.g. 100) and see if that has any effect.

                          Steve
                          Department of Bioengineering, University of Utah
                          Scientific Computing and Imaging institute, University of Utah

                          Comment

                          • JonahA
                            Member
                            • Jun 2018
                            • 38

                            #14
                            No change, it still refines the whole thing. This is most noticeable on a thin sphere but there are those patterns of refined regions still on thicker or solid spheres.

                            Comment

                            • maas
                              Lead Code Developer
                              • Nov 2007
                              • 3441

                              #15
                              Can you please send me your tet mesh. If it's too big to upload here, you may send it to steve dot maas at utah dot edu. I'll see if I can figure out what's going on.

                              Steve
                              Department of Bioengineering, University of Utah
                              Scientific Computing and Imaging institute, University of Utah

                              Comment

                              Working...
                              X
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎