CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

C_T(adjacent_cell) returns zero

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 17, 2013, 13:23
Default C_T(adjacent_cell) returns zero
  #1
Member
 
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 5
momo_sjx is on a distinguished road
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));
}
}
momo_sjx is offline   Reply With Quote

Old   July 23, 2013, 02:01
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 544
Rep Power: 12
vasava will become famous soon enough
This might work:

temp1 = C_T(c0,t0);
Message("Temperature of adjacent cell:%g.\n",temp1);
vasava is offline   Reply With Quote

Old   July 23, 2013, 18:53
Default
  #3
Member
 
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 5
momo_sjx is on a distinguished road
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.
momo_sjx is offline   Reply With Quote

Old   July 26, 2013, 01:34
Default
  #4
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 544
Rep Power: 12
vasava will become famous soon enough
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.
vasava is offline   Reply With Quote

Old   August 8, 2013, 10:50
Default
  #5
Member
 
Sean (J.X.) Shi
Join Date: May 2012
Location: US
Posts: 34
Rep Power: 5
momo_sjx is on a distinguished road
Thank you very much. I found some documents on it.
momo_sjx is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh returns to undeformed shape after ICEM Remesh Kindel CFX 4 January 21, 2013 15:26
dynamic contact angle udf returns no value to solver shiraz_man67 Fluent UDF and Scheme Programming 0 November 1, 2012 12:32
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


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