particle tracking using MPPICFoam
Hello everyone,
Currently I am trying to use MPPICFoam to track particles and delete them when they enter certain area. However, I have difficulty finding the codes about where the positions of these particles are stored nor the function of deleting the particles. I tried to read MPPICFoam, KinematicCloud, MPPICCloud flies, but I got nothing. So I hope someone can help me out here. Thanks a lot.:) |
Hey,
did you find an answer for your question? |
You will find that part of the code in $FOAM_SRC/lagrangian/basic/Cloud/Cloud.C
On the other hand particleCollector function object would solve your problem. You have to add it in your kinematicCloudProperties file. |
Dear dscian
Thanks for you answer, but what I am looking for is to find the Y position of particles(bubbles) and put it in below code; const KinematicParcel<ParcelType>& p; //Increase in diameter due to rising of bubble using ideal gas relation P1*V1=P2*V2 ===> V2 = (P1*V1)/P2 scalar V0 =Vinit*(Patm+(Ymax - 0.)*rhoo*gg) / (Patm+(Ymax - p.position()[2])*rhoo*gg); When I do this, I have got an error which says that the initialization has not done correctly, what should I do? |
You can use p.position().y() to get that scalar value however the initialization of p is incorrect. You have to link it to your Cloud and use a for loop with an iterator. Something like this (i.e in Cloud.C);
Code:
forAllIter(typename Cloud<ParticleType>, *this, pIter) |
All times are GMT -4. The time now is 10:03. |