
[Sponsors] 
May 23, 2002, 10:40 
Udf for heat source

#1 
Guest
Posts: n/a

Sponsored Links


Sponsored Links 
May 23, 2002, 21:08 
Re: Udf for heat source

#2 
Guest
Posts: n/a

It's possible. The DEFINE_SOURCE macro is available for your problem.
Keil 

May 23, 2002, 22:52 
Re: Udf for heat source

#3 
Guest
Posts: n/a

If you're using the standard porous media model in Fluent 5 or 6 you won't be able to model interphase heat transfer or have a model that assumes nonequilibrium between the two phases. Fluent assumes, a single energy equation for solid and fluid as described in the manual.
To model a porous media without thermal equilibirum you need to use udfs/udss... I have presented some code for this in 2000 and 2001. Its also in the udf repository....search the archives for the posts/code. Greg 

May 30, 2002, 04:12 
Re: Udf for heat source

#4 
Guest
Posts: n/a

Interesting,
where to find this udf repository? thanks in advance, Laika, still orbiting 

May 30, 2002, 04:36 
Re: Udf for heat source

#5 
Guest
Posts: n/a

Repository at
ftp://ftp.cfdonline.com/fluent and my code at ftp://ftp.cfdonline.com/fluent/udf_scalar_dos.c Greg 

June 1, 2014, 02:27 

#6 
New Member
Join Date: Jun 2014
Posts: 1
Rep Power: 0 
Dear Greg Perkin,
This is to let you know that I am working with heat transfer in porous media and have found your replies on this site very helpful. I wanted to download "udf_scalar_dos.c" but unable to download. I am using my user name and password of this site to download but it showing unable to login. Please let me know how to download it, or if possible,please email the file to me. Thanking you Sajid 

June 9, 2015, 10:55 
(define_source) heat generation changs with location

#7 
New Member
何杰
Join Date: Jun 2015
Posts: 2
Rep Power: 0 
hello everyone!
I write a udf for heat generation with different location(xyz),but only a part of fluid has heat generation. project:a solid (0.08X0.08X0.1 to xyz) with 2 cylinder(r=0.01),cylinder is fluid with heat generation. the code:#include "udf.h" DEFINE_SOURCE(heat_flux, cell, t, dS, eqn) { real a, b, c; real x[2] = { 0.02, 0.02 }, y[2] = { 0,0 }; //x、y source location real p[8] = { 0.025, 500000000, 0.025, 500000000, 0.075, 500000000, 0.075, 500000000 };//0.025、0.075 is Z location，source value follows. real pos[ND_ND]; real source=0; int i, j = 0; C_CENTROID(pos, cell, t); a = pos[0]; //abc acquire xyz b = pos[1]; c = pos[2]; if ((c >= p[0]  0.025) && (c <= p[0] + 0.025)) //judge Z location { i=0; while(i<2){ if ((a <= x[i] + 0.01 && a >= x[i]  0.01) && (b <= y[i] + 0.01 && b >= y[i]  0.01)) //judge xy，if meeting the range,give source right value {source = p[0 + i+1]; dS[eqn] = 0; i=2;} i=i+1; } } else if ((c >= p[4]  0.025) && (c <= p[4] + 0.025)) { i=0; while(i<2){ if ((a <= x[i] + 0.01 && a >= x[i]  0.01) && (b <= y[i] + 0.01 && b >= y[i]  0.01)) {source = p[4+2*i+1]; dS[eqn] = 0; i=2;} i=i+1; } } else { source=0; dS[eqn]=0; } return source; } the result shows the right cylinder has heat generation ,but the other one has zero. thanks for your kindness.contact me:956400837@qq.com Last edited by zhebenshu1912; June 9, 2015 at 11:03. Reason: without email 

June 9, 2015, 11:00 
(define_source) heat generation changs with location

#8 
New Member
何杰
Join Date: Jun 2015
Posts: 2
Rep Power: 0 
hello everyone!
I write a udf for heat generation with different location(xyz),but only a part of fluid has heat generation. project:a solid (0.08X0.08X0.1 to xyz) with 2 cylinder(r=0.01),cylinder is fluid with heat generation. the code:#include "udf.h" DEFINE_SOURCE(heat_flux, cell, t, dS, eqn) { real a, b, c; real x[2] = { 0.02, 0.02 }, y[2] = { 0,0 }; //x、y source location real p[8] = { 0.025, 500000000, 0.025, 500000000, 0.075, 500000000, 0.075, 500000000 };//0.025、0.075 is Z location，source value follows. real pos[ND_ND]; real source=0; int i, j = 0; C_CENTROID(pos, cell, t); a = pos[0]; //abc acquire xyz b = pos[1]; c = pos[2]; if ((c >= p[0]  0.025) && (c <= p[0] + 0.025)) //judge Z location { i=0; while(i<2){ if ((a <= x[i] + 0.01 && a >= x[i]  0.01) && (b <= y[i] + 0.01 && b >= y[i]  0.01)) //judge xy，if meeting the range,give source right value {source = p[0 + i+1]; dS[eqn] = 0; i=2;} i=i+1; } } else if ((c >= p[4]  0.025) && (c <= p[4] + 0.025)) { i=0; while(i<2){ if ((a <= x[i] + 0.01 && a >= x[i]  0.01) && (b <= y[i] + 0.01 && b >= y[i]  0.01)) {source = p[4+2*i+1]; dS[eqn] = 0; i=2;} i=i+1; } } else { source=0; dS[eqn]=0; } return source; } the result shows the right cylinder has heat generation ,but the other one has zero. thanks for your kindness. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF for energy source  João Fernandes  FLUENT  4  October 17, 2008 04:53 
UDF  source terms  Fred  FLUENT  2  October 11, 2005 20:53 
help on UDF mass source  shao1  FLUENT  2  July 11, 2002 20:36 
UDFs for Scalar Eqn  Fluid/Solid HT  Greg Perkins  FLUENT  0  October 13, 2000 23:03 
UDFs for Scalar Eqn  Fluid/Solid HT  Greg Perkins  FLUENT  0  October 11, 2000 03:43 
Sponsored Links 