|
[Sponsors] |
February 14, 2022, 21:16 |
Overlap detector for injected parcels
|
#1 |
New Member
Yves Robert
Join Date: May 2019
Posts: 4
Rep Power: 7 |
Hello,
I would like to use an overlap detector for injected parcels in a momentum cloud for particleFoam. I think this would be a valuable addition to the DEM solver, since it does not check for overlap, resulting in freezing of the code. To do that, I want to modify the following function: src/lagrangian/parcel/submodels/Momentum/InjectionModel/InjectionModel/InjectionModel.C Basically, I wrote in that file a new function that takes two parcel pointers p1 and p2 and determines the two particles are overlapping. What I would like is now to test if, when I inject a parcel, this parcel overlaps with an already existing parcel. I am open to any ideas as of how to implement that, since I am a new OpenFOAM developer. My example is the one of a cylinder which is open at the top from which we insert buoyant parcels from the bottom patch and which move upwards and can leave the cylinder once they reach the top. For now, what I tried to do is to create an empty DynamicList of parcels, and go through the owner of the injector (the parcels cloud) and iterate over all parcels p. If the parcel's position is low enough (z<Zmin), I will have to look if there is a collision between the injected parcels and p. Therefore, I add the parcel p to the DynamicList. Then, when the injection happens (when the position of the parcel is sampled), I go through the elements of the DynamicList and test for collision with the injected parcel. At least that is the idea. The problem is that my limited knowledge makes it very hard for me to apply. What I did was to create an empty DynamicList in the momentumCloud function so that I can populate it during the calculation and store the information through all injectors. Then Ï would to apply my idea and add something like that in the "inject" function: Code:
forAll(this->owner().parcels_of_interest_, i) { if (collision_test(*this->owner().parcels_of_interest_[i], *pPtr)) { injection_ok = false; break; } } I am open to any suggestion, and modifications of my code. Thank you! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
kinematic cloud properties-Regd | thegauravonline | OpenFOAM Programming & Development | 11 | August 8, 2023 06:52 |
limit diameter of parcels in sprayFoam | Rid@foam | OpenFOAM | 0 | March 25, 2021 04:47 |
More parcels stuck than there have been in the system | tomf | OpenFOAM Running, Solving & CFD | 1 | April 30, 2019 07:11 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 23:29 |
Unfinished particle tracks in simpleReactingParcelFoam | Cornelia | OpenFOAM Running, Solving & CFD | 3 | June 5, 2015 04:58 |