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

unsteady particle tracking using UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2005, 22:18
Default unsteady particle tracking using UDF
  #1
YZ
Guest
 
Posts: n/a
Hello, I was experiencing a hard time to track a particle in an unsteady flow. I used a simple UDF to get the current position of a particle and wrote it to a text file. However, when I compared the postion in the file and the position reported by "display"->"particle tracks"->"current positions", they are different--although the difference is small. I am using 6.2.

Also, how is the "solve"->"particle history" working in Fluent menu? The help file really wasnt helpful for me.

Thanks a lot!

P.S. the code:

#include "udf.h" #include "dpm.h" //#include "stdio.h"

/* update the user scalar variables */

DEFINE_DPM_SCALAR_UPDATE(follow_particle, cell, thread, initialize, p) {

FILE *pf;

pf = fopen ("oneparticle.txt", "a+t");

fprintf (pf, "%f, %f, %f, %f, %f, %f, %f\n", P_TIME(p), P_POS(p)[0], P_POS(p)[1], P_POS(p)[2],P_VEL(p)[0], P_VEL(p)[1], P_VEL(p)[2]);

fclose(pf);

}

  Reply With Quote

Old   August 20, 2005, 23:01
Default Re: unsteady particle tracking using UDF
  #2
YZ
Guest
 
Posts: n/a
Another question is that: the file could not be created unless I run several iterations under steady state first. I am desperate on this... thanks.
  Reply With Quote

Old   August 13, 2009, 07:35
Default DPM data
  #3
New Member
 
Join Date: Jun 2009
Posts: 14
Rep Power: 16
Hanz is on a distinguished road
I can see it has been a while since your post.

However, I am experiencing a similar problem with data errors.

I want to simply find the relative velocity between the particles in a cell.

I know that the calculated value I have should be roughly zero, however my calculated value is 0.18m/s which is higher than it should be.

Could this be to do with my variable definitions. I use double. How do I know whether to use double or float?
Hanz 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
Blood Damage Modelling via Particle Tracking in a Centrifugal Heart Pump scatman CFX 7 January 8, 2018 00:59
particle tracking Gab CFX 0 January 5, 2006 16:12
Particle tracking in unsteady rotating meshes? BP Siemens 3 October 14, 2003 07:44
SOS autosave unsteady particle tracking Alex Munoz FLUENT 2 June 27, 2003 00:37
CFX- Particle tracking in Unsteady flow faithkim Main CFD Forum 3 September 14, 1999 20:57


All times are GMT -4. The time now is 17:43.