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

UDF to increase the number of injected particles

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2010, 19:35
Default UDF to increase the number of injected particles
  #1
Member
 
Shawn Fotovati
Join Date: Jul 2009
Location: Dallas, TX
Posts: 42
Rep Power: 17
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


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
Getting data of injected particles Lior FLUENT 10 April 9, 2020 14:12
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 13:55
Problem with decomposePar tool vinz OpenFOAM Pre-Processing 18 January 26, 2011 03:17
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 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


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