Register Blogs Members List Search Today's Posts Mark Forums Read

 December 20, 2006, 14:42 Heat source UDF, please #1 Sasha 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 Sujith 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 samyak likes this.

 December 21, 2006, 15:27 Re: Heat source UDF, please #3 Sasha Guest   Posts: n/a Thanks a lot.

 May 5, 2012, 01: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, 01:32 hi #5 Member   Qureshi M Z I Join Date: Sep 2013 Posts: 75 Rep Power: 6 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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post GGerber OpenFOAM Installation 54 April 24, 2015 16:02 david yang Main CFD Forum 1 October 12, 2009 13:34 Nuno FLUENT 0 September 1, 2008 15:31 wanghong FLUENT 0 February 24, 2006 04:53 Suga FLUENT 1 February 3, 2006 04:40

All times are GMT -4. The time now is 02:57.