Negative jacobian was detected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hadil
    Junior Member
    • Apr 2024
    • 6

    Negative jacobian was detected

    Hello,

    I am trying to simulate breast deformation such as the compression of the breast in mammography where there are two paddles and the breast is compressed between them. I was inspired by the billet problem in the tutorials and tried to adapt it to my case. But I am getting this error: Negative jacobian was detected. I don't really know where is it coming from and I am seeking your help.

    The .feb file is too big so I am going to attach the google drive link here:



    Thank you very much.
    Hadil
  • maas
    Lead Code Developer
    • Nov 2007
    • 3458

    #2
    Hi Hadil,

    The problem is that the model is not sufficiently constrained. The z-degree of freedom is fixed, but x and y are left open. The plates somewhat constrain the Y-motion, but the X-motion is completely left open, allowing the model to slide along X without changes in stress or strain. As a result, FEBio cannot find an equilibrium position.
    The solution is to add more constraints that constrict the motion, especially in the X-degree of freedom. The easy solution would be to take a few nodes near the center and constrain their X and perhaps also Y motion.
    Alternatively, you could consider modeling the plates explicitly (e.g. by a single hex element), and then use sliding-elastic contact with friction on. The friction will also help prevent motion in the X direction.

    Best,

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

    Comment

    • hadil
      Junior Member
      • Apr 2024
      • 6

      #3
      Thank you very much maas. I added a constrain in the X and Y motion for few nodes near the center and it worked.
      I have another issue, where I am trying to automate the generation of the feb model using python, for the rigid wall it only accepts faces. And while I was trying to define the surface that I want to be selected containing triangle faces , when I open it on FEBio doesn't recognize it.
      Also previously I defined the boundary condition nodes as a ponit data scalars which FEBio didn't recognize as well. I noticed that it only recognized the material scalars cell data as parts. So I considered the boundary condition as an additional material scalar to have them as cells instead of nodes.
      Is there a more straight foreword way to solve that?
      I have chosen to track all parts to one material solely for speed.
      Here is a very simple example of the feb model resulted from the python code attached.

      Thanks and I really appreciate your answers.

      Hadil
      Attached Files

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3458

        #4
        Hi Hadil,

        It looks like you defined the surface using 0-based nodal indices, instead of the nodal IDs (which are 1-based). If you increment all the nodal IDs in the surface definition by one, I think it should work.
        Also, the value OUTPUT_FINAL for the plot_stride parameter is not valid. Since you already specified the plot_level to PLOT_FINAL, you don't need to specify the plot_stride since it will be ignored anyways.

        Best,

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

        Comment

        • hadil
          Junior Member
          • Apr 2024
          • 6

          #5
          Thank you very much maas . I made sure that the nodal IDs are 1-based and it worked.
          But, when I try to open the model, I get a warning as in the picture. After I click OK, everything is fine and the faces are selected and recognized. What could be the reason for this? I am worried that it could affect the process later.

          Thank you very much. I appreciate all your answers.

          Hadil
          Attached Files

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3458

            #6
            Hi Hadil,

            This warning indicates that the internal node numbering that FEBio Studio generated for the surfaces is inconsistent with the node numbering as defined in the input file. Although FEBio Studio will still read the file in, the consequence of this could be that the model behaves differently. For instance, if the affected surface had a pressure load applied to it, the pressure will now be applied in the opposite direction.
            To avoid this error, I advise to use the same convention for numbering faces that FEBio uses. I think the solution is simple and it only requires that you write the surface nodes in the opposite direction. So, instead of
            Code:
            <tri3 id="1">n0,n1,n2</tri3>
            you would write,

            Code:
            <tri3 id="1">n2,n1,n0</tri3>
            Please give that a try and let me know if that resolved the warnings.

            Best,

            Steve

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

            Comment

            • hadil
              Junior Member
              • Apr 2024
              • 6

              #7
              Thank you for your response @mass. Something that I forgot to mention is that not all the selected faces had the incorrect winding warning, only half of them.

              I tried to do it the way that you mentioned
              <tri3 id="1">n2,n1,n0</tri3>

              But I am having the warning again for the other half of the selected faces. I don't know what I should do at this point. Do you have any ideas?

              Thank you very much. I appreciate all your answers.

              Hadil

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3458

                #8
                Hi Hadil,

                In that case, I still suspect that there is an inconsistency with how you are numbering your nodes, but you might have to go back to the code that is exporting those surfaces and see if you can change it so that it uses the same consistent node numbering as FEBio. Referring to the image here, FEBio uses the following node numbering for the faces. (Note that this ordering is chosen so that all faces have an outward pointing normal).

                face1: 1,2,4
                face2: 2,3,4
                face3: 3,1,4
                face4: 1,3,2

                Hope this helps!

                Best,

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

                Comment

                Working...
                X