|
[Sponsors] |
May 5, 2006, 15:13 |
UDF for unsteady spray
|
#1 |
Guest
Posts: n/a
|
Hi to all
Can anybody enlighten me in the writing of an UDF to define unsteady mass flow rate in a spray? I have tried the subroutine below but it does not want to compile. #include "udf.h" #include "surf.h" #include "dpm.h" DEFINE_DPM_INJECTION_INIT(pulse_spray, I) { real spray; Particle *p; cell_t cell; Thread *cthread; loop(p, I->p_init) { cell = P_CELL(p); cthread = P_CELL_THREAD(p); real t=RP_Get_Real("flow-time"); P_FLOW_RATE(p) = 0.00011+0.00009*cos(200*M_PI*t); spray=P_FLOW_RATE(p); } return spray Thanks Fernando |
|
May 6, 2006, 08:04 |
Re: UDF for unsteady spray
|
#2 |
Guest
Posts: n/a
|
Hi, i think your problem is in the definition of the pointer 'p'. in subroutine you're using *p need to be passed to macros as Tracked_Particle type, so let's try to declare: 'Tracked_Particle *p' instead of 'Particle *p
I might be wrong but, It could be a solution. Seeu Adriano Z |
|
May 6, 2006, 14:52 |
Re: UDF for unsteady spray
|
#3 |
Guest
Posts: n/a
|
Thanks Adriano. I tried it but it still does not want to compile.
|
|
May 8, 2006, 13:19 |
Re: UDF for unsteady spray
|
#4 |
Guest
Posts: n/a
|
I'm working in a similar code and I've similar problems... so mahh?!?!
|
|
May 9, 2006, 09:47 |
Re: UDF for unsteady spray
|
#5 |
Guest
Posts: n/a
|
Adriano, I have corrected the UDF and it is compiling fine. If you see this send me an e-mail and I will send you the file. lopar30@hotmail.com
Regards Fernando |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
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 |