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

How to create over one particles in udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2014, 22:43
Default How to create over one particles in udf
  #1
New Member
 
heiko
Join Date: Feb 2014
Posts: 4
Rep Power: 12
chaocaho_0627 is on a distinguished road
Thanks for coming.here is my code,but only could create one particle,how could i create at least two particles?

#include "udf.h"
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

DEFINE_DPM_INJECTION_INIT(initial_particle,I)
{
Particle *p;Message("Initializing Injection: %s\n",I->name);
loop(p,I->p)
{
P_POS(p)[0]=0.0002;
P_POS(p)[1]=0.00002;
P_DIAM(p)=2.5e-5;
P_RHO(p)=8978;
P_MASS(p)=3.14*4/3*(P_DIAM(p)/2)*(P_DIAM(p)/2)*(P_DIAM(p)/2);
}

}
chaocaho_0627 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
UDF for deleting particles in DPM imanmirzaii Fluent UDF and Scheme Programming 12 November 25, 2020 19:27
Can I change the diameter and density of Particles depend on the pressure using UDF Yanlong Li Fluent UDF and Scheme Programming 2 January 13, 2013 10:46
Looping inside UDF and use of C_UDMs in DEFINE_DPM_BC shankara.2 Fluent UDF and Scheme Programming 0 November 10, 2009 17:11
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
how to create a linearly varying tempraturein UDF arwang FLUENT 4 April 22, 2005 18:23


All times are GMT -4. The time now is 15:16.