
[Sponsors] 
January 9, 2020, 03:34 
Particles Forces on Wall

#1 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
Hi everyone !
Does anyone have experience with the solver icoUncoupledKinematicParcelFoam? I'd like to know if there's a way to compute forces exerted by particles on a wall. I'm trying to do it using the functionObject 'force' but apparently this method only works with fluid fields. Let's say I have a rotating cylinder with rigid particles in it; since the cylinder is rotating, the particles will start moving, colliding and sliding on the internal surface leading to contact forces that (considering the particlewall friction) generate a torque around the axis of rotation of the cylinder. I'm interested in this torque value in order to compute the power draw. Does anyone have any idea of how this should be achieved? thank you! 

January 9, 2020, 05:07 

#2 
Senior Member
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 12 
Not sure if it would be rigorous enough but one of the ways could be to postprocess particle velocity data (using paraview or similar software). One could postprocess the timedependent velocity arrays to get average acceleration and hence force vectors (using known particle mass), crossproduct of which with position vector could yield torque. Summation over all particles would then be your total particulate torque.


January 9, 2020, 05:12 
Thanks for your help!

#3 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
I'll think about this method! At a first glance, I'm just not sure if it works considering more layers of particles since the force is basically transmitted through contact, isn't it? Thanks a lot !!


January 9, 2020, 06:14 

#4 
Senior Member
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 12 
Yes, firstly apologies, I callously assumed that you're not solving interparticle collisions in icoUncoupledKinematicParcelFoam i.e. all particles are in contact with cylinder wall and will contribute.
However, given interparticle collisions, I would think that under elastic collision assumption the force vectors of all particles in contact (cylinder wall or other particles) would ordinarily sum up. On a slightly different note, a long shot probably, if you could compute the integrated centre of mass position vector of the particle cloud then the very weight of it and perpendicular distance will provide you the average torque. Tracking this, as the particle cloud takes different shapes (due to particleparticle and particlewall interactions), would provide the changes over time/rotation, which can then be averaged. Does this seem useful? Needless to say that this would be an overall effect of the particle cloud and not particlelevel details; although, may suffice given your objective variable (Power) is also a derived one/ cumulative. 

January 14, 2020, 10:42 
That's a good hint

#5 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
Your first approach is actually a good idea. I am doing some check on Liggghts, that makes it easier to verify if the assumption is correct (indeed, they provide a command that prints out the forces on the wall when it solves the particlewall contact).
Basically what I am looking at, is a system of particles on which 2 external forces are applied: gravitational force and force transmitted by the cylinder; the linear momentum can be used recalling that internal forces doesn't affect the change of linear momentum (I would say that it works even considering friction between particleparticle collision since the reciprocal force is on the same direction). Thus, by computing the velocity of every single particle, multipling each value with the respective mass of the particle and summing up all the values, what I get is the Linear Momentum of the system of particles; I've computed it for each step of my simulation and that allowed me to determine its rate of change (L1  L0)/dt that is equal to the force applied on the mesh for each timestep (there's just some small percentage of difference with the results provided by Liggghts ). I'm now working on the momentum to double check if it works, I'll write a reply as soon as I work it out. Thanks Fresty!! Now I've a second question for you! Are you comfortable with paraview? What do you think it would be the best way to achieve this procedure? Would you suggest me to print out a .csv data file and rearrange my data outside of paraview? Thank you! 

January 15, 2020, 05:54 

#6 
Senior Member
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 12 
Thanks, good to hear that the approach is coherent, at least to some extent.
I normally use either ParaView Python API OR a combination of ParaView and Python separately; the latter as you suggested is simply extracting required arrays and manipulating it outside, which in my opinion can be especially handy/quick when establishing a procedure. To extract Momentum from ParaView, you could conveniently export the individual particle velocity (U) array .csv from Lagrangian Arrays Dataset. However, to extract mass, not knowing the details of your 'InjectionModels', I would think out loud a potential way to acquire it. One could extract the dParticle array to compute (spherical) volumes and multiply by rho_Particle (rho0 in kinematicCloudPropeties) to calculate mass of respective particles. This array can then help form the integrand [m_particle_i * U_i], in order to integrate and get total momentum, ultimately divided by 'dt' to get force applied for each time step. Does this seem reasonable and doable? 

January 15, 2020, 07:44 

#7 
Senior Member
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 12 
Alternatively, and much conveniently, I just realized that icoUncoupledKinematicParcelFoam would output the Linear momentum (components and magnitude) at every time step while solving the case. So, all that I said in my previous email may fall into the category of reinventing the wheel...


January 17, 2020, 08:43 
Not Really!

#8 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
What you say is right, I didn't notice it as well in a first moment; however, angular momentum calculation is necessary and it is not printed in the log at runtime, thus, your procedure is essential
If angular momentum and center of mass data was printed out in the log as well, it would be handy! Otherwise, I' think I'll have to run the simulation and write results every step; will my PC be able to cope with all these folder? If you don't see any reply for a while, you'll now the answer 

January 22, 2020, 04:45 
Not really good news!

#9 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
here I am again.. the implementation of ths method took me a while; as I said, angular momentum of particles is not printed out, hence, all I get is the total force applied in the center of mass of the particles;
In order to obtain reliable data, I made some comparison with Liggghts, a pure DEM software, in which, the time step used was 1.1e4, that, on OpenFoam means a very high computational time for my model; moreover, to extract data about position of particles (to compute center of mass) and angular momentum I need to write data at every timestep and convert all this data in VTK (foamToVTK ascii) format, that is excessively time consuming even with only 1000 particles. I wrote a matlab script to extract relevant data from this vtk ascii file, and yeah it works but it takes hours; Considering that DEM simulation usually require far more than 1000 particles, (my real case consider something about 20.000 particles), another solution would be smarter. What I've thought, is to modify the kinematicCloud.C file in src/lagrangian/intermediate/clouds/Templates/KinematicCloud to add some lines before Info are printed out (basically, these are the info that we see in the log file); values that I need to print would be the value of the total angular momentum and the center of mass position that is necessary to calculate the moment of the force (computed using the difference of linear momentum) around the axis of rotation of the cylinder; I would do it in a similar manner to linear Momentum, (it is shown in the last rows of the script); first, linear momentum of all particles is computed and then, the total value is reduced to a single value for every timestep. It would me conceptually the same for angular momentum but I don't know how to implement it since I've never modified the openfoam source code. Do you have any idea of how to achieve this? The advantage would be to obtain all the values I need in the logfile with an incredible amount of time and effort saved. Thanks for you help! 

February 3, 2020, 09:35 

#10 
Senior Member
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 12 
Apologies if I'm wrong here, but have you tried (and may be compared) by just operating on the: positions, rho, d_Particle and U_Particle files that are already generated in your existing simulation case folder. Use positions, rho, d_Particle to acquire numerically integrated center of mass of the cloud at every time step, as:
m(t_i) = sum[i: 0  P] (m(P_i))  total mass in system, P_i: chosen particle, t_i: chosen time step r_c(t_i) = sum[i: 0  P](m(P_i).r(P_i)) / m(t_i)  Integrated center of mass location, r: particle positions mv(t_i) = sum[i: 0  P](m(P_i).v(P_i))  Integrated Linear Momentum L(t_i) = (r_c(t_i) x mv(t_i))  Total Angular Momentum Similarly, Angular momentum at every time step could then be evaluated. Is this method also equivalently expensive? Actually first, does this seem valid to you? I am not sure if VTK data has to be generated at every step for this. May be operating directly on OpenFOAM generated files is the relatively efficient way to go about this. Moreover, modifying kinematicCloud.C and other OpenFOAM framework files to print out the required data could be worthy of a try, to expedite the process. Cheers 

February 3, 2020, 12:32 
Sorry If I didn't update the thread

#11 
New Member
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 5 
I'm pretty busy in this period since I'm writing my thesis while doing the internship; however, I've managed to modify the code.. My knowledge of Openfoam programming (and C++ as well) are pretty low, I've to be honest, but after struggling with it a little bit (and with little bit I mean 3 days ) I've been able to do it following the idea I had wrote in my previous answer.
I'll write down the exact procedure as soon as possible in case anyone in the future will need it! About your suggestion, I think the main problem is that in order to apply the linear momentum theorem, I need timestep to be very small (in my case it's something around 1.e4) and, since I need 60 sec of simulation in order to analyze the """steady state""" solution, the simulation gets too slow. Using this method, I can avoid writing data at all since the only need is the log file! btw, thanks a lot for your support, it has been precious! 

April 22, 2021, 04:17 

#12  
Member
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 6 
Quote:
Have you been able to work this out? I don't have the exact goal, but it will certainly help me or others in modifying OpenFoam codes. Can you please post your reply if you achieved this? 

Tags 
forces, lagrangian, particle 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Centripetal forces on particles in incompressible fluid  sam1984_b  OpenFOAM Running, Solving & CFD  4  December 14, 2018 06:16 
forces on particles  netmaster  STARCCM+  6  March 16, 2017 04:27 
Wrong flow in ratating domain problem  Sanyo  CFX  17  August 15, 2015 06:20 
Water subcooled boiling  Attesz  CFX  7  January 5, 2013 03:32 
UDF for wall slipping  HFLUENT  Fluent UDF and Scheme Programming  0  April 27, 2011 12:03 