|
[Sponsors] |
Create a Cosine shapped wall heat flux in 3d geometry |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 3, 2012, 13:30 |
Create a Cosine shapped wall heat flux in 3d geometry
|
#1 |
New Member
Join Date: Mar 2012
Posts: 6
Rep Power: 14 |
Hello,
I have been tasked to model flow around heated rods in fluent. The heat flux profile for the rod is a cosine shape of the form qflux (W/m^2) =A*cos(B*y); where A and B are constants and y is the height position from 0 to some arbitrary height h. My model is 3 dimensional but the wall upon which I want to put this condition is cylindrical in shape with constant radius, r. I have been reading through the UDF manual and need some help. This is what I have so far: /************************************************** *** UDF for specifying the heat flux from a cosine shapped heatflux boundary profile in three dimensions ************************************************** ***/ #include "udf.h" DEFINE_PROFILE(cos_profile,t,i) { face_t f; begin_f_loop(f,thread) F_PROFILE(f,thread,i) = A*cos(B*y); end_f_loop(f,thread) } Where once again A and B are just place holders for constant values and y represents the cosine profile which changes axially but is constant radially around the rod. My question is what modifications/additions do I need to do to have this profile be implemented correctly for Fluent? I appreciate your pointers and forgive me if this has been covered at some point and I did not locate it. |
|
April 4, 2012, 18:42 |
|
#2 |
New Member
Join Date: Mar 2012
Posts: 6
Rep Power: 14 |
After much time of sadness and despair in my first escapades into the seemingly uncharted (to the beginner) but frequently traveled world of UDF's I regrouped and I think I fixed the little bugs and now have a working solution.
The solution below seems to work so have fun using this or adapting it to your purposes. Hopefully this will help someone out. If anyone, including myself, happens to find error in the future feel free to correct. /************************************************** *** UDF for specifying the heat flux from a cosine shapped heatflux boundary profile in three dimensions ************************************************** ***/ #include "udf.h" DEFINE_PROFILE(cos_profile, thread, position) { real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { y = x[1]; F_CENTROID(x, f, thread); F_PROFILE(f,thread,position) = A*cos(B*y); } end_f_loop(f, thread) } Take care yall! Scott |
|
Tags |
boundary condition, help me, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem with heat flux in the wall | gholamghar | FLUENT | 1 | September 14, 2010 08:47 |
Heat flux at the wall. | Sang | FLUENT | 0 | February 20, 2010 00:20 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 08:06 |
Where's the singularity/mesh flaw? | audrich | FLUENT | 3 | August 4, 2009 02:07 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |