|
[Sponsors] |
March 4, 2003, 05:46 |
somebody help me!!(regarding udf)
|
#1 |
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, 13:02 |
Re: somebody help me!!(regarding udf)
|
#2 |
Guest
Posts: n/a
|
<font face = "courier new">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 </font> |
|
March 4, 2003, 21:41 |
Re: somebody help me!!(regarding udf)
|
#3 |
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, 04:48 |
Re: somebody help me!!(regarding udf)
|
#4 |
Guest
Posts: n/a
|
thanks ccc.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
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 |