Create a note in HV such that it will be difference of 2 curves

satya swaroop
satya swaroop Altair Community Member
edited August 2021 in Community Q&A

image

 

Hi

here 

i have 2 curves 

i want to create NOTE in Hyperview Using Notes option using the formula

i want to know , what is the value when x coordinate of curve 1 and x coordinate of curve 2 are subtracted

like curve 1 is -2 and curve is at +3  the difference is 1 

how to write a formula for this  with 4 decimal accuracy

Tagged:

Answers

  • Sandesh Gandhi_20689
    Sandesh Gandhi_20689
    Altair Employee
    edited August 2021

    Hello Satya,

    Didn't quite get the math there. Difference between -2 and +3 should be 5, right? - unless you wanted to consider their absolute values.

    Going by the picture, I believe you are using HyperGraph.

    So you can get these values in a note by referring to the curve location (page/window/curve id) and then the attribute.

    Please check out the math reference documentation on HyperWorks Help

    https://2021.help.altair.com/2021.1/hwdesktop/hwd/topics/reference/math/math_overview_r.htm

     

    In your case, you need an expression in the note such as

    {p1w1c1.x[10]-p1w1c2.x[10]}

    10 indicates the index of the point at which you're doing this calculation. Index starts at 0. So this expression was done for 11th point of a curve.

     

    You can also fetch index of min or max points of a curve using functions like indexofmax

    {p1w1c1.x[indexofmax(p1w1c1.y)]}

     

    Here is an expression to calculate difference in X values between the Y peaks of curve1 and curve2:

    {p1w1c1.x[indexofmax(p1w1c1.y)]-p1w1c2.x[indexofmax(p1w1c2.y)]}

     

    I highly recommend using HyperWorks 2021.1 in the next generation user interface to make most of this functionalities.