|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Arsalan
Join Date: Aug 2019
Location: Belfast, UK
Posts: 5
Rep Power: 7 ![]() |
Hi all,
I need to access the current cell of particles and if they are located in the region defined in topoSet, remove them and add their mass to their corresponding cells (for post-processing). Additionally, if possible, update the porous term locally. I have searched the forum, and I could find code snippets, but I cannot figure out where these codes need to be added. Should I write a functionObject? Or there might be a ready solution out there that I'm not aware of (since this is needed for filtration simulation)? The two related threads I found were these: 1- Access particle data in main function 2- remove particle |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 ![]() |
Hey!
What you would like to do can be probably done using CloudFunctionObjects (however, no idea what you mean with the porosity issue). Take a look at the interface defined for this class and you will find that there are some functions (like postMove, postEvolve) that are being called anyway when the general "evolve" function is called in your main application (one at the end of a parcel move and the other after the whole cloud has evolved). It basically works like a functionObject, but for clouds. For your task, you will probably have stored your cells in a cellSet, which can be used to create a labelHashSet. This can then be used to check if the current cell of the particle is inside this set. Code:
labelHashSet cellsOfInterest(cellSet(mesh,"myRegion"));// myRegion created with toposet or so, in a preprocessing step. Code:
// loop over cloud (this would be for instance inside your postEvolve method) for p in cloud k = p.cell // cell in which p is in if k is in cellsOfInterest // something like if(cellsOfInterest.found(k)) do whatever you would like to do // finito |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Arsalan
Join Date: Aug 2019
Location: Belfast, UK
Posts: 5
Rep Power: 7 ![]() |
Quote:
Now I remember I tried to use them some time ago, but I couldn't figure out how to use them. I first tried with ParticleCollector that includes postMove, and the region should be defined by a polygon or a concentricCircle: Code:
particleCollector1 { type particleCollector; mode concentricCircle; origin (0.05 0.025 0.005); radius (0.01 0.025 0.05); nSector 10; refDir (1 0 0); normal (0 0 1); negateParcelsOppositeNormal no; removeCollected no; surfaceFormat vtk; resetOnWrite no; log yes; } So, this pseudo-code that you have written (and labelHashSet) will be added to one of the Lagrangian submodels (and recompilled), or a separate functionObject needs to be written and to be included in the controlDict? What I meant by updating porosity is to modify the local permeability (resistance) based on a empirical relationship between the deposited mass (local) and the resistance. In fvOptions, a constant global permeability is defined for the whole region, but I would like to assign a dynamic value to each cell (updated at every time step). |
||
![]() |
![]() |
![]() |
Tags |
functionobject, kinematic cloud, lagrangian, lpt |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
dsmcFoam - micro-hole limiting the number of dsmc particles | Araist | OpenFOAM Running, Solving & CFD | 0 | June 25, 2015 06:50 |
trying to simulate two-phase jet flow with particles in surface injection | ajkratos | FLUENT | 5 | March 3, 2015 21:33 |
Hardware-Configuration for Fluent HPC-Pack (8x) | JohHaas | Hardware | 9 | March 3, 2015 13:25 |
Fluent DPM deleting particles during iteration | civilcfd | FLUENT | 0 | August 7, 2013 11:53 |
Parallel runs slower with MTU=9000 than MTU=1500 | Javier Larrondo | FLUENT | 0 | October 28, 2007 22:30 |