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

DEFINE_DPM_INJECTION_INIT Question

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2011, 14:35
Default DEFINE_DPM_INJECTION_INIT Question
  #1
New Member
 
patty
Join Date: Nov 2010
Posts: 21
Rep Power: 15
TedBrogan is on a distinguished road
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)
}
}
}
TedBrogan is offline   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
Unanswered question niklas OpenFOAM 2 July 31, 2013 16:03
internal field question - PitzDaily Case atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 15:26
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 04:37
CHANNEL FLOW: a question and a request Carlos Main CFD Forum 4 August 23, 2002 05:55
question K.L.Huang Siemens 1 March 29, 2000 04:57


All times are GMT -4. The time now is 22:08.