CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Exporting multiple flow data from particle tracks (http://www.cfd-online.com/Forums/fluent/86095-exporting-multiple-flow-data-particle-tracks.html)

andreas_haakansson March 14, 2011 11:11

Exporting multiple flow data from particle tracks
 
Hi,
I am simulating (FLUENT 12.0) a turbulent flow with discrete particles (including the Discrete Random Walk Model). By using GraphicsAndAnimations -> ParticleTracks it is possible to export a xy-plot of for example turbulent kinetic energy over residence time for each particle. But I want many flow properties (turbulent kinetic energy, dissipation, ...) over the particle tracks. If I click "write" several times FLUENT will perform a new particle tracking calculations and thus the two files are not comparable. I have also tried with the Step-by-stepReport in the same menu but that will only give me particle-variables, not flow variables. Export->ExportParticleHistoryData, seem to do the same as ParticleTracks; re-calculates the tracks for each time I write to file.

Does anybody have an idea?
I would greatly appreciate any ideas.

andreas_haakansson March 15, 2011 09:51

Found a way of doing it
 
Ok, I found a way myself, but it is not pretty: Extracted the whole field and step-by-step report for particles separately. Then exernally (MATLAB) I go through each track and interpolates the flow variables.
This will work for my but I am still interested if someone knows how to do it inside FLUENT.

Kind Regards
Andreas Håkansson

Amir March 15, 2011 11:09

Hi,
you can also do that by implementation of a simple UDf. e.g. with a macro that execute at every particle step and write desired flow properties of cells that contain the particles.

andreas_haakansson March 15, 2011 11:17

Thanks for your reply Amir!
I have been think on using a UDF but I was not sure how. My idea was back then to use DEFINE_DPM_OUTPUT. However it seems tricky to access flow-variables. I would need to know in what cell each particle is a each time. I never really figured out how to do this.
My other suggestion was to just use the DEFINE_ON_DEMAND but i run into the same problem of finding the cells where particles are. Also in DEFINE_ON_DEMAND I never figured out how to obtain the particles.
Any suggestions?

Amir March 15, 2011 15:50

it's not difficult to find cell and cell-thread index that contain a particle. FLUENT has two functions for that:
P_CELL(p),P_CELL_THREAD(p)
but you should use them in compiled UDFs.

xrs333 March 16, 2011 01:13

Hi, Andreas Håkansson,
Now that you use DRW to take into account for the turbulent dissipation, it is meaningless to present properties one time for only one particle.

andreas_haakansson March 16, 2011 02:34

Amir: Thanks, I didn't know about these functions. That is probably the solution.

xrs333: Thanks for your reply. I agree with you, I simulate at least 100 particles with the DRW (or until I reach convergence in my external simulation) but I want all of the flow variables for the same particle tracks. That was my problem. But I think I can solve this with Amirs anser now.


All times are GMT -4. The time now is 13:24.