Semi-permeable Lagrangian Baffles
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
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?
|All times are GMT -4. The time now is 03:20.|