Showing results for 
Search instead for 
Do you mean 
Reply

Journal issue with " AverageAcrossFeatangle = False "

Hi,

I have created a VBA journal script on NX 8.5 to export some data on a xslx file (such as maximum Von Mises stress).

Everything works well when I use the option :

Dim average As CAE.Result.Averaging
average.AverageAcrossFeatangle = True
average.AverageAcrossAnglevalue = 45.0

Then, further in the code, I use this command to obtain results : resultAccess.AskNodalResultAllComponents(nodeIndex, nodeValues)

The nodal values given by my journal script are the same as nodal values read in the screen.

So this action totally works ! However, when I change the Angle option, results remain the same :

Dim average As CAE.Result.Averaging
average.AverageAcrossFeatangle = False
average.AverageAcrossAnglevalue = 45.0

And to obtain results, this time I have to use :
resultAccess.AskElementNodalResult(elementIndex, nodeIndex, nodeValues)

The fact is Von Mises nodal values should not remain unchanged, or at least for some elements (because of the angle 45 activated).

On my screen, when I do the same steps manually on a specific element, I notice that nodal values have changed. But my journal script gives nodal values as if the averaging option had been unchanged (= True)...

Is this command not well understood when I use a journal script ?

I can send you the entire code if necessary !

Thanks !

Best Regards,

Baptiste

8 REPLIES

Re: Journal issue with " AverageAcrossFeatangle = False "

Interested in the problem so...

What have you got  in your script for the option:

 

Dim averaging As CAE.Result.Averaging

  averaging.DoAveraging

 

True or False?

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Journal issue with " AverageAcrossFeatangle = False "

[ Edited ]

Hi,

Thanks a lot for your response ! (I'm kind of desperate to think about it without finding anything ..)

In my script, averaging option is activated :

          average.DoAveraging = True
          average.AverageAcrossPropertyIds = True
          average.AverageAcrossMaterialIds = True
          average.AverageAcrossElementTypes = True
          average.AverageAcrossFeatangle = False
          average.AverageAcrossAnglevalue = 45.0

Indeed, even if I change Angle Value (for example : average.AverageAcrossAnglevalue = 0.0), I obtain the exact same nodal values on the element analyzed....and when I do the exact same actions with user interface, the screen gives me complete different values ...

I expect to obtain different nodal values for different angles, but it does not work with my journal script ...

Any idea ?

Thanks again !

Baptiste

Re: Journal issue with " AverageAcrossFeatangle = False "

PS : It seems that NX performs the averaging action anyway, without considering any angle value (the nodal values I obtain, for any angle, are the same as nodal values obtained with AverageAcrossFeatangle = True)

Re: Journal issue with " AverageAcrossFeatangle = False "

[ Edited ]

The AverageAcrossAnglevalue has no affect on the averaging if the switch is on (AverageAcrossFeatangle = True).

 

When the switch is off (AverageAcrossFeatangle = False), averaging will occur if the angle between adjacent element faces is less than the AverageAcrossAnglevalue

 

In short, the only time averaging will occur is if the switch is off and the angle between adjacent element faces is less than the angle value.

Re: Journal issue with " AverageAcrossFeatangle = False "

JimB beat me to it... but

From the doc

When this check box is not selected [AverageAcrossFeatangle = False I guess], the software leaves the results unaveraged across feature angles greater than the angle threshold you specify

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Journal issue with " AverageAcrossFeatangle = False "

[ Edited ]

Hi JimB,

Yes I totally agree with you, I have well understood how this option works, but in my case, I compare results from user interface, with nodal values from journal script, and it turns out that I obtain different nodal values.

Besides, I agree with selex_ct : When the switch is OFF (AverageAcrossFeatangle =  False), averaging will occur (if the angle between adjacent element faces is less than the AverageAcrossAnglevalue).  

So, to get back with my problem, I'm sure that I compare the same element (and same nodes) because I have implemented some box messages to return element and node labels considered in my script.

In my example, I observe Von Mises nodal values on a specific element which is linked which an other perpendicular element (the angle between adjacent element faces is equal to 90 °)

With the user interface, when the angle value is higer than 90°, nothing changes. And when the angle specified is under or equal 89 °, nodal values change. Up to now, everything is normal I guess.  

But, with journal script, results remain unchanged, even if angle value is higher or smaller than 90 ° ....and the comparison is made with the exact same element ....

Do you see my problem ? The command does not seem to work well in NX OPEN

Thanks,

Baptiste

Re: Journal issue with " AverageAcrossFeatangle = False "

Just  a tought before going. Not test carried out to verify the idea

 

Got it be linked to the fact that with the GUI, NX "knows" that say both elements are displayed, checks the averaging options specified and deals with the request accordingly (averign or not).

 

with the script option one is accessing "raw" data for 1 element with the resultAccess.AskElementNodalResult(elementIndex, nodeIndex, nodeValues) at a time so the variable nodeValues() contains the raw data for that element only

 

Again just a tought...

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Journal issue with " AverageAcrossFeatangle = False "

Hi selex_ct,

Yes, what you say makes sense ! But have you any idea to solve it ? 

How make NX consider all the elements, and not only the one considered ? 

Is there an other way to obtain nodal values of an element rather than using the resultAccess.AskElementNodalResult(elementIndex, nodeIndex, nodeValues) ?