|
[Sponsors] |
March 28, 2012, 18:10 |
Semi-permeable Lagrangian Baffles
|
#1 |
New Member
Ryan Danks
Join Date: Jan 2011
Posts: 20
Rep Power: 15 |
I am looking to simulate particle flow in a domain that features baffles that are semi-permeable to the particles. (i.e. I would ideally specify a probability of penetration for the baffle which would then only allow some of the particles through.)
I've created the cyclic baffles with createBaffles and modified the PacthInteractions folder such that I have a fourth interaction type ("baffle"). Within LocalInteraction.C, in the case of the baffle model I have the following code Code:
active = true; keepParticle = true; int randomNum = (rand() % 100); int probVal=int(patchData_[patchI].penProb()*100); if (randomNum > probVal) { active = false; U = vector::zero; nStick_[patchI]++; massStick_[patchI] += p.mass()*p.nParticle(); } What is actually happening is that regardless of the value of randomNum, all the particles stick. Adding an "else" case and copying the rebound code, has no effect either, the particles just always stick! It's not an issue with rand, or my logic for the probability if statement (I;ve already checked those repeatedly). And everything compiles and runs no problem. Has anyone attempted anything like this? Or does anyone have any pointers or suggestions for what I'm doing wrong? Thanks! |
|
Tags |
lagrangian |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
semi permeable wall | moun139 | Main CFD Forum | 0 | February 16, 2012 04:15 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
Permeable baffles | m-hack | Siemens | 0 | October 29, 2003 03:14 |
Semi Lagrangian method and Staggered Grid | JEONG MO HONG | Main CFD Forum | 1 | May 26, 2003 02:43 |