CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Per face tracking of particles that left and entered the cell in dsmcFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/106304-per-face-tracking-particles-left-entered-cell-dsmcfoam.html)

sor August 24, 2012 09:45

Per face tracking of particles that left and entered the cell in dsmcFoam
 
Hello CFD-Online Forum,
hello fellow OpenFOAM Users!

First of all I must say that I only did a superficial search in this forum (which was unsuccessful) because I had no big hope of finding someone with the same problem.

The problem persists of us wanting to track every movement of particles from one cell to the next. This problem was solved so far by saving the number of particles leaving and joining a cell as depicted below.

before:
Code:

---------
| 0 | 0 |
---------

after one particle moved from left to right:
Code:

---------
|-1 | 1 |
---------

To save this value I added a volVectorField in DsmcCloud. To track the outgoing particles a decrement call was added to DsmcParcel<ParcelType>::hitPatch and for the incomming particles an increment call was added to DsmcCloud<ParcelType>::addNewParcel. This worked well for our initial requirements, but later we saw that this was not enough. See this 2nd example:

before:
Code:

---------
| 0 | 0 |
---------
| 0 | 0 |
---------

after one particle traveled from each of the cells to another cell in a clockwise manner:

Code:

---------
| 0 | 0 |
---------
| 0 | 0 |
---------

This is just a example, we have more complex issues with the code so far.
The next level we want to take this, is adding particle tracking per face, so that this would be the outcome of the 2nd example:

the letters identify the cells
Code:

---------
| a | b |
---------
| c | d |
---------

face(a,b) = +1
face(a,c) = -1
face(b,d) = +1
face(c,d) = -1

This way the flow of the particles could be tracked. I have tried to find a way inside of FOAM to save these variables and determine the current face (like the cellI I used to identify the current cell), but I failed so far. This should be easily combinable with multi-CPU/-machine compilation. If anyone has a hint for me, I would be very happy.

I am using OpenFOAM Version 2.1.0, especially the tool dsmcFoam.

~ Jan R.

PS: Please tell me if anything is unclear, English is obviously not my native language. :rolleyes:

sor August 28, 2012 05:35

If anyone has a hint for us, this would be great.


All times are GMT -4. The time now is 17:22.