How to specify User Data?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ateshian
    Developer
    • Dec 2007
    • 1824

    How to specify User Data?

    Hi Steve,

    How does one specify User Data in PostView? Is it possible to specify it by combining some of the built-in quantities? For example, in a poroelastic analysis, say I want to evaluate the elastic stress in the solid matrix by adding the fluid pressure (Temperature field in PostView) to the total stress, e.g.,

    User Data 1 = Temperature + Z-stress

    Is that possible?

    Thanks,

    Gerard
  • maas
    Lead Code Developer
    • Nov 2007
    • 3400

    #2
    Hi Gerard,

    The way to set the userdata fields is by using the following command:

    userdata[n] <name> <expression>

    n can be 1 through 5. name is the description that will show up in the menu and in the title. And expression is the mathematical expression. For instance,

    userdata1 "radial displacement" "=sqrt(ux^2 + uy^2)"

    Note the use of quotes when spaces are present in the fields and the equal sign that must precede the expression.

    A list of the variables you can use at this time to build your expression follows:

    t: time
    x,y,z: nodal coordinates
    ux,uy,uz: nodal displacements
    vx,vy,vz: nodal velocties
    ax,ay,az: nodal acceleration
    sz,sy,sz,sxy,syz,sxz: nodal stress (= stress avg elements to which this node attaches)
    Ex,Ey,Ez,Exy, Eyz,Exz: nodal G-L strain (= idem)

    Note that temperature is not yet part of this list, but I will add it.

    Cheers,

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

    Comment

    • ateshian
      Developer
      • Dec 2007
      • 1824

      #3
      Thanks!

      Hi Steve,

      That's great, thanks! This is a very useful feature. I could not find a description of this option in the Help manual. If it's not there, could you please add it?

      Also, is it possible to mix nodal and elemental values? (such as nodal pressure/Temperature and elemental stress?) In that case would the User Data field become element based?

      Thanks,

      Gerard

      Comment

      • maas
        Lead Code Developer
        • Nov 2007
        • 3400

        #4
        Hi Gerard,

        Since I wanted to intermix element and nodal values freely there are a couple of things going on under the hood that the user is probably not aware of. The data plotted in the Graphics View is always nodal based. So if you're plotting element data, such as strain or stress, then the element values are projected and averaged over the nodes. This is also true for the data plotted in the Summary Window.
        However, in the TrackView window, things are a bit different. When you select a node, all values are nodal based, but when you select an element, all values are element based. So, in TrackView when you have an element selected, you can plot the actual stress as it is found in the plotfile.
        So, when plotting userdata, you are allowed to mix nodal and element data, but it will always be calculated nodal based, expect in the TrackView where for selected elements, it will be element based. I hope this clarifies things.

        Cheers,

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

        Comment

        • michalacadova
          Member
          • Jan 2010
          • 80

          #5
          Originally posted by maas View Post
          The way to set the userdata fields is by using the following command:
          userdata[n] <name> <expression>

          n can be 1 through 5. name is the description that will show up in the menu and in the title. And expression is the mathematical expression. For instance,

          userdata1 "radial displacement" "=sqrt(ux^2 + uy^2)"

          Note the use of quotes when spaces are present in the fields and the equal sign that must precede the expression.
          Hi Steve,
          could you please tell me, in which section of febio file do I have to add my “user defined data”? I tried to add it to the Output section

          <Output>
          <logfile>
          <node_data data="sqrt(sx^2+sy^2+sz^2)" name="StressCheck"> </node_data>
          </logfile>
          </Output>

          and it actually have added something to the log file with the appropriate name, but how can I then visualize it in Postview? I have tried to Add data in the “Data section” in postview (the log file, since I have nothing else), but then Postview crashed.

          Michala

          Comment

          • maas
            Lead Code Developer
            • Nov 2007
            • 3400

            #6
            Hi Michala,

            The format output by FEBio is not compatible with PostView's format. The only way to bring that data into PostView is to do the conversion manually. I apologize for the inconvenience and for PostView crashing. I will try to catch that error and bring up a dialog box instead.

            Also know that I am currently working on a better alternative. I am redefining the plot file format such that you can add that data directly to the plot file. It will still be a few weeks before this new format will be ready for the public, but that will probably solve your problems more elegantly.

            I will make a post on the forum when the new format is ready.

            Cheers,

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

            Comment

            • michalacadova
              Member
              • Jan 2010
              • 80

              #7
              Hi Steve,
              It’s great to here that this option is being prepared. As you said that “The only way to bring that data into PostView is to do the conversion manually” how does the format for PostVies look like? I can’t find it anywhere

              From “Output” I get for the rigid body force values in the following format

              *Title:
              *Step = 1
              *Time = 0.2
              *Data = Fx
              3 1.39237
              *Step = 2
              *Time = 0.347840488
              *Data = Fx
              3 2.06426
              *Step = 3
              *Time = 0.448729813
              *Data = Fx
              3 2.52272
              *Step = 4
              *Time = 0.589441274
              *Data = Fx
              3 3.15249
              *Step = 5
              *Time = 0.718763967
              *Data = Fx
              3 3.73446

              And for some nodal values like:

              *Title:
              *Step = 1
              *Time = 0.3
              *Data = UserData
              1 1.73205
              2 1.73205
              3 1.73205
              ...

              *Step = 2
              *Time = 0.497194195
              *Data = UserData
              1 1.73205
              2 1.73205
              3 1.73205
              ... etc.

              How should I adjust it for Postview?

              Michala

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3400

                #8
                Hi Michala,

                The format PostView expects is,
                node nr 1, value for step 1, value for step 2, ..., value for step n
                node nr 2, value for step 1, value for step 2, ..., value for step n

                So in your example, this would give,

                1, 1.73205, 1.73205, etc.
                2, 1.73205, 1.73205, etc.
                3, 1.73205, 1.73205, etc.

                There is currently no way to read in the rigid body data though. I am still working on that capability.

                Hope this helps,

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

                Comment

                • tff
                  Member
                  • Mar 2019
                  • 30

                  #9
                  Hi,

                  I have a question related to the posts in this thread. I know the posts are old and I was wondering if currently there is any way to export the values using logfile in the same PostView format described above.

                  Thank you for your help.

                  Best,

                  Comment

                  • maas
                    Lead Code Developer
                    • Nov 2007
                    • 3400

                    #10
                    Hi,

                    Unfortunately, FEBio cannot output in the PostView format, because PostView expects all the values for all time steps for a node (or element) on the same line. FEBio can only output one time step at a time.

                    I agree this would be a useful feature to have so I will look into this more. We are about to release a new version of PostView (version 2.5) and if possible, I'll see if I can add that in.

                    Cheers,

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

                    Comment

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