# Example of use of the solidParticlesolidParticleCloud classes

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 21, 2009, 06:50 #21 Senior Member   Håkan Nilsson Join Date: Mar 2009 Location: Gothenburg, Sweden Posts: 196 Rep Power: 10 The dieselSpray classes have an injector implementation. Have a look there. There is no such in the very simple solidParticle class. Also have a look at icoLagrangianFoam, which probably has it. Håkan.

 June 10, 2009, 08:52 simpleLagrangianFoam #22 Senior Member   ZHOU Bin Join Date: Mar 2009 Location: Nanjing/Torino, Nanjing/Piemente, China/Italy Posts: 164 Rep Power: 10 Hi Håkan, Thank you for a long-way help. As I could see there is something not correct in icoLagrangianFoam solver, I derived the particle movement, and with my steady state flow field by simpleFoam, I plan to inject particle. Now I developed my simpleLagrangianFoam solver, which could fulfill my idea. I have 2 questions to anybody who has experience with lagrangian: 1. Do we consider the particle diameter when particle hits the wall? This is important, and I am thinking about this problem, if you have some suggestions, welcome. 2. How to get the concentration of particle in the air? I have an idea: set one sampling plane upstream, to see at each second, how many particles are through, say n_up(particles/second), with the mean air velocity v_up m/s and cross section A (m^2), we know the upstream concentration (n_up/(v_up*A), particles/m^3 at each second); The problem is whether I can do this by OF 1.5.x? If anyone who has problem about particles, welcome for discussion. Best regards, Bin

 June 11, 2009, 03:09 #23 Senior Member   Håkan Nilsson Join Date: Mar 2009 Location: Gothenburg, Sweden Posts: 196 Rep Power: 10 Hi Bin, You need to implement an injector, since there is no such in the solidParticleCloud class. Have a look at dieselFoam. Håkan.

 June 11, 2009, 05:21 #24 Senior Member   ZHOU Bin Join Date: Mar 2009 Location: Nanjing/Torino, Nanjing/Piemente, China/Italy Posts: 164 Rep Power: 10 Hi Håkan, simpleLagrangianFoam solver is developed, which could model the particle movement in the steady-state flow field. I will learn if in dieselFoam they consider the particle diameter when hitting the wall. If yes, I will include this in my solver. I could see that my solver could only inject one particle at one time step, I have no idea how could I inject 2 or more particles at one time step. Welcome comment or suggestions. I am also practicing dieselFoam now, hoping to find something. Bin

 June 16, 2009, 02:29 #25 Senior Member   ZHOU Bin Join Date: Mar 2009 Location: Nanjing/Torino, Nanjing/Piemente, China/Italy Posts: 164 Rep Power: 10 Hi Foamers, The two problems are solved. Again my concern is: How to get the concentration of particle in the air? Method 1: set one sampling plane upstream, to see at each second, how many particles are through, say n_up(particles/second), with the mean air velocity v_up m/s and cross section A (m^2), we know the upstream concentration (n_up/(v_up*A), particles/m^3 at each second); Method 2: set one "box", to see how many particles are in this "box", and calculate the concentration. The problem is I don't know how can I set this kind of plane/box to count the particles. Thinking... Bin

June 17, 2009, 05:06
#26
Senior Member

ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Torino, Nanjing/Piemente, China/Italy
Posts: 164
Rep Power: 10
Hello, dear Foamers,

After one day's work, I still can not find a way to define the concentration.

My purpose is to: define the efficiency of the cylinder capturing particles.

I set to generate 3 particles every time step, now let's see the log:
**************************
...
Moving Particles
2000 Particles moved. 0 walls hit. 4 particles left the model. 3 particles injected.
...
**************************
As we could see that the number of particles left the model > the number of particles injected. It seems strange, but it is so. Here I attach a pictures of my simple model, hoping some friends could give me some suggestions.

The efficiency is defined as: 1-C_out/C_in, where C_out is the downstream concentration, and C_in is the upstream concentration.

Thanks for attention.

Bin
Attached Images
 Particle_count_ok.jpg (102.1 KB, 61 views)

 June 17, 2009, 22:04 Calculate DPM concentration in each cell #27 Senior Member   ZHOU Bin Join Date: Mar 2009 Location: Nanjing/Torino, Nanjing/Piemente, China/Italy Posts: 164 Rep Power: 10 Dear Foamers, For my above problem, in the solver file, after we move the particles, we have already got "(x,y,z) cell" in the "positions" file. Idea: Can we include one file, which can calculate the particle numbers, then particle concentration at each cell from the "positions" file? Algorithm: 1. generate a label list (1 1 1 .....1) like cell.size(); 2. read the positions file, get the first cell index, sum those in the same cell, we get the particle numbers NP in this first cell, then we get the cell volume, i.e. mesh.V()[cellID], so we know the concentration NP/mesh.V()[cellID]; at the same time, give the corresponding cell label 0 instead of 1; 3. go to the second cell, if the label is 0, go the third cell; if not, do as 2; 4. until the end of positions file, we set the rest cell concentration to be 0; 5. in this way, we may sample or use areaAverage get the concentration of some plane; I have this idea, but I am not sure if this is right or not? I have problem coding, if some one could do me a favor, really appreciate. Bin Alaska1964 likes this.

 July 9, 2009, 03:00 Brownian motion of sub-micro particles #28 Senior Member   ZHOU Bin Join Date: Mar 2009 Location: Nanjing/Torino, Nanjing/Piemente, China/Italy Posts: 164 Rep Power: 10 Dear Foamers, I have made a code for the Brownian motion of sub-micro particles, but I need someone who is willing to test it. If who is interested in this, please add my skype or msn. Bin

 June 5, 2017, 03:23 Error in running case with icolagrangianFoam solver #29 Member   AJAY BHANDARI Join Date: Jul 2015 Location: INDIA Posts: 48 Rep Power: 4 Hi all, I have coupled icoFoam solver with solidparticleCloud and made a new solver named icolagrangianFoam in openFoam 2.4.0 according to the following tutorial. http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2016/EbrahimGhahramani/Report_Ghahramani.pdf I have modified the inject function according to this tutorial. And for the time being i have used one way coupling only. My solver compiled with no error but when i am running the case with it it is showing the following error. Code: ``` Starting time loop Time = 0.005 Courant Number mean: 0 max: 0 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 1.15856e-07, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 DICPCG: Solving for p, Initial residual = 1, Final residual = 2.96221e-07, No Iterations 36 time step continuity errors : sum local = 5.93837e-13, global = -1.56066e-22, cumulative = -1.56066e-22 DICPCG: Solving for p, Initial residual = 0.000368734, Final residual = 7.38895e-07, No Iterations 26 time step continuity errors : sum local = 3.31228e-12, global = 4.415e-22, cumulative = 2.85434e-22 Cloud size = 0 ExecutionTime = 0.01 s ClockTime = 0 s Time = 0.01 Courant Number mean: 4.31471e-05 max: 0.000359491 smoothSolver: Solving for Ux, Initial residual = 0.327035, Final residual = 3.07967e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.333302, Final residual = 4.59868e-08, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.106629, Final residual = 6.59909e-07, No Iterations 30 time step continuity errors : sum local = 3.3037e-12, global = -5.31932e-22, cumulative = -2.46498e-22 DICPCG: Solving for p, Initial residual = 2.11117e-05, Final residual = 9.80283e-07, No Iterations 4 time step continuity errors : sum local = 5.38914e-12, global = -3.36608e-22, cumulative = -5.83106e-22 Cloud size = 0 ExecutionTime = 0.01 s ClockTime = 0 s Time = 0.015 Courant Number mean: 8.62474e-05 max: 0.000718761 smoothSolver: Solving for Ux, Initial residual = 0.195492, Final residual = 1.76912e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.200906, Final residual = 2.62192e-08, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.0640431, Final residual = 6.19957e-07, No Iterations 29 time step continuity errors : sum local = 3.64984e-12, global = 1.79896e-22, cumulative = -4.0321e-22 DICPCG: Solving for p, Initial residual = 1.37856e-05, Final residual = 9.41422e-07, No Iterations 3 time step continuity errors : sum local = 5.88669e-12, global = 6.20951e-22, cumulative = 2.17741e-22 Cloud size = 0 ExecutionTime = 0.01 s ClockTime = 0 s Time = 0.02 Courant Number mean: 0.000129306 max: 0.00107781 smoothSolver: Solving for Ux, Initial residual = 0.13947, Final residual = 2.20727e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.143906, Final residual = 1.78422e-08, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.0447785, Final residual = 7.94408e-07, No Iterations 28 time step continuity errors : sum local = 5.22257e-12, global = -1.45177e-21, cumulative = -1.23403e-21 DICPCG: Solving for p, Initial residual = 1.11154e-05, Final residual = 6.92867e-07, No Iterations 3 time step continuity errors : sum local = 4.7462e-12, global = 1.12994e-21, cumulative = -1.04084e-22 Cloud size = 1 ExecutionTime = 0.01 s ClockTime = 0 s Time = 0.025 Courant Number mean: 0.000172327 max: 0.00143665 smoothSolver: Solving for Ux, Initial residual = 0.108438, Final residual = 2.75195e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.112097, Final residual = 1.37583e-08, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.0341882, Final residual = 7.60475e-07, No Iterations 28 time step continuity errors : sum local = 5.38762e-12, global = 1.15078e-21, cumulative = 1.0467e-21 DICPCG: Solving for p, Initial residual = 9.32068e-06, Final residual = 7.5951e-07, No Iterations 2 time step continuity errors : sum local = 5.56977e-12, global = 1.80962e-21, cumulative = 2.85632e-21 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 double Foam::particle::trackToFace(Foam::Vector const&, Foam::solidParticle::trackingData&) at ??:? #4 Foam::solidParticle::move(Foam::solidParticle::trackingData&, double) at ??:? #5 void Foam::Cloud::move(Foam::solidParticle::trackingData&, double) at ??:? #6 Foam::solidParticleCloud::move(Foam::dimensioned > const&) at ??:? #7 ? at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 ? at ??:? Segmentation fault (core dumped)``` From the terminal i am able to see that my particle is injected at time 0.02 sec as the cloud size becomes 1. But after that solver gives error. I am attaching the case named cavitylagrangiannew also. I don't know why the error is coming and i am not able to understand it. I think there is some error in which i am setting up the case or something else of which i am not aware of. Please help. Regards Ajay cavitylagrangiannew.zip

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post philippose OpenFOAM 10 December 9, 2011 12:42 nadine OpenFOAM Running, Solving & CFD 14 January 22, 2009 10:25 sergio OpenFOAM 9 March 13, 2008 06:18 Amitava Majumdar Main CFD Forum 0 January 5, 1999 13:00

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