CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   C_T(adjacent_cell) returns zero (http://www.cfd-online.com/Forums/fluent-udf/120938-c_t-adjacent_cell-returns-zero.html)

momo_sjx July 17, 2013 13:23

C_T(adjacent_cell) returns zero
 
Hi, I am a new user of UDF.
I am using VOF model for multiphase flow.
I want to access the temperature of adjacent cell of each cell.
There are some value return as zero (like 360 E-360);
Why?
What is this cell?
Thanks

Here is my code in Define_Adjust()

begin_c_loop (c,t)
{
c_face_loop(c, t, n)
{
f = C_FACE(c,t,n);
tf = C_FACE_THREAD(c,t,n);
if (!BOUNDARY_FACE_THREAD_P(tf))
{
c0 = F_C0(f,tf);
t0 = THREAD_T0(tf);
if (c0==c)
{
c0 = F_C1(f,tf);
t0 = THREAD_T1(tf);
}
Message("Temperature of adjacent cell:%g.\n",C_T(c0,t0));
}
}

vasava July 23, 2013 02:01

This might work:

temp1 = C_T(c0,t0);
Message("Temperature of adjacent cell:%g.\n",temp1);

momo_sjx July 23, 2013 18:53

Hi, thanks for this solution.
But it still does not work.
here is the output:
Temperature of neighbor cell is: 3.95253e-323;
The interesting thing is when I use serial simulation,
this problem disappear.

When I use parallel computation.
This problem appear.

What is the reason?

Thank you in advance.

vasava July 26, 2013 01:34

You must modify your UDF for parallel usage. Your must use !RP_HOST and !RP_NODE for that. You can look in to fluent manual for that.

momo_sjx August 8, 2013 10:50

Thank you very much. I found some documents on it.


All times are GMT -4. The time now is 18:16.