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

UDF temperature profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2011, 10:29
Default UDF temperature profile
  #1
New Member
 
Delmas Anthony
Join Date: Oct 2011
Posts: 3
Rep Power: 14
NeoGamaes is on a distinguished road
Hello all,

My question will maybe seem quite easy for some of you, but i've never used UDF before and i'm a little lost, especialy cause i don't know either how to code in this language.
Anyway, to make short, i have the temperature values of a wall surface, obtained experimentatly. Now i would like to implement them in the simulation.

I have for ex:
x=0.1cm T=350K
x=0.2cm T=367K
x=0.3cm T=389K....

How can i put all these values in my simulation via UDF?

Thanks all for your future helps.
NeoGamaes is offline   Reply With Quote

Old   January 9, 2012, 05:11
Default
  #2
New Member
 
Join Date: Dec 2009
Location: Italy
Posts: 23
Rep Power: 16
SerSe is on a distinguished road
Hi Anthony,

I also have to specify the temperature profile (fixed in time) at a wall and do not know how...
how did you solve the problem? Might you copy the udf file you wrote to specify wall temperature?

Thank you very much!!

Serse
SerSe is offline   Reply With Quote

Old   January 9, 2012, 05:41
Default
  #3
Senior Member
 
Bionico's Avatar
 
Flavio
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 15
Bionico is on a distinguished road
I would insert a Profile rather than an UDF. try it!
Bionico is offline   Reply With Quote

Old   January 9, 2012, 08:10
Default
  #4
New Member
 
Delmas Anthony
Join Date: Oct 2011
Posts: 3
Rep Power: 14
NeoGamaes is on a distinguished road
I solved the problem by finding the polynomial equation feeting with my points. I found this equation with Matlab.
NeoGamaes is offline   Reply With Quote

Old   January 13, 2012, 12:33
Default
  #5
New Member
 
Join Date: Dec 2009
Location: Italy
Posts: 23
Rep Power: 16
SerSe is on a distinguished road
I tried with the following profile file to simulate a linearly increasing temperature at a wall

((temperature line 2)
(x
-0.3955 0.682 )
(y
0.0795 0.0795 )
(temperature
1173.15 1923.15 )
)

The file simply contains locations of two nodes and temperature values at these nodes. Fluent reads it easily, but after initializing the solution there is not such temperature distribution at the wall. The temperature I get is the one from the fluid zone.

Might you help me on this?

For NeoGamaes - How did you include the polynomial function at a wall?

Thank you very much!
SerSe is offline   Reply With Quote

Old   January 16, 2012, 03:10
Default
  #6
New Member
 
Delmas Anthony
Join Date: Oct 2011
Posts: 3
Rep Power: 14
NeoGamaes is on a distinguished road
Exemple of Temperature profile:

Code:
/*************************************************************************/
/* temperature_profile2_100.c                                                          */
/* UDF for specifying a temperature profile boundary condition for the disk */
/*************************************************************************/

#include "udf.h"


DEFINE_PROFILE(temperature100disk, thread, index) 
{
  real x[ND_ND];		/* this will hold the position vector */
  real y;
  face_t f;

  begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
      y = x[1];
        F_PROFILE(f, thread, index) = (-3363080951743./1000000000)*y*y+(426743./10000)*y+(3710751./10000);
    }
  end_f_loop(f, thread)
}
If your wall is horizontal in Fluent, you just have to replace x by y. To find the polynomial function with Matlab, use the "polyfit" and "polyval" function.. it's really easy.
NeoGamaes is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
please help UDF for velocity profile in y-directio raju Fluent UDF and Scheme Programming 6 April 12, 2019 23:21
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 9 June 25, 2016 19:08
defining temperature profile with UDF mohammadkm Fluent UDF and Scheme Programming 11 July 3, 2013 00:15
UDF temp. profile BC Shashikant FLUENT 0 June 24, 2006 03:16
temperature profile on boundary sivakumar FLUENT 5 November 24, 2002 00:58


All times are GMT -4. The time now is 09:19.