# somebody help me!!(regarding udf)

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

 March 4, 2003, 06:46 somebody help me!!(regarding udf) #1 guevara Guest   Posts: n/a I don't know wheather this form is correct or not. Can anyboby help me? #include "udf.h" #define PI 3.141579 #define I 36000 #define Jc 4400 DEFINE_SOURCE(thetamom_source, cell, thread, dS, eqn) { real x[ND_ND]; real Rc, R, source1; real Jz, B,y; y=x[1]; Rc=sqrt(I/PI*Jc); R=Rc*(1.+sqrt(x[0]/Rc)); if(y<=R) { C_CENTROID(x, cell, thread); Jz = (2*I/PI*pow(R,4))*(pow(R,2)-pow(y,2)); B = I/PI*(y/pow(R,2)-(pow(y,3)/2*pow(R,4))); source1= Jz*B; if(y>R) source1= 0; dS[eqn]=0; return source1; } - guevara ccc, can you send me? if you can, i will appreciate it

 March 4, 2003, 14:02 Re: somebody help me!!(regarding udf) #2 Murali Guest   Posts: n/a some tips that were suggested to me while writing udfs are: (1) the #define statements each better be in different lines (2) do not ever try to cut a long stmt into parts and continue the trailing part in the next line. Write the full stmt in the same line (3) do not use /* and */ for commenting huge chunks of code. Use them for commenting single lines Other than these company tips, whatever you write is your code. U don't really have to by ultra-proficient in C to programme UDFs. A little application of mind with a lot of copy-paste from UDF manuals should take care of UDFs. Hope this helps Murali

 March 4, 2003, 22:41 Re: somebody help me!!(regarding udf) #3 ccc Guest   Posts: n/a hi, guevara: sorry, I am out for several days. I will send it to you and others who want it tonight and you might recieve it today or tomorrow due to the time difference.

 March 5, 2003, 05:48 Re: somebody help me!!(regarding udf) #4 guevara Guest   Posts: n/a thanks ccc.

 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 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 Qureshi FLUENT 1 December 2, 2009 01:27 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 06:58.