CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Problem with a simple UDF to calculate cell-averaged particle values

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

LinkBack Thread Tools Display Modes
Old   July 13, 2009, 10:16
Default Problem with a simple UDF to calculate cell-averaged particle values
New Member
Mayank Kumar
Join Date: May 2009
Posts: 4
Rep Power: 8
kmayank is on a distinguished road

I want to write a UDF for recovering averaged particle properties within each cell throughout the domain.
For that I wrote a simple test UDF, mainly copying from Fluent manual, as follows:

#include "udf.h"
#include "dpm.h"


Domain *d;
Thread *t;
cell_t c;
d = Get_Domain(1); /* mixture domain if multiphase */
int count;
Particle *p;


count += 1;


printf("Total particles in domain %d \n", count);

This gives no error in compilation but on running gives Segmentation Violation and stack backtrace generation. The Segmentation Violation seems due to the presence of the particle loop only. When I remove the particle loop, the error message does not come.

Stack backtrace generated for process id 301 on signal 1:
Please include this information with any bug report you file on this issue!

Could anyone please me help me on this.

My aim is to obtain cell avergaed values of x, y, z particle velocities throughout the domain. Fluent postprocessing does not provide these values, so I guess we have to write a UDF.

kmayank is offline   Reply With Quote

Old   January 18, 2011, 02:40
Roman Gobitz-Pfeifer
Join Date: Dec 2009
Location: Stuttgart
Posts: 76
Rep Power: 7
Wikie is on a distinguished road

did you solve your problem? I also have to count the number of particles, but I wasn't able to do so yet.

Wikie is offline   Reply With Quote


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
Ensight - node values -cell values leo FLUENT 1 May 12, 2010 08:47
accessing upstream cell - UDF bohis FLUENT 0 April 7, 2008 05:12
Accessing node values using a UDF Nico FLUENT 2 December 20, 2007 03:50
compatibility problem of UDF on LINUX manu FLUENT 4 December 19, 2007 05:58
extremely simple problem... can you solve it properly? Mikhail Main CFD Forum 40 September 9, 1999 09:11

All times are GMT -4. The time now is 21:36.