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/)
-   -   Access to particles diameter for turbulent dispersion (https://www.cfd-online.com/Forums/openfoam-programming-development/255444-access-particles-diameter-turbulent-dispersion.html)

CGuaq April 9, 2024 12:07

Access to particles diameter for turbulent dispersion
 
Dear Foamers,

I try to optimize my new model for turbulent dispersion on particles and I need to know the size of each particles to modify their turbulent fluctuating velocity depending on their size.
Until now I manually specified the particle size in my code (assuming a constant size). But in a case where I have a distribution in size it's not possible to use this method without errors for the prediction.
I tried to add the following line at the beginning of the function to calculate the turbulent fluctuating velocity:

Code:

(
    const typename CloudType::parcelType& p,

    ...
    const scalar dt,
    const label celli,
    const vector& U,
    const vector& Uc,
    vector& UTurb,
    ...

And in my code to specify the diameter:

Code:

const scalar dp = p.d();
This method is used in the Brownian motion code (../src/lagrangian/parcelTurbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion), I can compile the code with these lines but when I launch the simulation I have an error at the injection time of the particles. Did I forget something or is it just impossible to use these lines in the turbulent dispersion code ?
Thus how can I access the particle size in my code ? Do you have another method?

Thanks for your help.


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