Accessing nodal values for plots?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • JonahA
    Member
    • Jun 2018
    • 38

    Accessing nodal values for plots?

    This might be very obvious, but I can't seem to figure out the proper way of doing it. How can I use Postview to plot a variable value along a line or curve (for a radial plot of strain, say)? And, more generally, if I want to access variables such as the displacement or concentration at nodes satisfying some condition for the purposes of generating plots, what would be the syntax or tools to do that?
  • weiss
    Moderator
    • Nov 2007
    • 124

    #2
    To plot a variable as a function of position, first select the (e.g.) nodes you are interested in, Then look at Post -> New Graph, and then select type Time-Scatter. For x, you can select e.g., initial position. Then for y, select the variable of interest. Look under the "Tools" button to control whether the current state is used, or a range of states.

    Not sure I understand the second part of your question.

    Regards,

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

    Comment

    • JonahA
      Member
      • Jun 2018
      • 38

      #3
      Well, what I am asked is there a way to select the nodes programmatically, rather than manually? So instead of having to select all the nodes on a line through the center, I can just enter an equation to tell Postview how much to select? Or at least some way of putting the nodes and values satisfying a given condition into some file to graph in another program?

      Comment

      • weiss
        Moderator
        • Nov 2007
        • 124

        #4
        Yes you can do that.

        Make sure the node selection icon is selected.

        Advance to the plot state of interest.

        Select the result of interest from the pull-down menu, e.g. effective stress.

        Edit -> Select range -> set the range of values

        Post -> New Graph -> select the result

        This will show the results for the selected nodes for all states.

        To save the data, select the save or copy icon in the top left of the Graph window.
        Jeffrey A. Weiss
        Professor, Department of Biomedical Engineering, University of Utah
        Director, Musculoskeletal Research Laboratories
        jeff.weiss@utah.edu

        Comment

        • JonahA
          Member
          • Jun 2018
          • 38

          #5
          OK, that's good to know. But I guess I was asking more about selecting all the elements on the line x = 1, say, rather than those with a stress, concentration, etc. in a certain range.

          Comment

          • weiss
            Moderator
            • Nov 2007
            • 124

            #6
            I don't believe that we have that feature (to select nodes by coordinates via equation input or similar), but it seems like it could be useful. Please submit a Feature Request in the PostView "Project" section if it is a feature that you need for your research.
            Jeffrey A. Weiss
            Professor, Department of Biomedical Engineering, University of Utah
            Director, Musculoskeletal Research Laboratories
            jeff.weiss@utah.edu

            Comment

            • weiss
              Moderator
              • Nov 2007
              • 124

              #7
              Originally posted by JonahA View Post
              OK, that's good to know. But I guess I was asking more about selecting all the elements on the line x = 1, say, rather than those with a stress, concentration, etc. in a certain range.
              Actually you can do this as per my previous post. For the result, select "initial position" from the pull-down menu. If you want to select all nodes with x-coordinate of 1, select "X - initial position", then Edit -> Select Range and put in min and max values of 1.
              Jeffrey A. Weiss
              Professor, Department of Biomedical Engineering, University of Utah
              Director, Musculoskeletal Research Laboratories
              jeff.weiss@utah.edu

              Comment

              • JonahA
                Member
                • Jun 2018
                • 38

                #8
                OK, that's helpful. But in 3D it does only select a plane, not a line. Would it be possible to define a callback function that would write the values associated with elements satisfying a certain equation to a file at the end of a run? A callback executes an arbitrary operation on the FeModel class, right? And the FeModel class presumably stores the list of elements and their corresponding variable values, including position, such that it would be possible to define some condition on the coordinates that if satisfied writes the concentration, strain, whatever, to a file.

                I already wrote a diffusivity material plugin for my model, so I suppose I could just put the condition in there as a condition on FeMaterialPoint::m_rt, and then it would be called every time the diffusivity was needed, so that I would essentially have what I wanted, right? But would that add too much overhead?

                Comment

                • weiss
                  Moderator
                  • Nov 2007
                  • 124

                  #9
                  The diffusivity material is called to evaluate the right hand side as part of Newton's method, so if you wrote nodal or element data every time it was called, it would include data for non-converged nonlinear iterations.

                  If you would like to have a feature available in PostView to select nodes based on an equation in addition to the current capabilities (it should not be hard to add), please make a feature request here:

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

                  Comment

                  • ianberg1
                    Junior Member
                    • Mar 2019
                    • 5

                    #10
                    Hi All,

                    I landed in this forum similarly looking for a way to select certain nodes, e.g. a line along a plane. For complex lines or planes, a method to select based on a equation or similar as described would be helpful. However for simple sections, such as x = 1 along the plane Z = 0, I realized that the method Jeff described can be used iteratively to accomplish this. For example (adding to Jeff's instructions):


                    Make sure the node selection icon is selected.

                    Advance to the plot state of interest.

                    Select a condition from the pull-down menu, e.g. Z initial position

                    Edit -> Select range -> set the range of values, e.g. 0 to 0 or -1 to 1, depending on the mesh and how you want to define the plane.

                    Select the next condition from the pull-down menu, e.g. X initial position

                    Repeat Edit -> Select range -> set the range of values, e.g. 0 to 0 or -1 to 1, depending on the mesh and how you want to define the plane, **but this time check the "apply to current selection" box

                    Post -> New Graph -> select the axes etc.

                    You should now have all of the nodes on plane Z=0 along the line X = 1 selected, and you can follow the process to create a graph of the data on these nodes.

                    It might not be perfect for all applications, but it works for what I need currently, so I thought I would share if others found it helpful.

                    Comment

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