CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Particle tracking (https://www.cfd-online.com/Forums/openfoam-solving/198284-particle-tracking.html)

lasherwc February 1, 2018 10:15

Particle tracking
 
Hi:

I'm trying to do a simple particle tracking using one-way coupling (only the effect of the liquid on the particle). I've read conflicting things about whether icoUncoupledKinematicParcelFoam will do this. I've been able to model a single particle with buoyancy in a still fluid and get accurate results. When I specify a uniform velocity nothing changes - as though the solver doesn't recognize it. My eventual goal is to use another solver to get the flow field, then use a particle tracker to get the track. Am I going down the right path or do I need to use a different solver?

Thanks,

Bill

lasherwc February 1, 2018 14:28

Answer to question
 
Ok, so I solved my own problem and thought I might put it here for others, since I've seen a lot of posts about this.

First, I had an error in my kinematicCloudProperties dictionary where the patch names didn't match what was in blockMesh. I fixed that and everything worked as expected.

To use icoUncoupledKinematicParcelFoam on an already-solved flow field, this is all I had to do:

1. Solve the original flow problem (I did the pitzDaily tutorial from the simpleFoam tutorials).
2. To the constant directory add/edit the following files, which you can get from the hopper tutorial:
-g, kinematicCloudProperties, kinematicCloudPositions
-add rhoinf to the transport properties dictionary
3. Replace the controlDict file with the one from the hopper tutorial and make the appropriate changes
4. Run icoUncoupledKinematicParcelFoam, then visualize using the instructions that can be found on the OpenFOAM wiki.

Voila!

Simone81 July 10, 2019 12:41

Hi,


I follow your instructions but the solver get stock forever on the first time step! perhaps do you have a working example?
Thank you!

lasherwc July 11, 2019 15:04

Example
 
Hi:

I do not still have the files but I can try to re-create the case. Give me a few days and I'll get back to you.

Simone81 July 11, 2019 16:28

Hi,
Thank you very much for your help! I really appreciate it.

lasherwc July 14, 2019 15:05

Example
 
1 Attachment(s)
Here is an example. Run the pitzDaily tutorial using simpleFoam, rename the last directory (288) to 0 and remove the other time directories.

Copy the attached controlDict, fvSchemes and fvSolution files to the system directory, and the remaining files to the constant directory, and run icoUncoupledKinematicParcelFoam (I used OpenFoam v. 6).

You should be able to view the results in paraFoam.

Good luck, and let me know if you have any problems!

Mars409 June 14, 2020 05:25

I ran the pitzDaily case with simpleFoam and then overwrote the system/ directory and constant/ directory files with those from your zip file, and ran icoUncoupledKinematicParcelFoam. Finally, where I ran paraFoam, selecting kinematicCloud - Lagrangian under Mesh Parts and selecting all under Lagrangian fields, ParaView showed nothing.

Can you show what ParaView is supposed to show?

I ran mine on Raspberry Pi-4 (Buster 32 bits), with ParaView built to 64-bit architecture and 32-bit IDs.

=====
I see I missed out the steps in OpenFoamWiki: https://openfoamwiki.net/index.php/H...er_in_paraFoam (but isn't this said to be for massless particles tracking, whereas we are interesting in tracing Lagrangian particles?).

Following that instruction, ParaView through errors complaining "The input dataset did not have a valid DATA_TIME_STEPS information key.

I have seen this error message before when running ParticleTracks and trying to display the filter Temporal Particles to Pathlines.

lasherwc June 15, 2020 11:09

Postprocessing
 
Hi:

The wiki link you noted is different than the one I used and I believe it's for showing the flowfield rather than Lagrangian particle tracking (thus the massless particles).

The link I was referring to is here:

http://openfoamwiki.net/index.php/FA...gian_particles

Note that you need to unselect everything in Volume Fields.

Let me know if this solves the problem - if not perhaps zip your case and post it, I will take a look.

Mars409 June 15, 2020 12:07

Thanks. It works now using the Glyph filter.

Indeed after posting the last remark yesterday I looked through the time directories and inspected the Lagrangian VTK files (they are in ASCII) and came away wondering why ParaView wasn't showing the ball since the Lagrangian Fields list a whole bunch of them.

So it's the Glyph filter that needs to get applied.

Now I see the ball moving from left the the right when I tripled the end time.

Strangely, though, in a separate cyclone simulation case prepared through the SimFlow GUI and viewed separately using ParaFoam invoked from the command line I did not have to apply the Glyph filter to see the particles. With that experience, I was expecting the same in this pitzDaily tutorial case that it caught my blindsided.

On top of that--it maybe just me--somehow I am unable to display the Lagrangian field at the mesh at the same time. It's not just this case but that cyclone simulation as well.

lasherwc June 15, 2020 12:47

Glad you got it to work! I'm not an expert on Paraview, I just figured this particular thing out and thought I'd share it.

Good luck!

veeturi July 2, 2020 19:13

Quote:

Originally Posted by lasherwc (Post 680140)
Ok, so I solved my own problem and thought I might put it here for others, since I've seen a lot of posts about this.

First, I had an error in my kinematicCloudProperties dictionary where the patch names didn't match what was in blockMesh. I fixed that and everything worked as expected.

To use icoUncoupledKinematicParcelFoam on an already-solved flow field, this is all I had to do:

1. Solve the original flow problem (I did the pitzDaily tutorial from the simpleFoam tutorials).
2. To the constant directory add/edit the following files, which you can get from the hopper tutorial:
-g, kinematicCloudProperties, kinematicCloudPositions
-add rhoinf to the transport properties dictionary
3. Replace the controlDict file with the one from the hopper tutorial and make the appropriate changes
4. Run icoUncoupledKinematicParcelFoam, then visualize using the instructions that can be found on the OpenFOAM wiki.

Voila!

An alternative I found was to use the "particle tracer" filter in ParaView. The downside is that you have to reconstruct all the time steps of interest, at least on a coarse temporal resolution. i.e. if you're simulating for 10 sec, get results for each second and then use the temporal interpolation in ParaView.

This may not be completely accurate but its a technique to get quick results.


All times are GMT -4. The time now is 20:16.