|
[Sponsors] |
October 17, 2020, 13:41 |
Access trackingData in PairCollision
|
#1 |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
Hi everyone
I am working on Lagrangian particle tracking in openfoam. I want to add some pieces of code in PairCollision class. In this class there are some functions in which particle-particle and particle-wall interactions are evaluated. wallInteraction() is the function in which i want to add some pieces of code. In this function there is a loop over all parcels in cell which some part of it is as follows: Code:
forAll(cellOccupancy[realCelli], cellParticleI) { flatSitePoints.clear(); flatSiteExclusionDistancesSqr.clear(); flatSiteData.clear(); otherSitePoints.clear(); otherSiteDistances.clear(); otherSiteData.clear(); sharpSitePoints.clear(); sharpSiteExclusionDistancesSqr.clear(); sharpSiteData.clear(); typename CloudType :: parcelType& p = *cellOccupancy[realCelli][cellParticleI]; p::trackingData& td or parcelType::trackingData& td but i encounter error after compilation. It would be highly appreciated if anyone could help. |
|
October 22, 2020, 04:23 |
|
#2 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
Hi,
I assume that you would have to hand it over to the function in which you want to use it (see for example the "update"-funciton in StochasticCollisionModel.C) or you would have to put it in the class-constructor to have it available in the whole PairCollision-class. |
|
October 22, 2020, 11:18 |
|
#3 | |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
Quote:
Code:
this->owner().deleteParticle(p) Code:
collsionModel().collide() Best regarad, Kazem |
||
October 23, 2020, 07:19 |
|
#4 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
Hi Kazem,
where and why are you calling this function? It would be easier to give some advise if there would be a bit more information, especially a bit more of the code you were writing. |
|
October 23, 2020, 13:01 |
|
#5 |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
Thank you very much for your reply oswald. Actually i have discovered that in of6 and later versions all particles are considered as points and there is no function to control particle-wall distance unless pair collision model is turned on. I am trying to solve flow and particle in a geometry in which when a particle hits a wall it sticks to it. Hopefully In pair collision class there exist a function wallInteraction() in which a loop over all parcels exists and it controls the distance between particle and wall. If the distance between particle and wall is lower than half of the particle diameter particle-wall interaction is evaluated. In this function i add deleteParticle(p) to remove the particle. I think this is the easiest way to do that. Today i use Info in collide() function in which wallInteraction() is also called to check function call. This time i use of7 instead of of6. Unlike of6 i did not encounter any problem and my message appeared on the terminal. I really don't have any idea why nothing appears on the terminal when i use of6.
Last edited by Kaazem_RA; October 23, 2020 at 15:57. |
|
October 23, 2020, 16:04 |
|
#6 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
Also before version 6 particles were treated as points, as this is the standard way in Euler-Lagrange-methods. Otherwise there would for example be no need for force models.
Do I get you right that the only reason you are using the deterministic collision model is that you want particles that hit walls will stick to them? If so: Consider using "standardWallInteraction" with the option "stick" as patchInteractionModel. This drastically reduces the computational effort. If you want the particles to vanish and to to be kept inside the domain, use the option "escape" instead of "stick". If you have any other reasons to use pairCollision: I still did not get what you are trying to achieve at the moment, sorry. |
|
October 23, 2020, 19:56 |
|
#7 |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
Thank you very much for your answer.
You are completely right. For spherical particles using standardWallInteraction is a very good choice and reduces computational efforts. The big problem i have is that i deal with non-spherical particles and as you probably know there is a completely different mechanism for non-spherical particles to stick to the wall they hit. I checked standardWallInteraction class and tried to add some pieces of code to account for non-spherical particle depositions but i could not. There is only one function correct() in this class which is called whenever a particle center touches the wall. This is not what i want. I need a function that controls the distance between the particle and the wall. To the best of my knowledge just wallInteraction() function has this capacity (It would be appreciated if you introduce any function if available). In this function the distance between a particle and nearest wall is calculated. If this distance is lower than half diameter of the particle, wall-interaction is evaluated. For non-spherical particle the minimum distance is not half diameter and my goal is to add this distance to pairCollision class and then remove particle if the aforementioned distance is lower than nearest wall distance. Last edited by Kaazem_RA; October 24, 2020 at 07:14. |
|
November 4, 2020, 04:33 |
|
#8 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
I see, with non-spherical particles it is a bit more complicated. Maybe the wall distance stuff is of interest for you? https://www.openfoam.com/documentati...-distance.html
You can find an example in applications/test/wallDist |
|
November 5, 2020, 15:49 |
|
#9 |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
thank you very much for your answer. I will check the link.
|
|
May 22, 2024, 11:38 |
|
#10 |
New Member
Richard Tribess
Join Date: Jul 2021
Posts: 8
Rep Power: 5 |
Greetings, Kaazem
Have you managed to solve your problem for non-spherical particle deposition using the wallInteraction() function? I have implemented something with the wallDistance function in order to consider the real particle size when using a patchInteractionModel, however, I am limited to particle radius values smaller than the wall boundary cell height. Also, have you used AMR with the "collisionModel pairCollision" on? Thank you in advance. |
|
May 23, 2024, 03:29 |
|
#11 |
New Member
Kaazem
Join Date: Jul 2018
Posts: 14
Rep Power: 8 |
Hi richardt
Yes I managed to solve the problem. I defined a function that takes tracking data as input as following: virtual void ellipsoidalFiberCollide ( typename CloudType:: parcelType:: trackingData& td ); |
|
Tags |
collision, lagrangian openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting access to mesh (fvMesh) via object registry | Chris Lucas | OpenFOAM Programming & Development | 18 | January 15, 2024 03:57 |
[DesignModeler] DesignModeler Scripting: How to get Full Command Access | ANT | ANSYS Meshing & Geometry | 53 | February 16, 2020 16:13 |
Why is access to turbulence fields provided as const? | mrishi | OpenFOAM Programming & Development | 3 | January 23, 2020 13:51 |
Is there a way to access the gradient limiter in Fluent ? | CFDYourself | FLUENT | 1 | February 16, 2016 06:49 |
Online libraries - with access to Journals | momentum_waves | Main CFD Forum | 2 | December 12, 2007 11:08 |