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

Help please! UDF for Temperature profile in 3D

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 16, 2010, 01:42
Default Help please! UDF for Temperature profile in 3D
  #1
New Member
 
Subhankar
Join Date: Jul 2010
Posts: 12
Rep Power: 6
subhankar_bhandari is on a distinguished road
Hi all,
I am using UDF to define temperature field in 2D fluid flow problem. If I would like to put 3D temperature profile , what modification of UDF for 2D temperature profile is required.

My UDF for 2D temperature profile is :

DEFINE_PROFILE(inlet_temp, thread, index)
{
real x[ND_ND];
real temp, y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
temp = (12285-333)*(1-(pow((y/0.0035),4)))+(333);
F_PROFILE(f, thread, index) = temp;
printf("Temperature calculated by UDF is %f\n",temp);
}
end_f_loop(f, thread)
}

what would be for 3D?

Thanks in advance.
subhankar_bhandari is offline   Reply With Quote

Old   August 16, 2010, 05:23
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 8
coglione is on a distinguished road
If your inlet is a face aligned with yz-plane and temperature varies in both directions get the z-coordinate using x[2] and define your profile as function of both, y and z.

cheers
coglione is offline   Reply With Quote

Old   August 16, 2010, 08:37
Default Modification in UDF for temperature profile for 3D geometry
  #3
New Member
 
Subhankar
Join Date: Jul 2010
Posts: 12
Rep Power: 6
subhankar_bhandari is on a distinguished road
Hi Max,
Thanks for your suggestion. I have made modification according to your suggestion. Modified UDF for 3D geometry is given below please let me know whether it is ok.



begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
z = x[2];
r = sqrt(pow(y,2)+pow(z,2));
F_PROFILE(f, thread, index) = (12285-333)*(1-(pow((r/0.0035),4)))+(333);


}
end_f_loop(f, thread)
}


Thanks again.
subhankar_bhandari 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
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 9 November 26, 2014 08:58
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 8 May 11, 2014 08:34
UDF parse error at profile function line Wiggy Fluent UDF and Scheme Programming 1 July 27, 2009 15:59
please help UDF for velocity profile in y-directio raju FLUENT 3 September 22, 2008 16:36
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 16:58


All times are GMT -4. The time now is 05:35.