|
[Sponsors] |
December 16, 2011, 07:54 |
UDF for heat source
|
#1 |
Member
prince
Join Date: Jun 2011
Posts: 56
Rep Power: 15 |
Hello friends
I got stuck in one problem and will appreciate any help In my problem there is a heat source of 15KW which will distribute uniformaly in some part of window (over area of 10 cm2 in window zone). I have written simple UDF code to identify the area over which heat has to distributed. #include "udf.h" #define CX 0.0 #define CY 0.0 #define CZ 0.0 DEFINE_SOURCE(heat, cell, thread, ds, eqn) { real source; real x[ND_ND]; real r,y, a, b,qr; C_CENTROID(x, cell, thread); a = (x[0]-CX)*(x[0]-CX); b = (x[2]-CZ)*(x[2]-CZ); r = (sqrt(a + b)); y = x[1]; if(y>1.068798307 && y<=1.070483879) { if(r<=0.06) source=8.39e09; if(r>0.06) source=0.0; } ds[eqn]=0.0; return source; } My problem is, i am not getting right area over which heat has to distribute. Thankss |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for energy source | João Fernandes | FLUENT | 4 | October 17, 2008 05:53 |
UDF - source terms | Fred | FLUENT | 2 | October 11, 2005 21:53 |
help on UDF mass source | shao1 | FLUENT | 2 | July 11, 2002 21:36 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 14, 2000 00:03 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 04:43 |