Negative Jacobian and Node Numbering

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mcgeadyh
    Junior Member
    • Jul 2011
    • 21

    Negative Jacobian and Node Numbering

    Hi,

    I'm having a problem running files I import from Gmsh into preview. The file imports fine and everything but when I try running it in febio i get an error saying "negative jacobian detected at integration point 'x' of element 'y'. Did you use the right node numbering?" The file isn't complicated, just a simple block in compression I was testing.

    Thanks,

    Hugh
  • maas
    Lead Code Developer
    • Nov 2007
    • 3400

    #2
    Hi Hugh,

    It seems that you have quad elements lying on top of a hex mesh. The node numberings of these quad elements appears backwards to what FEBio expects and hence the negative jacobians. If you don't need the quads, just remove them and the problem is fixed. If you do need them, you can invert their node numbering in PreView (from the Mesh Panel, Select Elements, Invert) but you must do this before you create any boundary conditions. Hope this helps.

    Cheers,

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

    Comment

    • mcgeadyh
      Junior Member
      • Jul 2011
      • 21

      #3
      Hi Steve,
      I tried inverting the elements but I still get the same error? I've attached the file with the inverted quad elements. Also someone was asking me if meshes created in cubit can be supported in preview and febio and if they can then which file type should be used?

      Thanks,

      Hugh

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3400

        #4
        Hi Hugh,

        Did you invert just the quad elements? When I remove the quad elements and then inspect the jacobians, I still see a whole bunch of negative volume elements using the Mesh Inspector.

        What formats does cubit export? If there is format you prefer, and if it is a text based format, I can look into adding it to PreView.

        Cheers,

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

        Comment

        • mcgeadyh
          Junior Member
          • Jul 2011
          • 21

          #5
          Hi Steve,
          I got the mesh working now thanks. And we found that cubit can export abaqus files which can be imported into preview.

          Thanks,

          Hugh

          Comment

          • midhun
            Junior Member
            • Jul 2012
            • 2

            #6
            Similar problem with the meshes : From Gmsh to Preview conversion- -ve Jacobians

            Dear steve

            I am facing the same problem with all of my meshes. I tried all that you have said. But it doesnt seem to work have attached the .feb files

            Midhun
            Attached Files

            Comment

            • maas
              Lead Code Developer
              • Nov 2007
              • 3400

              #7
              Hi Midhun,

              You are defining both tets and shell elements. Is that your intention? In your input file, the shell elements have zero thickness which will cause zero jacobians. The strange thing is that I can't see the elements in PreView which makes me suspect that the local element node numbering is off. I will take a closer look but in the mean time try creating your mesh without the shells.

              Cheers,

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

              Comment

              • midhun
                Junior Member
                • Jul 2012
                • 2

                #8
                Hi Steve,

                THere are triangles and tets . I am using Gmsh for this and was just doing the initial trial run . Can you give me a fool proof method starting from a cube-step file through gmsh to preview which will definitely work(with any type of elements). Or could you suggest any other opensource mesh generation software(CAD to Mesh) which is compatible with Febio and preview.

                Regards
                Midhun

                Comment

                • christinasundgren
                  Junior Member
                  • Dec 2012
                  • 12

                  #9
                  Hugh,

                  What did you end up doing to get the mesh working? I'm having the same error as you once were getting. Thank you.

                  Christina

                  Comment

                  • maas
                    Lead Code Developer
                    • Nov 2007
                    • 3400

                    #10
                    Hi Midhun (and Christina)

                    So, this seem to be a common problem, so I will figure out an elegant way to get around this. To reiterated, the problem is that GMsh outputs the surface mesh as well as the volume mesh. For a volume mesh, PreView doesn't like the surface definition in the file since it creates its own surface mesh directly from the volume mesh. To circumvent this problem, only export the volume mesh to your gmsh file. If you are working with existing files, remove the surface definition from the file (in the element section, all lines that have a "2" in the second column). Hope this workaround works for now. Let me know if you have any more questions.

                    Cheers,

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

                    Comment

                    • christinasundgren
                      Junior Member
                      • Dec 2012
                      • 12

                      #11
                      Hi Steve,

                      I tried removing the surface definition from the file like you said. I just opened my .msh file in notepad and deleted the 2's from the second column in the element section. However, now PreView crashes on me when I try to upload the file. Thanks again for the help.

                      Christina

                      Comment

                      • maas
                        Lead Code Developer
                        • Nov 2007
                        • 3400

                        #12
                        Christina,

                        Try the latest version of PreView on the web. There was a bug in some of the file readers that was fixed recently. I wonder if that's the problem. Let me know if the problem persists in the latest version.

                        Cheers,

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

                        Comment

                        • christinasundgren
                          Junior Member
                          • Dec 2012
                          • 12

                          #13
                          Steve,

                          I tried loading the newest version of PreView but it still crashed on me. Any other ideas? Thank you!

                          Christina

                          Comment

                          • maas
                            Lead Code Developer
                            • Nov 2007
                            • 3400

                            #14
                            I'll have to take a look at the file. Could you please send it to me? If it's not too big, just attach it to this thread, otherwise you can email it to me at steve dot maas at utah dot edu.

                            Thanks,

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

                            Comment

                            • sdast9
                              Junior Member
                              • Nov 2013
                              • 10

                              #15
                              Based on the previous posts regarding surface elements, I found a workaround for this issue. After importing your mesh to preview, select the object and then go to tools --> mesh inspector. On the upper right menu, click on your tri elements. At the bottom, enter min and max values that include the values for all of your tri elements, then hit select. Now, close the mesh inspector and go to the mesh tab on the left-hand menu. Make sure the element box is selected. Then, click detach. Select "detach to object" and hit apply. Finally, click on the model tab on the left-hand menu and find the new object. Right click on the newly detached object and select delete. Now you should be good to go! The surface elements that were imported have been successfully deleted!

                              Hope it helps some of you.

                              Best,

                              Steve

                              Comment

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