Negative Jacobian and Node Numbering

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Zhubbell
    Junior Member
    • Apr 2015
    • 8

    #16
    Hello Steve,

    I am experiencing a node-numbering issue as well while trying to solve a problem based on an imported mesh (in .hmascii). The run in FEBio2 is aborted with the message "Found ### initially inverted elements." I have tried to follow your above instructions to rectify the issue (just in case my mesh was imported with both surface and volume elements). However, when I attempt to "detach" the selected elements, PreView tells me that "Selection cannot be detached." Does this mean I don't have surface elements after all?

    Any help working through this problem would be greatly appreciated!

    Best,
    Zac

    Comment

    • maas
      Lead Code Developer
      • Nov 2007
      • 3458

      #17
      Hi Zac,

      Could you please upload the .hmascii file? If I can recreate the issue on my end, I will be able to assist you much better.

      Cheers,

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

      Comment

      • Zhubbell
        Junior Member
        • Apr 2015
        • 8

        #18
        .hmascii mesh file

        Steve,

        I could not get my .hmascii file to attach here, so I will email it to you shortly.

        I now actually suspect that my imported mesh may only be a surface mesh, but the TetGen feature crashes PreView on me. I've been attempting to figure out how to create a volume mesh in Gmsh, but so far without success. I'd be truly grateful for your help!

        Many thanks,
        Zac

        Comment

        • Zhubbell
          Junior Member
          • Apr 2015
          • 8

          #19
          Hi Steve (and User Community),

          I was finally able to generate a "clean" surface mesh in my surface generation program (the report created in that program says my triangles are of good quality, with no intersections or anything), but PreView still crashes when I use the "TetGen" function to create a volume mesh.

          I can't figure out why this is happening, and I'm especially confused as to why this feature sometimes does work with more complicated surface meshes that contain many more triangles and have much poorer quality. I am using PreView 1.16.3 and my surface geometry was imported in .hmascii format. Are there steps I am missing in the process of generating a Tet mesh? Any advice would be most welcome!

          Best,
          Zac

          Comment

          • opcg
            Junior Member
            • Aug 2015
            • 13

            #20
            Dear Steve/all,

            I'm starting my trail on the Febio's software family and facing the same problem with the Jacobian while setting the .feb, as mentioned in this thread.
            Too many elements are problematic.

            My geometry is that one of a trabecular bone, however not perfectly flat over the bounding box.
            I attach a Preview's figure showing the normals of this structure, although it can seem a bit messy for visual analysis.
            My point in showing it is also to clear up some doubts. So,

            i) I'd like to know if someone of you could give me a trick on how to solve this problem;

            ii) I can't interpret which direction the normal vectors point to only looking at the color. I suppose that {R,G,B} represent {x,y,z} axis, in this order, and that an inclined normal, for instance, results from an interpolated color. Sorry for this question, but is it right?? Further, how do I know when the normal points outward/inward? Is there an option to show/hide the {x,y,z} axis labels?

            iii) I've heard about other softwares like Meshlab to correct/repair a surface mesh. Would it be the case of working more in depth in the mesh in order to "smooth" such a bad elements? Suggestions?

            Thank you.

            2015-08-18-04.55.52-pm.png
            Last edited by opcg; 08-18-2015, 02:01 PM. Reason: Attachment forgotten.

            Comment

            • maas
              Lead Code Developer
              • Nov 2007
              • 3458

              #21
              Hi,

              i) Sorry if I missed it, but can you please explain what problem you are referring too?

              ii) Your interpretation of the color is correct. PreView always draws the normal in the outward direction. I assume you are talking about the labels on the tried? If so, then no, you cannot turn them off in PreView, although we know that on some macs, the labels don't always show up correctly.

              iii) Depending on the problem, you might be able to correct the issue inside PreView, but I'll need to know a little bit more about the issue you are having.

              In any case, I hope this helps, and let us know if you have any further questions.

              Cheers,

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

              Comment

              • opcg
                Junior Member
                • Aug 2015
                • 13

                #22
                Hi Steve,

                Thank you for your reply.

                i) This is the error (inverted elements):

                **************************** E R R O R ****************************
                Negative jacobian detected at integration point 1 of element 55927
                Jacobian = -0.886097
                Did you use the right node numbering?
                Nodes:22265,22266,22281,22286
                ************************************************** *****************

                **************************** E R R O R ****************************
                Found 28046 initially inverted elements.
                Run will be aborted.
                ************************************************** *****************

                Here are my workflows experienced to solve this, but not effective yet:

                a) (like suggested in a post above) export surface as a .poly -> mesh with Tetgen -> importing to PreView.

                b) import volume mesh .msh directly to PreView -> invert elements.

                c) reorient the mesh in my script (a function of iso2mesh's toolbox) before building the .feb structure.

                Moreover, if a) or b) had worked, they wouldn't be the most suitable options to me since I'm exporting the whole
                .feb xml structure directly from a Matlab script with everything set (BCs, loads, etc.). c) looks like fine, but doesn't have
                the desirable effect in PreView (above error).

                ii) Great! Yes, I talk about the tried and I'm using mac, indeed. OK.
                But, I've a last point for my enlightenment : for instance, I see coloured stems - vectors - starting from
                a white color (at the face) to a red color (outward the face).
                What you call "outward" is the direction "white -> red"?? That's to say, "inward" would be "red -> white"? I can't see arrows...

                iii) Good! Is there a way to solve it inside PreView so that I don't need set the conditions by hand, i.e., do what the xml automatically does through my script?
                For my geometry, this would be insane!

                Best regards,

                Comment

                • opcg
                  Junior Member
                  • Aug 2015
                  • 13

                  #23
                  Hi Steve,

                  Thank you for your reply.

                  i) This is the error (inverted elements):

                  **************************** E R R O R ****************************
                  Negative jacobian detected at integration point 1 of element 55927
                  Jacobian = -0.886097
                  Did you use the right node numbering?
                  Nodes:22265,22266,22281,22286
                  ************************************************** *****************

                  **************************** E R R O R ****************************
                  Found 28046 initially inverted elements.
                  Run will be aborted.
                  ************************************************** *****************

                  Here are my workflows experienced to solve this, but not effective yet:

                  a) (like suggested in a post above) export surface as a .poly -> mesh with Tetgen -> importing to PreView.

                  b) import volume mesh .msh directly to PreView -> invert elements.

                  c) reorient the mesh in my script (a function of iso2mesh's toolbox) before building the .feb structure.

                  Moreover, if a) or b) had worked, they wouldn't be the most suitable options to me since I'm exporting the whole
                  .feb xml structure directly from a Matlab script with everything set (BCs, loads, etc.). c) looks like fine, but doesn't have
                  the desirable effect in PreView (above error).

                  ii) Great! Yes, I talk about the tried and I'm using mac, indeed. OK.
                  But, I've a last point for my enlightenment : for instance, I see coloured stems - vectors - starting from
                  a white color (at the face) to a red color (outward the face).
                  What you call "outward" is the direction "white -> red"?? That's to say, "inward" would be "red -> white"? I can't see arrows...

                  iii) Good! Is there a way to solve it inside PreView so that I don't need set the conditions by hand, i.e., do what the xml automatically does through my script?
                  For my geometry, this would be insane!

                  Best regards,

                  Comment

                  • maas
                    Lead Code Developer
                    • Nov 2007
                    • 3458

                    #24
                    Hmm, I was going to suggest use the Invert elements tool in PreView, but it sounds like you already tried that. Strange, cause that usually does the trick. Did you apply the Invert tool on the entire mesh or only on the inverted elements? Is there any way you could attach the model or email it to me? I'd like to see what is going on with it.

                    The colors for the vectors do go from white (on the surface) to a color, in the outward direction.

                    Cheers,

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

                    Comment

                    • opcg
                      Junior Member
                      • Aug 2015
                      • 13

                      #25
                      Hi Steve!

                      Eureka! I could run my first simulation!!!

                      I think I found a mistaken step... But questionable.

                      While calling the method 'reorientmesh()' - this is from iso2mesh toolbox -, I was passing the wrong array entries which define the
                      element's table. Then, I suppose that the mesh was going out from my script with no effect. But, even applying 'Invert' inside PreView,
                      the Jacobian error remained. Of course, the bad use of the function belongs to iso2mesh's realm and to my skill over it. Fine...

                      Well, I could run the simulation on Febio doing the following: I've applied the 'reorientmesh()' passing the arguments correctly and then applied 'Invert' in PreView.
                      I'm not completely sure why I have to use 'Invert' even with 'reorientmesh()'. Nonetheless, it was the solution.

                      From now, I will go to Febio's theory to mature in the models, since I have a fair solution for the pre-processing stage. My script uses an example extracted from Gibbon code to mount the XML tables required by Febio, but I need to go through it.

                      I do believe I'll be around here for another question soon.

                      Thank you for your amazing support!

                      Comment

                      • opcg
                        Junior Member
                        • Aug 2015
                        • 13

                        #26
                        Hi Steve!

                        Eureka! I could run my first simulation!!!

                        I think I found a mistaken step... But questionable.

                        While calling the method 'reorientmesh()' - this is from iso2mesh toolbox -, I was passing the wrong array entries which define the
                        element's table. Then, I suppose that the mesh was going out from my script with no effect. But, even applying 'Invert' inside PreView,
                        the Jacobian error remained. Of course, the bad use of the function belongs to iso2mesh's realm and to my skill over it. Fine...

                        Well, I could run the simulation on Febio doing the following: I've applied the 'reorientmesh()' passing the arguments correctly and then applied 'Invert' in PreView.
                        I'm not completely sure why I have to use 'Invert' even with 'reorientmesh()'. Nonetheless, it was the solution.

                        From now, I will go to Febio's theory to mature in the models, since I have a fair solution for the pre-processing stage. My script uses an example extracted from Gibbon code to mount the XML tables required by Febio, but I need to go through it.

                        I do believe I'll be around here for another question soon.

                        Thank you for your amazing support!

                        Comment

                        • Sanaz
                          Junior Member
                          • Apr 2016
                          • 14

                          #27
                          Hello steve,

                          I am trying to run a simulation in Febio. After 2-5% of processing, Febio fails to converge and shows negative jacobian in some elements. I have around 3 million volume elements and zero surface elements in my mesh. I also use dynamic analysis for this simulation.
                          <beta>1.0</beta>
                          <gamma>2.0</gamma>
                          <analysis type="dynamic"/>
                          I do not know why it is not converging. Any help would be greatly appreciated.

                          Thank you,

                          Sanaz

                          Comment

                          • Sanaz
                            Junior Member
                            • Apr 2016
                            • 14

                            #28
                            Originally posted by Sanaz View Post
                            Hello steve,

                            I am trying to run a simulation in Febio. After 2-5% of processing, Febio fails to converge and shows negative jacobian in some elements. I have around 3 million volume elements and zero surface elements in my mesh. I also use dynamic analysis for this simulation.
                            <beta>1.0</beta>
                            <gamma>2.0</gamma>
                            <analysis type="dynamic"/>
                            I do not know why it is not converging. Any help would be greatly appreciated.

                            Thank you,

                            Sanaz
                            I reduced the bulk modulus and the simulation converged for 20% (It diverged because of negative jacobian). So I thought by more reduction, I might get better convergence. But it did not happen.
                            Anyone has any suggestion for improving the convergence by eliminating the negative jacobian?


                            Thank you
                            Sanaz

                            Comment

                            • maas
                              Lead Code Developer
                              • Nov 2007
                              • 3458

                              #29
                              Hi Sanaz,

                              There are many reasons for getting negative Jacobians. A good place to start for debugging your model is the Troubleshooting section of the FEBio User's manual, which you can find here (See Chapter 8 of the user manual). Please take a look at this and let us know if you need any further assistance.

                              Cheers,

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

                              Comment

                              • bohi_amine
                                Junior Member
                                • Dec 2017
                                • 13

                                #30
                                Negative Jacobian and Node Numbering

                                Hi,

                                I'm having the same problem with files.ply that I import into preview. 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?"

                                Thanks a lot,

                                Amine

                                Comment

                                Working...
                                X