CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Semi-permeable Lagrangian Baffles

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By RDanks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2012, 18:10
Default Semi-permeable Lagrangian Baffles
  #1
New Member
 
Ryan Danks
Join Date: Jan 2011
Posts: 20
Rep Power: 15
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

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();
}
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?

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

Reply

Tags
lagrangian


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 Off
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] 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


All times are GMT -4. The time now is 16:13.