CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Number of Droplets per Cell (http://www.cfd-online.com/Forums/openfoam/67118-number-droplets-per-cell.html)

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
{
forAll(celli)
{
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.

Thanks,

viv05

viv05 August 4, 2009 14:02

Sorry, I guess this might be more suitable:

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


If anyone knows this, Yell!

Thanks,
Viv05

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.

Quote:

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

Quote:

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

Henrik


All times are GMT -4. The time now is 23:15.