using Tetgen to make volume mesh by surface mesh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • foroughmkh
    Junior Member
    • Jul 2013
    • 3

    using Tetgen to make volume mesh by surface mesh

    Hi All,

    I am trying to make a FEM analysis by using a set of bones and muscle surfaces. I imported geometry information with different formats (stl, iges and step) to Gmsh and then import .msh format (3D mesh) to preview. But febio encountered Negative Jacobian error for all formats, for iges and stl formats it makes sens as mesh is surface information, but I it is strange for step format. to solve it I tried with Tetgen to make volume mesh but preview crashed! In attachment you can find different formats and related mesh information. May I ask you to help me what is the problem with negative jacobian error for step format and why I cant make volume mesh by tetgen?

    Thanks,
    Forough
    Attached Files
  • maas
    Lead Code Developer
    • Nov 2007
    • 3458

    #2
    Hi Forough,

    I fixed some issues with Tetgen support in PreView and in the upcoming version 1.12.3 you should be able to mesh your geometry.

    Regarding the negative jacobians, can you send me the .feb input file that you are using to run your model.

    Thanks,

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

    Comment

    • foroughmkh
      Junior Member
      • Jul 2013
      • 3

      #3
      using Tetgen to make volume mesh by surface mesh

      Hi Maas,

      Thank you well for the answer. I attached a very simple input file just to show the error.

      Regards,
      Forough
      Attached Files

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3458

        #4
        I see the problem. You have both triangle and tetrahedral elements in your model. FEBio assumes the triangles are shell elements, but they don't have a thickness assigned which creates a negative Jacobian (actually, it creates a zero Jacobian but FEBio throws the same error message). I guess what happened is that you imported a gmsh file that contains both the surface and the volume elements. PreView reads them both and considers them separate parts, which is rarely what you want. I'll see if I can fix this, but the work-around is simple. Just remove the surface elements either directly from the gmsh file or in PreView. Unfortunately you have to do this before you apply any boundary conditions, so you'll have to start over. Hope this gets you going.

        Cheers,

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

        Comment

        • foroughmkh
          Junior Member
          • Jul 2013
          • 3

          #5
          problem with step format

          Hi,

          Again problem! Finally I could import bones mesh generated in Gmsh by stl formats and run fem by Febio. But or soft tissues the quality of surfaces is extremely weak and Gmsh cant generate mesh. Also I couldn't generate mesh by stl formats in new version of preview (tetgen), as you said the problem with tetgen is solved in this version I supposed it is problem with my low quality surfaces. Anyway, only I can make mesh by step format in gmsh by this surfaces. When I import generated mesh (only volume mesh without those problematic triangles) preview doesn't know imported mesh as an object, it is only information regarding to elements. in this case I can't define boundary conditions, loads . . . I can't run a simulation in this case. May I ask you help me how can I work with step format in preview? I tried to attach zip files but it was not possible, May I ask you to send it by email?

          Regards,
          Forough

          Comment

          • gghandsfield
            Junior Member
            • Oct 2013
            • 3

            #6
            Greetings,
            Has anyone had success in using TetGen to mesh a shape imported from STL? I have decreased the complexity of my shapes thinking that might be the problem, but even with a sphere my PreView crashes. Does anyone have any advice on how to get the TetGen feature to work in PreView?

            Thanks in advance.

            Comment

            • maas
              Lead Code Developer
              • Nov 2007
              • 3458

              #7
              We have been able to use Tetgen successfully for some of our models. In my experience, tetgen will most likely fail if there is a problem with the mesh. Can you attach or send me that stl file (steve dot maas at utah at edu)? I'll try to replicate the problem and see if I can find a solution.

              Thanks,

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

              Comment

              • NataCalc
                Member
                • Jan 2019
                • 87

                #8
                scaphoid_smooth.stl.zip


                Dear Maas,

                I also faced problem with surface mesh using TetGen from STL file. Do you think there is a problem in STL file? I am enclosed stl file.


                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                --- TETGEN Tetrahedral meshing --- 08-Feb-2019 08:56:07

                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                --- Writing SMESH file --- 08-Feb-2019 08:56:07
                ----> Adding node field
                ----> Adding facet field
                ----> Adding holes specification
                ----> Adding region specification
                --- Done --- 08-Feb-2019 08:56:07
                --- Running TetGen to mesh input boundary--- 08-Feb-2019 08:56:07
                Opening /Users/s2986149/Desktop/GIBBON/data/temp/temp.smesh.
                Delaunizing vertices...
                Delaunay seconds: 0.002129
                Creating surface mesh ...
                Surface mesh seconds: 0.001026
                Recovering boundaries...
                Boundary recovery seconds: 0.001184
                Removing exterior tetrahedra ...
                Warning: The 1-th region point lies outside the convex hull.
                "/Users/s2986149/Desktop/GIBBON/lib_ext/tetGen/mac64/tetgen" -pq1.2AaY "/Users/s2986149/Desktop/GIBBON/data/temp/temp.smesh": Segmentation fault
                --- Done --- 08-Feb-2019 08:56:07

                Comment

                Working...
                X