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/)
-   -   How to create a list with particle properties from a specific cell? (https://www.cfd-online.com/Forums/openfoam-programming-development/163563-how-create-list-particle-properties-specific-cell.html)

osgr December 1, 2015 10:11

How to create a list with particle properties from a specific cell?
 
Hey everyone

I'm trying to implement a stochastic particle-particle collision model in OpenFOAM-2.3.
For that, I want to create lists with determined particle properties for every mesh cell.

For example, The diameter distribution inside a cell.
With that I'm able to determine the average particle diameter, maximum and minimum diameter inside a cell and so on. These statistics are necessary to create the fictitious particle used in this collision model.

Someone can help? :confused:

Best regards :)

prasadsai31 January 22, 2016 05:55

I'm also facing similar problem in fluent. Did u find a way.
Thanks.

tomislav_maric January 22, 2016 07:19

Quote:

Originally Posted by osgr (Post 575807)
Hey everyone

I'm trying to implement a stochastic particle-particle collision model in OpenFOAM-2.3.
For that, I want to create lists with determined particle properties for every mesh cell.

You do not have to create lists with determined particle properties for every mesh cell. :)

Every particle/parcel is linked with each cell. Check out the particle class.

Parcels used for kinematic tracking offfer the diameter (KinematicParticle.H):

Code:

protected:

    // Protected data

        // Parcel properties

            //- Active flag - tracking inactive when active = false
            bool active_;

            //- Parcel type id
            label typeId_;

            //- Number of particles in Parcel
            scalar nParticle_;

            //- Diameter [m]
            scalar d_;


And they wrap around the basic particle

Code:

template<class ParcelType>
class KinematicParcel
:
    public ParcelType

when the cloud is instatiated, so basically the parcel is a particle.

For you, this means that the particles/parcels themselves already contain the information you require for the collision model. Also, your sentence:

Quote:

I'm trying to implement a stochastic particle-particle collision model

already gives you a very strong hint that you should take a look at existing collision models, and not start thinking on the particle/cell, for-loop, list level. :) Good luck!

hojjat.m April 6, 2016 11:22

Number of particles at each cell
 
Hi foamers,

I am using solidParticle class and I am trying to calculate the number of particles in each cell at certain times. I want to combine all of the particles in a cell. Any suggestions?

Thanks,

a.weber May 23, 2016 08:53

There is already something similar in Foam::KinematicCloud<CloudType>::theta()
which will calculate the particle fraction in the cells via
theta[cellI] += p.nParticle()*p.volume();
This can for example be used in sprayFoam.C with
alpha = parcels.theta();

You could duplicate this function and change this to
sumParticles[cellI] += p.nParticle();
you will get the desired Number of particles.

best regards
Andy

chpjz0391 June 21, 2016 04:22

Quote:

Originally Posted by a.weber (Post 601342)
There is already something similar in Foam::KinematicCloud<CloudType>::theta()
which will calculate the particle fraction in the cells via
theta[cellI] += p.nParticle()*p.volume();
This can for example be used in sprayFoam.C with
alpha = parcels.theta();

You could duplicate this function and change this to
sumParticles[cellI] += p.nParticle();
you will get the desired Number of particles.

best regards
Andy

Hi Andy,

You are right.
However, the diameter distribution information for each cell cannot be got by this way.

Kind Regards,

Ping

marialhm May 22, 2017 22:11

Quote:

Originally Posted by a.weber (Post 601342)
There is already something similar in Foam::KinematicCloud<CloudType>::theta()
which will calculate the particle fraction in the cells via
theta[cellI] += p.nParticle()*p.volume();
This can for example be used in sprayFoam.C with
alpha = parcels.theta();

You could duplicate this function and change this to
sumParticles[cellI] += p.nParticle();
you will get the desired Number of particles.

best regards
Andy

Hi Andy,

Do you mean that parcels.theta() represents the particle volume fraction? But when I use this in my case, in some areas, the value of parcels.theta() is more than 1. I dont know what does it mean, can you explain it again? And what should I do to get the volume fraction of the particles?

a.weber May 23, 2017 03:54

Yes, exactly... when your sum of particle volumes is more than the cells volume, you'll get a theta > 1. This can happen easily when you are not calculating paircollision of particles.
You can also try a dispersion model, which spreads the particles where the volume fraction is high.
found here:
Lahey, R.T., Lopez de Burnsdano, M., Jones, O.C., 1993.
Phase distribution in complex geometry conduits.
Nuclear Engineering and Design 141, 177–201.

Best regards

marialhm May 23, 2017 04:07

Quote:

Originally Posted by a.weber (Post 649917)
Yes, exactly... when your sum of particle volumes is more than the cells volume, you'll get a theta > 1. This can happen easily when you are not calculating paircollision of particles.
You can also try a dispersion model, which spreads the particles where the volume fraction is high.
found here:
Lahey, R.T., Lopez de Burnsdano, M., Jones, O.C., 1993.
Phase distribution in complex geometry conduits.
Nuclear Engineering and Design 141, 177–201.

Best regards

Ok, I will try. Many thanks!


All times are GMT -4. The time now is 05:24.