Register Blogs Members List Search Today's Posts Mark Forums Read

 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: 5 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: 544 Rep Power: 12 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: 5 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: 544 Rep Power: 12 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: 5 Thank you very much. I found some documents on it.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Kindel CFX 4 January 21, 2013 15:26 shiraz_man67 Fluent UDF and Scheme Programming 0 November 1, 2012 12:32 openfoamstudents OpenFOAM Bugs 4 August 7, 2010 11:25 Grzegorz FLUENT 0 June 3, 2008 08:50 kat Main CFD Forum 10 September 9, 2007 09:20

All times are GMT -4. The time now is 22:04.