|
[Sponsors] |
December 16, 2013, 02:29 |
regarding UDF
|
#1 |
New Member
rajendra soni
Join Date: Nov 2013
Location: guwahati
Posts: 7
Rep Power: 13 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
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 |