|
[Sponsors] |
May 23, 2012, 08:01 |
If statement question
|
#1 |
Senior Member
Join Date: Jan 2011
Posts: 339
Rep Power: 16 |
Hello I am tried to wright if statement to set velocities of two fluids (one at the bottom of the pipe and the other on the upper part) I tried use CEL expression and I use in it If expression to distribute the velocity between the phases as below:
if(y>0.01 [m],if(y<=0.01 [m],12.5 [m s^-1],0.0066 [m s^-1]),0 [m s^-1]) where y vertical distance 0.01 m is the free surface level knowing that the velocities at walls are zero (no slip condition). when I try test the expression above before run in cfx-pre it gives zero velocity everywhere along y direction so what the problem? may somebody tell me? is the expression incorrect? I read at the documentations about IF statement but not find similar example to my case? |
|
May 23, 2012, 12:34 |
|
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
Code:
if(cond_expr,true_expr,false_expr) if(y>0.01 [m],12.5 [m s^-1],0.0066 [m s^-1]) |
|
May 23, 2012, 15:17 |
|
#3 |
Senior Member
Join Date: Jan 2011
Posts: 339
Rep Power: 16 |
Yes when y>0.01 m velocity is 12.5 m/s
But when y<=0.01 m velocity is 0.0066 m/s When y=0 & y=0.0985 m (at lower and upper walls respectively) velocity is 0 m/s with the above conditions how the expression will be? Thanks |
|
May 24, 2012, 03:33 |
|
#4 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
The expression I gave you will work. At the walls the velocity will be zero unless you have defined a free-slip wall.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 14:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
Question about Table applicaiton. | universez | OpenFOAM Running, Solving & CFD | 0 | January 12, 2010 21:31 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 05:37 |
Philosophical CFD question | Richard Howe | Main CFD Forum | 14 | June 17, 2001 15:41 |