CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Phoenics (https://www.cfd-online.com/Forums/phoenics/)
-   -   cell distiction (https://www.cfd-online.com/Forums/phoenics/51996-cell-distiction.html)

Daniel January 11, 2006 15:27

cell distiction
 
Hi, im working with open chanel flow, my problem is,

i created a variable called ALT, is defined by multiplying rho*1000 in non porous zones and rho*900 in porous media, how can i make that distiction? ive tried with this ground code

IF((IX.LT.15).AND.(IX.GT.14))THEN

CALL FN0(LBNAME('ALT'), LBNAME('DEN1'))

CALL FN25(LBNAME('ALT'), 0.001)

ELSE

CALL FN0(LBNAME('ALT'), LBNAME('DEN1'))

CALL FN25(LBNAME('ALT'), 0.0009)

ENDIF

The problem is that the condition if is not working, all the domain goes directly to else, why? ix is the cell number in X direction right? help please

Rami January 12, 2006 02:52

Re: cell distiction
 
Simply because the condition 14<ix<15 is never true for integer ix...

Rami January 12, 2006 02:54

Re: cell distiction
 
Simply because the condition 14 < ix < 15 is never true for integer ix...

Daniel January 12, 2006 12:20

Re: cell distiction
 
Rami, thatks for your answer, buti misstyped, instead of 14 is 34, what i want to know is that if is correct to use ix for that calculation, or what integer should i use

IF((IX.LT.15).AND.(IX.GT.34))THEN

CALL FN0(LBNAME('ALT'), LBNAME('DEN1'))

CALL FN25(LBNAME('ALT'), 0.001)

ELSE

CALL FN0(LBNAME('ALT'), LBNAME('DEN1'))

CALL FN25(LBNAME('ALT'), 0.0009)

ENDIF


All times are GMT -4. The time now is 07:20.