CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Visualization & Post-Processing (https://www.cfd-online.com/Forums/visualization/)
-   -   If and ElseIf in CFD Post Expression (https://www.cfd-online.com/Forums/visualization/251552-if-elseif-cfd-post-expression.html)

Farsheedd August 24, 2023 14:19

If and ElseIf in CFD Post Expression
 
Hello.
Today I solved a problem of mine with Else and Else If expression in cfd post. so I want to share it with you. The If ElseIf statement in CFD Post is:
if(condition, if(condition, true statement, false statement))
as you know the simple If is:
if(condition, true statement, false statement)
so, you can make loops. Here is a sample:

if(X>0[m],atan(Y/X),if(X<0[m],atan(Y/X)+180[deg],90[deg]))

Hope it will be useful


All times are GMT -4. The time now is 13:27.