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

Distribution of temperature

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By `e`
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2016, 07:11
Default Distribution of temperature
  #1
New Member
 
George
Join Date: Oct 2015
Posts: 5
Rep Power: 11
fnatic09 is on a distinguished road
Hello Guys, I've created a simple code which is used to show symmetrical temperature distribution on a disc. But it's only symmetrical in one axis direction. How to change a code to make a circular distribution in all directions not only in one axis ? Is it possible ? I've tried to enter a circle equation but it's not working..
Code:
#include "udf.h"                       
DEFINE_PROFILE(inlet_x_temperature, thread, position)            
{
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];                          
if(y<=0)
{
F_PROFILE(f, thread, position) = 300-y;
}
else
{
F_PROFILE(f, thread, position) = 300+y;
}
}
end_f_loop(f, thread)
}

Last edited by fnatic09; January 10, 2016 at 11:23.
fnatic09 is offline   Reply With Quote

Old   January 10, 2016, 21:27
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
You're currently setting the temperature profile as T(y) = |y| + 300 which agrees well with your result (independent of x).

For a radial temperature profile you must first calculate the radial component r = \sqrt{(x^2 + y^2)} (assuming the origin is at (x,y) = (0,0)) and then T(r) = r + 300.

An example code snippet:

Code:
F_PROFILE(f, thread, position) = sqrt(x[0]*x[0] + x[1]*x[1]) + 300.;
fnatic09 likes this.
`e` is offline   Reply With Quote

Old   February 13, 2016, 05:40
Default
  #3
New Member
 
George
Join Date: Oct 2015
Posts: 5
Rep Power: 11
fnatic09 is on a distinguished road
Everything's working fine but now I have a question how to change equation to get parabolic and circular (in all sides) temperature distribution. I attach an image to show what exactly I mean.

Regards
fnatic09 is offline   Reply With Quote

Old   February 15, 2016, 10:05
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Look again at what `e` typed, but use a different equation for T.
For example: T(r)=300+r^2.

(Or, including units: T(r)=300 K+1 K m^{-2} \cdot r^2.)
fnatic09 likes this.
pakk 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
Problem with zeroGradient wall BC for temperature - Total temperature loss cboss OpenFOAM 12 October 1, 2018 07:36
temperature distribution inside droplet? ljp Fluent UDF and Scheme Programming 1 June 7, 2017 02:38
Indoor Air Temperature distribution - convergence problem Shogan FLUENT 4 May 8, 2014 03:07
how to show the temperature distribution of the mould thomasyangfly FLOW-3D 2 August 26, 2012 10:21
unsteady temperature distribution over coupled bc in MultiRegionCase mvoss OpenFOAM Running, Solving & CFD 0 December 29, 2010 06:17


All times are GMT -4. The time now is 20:15.