CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

regarding UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 16, 2013, 02:29
Default regarding UDF
  #1
New Member
 
rajendra soni
Join Date: Nov 2013
Location: guwahati
Posts: 7
Rep Power: 3
rp.soni is on a distinguished road
i am using UDF for source term of volumetric heat generation for my 2D simulation of heat transfer. Since i am new user for UDF, so i am in doubt whether i have written a correct UDF or not. UDF is given below.

/* sinusoidal heat generation in heater*/
#include "udf.h"
#include "math.h"
DEFINE_SOURCE(heat_gen_1e5,cell,thread,dS,eqn)
{
double source;
double time,A,B,omega,pi,time_period ;
A = 1.0e2, B=1.0e5;
pi= 22.0/7.0;
time_period = 900.0; //time in seconds;
time = CURRENT_TIME; //taking time value;
omega = (2.0*pi)/time_period;
source = A+B*(1+sin(omega*time));
//dS[eqn]= B*omega*cos(omega*time);
dS[eqn]= 0.0;
return source;
}


Kindly go through this UDF and reply whether it is in correct format or not.

Thanking you
rp.soni is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 14:07.