CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Conditional expression (https://www.cfd-online.com/Forums/star-ccm/139587-conditional-expression.html)

djordje8 July 27, 2014 12:28

Conditional expression
 
Hi,

I am trying to set up the inlet turbulence intensity profile. Namely, I want to have one profile up to a certain height and then a different profile after that height. So, this is how I set it up:

(($$Position[2]>0) && ($$Position[2]<0.97)) ? (TI_sub) : (($$Position[2]>=0.97) && ($$Position[2]<=1.5)) ? (TI_water) : 0

TI_sub and TI_water are the turbulence intensities that I defined as another Field functions.

So, I want the following: If the height is in between 0 and 0.97, then use TI_sub; if the height is in between 0.97 and 1.5, then use TI_water; and for any other height use 0.

However, the problem is that StarCCM+ does not see the first profile (the one between 0 and 0.97).

Please could you help me with this?

Thanks,
Djordje

djordje8 July 27, 2014 12:33

It looks like it uses only the TI_water profile.

cwl July 30, 2014 20:44

Should be

(($$Position[2]>0) && ($$Position[2]<0.97))
?
(TI_sub)
:
( (($$Position[2]>=0.97) && ($$Position[2]<=1.5)) ? (TI_water) : 0 )

djordje8 July 31, 2014 09:55

Thanks very much.


All times are GMT -4. The time now is 05:03.