CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

UDF to increase the number of injected particles

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 12, 2010, 18:35
Default UDF to increase the number of injected particles
  #1
Member
 
Shawn Fotovati
Join Date: Jul 2009
Location: Cincinnati, OH
Posts: 41
Rep Power: 8
sfotovati is on a distinguished road
Dear users,
I know that the maximum number of injected particles from any surface is equal to the total number of mesh points over that surface. I wrote a UDF to increase that which is as followings:


#include "udf.h"
DEFINE_DPM_INJECTION_INIT(init_inject,I)
{
real x;
real ymax;
Particle *p;
ymax=20e-3;
x=rand()* ymax / RAND_MAX ;
P_POS(p)[0]=0;
P_POS(p)[1]=x; 
}

but I recieve a SEGMENTATION VIOLATION error. Please help me to fix it.
sfotovati is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Mesh Utilities 41 January 17, 2013 03:43
Problem with decomposePar tool vinz OpenFOAM Pre-Processing 18 January 26, 2011 03:17
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
How to increase the Re number in a jet flow comput Novice Main CFD Forum 6 December 4, 2006 08:06
Getting data of injected particles Lior FLUENT 8 August 19, 2004 15:11


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