|
[Sponsors] |
April 14, 2008, 08:21 |
help for a simple UDF
|
#1 |
Guest
Posts: n/a
|
Hi I am writting my first UDF but I did programming a long time ago..
So as to set a non constant pressure boundary, I wrote: #include "udf.h" DEFINE_PROFILE(pressure_profile, t, i) { face_t f; real to; to=1.3e-3; real po; po=10.5e6; i= po*(1-time/to)*exp(time/to); } After I will have to compile this .txt file in Fluent thanks to Compiled UDF buld. Am I right? Thank you for your help. Greg |
|
April 14, 2008, 11:17 |
Re: help for a simple UDF
|
#2 |
Guest
Posts: n/a
|
Hi,
firstly, You wonīt succeed if you compile *.txt. It must be *.c Then you can proceed compiling, but your UDF isnīt complete anyway! Check it out! Bye |
|
April 14, 2008, 11:53 |
Re: help for a simple UDF
|
#3 |
Guest
Posts: n/a
|
Try considering including the following lines in your code:
-------------------------------------------- real time = RP_Get_Real("flow-time"); begin_f_loop(f,t) { F_PROFILE(f,t,i)=po*(1-time/to)*exp(time/to); } end_f_loop(f,t) -------------------------------------------- save your file with a .c extension and put it in your workind directory. now you can compile and build the UDF. Maybe you need a pressure inlet to hook this UDF properly. When selecting the gauge total pressure, use the drop down menu to select the profile you compiled previously. See the UDF manual for details on hooking the UDF to the solver. Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm | Yan Kai | Main CFD Forum | 0 | April 18, 2007 04:48 |
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm | Yan Kai | FLUENT | 0 | April 14, 2007 00:17 |
simple vof | yang | Main CFD Forum | 0 | November 18, 2005 09:19 |
Can i get help for SIMPLE | Ramu | Main CFD Forum | 5 | September 21, 2003 19:37 |
C++ & SIMPLE | saba | Main CFD Forum | 3 | December 3, 2002 23:43 |