|
[Sponsors] |
January 10, 2016, 07:11 |
Distribution of temperature
|
#1 |
New Member
George
Join Date: Oct 2015
Posts: 5
Rep Power: 11 |
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. |
|
January 10, 2016, 21:27 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You're currently setting the temperature profile as which agrees well with your result (independent of x).
For a radial temperature profile you must first calculate the radial component (assuming the origin is at ) and then . An example code snippet: Code:
F_PROFILE(f, thread, position) = sqrt(x[0]*x[0] + x[1]*x[1]) + 300.; |
|
February 13, 2016, 05:40 |
|
#3 |
New Member
George
Join Date: Oct 2015
Posts: 5
Rep Power: 11 |
||
February 15, 2016, 10:05 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
|
|
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 |