Plugin designed for FEBio 2.3.1 doesn't work on 2.5.1 even after compiling it again

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Fisher
    Member
    • Feb 2017
    • 38

    Plugin designed for FEBio 2.3.1 doesn't work on 2.5.1 even after compiling it again

    I have a material plugin made by my colleague which he uses on his installation of FEBio 2.3.1. The plugin has been compiled and is used on his Mac.
    He has given me the source code for this plugin which I have compiled on my Windows pc using Visual Studio 2013. FEBio successfully loads the plugin, but when attempting to test it on his 'example' feb file FEBio gets stuck performing endless augmentations.

    I was wondering if there was a change between successive FEBio versions or a known difference between VS/Xcode that would cause this to occur.

    Best regards,
    LKF
  • maas
    Lead Code Developer
    • Nov 2007
    • 3400

    #2
    Hi,

    Is this occurring only with that particular material plugin or with any material? And what augmentations are you talking about? Contact, constraints, material? I'm not aware of any change to the code that would explain this behavior but if you can provide a bit more information, I might be able to provide a better answer.

    Thanks,

    Steve

    FYI: If you have developed a plugin and when you are ready to share it, please consider uploading it to the febio website for others to use.
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

    Comment

    • Fisher
      Member
      • Feb 2017
      • 38

      #3
      I have compiled the 'NeoHookeanPI' template material plugin and that works successfully on its own example feb file, so this is not a problem that occurs with all materials.

      Here is a sample log file showing the typical output of the problematic material http://pastebin.com/dyfPBmxS

      If I do get it successfully working and the original creator approves then I will certainly consider uploading it.

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3400

        #4
        Interesting. That looks like a bug to me. I'll take a closer look at the code and if it turns out to be a bug, I'll try to fix it before our upcoming 2.6 release. In the mean, I suggest turning off augmented Lagrangian in your material.

        Cheers,

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

        Comment

        • Fisher
          Member
          • Feb 2017
          • 38

          #5
          The output in my previous post is from a run where the augmented Lagrangian is already disabled (the laugon flag is set to 0).
          Let me know if I can provide any further information.

          Best regards,
          LKF

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3400

            #6
            Interesting. What is causing the augmentations then? Can you attach or send me the input file. I won't be able to run it, but it might give me a better idea on what's going on.

            Thanks,

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

            Comment

            • Fisher
              Member
              • Feb 2017
              • 38

              #7
              co01yeoh.feb

              Hi, sorry to raise this again.
              At the time I think I did mail you the input file but I may have found a defunct address to send it to. I moved on to a different problem in the meantime but this issue is causing me trouble again.
              (The input file is a modification of the co01 test supplied with FEBio)

              Interestingly the log file still shows augmented lagrangian options for the material even if you remove them from the input file (deleting those lines entirely), but maybe this is default behaviour for the UncoupledMaterials class? I'm not sure

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3400

                #8
                Hi,

                Unfortunately, I cannot run this model since I don't have your plugin. I tried it with a couple other materials and in each case it runs fine for me. If you are not using the latest version of FEBio (2.6.4), please try that first. If the problem persists, I may need to have the plugin source code so I can debug this properly. You can send it to steve dot maas at utah dot edu.

                Cheers,

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

                Comment

                • mmengoni
                  Junior Member
                  • Nov 2017
                  • 3

                  #9
                  Hi Steve

                  Not sure if this has been soved...

                  I am experiencing the same thing with a uncoupled elastic material.
                  I have stripped down my material complexity to c1(I1-3) so that I can compare with the existing Mooney-Rivlin. Source code for plugin is basically a copy of FEMooneyRivlin.cpp/h with c2=0.
                  I use FeBio 2.6.4 and the SDK David sent me for VS2015. There is no augmented lagrangian in my model.

                  Running the model with default Mooney-Rivlin material works as expected - it is stuck with augmentation steps on my material plugin.
                  It works as expected with Neo-Hookean model (exisitng or plugin) - hence I assume it is linked to uncoupled formulation.
                  I copy here under the top of log file for each model.

                  If you can give some advice it would be great - I could try same strain energy model but coupled, adding a term depending on K...

                  Best
                  Marlene

                  TOP OF LOG FILE FOR MOONEY-RIVLIN

                  FILES USED
                  ================================================== =========================
                  Input file : rectangle.feb
                  Plot file : rectangle.xplt
                  Log file : rectangle.log


                  MESH INFO
                  ================================================== =========================
                  Number of materials ............................ : 1
                  Number of domains .............................. : 1
                  Number of nodes ................................ : 84
                  Number of solid elements ....................... : 20


                  CONTROL DATA
                  ================================================== =========================
                  Module type .................................... : solid
                  Analysis type .................................. : quasi-static
                  Plane strain mode .............................. : no
                  Number of timesteps ............................ : 100
                  Time step size ................................. : 0.01
                  Auto time stepper activated .................... : no
                  Number of loadcurves ........................... : 1
                  Number of displacement boundary conditions ..... : 1
                  Number of concentrated nodal forces ............ : 0
                  Max nr of stiffness reformations ............... : 15
                  per time steps
                  Max nr of Quasi-Newton iterations .............. : 10
                  between stiffness matrix reformations
                  Linesearch convergence tolerance ............... : 0.9
                  Minimum line search size ....................... : 0.01
                  Maximum number of line search iterations ....... : 5
                  Max condition number ........................... : 4.94066e-319
                  Displacement convergence tolerance ............. : 0.001
                  Energy convergence tolerance ................... : 0.01
                  Residual convergence tolerance ................. : 0
                  Minimal residual value ......................... : 1e-020


                  OUTPUT DATA
                  ================================================== =========================
                  plot level ................................ : major iterations
                  plotfile format ........................... : FEBIO
                  Nodal Variables:
                  displacement (type = vec3f, format = NODE)
                  reaction forces (type = vec3f, format = NODE)
                  Domain Variables:
                  deviatoric strain energy density (type = float, format = ITEM)
                  elasticity (type = tens4fs, format = ITEM)
                  relative volume (type = float, format = ITEM)
                  strain energy density (type = float, format = ITEM)
                  stress (type = mat3fs, format = ITEM)


                  MATERIAL DATA
                  ================================================== =========================
                  1 - unknown (type: Mooney-Rivlin)
                  density ........................................... : 1
                  k ................................................. : 0
                  laugon ............................................ : 0
                  atol .............................................. : 0.01
                  minaug ............................................ : 0
                  maxaug ............................................ : 0
                  c1 ................................................ : 0.1
                  c2 ................................................ : 0


                  LOADCURVE DATA
                  ================================================== =========================
                  1
                  0 0
                  1 0.1


                  LINEAR SOLVER DATA
                  ================================================== =========================
                  Solver type ............................... : Pardiso
                  Matrix format ............................. : symmetric



                  ===== beginning time step 1 : 0.01 =====
                  ===== reforming stiffness matrix:
                  Nr of equations ........................... : 80
                  Nr of nonzeroes in stiffness matrix ....... : 504

                  1
                  Nonlinear solution status: time= 0.01
                  stiffness updates = 0
                  right hand side evaluations = 2
                  stiffness matrix reformations = 1
                  step from line search = 1.000000
                  convergence norms : INITIAL CURRENT REQUIRED
                  residual 1.210293e+000 6.442727e-023 0.000000e+000
                  energy 2.090253e-003 5.202697e-015 2.090253e-005
                  displacement 2.470000e-005 2.470000e-005 2.470000e-011
                  ************************************************** ***********************
                  * WARNING *
                  * *
                  * No force acting on the system. *
                  ************************************************** ***********************

                  convergence summary
                  number of iterations : 1
                  number of reformations : 1


                  ------- converged at time : 0.01


                  ===== beginning time step 2 : 0.02 =====


                  TOP OF LOG FILE FOR MINE (no diff before time step)

                  ===== beginning time step 1 : 0.01 =====
                  ===== reforming stiffness matrix:
                  Nr of equations ........................... : 80
                  Nr of nonzeroes in stiffness matrix ....... : 504

                  1
                  Nonlinear solution status: time= 0.01
                  stiffness updates = 0
                  right hand side evaluations = 2
                  stiffness matrix reformations = 1
                  step from line search = 1.000000
                  convergence norms : INITIAL CURRENT REQUIRED
                  residual 1.210293e+000 6.442727e-023 0.000000e+000
                  energy 2.090253e-003 5.202697e-015 2.090253e-005
                  displacement 2.470000e-005 2.470000e-005 2.470000e-011
                  ************************************************** ***********************
                  * WARNING *
                  * *
                  * No force acting on the system. *
                  ************************************************** ***********************

                  ........................ augmentation # 1
                  material 1
                  CURRENT CHANGE REQUIRED
                  pressure norm : 0.000000e+000 0.000000e+000 0.000000e+000
                  2
                  Nonlinear solution status: time= 0.01
                  stiffness updates = 0
                  right hand side evaluations = 4
                  stiffness matrix reformations = 0
                  step from line search = 1.000000
                  convergence norms : INITIAL CURRENT REQUIRED
                  residual 1.210293e+000 6.388011e-023 0.000000e+000
                  energy 2.090253e-003 2.667897e-026 2.090253e-005
                  displacement 2.470000e-005 5.174896e-028 2.470000e-011

                  ........................ augmentation # 2
                  material 1
                  CURRENT CHANGE REQUIRED
                  pressure norm : 0.000000e+000 0.000000e+000 0.000000e+000

                  Comment

                  • maas
                    Lead Code Developer
                    • Nov 2007
                    • 3400

                    #10
                    Hi Marlene,

                    First thing to check is the value for the laugon flag reported in the MATERIAL DATA section of the log file. Although you mentioned there was no difference, can you please double-check this flag. If this flag is set to one, it would explain why you are seeing augmentations. If this flag is zero, then I don't understand why FEBio does augmentations.

                    Cheers,

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

                    Comment

                    • mmengoni
                      Junior Member
                      • Nov 2017
                      • 3

                      #11
                      Hi Steve

                      It is exactly same information (copied blow). Definitely no idea either why there are augmentations!
                      As mentioned, happens only with uncoupled material plugin. Same geometry/mesh/control/BC/step with elastic material plugin works perfectly fine.
                      Happy to send you plugin and feb files if it would help...

                      Thanks for looking into it - in the meantime I have implemented what I wanted to do as coupled material and use high bulk modulus to compensate... not ideal!
                      Marlene

                      1 - unknown (type: microstructlig)
                      density ........................................... : 1
                      k ................................................. : 0
                      laugon ............................................ : 0
                      atol .............................................. : 0.01
                      minaug ............................................ : 0
                      maxaug ............................................ : 0
                      mu ................................................ : 0.2

                      Comment

                      • maas
                        Lead Code Developer
                        • Nov 2007
                        • 3400

                        #12
                        That's odd. Okay, please send me the plugin code and test file and I'll see if I can reproduce the problem on my end.

                        Cheers,

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

                        Comment

                        • mmengoni
                          Junior Member
                          • Nov 2017
                          • 3

                          #13
                          If this happens to anyone else, the "bug" was due to using a SDK not compiled with same visual studio as as the FeBio exe!
                          Thanks Steve and David for the fix!

                          Comment

                          • Fisher
                            Member
                            • Feb 2017
                            • 38

                            #14
                            Originally posted by mmengoni View Post
                            If this happens to anyone else, the "bug" was due to using a SDK not compiled with same visual studio as as the FeBio exe!
                            Thanks Steve and David for the fix!
                            This worked for me as well
                            I didn't know what version of visual studio was used to compile the 'stock' SDK so I compiled my own SDK from the source code and used that, and the plugin is now working
                            Thanks for the fix

                            Comment

                            • weiss
                              Moderator
                              • Nov 2007
                              • 124

                              #15
                              Hi Liam,

                              I'm glad to hear that you were able to fix this problem.

                              If you would like, we can distribute your plugin for you on the FEBio web page. Please take a look here for more information:

                              Jeffrey A. Weiss
                              Professor, Department of Biomedical Engineering, University of Utah
                              Director, Musculoskeletal Research Laboratories
                              jeff.weiss@utah.edu

                              Comment

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