CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Tecplot (https://www.cfd-online.com/Forums/tecplot/)
-   -   Expand the 3D surface into a 2D plane--IF Statement (https://www.cfd-online.com/Forums/tecplot/227715-expand-3d-surface-into-2d-plane-if-statement.html)

lixinjun June 8, 2020 01:24

Expand the 3D surface into a 2D plane--IF Statement
 
Hi everyone,
I want to expand the 3D surface into a 2D plane.
The math transformation piecewise function is like this:
if y>=0
y=48*arcsin(y/48)

if y<0 and x>=32
y=16*arcsin(y/16)

if y<0 and x<32
y=16*arcsin(1) +32-x

(x,y are coordinates for this 3D surface.)
I have written a Macro as follow:
#!MC 1200

$!ALTERDATA EQUATION = "{Y}=if({Y}>=0,48*ASIN({Y}/48), {Y})"

$!ALTERDATA EQUATION = "{Y} = if({Y}<0 && {X}>=32, 48*ASIN({Y}/48),{Y})"

$!ALTERDATA EQUATION = "{Y} = if({Y}<0 && {X}<32, 16*ASIN(1)+32 -{X},{Y})"


But it is wrong!!!
I really need your help on this Macro.
Thank you so much!!!


All times are GMT -4. The time now is 22:57.