|
[Sponsors] |
Particle tracking file per time step in an Unsteady Particle Tracking |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 19, 2019, 04:02 |
Particle tracking file per time step in an Unsteady Particle Tracking
|
#1 |
New Member
Join Date: Feb 2018
Posts: 29
Rep Power: 8 |
While running an unsteady particle tracking simulation in Ansys Fluent 13.0 with DPM model, how can we write the particle tracking summary for a particle injection (in-order to know the particle fate) in to a file for every time step or after every prescribed number of time steps? For instance,say, my total simulation time is for 100s and I need to write the particle tracking summary for every one second. How can we do it? Kindly let me know your valuable comments.
|
|
December 29, 2022, 08:15 |
|
#2 | |
New Member
Kailash Choudhary
Join Date: Dec 2022
Posts: 1
Rep Power: 0 |
Quote:
My name is Kailash Choudhary. I have the answer to your question. How I did is like, in 'Graphics', go to 'Particle Tracks' and select 'Current Positions' and report to 'File' type. Then in 'Reporting Variables', select the variables you want to see. Then 'Save/Display' with, let's say name 'Output.dpmrpt'. The tricky part comes now. So basically, this will save the data of this step only, and to update data at other flow timestep, make one animation for this 'Particle Track', this way, the data in this file will get updated whenever the Animation file is saved. Now the data in this file will update but name of the file will be same and all the data will be over-written in this one file only. To solve this problem, I wrote a UDF code to re-name this file, so that fluent will create a new file in the absence of file with ''Output.dpmrpt'. The udf code I wrote is -- /*This will rename the file "OUTPUT.dpmrpt" which will be generated at each animation save this file contains data of particles in the domain*/ DEFINE_EXECUTE_AT_END(execute_at_end) { char filename[50]; char old_name[50]; snprintf(filename,50,"Time_%06.f.dat",ceil(CURRENT _TIME)); snprintf(old_name,50,"OUTPUT.dpmrpt"); rename(old_name, filename); } Attach this code at 'Function Hooks' -- 'Execute at End'. In this, I faced a problem that sometimes particle track gets un-selected. So every time before starting the Run Calculation/Compute, to the particle track steps again. Thank you Let me know if you still have any problems with this. Sorry for replying after 4 years (HaHa). Last edited by Kailash Choudhary; January 5, 2023 at 07:08. Reason: Added more explanation. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 01:01 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |