CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Particles Forces on Wall

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By antoniosereno

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2020, 04:34
Exclamation Particles Forces on Wall
  #1
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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 particle-wall 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!
antoniosereno is offline   Reply With Quote

Old   January 9, 2020, 06:07
Default
  #2
Senior Member
 
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 13
fresty is on a distinguished road
Not sure if it would be rigorous enough but one of the ways could be to post-process particle velocity data (using paraview or similar software). One could post-process the time-dependent velocity arrays to get average acceleration and hence force vectors (using known particle mass), cross-product of which with position vector could yield torque. Summation over all particles would then be your total particulate torque.
fresty is offline   Reply With Quote

Old   January 9, 2020, 06:12
Default Thanks for your help!
  #3
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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 !!
antoniosereno is offline   Reply With Quote

Old   January 9, 2020, 07:14
Default
  #4
Senior Member
 
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 13
fresty is on a distinguished road
Yes, firstly apologies, I callously assumed that you're not solving inter-particle collisions in icoUncoupledKinematicParcelFoam i.e. all particles are in contact with cylinder wall and will contribute.
However, given inter-particle 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 particle-particle and particle-wall 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 particle-level details; although, may suffice given your objective variable (Power) is also a derived one/ cumulative.
fresty is offline   Reply With Quote

Old   January 14, 2020, 11:42
Default That's a good hint
  #5
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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 particle-wall 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 particle-particle 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!
antoniosereno is offline   Reply With Quote

Old   January 15, 2020, 06:54
Default
  #6
Senior Member
 
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 13
fresty is on a distinguished road
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?
fresty is offline   Reply With Quote

Old   January 15, 2020, 08:44
Default
  #7
Senior Member
 
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 13
fresty is on a distinguished road
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...
fresty is offline   Reply With Quote

Old   January 17, 2020, 09:43
Default Not Really!
  #8
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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
antoniosereno is offline   Reply With Quote

Old   January 22, 2020, 05:45
Default Not really good news!
  #9
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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.1e-4, 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!
antoniosereno is offline   Reply With Quote

Old   February 3, 2020, 10:35
Default
  #10
Senior Member
 
Join Date: Aug 2014
Location: UK
Posts: 213
Rep Power: 13
fresty is on a distinguished road
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
fresty is offline   Reply With Quote

Old   February 3, 2020, 13:32
Default Sorry If I didn't update the thread
  #11
New Member
 
Antonio Sereno
Join Date: Dec 2019
Posts: 9
Rep Power: 6
antoniosereno is on a distinguished road
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.e-4) 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!
sourav90 likes this.
antoniosereno is offline   Reply With Quote

Old   April 22, 2021, 05:17
Smile
  #12
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by antoniosereno View Post
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.e-4) 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!
Hi Antoniosereno,

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?
sourav90 is offline   Reply With Quote

Reply

Tags
forces, lagrangian, particle


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 07:16
forces on particles netmaster STAR-CCM+ 6 March 16, 2017 05:27
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 13:03


All times are GMT -4. The time now is 22:55.