CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Tecplot (https://www.cfd-online.com/Forums/tecplot/)
-   -   Maximum value on a slice (https://www.cfd-online.com/Forums/tecplot/226549-maximum-value-slice.html)

mlazim14 April 30, 2020 12:27

Maximum value on a slice
 
I've recorded a macro which creates a number of slices along my nozzle, and then performs an Integration on each slice to extract the average values of a range of variables, and saves each to a text file.

Now, I'm also looking to get the radius of the nozzle along the axis, which would simply be either the maximum value of my {Radius} variable, or just the maximum Y value for example.

How can I use the Perform Integration tool to get this maximum value on each slice, or alternatively write a macro which does the same?

I've tried using a macro loop as follows, but it returns 0 for all slices:
Code:

$!VARSET |FIRSTSLICEZONE| = (|INITZONES| + 1)
$!VARSET |SLICEZONE| = |FIRSTSLICEZONE|
$!LOOP |NEWZONECOUNT|
$!ACTIVEFIELDMAPS = [|SLICEZONE|]
$!ALTERDATA [|SLICEZONE|] EQUATION = '{R} = |MAXY|'
$!VarSet |SLICEZONE| += 1
$!ENDLOOP


novedevon May 1, 2020 15:31

Integration is available from the macro language, but the integration result is not accessible from the script easily. That is not true for the PyTecplot interface where you can run the integration as well as have direct access to the data. I would recommend switching to a PyTecplot script which will give you more flexibility.

-Devon Tecplot Product Engineer


All times are GMT -4. The time now is 11:02.