IBBM 2017

Results 1 to 6 of 6

Thread: Calculating new plot field with plugin: issues

  1. #1
    Join Date
    Apr 2016
    Posts
    4

    Default Calculating new plot field with plugin: issues

    Hi all,

    I've been working to try and develop a plugin to calculate a new plot field to display in PostView. I'm using a material with a specified fiber direction (trans iso mooney rivlin), and I'm looking to use a couple different variables (deformation gradient, stress tensor, specified fiber direction) from each element to calculate a new value and display that for each element in PostView.

    I've been working with Steve and Dave to work out the issues I'm having, but I figured the forum might be an easier place of communication.

    Steve first sent me a sample plugin that calculates I1 and creates a new plot field, but I'm having trouble getting the sample plugin to run. I'm running on a mac (without an intel compiler), so my first issue was compiling the plugin with the libraries. Dave sent me the g++ libraries, so I've been able to successfully compile the sample plugin and import it into FEBio. When opening FEBio I get the message: "Success loading plugin libFEPlotTest_osxg++.dylib" so I believe the plugin contains all the proper information.

    However, when I run a simple simulation to see if it's calculating the new I1 field, I don't see any new output fields in PostView. I also modified the plugin to just write some simple lines in a text file, to see if the plugin is actually being accessed, and the text file is blank after running the simulation. I'm wondering if there's anything else I need to do to get the plugin working in FEBio (besides importing it in the febio.xml file). Do I need to modify the .feb for the simulation to have it calculate the new field I want? Or am I making another mistake somewhere?

    Once I'm able to get the sample plugin running, then I'll be working to calculate the things I need, but I need to make sure I can actually create a new field to be viewed in PostView.

    If anyone has any ideas, let me know, thanks!

    -Chris Korenczuk

  2. #2
    Join Date
    Apr 2016
    Posts
    4

    Default

    So I realized that I also need to add the proper output line to include the class in the .xplt file. The name of the class specified in the plugin is "stress_I1", so I've added

    <var type="stress_I1"/>

    in the output under the plotfile.

    When I run FEBio, it give me a notification that it was able to successfully load the plugin:

    "Success loading plugin FEPlotField.dylib"

    But when I try to run a file with new plot variable I get:

    "FATAL ERROR: Output variable "stress_I1" is not defined"

    Is there something else that I'm missing? I've attached the plugin.

    I've been compiling on a mac using "make osxg++", which accesses the Makefile and FEPlotTest.mk files to compile the plugin. Dave has provided the g++ libraries for me to use in compiling.

    Let me know if anyone has any thoughts, thanks!

    -Chris
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    1,664

    Default

    Hi Chris,

    I've tried your plugin on a windows computer and everything looks good there. Looking at the code, I don't see anything missing or wrong, so I'm not sure why it's not working for you. I'll ask one of the other developers to try it on a mac.

    Cheers,

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

  4. #4
    Join Date
    Apr 2016
    Posts
    4

    Default

    Thanks for checking it out Steve. Let me know if you find any issues with it running on a mac!

    -Chris

  5. #5
    Join Date
    Dec 2008
    Location
    Salt Lake City, UT
    Posts
    376

    Default

    Chris,

    I haven't been able to get this to work with the g++ compiler on the Mac, but I did get it to work with the the Intel compiler and I've attached it here. I'll continue to work on the g++ version.

    FEPlotField.zip

    Cheers,

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

  6. #6
    Join Date
    Apr 2016
    Posts
    4

    Default

    Hi Dave,

    This version works for me as well! Let me know if you find any success with the g++ version. I'll start writing the actual new field that I need calculated (not just I1) for the plugin.

    Thanks!

    -Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •