CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   CellIDs to create post-processed fields (https://www.cfd-online.com/Forums/openfoam-post-processing/139671-cellids-create-post-processed-fields.html)

Antimony July 29, 2014 06:39

CellIDs to create post-processed fields
 
Hi All,

Not sure how to phrase this question, but here goes:

Am currently testing out solidParticleFoam and I see that the positions file also gives the cell number in which the particle is present at that step.

Now I want to use these cell numbers and assign a value (say 1.0) and create a new variable.

So basically if I have 10 cells in my domain, and 3 cell numbers "1","4" and "6" (corresponding to where the particles were at a particular time step) then I want to create this variable "dummy" such that it is something like this:
....
internalField nonuniform List<scalar>
10
(0 1 0 0 1 0 1 0 0 0);
.....

Here are my questions:
1. Is the assumption that I have made for the continuous numbering of cells valid? Whenever I do a foamToVTK conversion to view the particles, one of the lines in the log file that I see is that there are "additional cells". How do I account for these additional cells while numbering? Or does OF/ParaView treat particles entirely differently and I don't need to put in the additional cells?

2. I have noticed that whenever I have a refinement region, if I follow the above procedure, the values don't show up in ParaView. Rather there is a distinct discontinuity when there is a refinement region.

I hope I haven't made it too complicated.

Any suggestions please do let me know!

Thanks!

Regards,

Antimony

Antimony August 26, 2014 22:08

Hi All,

In case anyone is still looking for a way to do this, I used the "labelsToCell" option for "setFields" as a temporary fix for the issue.

Regards,

Antimony


All times are GMT -4. The time now is 10:52.