CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF for unsteady spray

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2006, 15:13
Default UDF for unsteady spray
  #1
Fernando
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

  Reply With Quote

Old   May 6, 2006, 08:04
Default Re: UDF for unsteady spray
  #2
Adriano
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
  Reply With Quote

Old   May 6, 2006, 14:52
Default Re: UDF for unsteady spray
  #3
Fernando
Guest
 
Posts: n/a
Thanks Adriano. I tried it but it still does not want to compile.
  Reply With Quote

Old   May 8, 2006, 13:19
Default Re: UDF for unsteady spray
  #4
Adriano
Guest
 
Posts: n/a
I'm working in a similar code and I've similar problems... so mahh?!?!

  Reply With Quote

Old   May 9, 2006, 09:47
Default Re: UDF for unsteady spray
  #5
Fernando
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
  Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 05:19.