|
[Sponsors] |
December 20, 2006, 14:42 |
Heat source UDF, please
|
#1 |
Guest
Posts: n/a
|
Hi, guys. I need to write an UDF for volumetric heat production in a 3D problem. The heat source strength is a say parabollic function of say Z coordinate, e.g. q_dot=2*z*z-5z+3 W/m^3. Please help me. Thank you.
|
|
December 21, 2006, 06:01 |
Re: Heat source UDF, please
|
#2 |
Guest
Posts: n/a
|
#include "udf.h"
DEFINE_SOURCE(heat_source,c,t,dS,eqn) { real x[ND_ND]; real source; C_CENTROID(x,c,t); source = 2*x[2]*x[2]-5*x[2]+3; dS[eqn] = 0.0; return source; } /*Z coordinate, e.g. q_dot=2*z*z-5z+3 W/m^3. Hook this UDF to appropriate panel for energy source. PS: I havent tested it for any error.*/ ------- Sujith S Nair |
|
December 21, 2006, 15:27 |
Re: Heat source UDF, please
|
#3 |
Guest
Posts: n/a
|
Thanks a lot.
|
|
May 5, 2012, 02:11 |
|
#4 |
New Member
juliana
Join Date: May 2012
Posts: 2
Rep Power: 0 |
hi,
I need to write an UDF for 2D heat source (on a face).The source has a parabolic function (source=x*x+2*x+1 ) Do I use C-CENTROID or C-FACE in my programm? Please help me. Thank you. DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real x[ND_ND]; real source; cell_t c; begin_c_loop(c,t) { C_CENTROID(x,c,t); source = x*x+2*x+1; dS[eqn] = 2*x+2; return source; } end_c_loop(c,t) } |
|
October 14, 2014, 02:32 |
hi
|
#5 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
hi
i am facing the similar problem. my UDF of source term is showing zero output. here is my Udf , if anybody know the problem please help me . DEFINE_SOURCE(xmom,c,t,dS,eqn) { real x[ND_ND]; real source,ve; C_CENTROID(x,c,t); ve=sqrt((pow(C_U(c,t),2.0)+pow(C_V(c,t),2.0)+pow(C _W(c,t),2.0))); source =-1.225*0.2*0.55* C_U(c,t)*ve; C_UDMI(c,t,0)=source; return source; } thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
how to load the heat source to wall | david yang | Main CFD Forum | 1 | October 12, 2009 14:34 |
UDF: PROFILE + SOURCE | Nuno | FLUENT | 0 | September 1, 2008 16:31 |
how to define volme heat source in udf ? | wanghong | FLUENT | 0 | February 24, 2006 04:53 |
Please help me run UDF code for source | Suga | FLUENT | 1 | February 3, 2006 04:40 |