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

Particle tracking file per time step in an Unsteady Particle Tracking

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2019, 03:02
Default Particle tracking file per time step in an Unsteady Particle Tracking
  #1
New Member
 
Join Date: Feb 2018
Posts: 29
Rep Power: 8
Manu4CFD is on a distinguished road
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.
Manu4CFD is offline   Reply With Quote

Old   December 29, 2022, 07:15
Default
  #2
New Member
 
Kailash Choudhary
Join Date: Dec 2022
Posts: 1
Rep Power: 0
Kailash Choudhary is on a distinguished road
Quote:
Originally Posted by Manu4CFD View Post
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.
Hi,
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 06:08. Reason: Added more explanation.
Kailash Choudhary 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
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03


All times are GMT -4. The time now is 02:14.