|
[Sponsors] |
OpenFOAM] Can I plot the lagrangian particle velocity to field velocity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2019, 22:53 |
OpenFOAM] Can I plot the lagrangian particle velocity to field velocity
|
#1 |
New Member
Seokwon Whang
Join Date: May 2012
Posts: 25
Rep Power: 13 |
I tried to post the Lagrangian data. Especially, I want to post the particle velocity on certain line.* (I use reactingParcelFoam, and there are*no particles which are exactly on the line.)
Therefore, I think that the Lagrangian particle data in the time folder (0/reactingCloud1/ U, T, position,*etc.) should be converted into the field data. (Is it right?) How can I*convert the Lagrangian data to*Eulerian data in OpenFOAM? |
|
February 12, 2019, 08:44 |
|
#2 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12 |
Quote:
The best solution I've see so far for plotting your data was this thread Sampling lagrangian data "1. start paraFoam 2. load the lagrangian data in addition to the "regular" data 3. "Split off" the lagrangian data using the "Extract Block"-filter 4. Open a new view on the result and make that view a "Spreadsheet view". In that view you will see the raw lagrangian data 5. File->Export that view to a CSV-file" |
||
February 13, 2019, 22:36 |
|
#3 |
New Member
Seokwon Whang
Join Date: May 2012
Posts: 25
Rep Power: 13 |
Thank you for answering my question.
If I follow your answer, I get the “point data” for each lagranian particle, not the “field data”. What I want to do is to convert this “point data” to “field data”. Thank you again for your reply. |
|
February 13, 2019, 23:30 |
|
#4 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12 |
Quote:
Say you have two equally massed particles in a cubic cm at an instant and they have a mass of 2 grams, so then in that cell you can compute what density is and there's your Euler data, but two seconds later the particles with different vectors now occupy two cells each and now each cell has half the density. Writing the program to do this is possible, just use hashing like octrees or something, it's just complicated and needs tons of ram. Maybe someone else could explain a better solution, regards. |
||
September 8, 2019, 23:07 |
|
#5 | |
New Member
lgz
Join Date: Apr 2019
Posts: 4
Rep Power: 6 |
Quote:
|
||
September 11, 2019, 17:15 |
|
#6 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
I have some doubts if this is really what you want. Usually, you will have a limited amount of parcels (or real particles) in each computational cell. The number will probably not be large enough to create meaningful statistics in one cell. If you want a representative velocity for your particle phase in a cell, I think you have to gather the particles crossing that cell over time and calculate a mean or rms velocity by using the velocity moments of the resulting distribution. This a similar to calculating the SMD of a distribution, only that you are working with velocities. Hope this helps. Cheers RP
|
|
February 2, 2022, 03:23 |
|
#7 |
Senior Member
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 112
Rep Power: 5 |
To extract Eulerian statistics, you can add an extra class to perform averaging at run-time, which is what I usually do. This is much better for getting mean + rms statistics over time.
For instantaneous statistics, you can write a functionObject which does the following (as a brute force, fairly simple approach): 0. Create a new Eulerian field (i.e. "UpTilde") 1. Read particle data 2. Loop over all particles and assign their velocities to the field (UpTilde[p.cell()] += p.U()) 3. Perform averaging by looping over all cells with more than a pre-specified number of particles (to ensure the statistics are robust and not effected by cells with only 1-2 particles). 4. To extract second order statistics like RMS you will need to perform this again. When I implemented this, I thought it would be pretty slow but it did not take much time (tested on up to 10million particle simulation with 1 million cells). |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Plot over line average magnitude of particle velocity in paraview | maysmech | ParaView | 13 | August 12, 2022 12:46 |
[swak4Foam] Validation of swak4Foam for lagrangian particle tracking | nero235 | OpenFOAM Community Contributions | 13 | March 28, 2017 06:45 |
Unsteady field advected by steady velocity field | t.oliveira | OpenFOAM Running, Solving & CFD | 2 | December 28, 2015 14:42 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
Check particle impaction with User Fortran | Julian K. | CFX | 3 | January 12, 2012 10:46 |