Truss elements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • autrera
    Member
    • Jul 2021
    • 35

    Truss elements

    Hi!

    I am currently working on a multiscale analysis of a fiber reinforced material using embedded trusses in a solid mesh.

    I've been able to correctly simulate this material; however, I still need to implement a different model for the truss behavior, and then, I want to incorporate this model in a micro-material.
    Currently, I can't get any output for the “truss stretch” plot variable. I tried to implement this plot variable as a plugin, but I get nothing from the dynamic_cast from the domain to FELinearTrussDomain or FETrussDomain classes.

    Is it possible that there may be an issue with this plot variable? Since beams and trusses have been developed recently, I wonder if this stopped working at some point.

    Thank you!
    Andrés
  • maas
    Lead Code Developer
    • Nov 2007
    • 3458

    #2
    Hi Andres,

    Are you still having this problem? As far as I can tell, this should work. I recently implemented some updates to the trusses so make sure you are working of the latest development branch. Let me know if the issue persists.

    Best,

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

    Comment

    • autrera
      Member
      • Jul 2021
      • 35

      #3
      Hi Steve,

      I've tried to get this output variable directly with FEBioStudio. Currently, I can't get the truss stretch, but I can see the truss stresses in the plotfile.
      When I try to get these variables compiling a plugin, I can't get anything from the dynamic_cast. I've copied FEPlotTrussStretch::Save and FEPlotElementStress::Save into a plugin, but the dynamic_cast from the domain returns a null pointer.

      I'm attaching a simple case that I'm using to test the truss variables (the simulation itself doesn't have any sense)

      Thank you,
      Andres

      Attached Files

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3458

        #4
        Hi Andres,

        When I run that model, it looks like it's always producing the value 1 for the truss stretch. I'll look into that and see if I can figure out what is happening here, but the dynamic cast is succeeding, so it sounds like you are running into a different issue.

        Would it be possible for you to share your plugin code? If you prefer not to share it here, feel free to email it to me (at steve dot maas at utah dot edu) and I'd be happy to see what is happening in your plugin.

        Thanks,

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

        Comment

        • autrera
          Member
          • Jul 2021
          • 35

          #5
          Hi Steve.

          Yes, the variable is not changing, but I can tell that the output to the plot file is being generated.
          Here I attach my plugin code, It's a copy of the GitHub code for the truss stretch plot variable, but registered as "myTruss". I've tried to output the stress as well, but I get the same result (null pointer at the dynamic cast).

          I appreciate your time!
          Best,
          Andres​
          Attached Files

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3458

            #6
            Hi Andres,

            I took a look at your code, and I think it all looks good. For each time step, your code is called twice, once for the solid domain and once for the truss domain. For the solid domain, the cast is, of course, zero, but for me the cast works for the truss domain. Is that not what you are seeing then?
            So, for me, the plot variable is outputting the stretch factor, except that it's always 1 since that variable is not used for the linear truss domain. (It is currently only used by the elastic truss, but that is likely to change soon.)

            If for you the cast of the truss domain is also producing nullptr, then I wonder if you are mixing debug and release libraries when building your plugin or using it in FEBio. Make sure that you are building your debug version to link to the debug libraries and run the debug version of the febio executable (which should be part of the SDK). (And some for the release configuration.) Please double-check that and let me what you find.

            Best,

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

            Comment

            • autrera
              Member
              • Jul 2021
              • 35

              #7
              Hi Steve,

              I'll try to build the plugin that way and see if it works. I was unaware that there were different libraries for the debug/release versions.
              I think that using the AngioFE CMake lists file would be a good starting point. I'm using a similar file, but it doesn't have anything about the debug libraries.

              Finally, do you mean to run Febio with the '-g' debug flag? Is there something else to look for? I have not found anything else in the Linux version of FEBioStudio.

              Thank you,
              Andrés


              PD: I just checked the Linux vs Windows SDK folders. The Windows version contains the bin, include, and lib folders. On Windows, I can see the libraries Debug and Release versions as well as the febio debug executable, but on Linux, I just have the include folder.
              It seems that I am mixing the release and debug versions of the libraries, but they are not present in the Linux version of FEBioStudio

              Kind regards,

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3458

                #8
                Hi Andres,

                To clarify, when I mentioned to run the debug version of FEBio, I just meant the executable that should be part of the Debug folder of the SDK. (I did not mean to use the -g flag).

                I did not know that the linux installer does not include the debug versions of the sdk. I'll bring that to the attention of our linux developer and hopefully that can be addressed soon.

                Best,

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

                Comment

                • mherron
                  Developer
                  • Aug 2016
                  • 99

                  #9
                  Andres,

                  I'm really sorry about taking so long to get back to you on this. I've built a copy of the debug versions of FEBio4 and its libraries and you can download them from this link. Please give it a try with these debug versions, and let me know if you run into any further problems.

                  Michael Herron

                  Comment

                  • autrera
                    Member
                    • Jul 2021
                    • 35

                    #10
                    Thanks, Steve and Michael,

                    I am trying to use the debug lib versions on Linux, but I am still having the same issue. I just checked that I am using the debug libs, and the plugin compiles just fine, but I can't get the dynamic cast.
                    I'll try this on Windows to make sure I'm not making a mistake when compiling the plugin.

                    This is an ongoing project, so I'm not rushing.
                    I will come back to you after trying this on Windows and double-checking everything.

                    Thank you so much for your time!
                    Best,
                    Andrés

                    Comment

                    • autrera
                      Member
                      • Jul 2021
                      • 35

                      #11
                      Hi,

                      I hope you are doing well.
                      After a while, I was able to compile my test plugin for plotting the truss stretch (using an elastic-truss domain) without problems.

                      Now, my next step is to perform a multiscale analysis on a Tet mesh that contains embedded trusses. The issue here (I think) is that the FERVEModel class assumes that the domains are always solid domains, so having a beam/truss results in a segmentation fault.
                      I started by trying to compile a new plugin (FERVEModel + FEMicroMaterial) that could ignore the truss domain, but I found another issue while I was trying to compile this code (same as FEBio source code).

                      The Linux SDK doesn't have all the required files to compile these classes. For example, the FEBioRVE and FEBioXML are missing.
                      I checked that the Windows SDK folder does contain a lot more folders and files.

                      Thank you for your time,
                      Best,
                      Andres

                      Comment

                      • mherron
                        Developer
                        • Aug 2016
                        • 99

                        #12
                        Andres,

                        It looks like the Linux installer was missing some of the SDK files, as you mentioned. I've created a new installer and we'll be replacing the one on our website shortly. However, you can download this new installer right now from this link. Please give that a try and let me know if you run into any more problems.

                        Michael Herron

                        Comment

                        • autrera
                          Member
                          • Jul 2021
                          • 35

                          #13
                          Thank you! It's working properly. I can compile without problems.

                          Comment

                          Working...
                          X