|
[Sponsors] |
March 28, 2011, 15:35 |
DEFINE_DPM_INJECTION_INIT Question
|
#1 |
New Member
patty
Join Date: Nov 2010
Posts: 21
Rep Power: 15 |
I am trying to inject particles when the volume fraction in a cell becomes less than 0.3 (first step in eventually trying to replace VOF droplets with particles). However, I cannot even get FLUENT to do the particle injection via UDF. I have an injection defined and I link this UDF to the injection. Can anyone tell me where I'm going wrong? Thanks.
#include "udf.h" DEFINE_DPM_INJECTION_INIT(init_particles,I) { real threshold = 0.3; real x[1]; Particle *p; Domain *d = Get_Domain(1); int ID = 2; Thread *t1 = Lookup_Thread(d,ID); cell_t c1; thread_loop_c(t1,d) { begin_c_loop(c1,t1) { if(C_VOF(c1,t1) < threshold) { C_CENTROID(x,c1,t1); Message("Initializing*Injection:*%s\n",I->name); loop(p,I->p_init) { P_DIAM(p) = 1e-3; P_RHO(p) = 1.0; P_FLOW_RATE(p) = 1.0; P_POS(p)[0] = x[0]; P_POS(p)[1] = x[1]; } } end_c_loop(c1,t1) } } } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unanswered question | niklas | OpenFOAM | 2 | July 31, 2013 17:03 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 05:37 |
CHANNEL FLOW: a question and a request | Carlos | Main CFD Forum | 4 | August 23, 2002 06:55 |
question | K.L.Huang | Siemens | 1 | March 29, 2000 05:57 |