|
[Sponsors] |
July 17, 2013, 13:23 |
C_T(adjacent_cell) returns zero
|
#1 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 13 |
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)); } } |
|
July 23, 2013, 02:01 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
This might work:
temp1 = C_T(c0,t0); Message("Temperature of adjacent cell:%g.\n",temp1); |
|
July 23, 2013, 18:53 |
|
#3 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 13 |
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. |
|
July 26, 2013, 01:34 |
|
#4 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
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.
|
|
August 8, 2013, 10:50 |
|
#5 |
Member
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 13 |
Thank you very much. I found some documents on it.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dynamic contact angle udf returns no value to solver | shiraz_man67 | Fluent UDF and Scheme Programming | 5 | July 3, 2018 14:51 |
Mesh returns to undeformed shape after ICEM Remesh | Kindel | CFX | 4 | January 21, 2013 14:26 |
Kubuntu 10.04 bashrc script returns error | openfoamstudents | OpenFOAM Bugs | 4 | August 7, 2010 11:25 |
UDF - C_STRAIN_RATE returns 0 | Grzegorz | FLUENT | 0 | June 3, 2008 08:50 |
DNS always returns to laminar initial solution | kat | Main CFD Forum | 10 | September 9, 2007 09:20 |