Output data for a specific set of elements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sschwaner
    Junior Member
    • Jul 2015
    • 24

    Output data for a specific set of elements

    It would be beneficial for me to be able to output data for a specific set of elements. I read in the FEBio manual that it's possible to create element sets for this purpose, but I was unable to find anything later on in the manual about how to actually output data for a specific element set after it has been created. Does anyone know how to use this feature?

    Thanks,

    Stephen
  • maas
    Lead Code Developer
    • Nov 2007
    • 3400

    #2
    Hi Stephen,

    You can do this by adding the "elset" attribute do the element data tag.

    Code:
    <element_data data="sx;sy;sz" elset="set1"/>
    This will only output the data for element set, named "set1", and defined the Geometry section. Note that this was added recently. I think it's available in 2.3, but I'm not sure. If not, it will definitely be available in the upcoming 2.4 release. Give it a try and let me know if that worked for you.

    Cheers,

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

    Comment

    • sschwaner
      Junior Member
      • Jul 2015
      • 24

      #3
      Great, thanks! I'll let you know if it works.

      Thanks,

      Stephen

      Comment

      • opcg
        Junior Member
        • Aug 2015
        • 13

        #4
        Hi,

        The same idea is valid if I wish to track surface elements (type "tri")? Because... in my Matlab script, for instance, I can define a surface set which is seen by PreView with a name, let's say "Surface". However, after I run some simulation, PostView only sees the structure tagged by <elem> for the elements making up the "Part" - unique here.

        By supposing that I need to know quantities in a certain area - in my case, the reaction forces over "Surface" after the domain is deformed -, how do I recover this information from PostView? Is it a right rationale to say that PostView doesn't save the information about "Surface"? (As a matter of fact, I've posted a question
        on this line - awaiting -, since I need to track a surface and know how to recover reaction forces after deformation to compute an apparent Young modulus of the structure.)

        To explain better: my script leaves out Matlab like this

        <Surface name="Surface">
        <tri3 id="1"> 1, 2, 3, 4 </tri3>
        ditto...
        </Surface>
        but this structure is not kept in PostView after I run Febio, so that I can't track it anymore.

        Thank you all!

        Peixoto

        Comment

        • maas
          Lead Code Developer
          • Nov 2007
          • 3400

          #5
          Hi Peixoto,

          I'm not sure I completely understand the problem, but if you define the surface in the Geometry section of the FEBio input file, then PostView will know it. It will show up in PostView in the Model Editor, under the Mesh item. You should be able to select it and it will be highlighted in PostView. Please give that a try and let me know if that worked for you.

          Cheers,

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

          Comment

          • opcg
            Junior Member
            • Aug 2015
            • 13

            #6
            Hi Steve,

            To be clearer, I attach two screenshots:

            i) 'preview.png': note that 'Top_surface' is indeed defined (circled in red).

            ii) 'postview.png': note that there is no surface highlighted anymore (circled in black).

            What's wrong?

            preview.jpg postview.jpg
            Thanks!

            Comment

            • maas
              Lead Code Developer
              • Nov 2007
              • 3400

              #7
              Aha, I see. The Named Selections in PreView don't get stored in the .feb file and that's why they don't show up. That's an interesting suggestion, maybe I can add that.

              The only surfaces that are currently stored in the Geometry section of the input file have to be defined as part of a boundary condition and given a name in the Name field of the Selection box of the boundary condition. I assume that Top_Surface is part of a boundary condition? If so, just name the selection Top_Surface and it should show up in PostView.

              Give that a try and let me know if that worked.

              Cheers,

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

              Comment

              • opcg
                Junior Member
                • Aug 2015
                • 13

                #8
                Hi Steve,

                'Top_surface' was not a BC, just a named selection like this in .feb file:
                <Surface name="Top_surface">
                <tri3 id="1"> 1, 2, 5</tri3>
                <tri3 id="2"> 1, 3, 4</tri3>
                <tri3 id="3"> 1, 3, 7</tri3>
                (...)


                I had applied displacement over the top nodes. I think I got it.

                Now, I did the following:

                i) applied displacement BC by selecting 'Top_surface'; PostView showed up it, but in the form of node selection;
                ii) applied pressure load BC by selecting 'Top_surface'; PostView showed up it, but in the form of surface selection. <---

                Option ii) is what I want, but brings me questions:

                - To have the full surface selectable (ready to compute area and reaction forces), should I always apply pressure load BCs instead of displacements?
                - Turning back to a question of mine from another post: to achieve a "p%" of strain in the simulations, the scale factor of "p%" set while prescribing
                displacement BCs will produce the same effect as if prescribed for pressure load BCs?

                In a quick run here, ii) didn't converge.

                Thank you!

                Peixoto

                Comment

                • maas
                  Lead Code Developer
                  • Nov 2007
                  • 3400

                  #9
                  Hi Peixoto,

                  In FEBio, prescribed displacements are applied on the nodes, whereas pressures are prescribed on a surface. Although in PreView you can apply a prescribed displacement to a surface, if you'll look in the .feb input file, you'll see that PreView actually created a node set for the displacement boundary condition.

                  So in order to get the surface to show in PostView, you'll have to apply a pressure boundary condition. The applied pressure is not the same as the applied displacement, and in fact, a constant pressure will not result in a constant displacement, so I think for your case, the prescribed displacement is the way to go. Of course, that doesn't give you the surface in PostView, but you can apply this trick: apply a zero pressure boundary condition in addition to the prescribed displacement. The zero pressure will not affect your result and will get your surface into PostView. Give that a try and let me know if that worked.

                  Cheers,

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

                  Comment

                  • opcg
                    Junior Member
                    • Aug 2015
                    • 13

                    #10
                    Hi Steve!

                    Wow, awesome! It worked!

                    Thank you!!!

                    P.

                    Comment

                    • sschwaner
                      Junior Member
                      • Jul 2015
                      • 24

                      #11
                      Hi Steve,

                      Did outputting data for specific element sets and node sets get removed from the 2.5 release? A few lines from my Output section below don't seem to be working like the above thread posts would suggest.

                      <logfile file="halfSphere.log">
                      <node_data data="x;y;z;ux;uy;uz" file="NodeDisp.txt" delim="," node_set="ResultsNodes"></node_data>
                      </logfile>

                      Any insight on whether this is supposed to work or not?

                      Thanks,

                      Stephen

                      Comment

                      • kingina
                        Junior Member
                        • Feb 2015
                        • 11

                        #12
                        Hi,

                        I'm also having issues with extracting data from a specific set of elements. When using code for creating a set of nodes, everything is working fine
                        i.e
                        <NodeSet name="set01">
                        <node id="101"/>
                        ...
                        </NodeSet>
                        If I'm trying to do exactly the same for a specific set of elements, febio crashes.
                        <ElementSet name="set01">
                        <elem id="101"/>
                        ...
                        </ElementSet>
                        Can you please let me know if creating and outputting data from a set of elements is still working? I'm using the latest version of febio.

                        Many thanks,
                        Kinga

                        Comment

                        • sschwaner
                          Junior Member
                          • Jul 2015
                          • 24

                          #13
                          Hello,

                          Just wondering if there is an update on this? This would be a huge help to be able to output data for specific element sets or node sets.

                          - Stephen

                          Comment

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