CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Semi-permeable Lagrangian Baffles

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By RDanks

LinkBack Thread Tools Display Modes
Old   March 28, 2012, 17:10
Default Semi-permeable Lagrangian Baffles
New Member
Ryan Danks
Join Date: Jan 2011
Posts: 18
Rep Power: 8
RDanks is on a distinguished road
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

active = true;
keepParticle = true;
int randomNum = (rand() % 100);
int probVal=int(patchData_[patchI].penProb()*100);
if (randomNum > probVal)
	active = false;
	U = vector::zero;
	massStick_[patchI] += p.mass()*p.nParticle();
Which I thought, should act the same as the "stick" interaction for cases where the particle doesn't penetrate, and should not effect the particle in cases where it's allowed to penetrate.

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?

Tushar@cfd likes this.
RDanks is offline   Reply With Quote



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
semi permeable wall moun139 Main CFD Forum 0 February 16, 2012 04:15
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
external flow with snappyHexMesh chelvistero OpenFOAM 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 01:43

All times are GMT -4. The time now is 12:52.