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

regarding UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2013, 01:29
Default regarding UDF
  #1
New Member
 
rajendra soni
Join Date: Nov 2013
Location: guwahati
Posts: 7
Rep Power: 12
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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
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 22:14
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


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