CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Number of Droplets per Cell (

viv05 August 4, 2009 13:40

Number of Droplets per Cell
Hi All,

I would like to find the number of droplets per cell in dieselFoam.

I know that, mathematically,
number of droplets per cell = mass of droplets per cell / stripped mass of droplets per cell.

In parcel.H, can I declare number of droplets per cell as dimensionedscalar nD ?

If so, will this in parcelFunctions.H be okay?

dimensionedScalar parcel::nD (const label celli) const
return nD[celli] = m[celli] / ms[celli] ;

I guess after that I have to call the function in createFields.H

I am clueless of now, please help.



viv05 August 4, 2009 14:02

Sorry, I guess this might be more suitable:

dimensionedScalar parcel::nD (cell()) const
nD[celli] += m[celli] / ms[celli] ;
return nD;

If anyone knows this, Yell!


henrik August 11, 2009 02:35

Dear Viv05,

the parcels are stored in a linked list and carry the cell ID of the cell they are (currently) in.


inline label Particle::cell() const
You can also ask for the number of drops they represent


scalar parcel::N(const scalar rho) const
To create the statistics, you need to loop over all parcels.


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