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

porousInterFoam with a permeable wall: which BC should be used?

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2015, 11:02
Default
  #21
New Member
 
Join Date: Mar 2014
Posts: 23
Rep Power: 12
Majed is on a distinguished road
I didn't have time to run my latest case, as I took me around 6 hours to modify the geometry. But, what I am concerned about, is to define the BCs in a way that changing the porosity, affects the velocity field in the surface water. The thing that I could not get, when I changed the internal face to a boundary face . Maybe, in this latest case changing the porosity affects the velocity field, but I don't think that it will be very accurate, because for the first half (before x=7.2 m) it seems that there is no wall (as it is cyclic) and for the second half it is all wall!

If this was the only geometry that I wanted to use, I would implement the idea in my previous post (dividing the porous medium into many parts...), but I want to have simulations with different shapes of the porous medium, so for every case I have to spend around 1-2 days on making the geometry. That's why I would like to have some BCs that switch between cyclic and wall.
Majed is offline   Reply With Quote

Old   August 17, 2015, 11:27
Default
  #22
New Member
 
Join Date: Mar 2014
Posts: 23
Rep Power: 12
Majed is on a distinguished road
My problem is that I have a boundary which is acting as a wall, and at the same time the flow passes through it. Do you think is that possible to define such a BC?

Best regards,

Hessam
Majed is offline   Reply With Quote

Old   August 17, 2015, 11:55
Default
  #23
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Hessam,

Well, unfortunately I don't have the time needed for implementing a proper boundary condition for this, specially because I don't have enough experience in this kind of advanced boundary condition you're looking for... i.e, it would likely take me several days to do it.

Nonetheless, the "groovy6" case you provided gave similar results and after some tests, it seems attached files can get the job done:
  • "groovy6_slight_adjustment.jpg" - shows the results at t=200.0 (i.e. iteration 2000, because you have deltaT=0.1) - these seem close enough to the geometry you have.
  • "boundary.gz" - this file was slightly adjusted, because there was a typo in "secondHalfporousWall_2" and it wasn't a "mappedWall".
  • "0.tar.gz" - this has the boundary conditions that were adjusted to achieve the result on the image. Essentially I simply made it zero gradient on both sides for the turbulence fields.
At 2000 iterations, the residuals seemed to be low enough for the results to be representative (U and p were around 1e-4):
Code:
Time = 200

smoothSolver:  Solving for Ux, Initial residual = 2.0294e-06, Final residual = 2.54496e-07, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.000210234, Final residual = 1.55541e-05, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.000114592, Final residual = 3.30167e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000465951, Final residual = 2.30545e-05, No Iterations 1
time step continuity errors : sum local = 1.93143e-05, global = 6.60033e-06, cumulative = 0.0276762
smoothSolver:  Solving for omega, Initial residual = 3.4969e-06, Final residual = 3.54347e-07, No Iterations 1
smoothSolver:  Solving for k, Initial residual = 3.60996e-06, Final residual = 8.3163e-07, No Iterations 1
ExecutionTime = 911.31 s  ClockTime = 955 s
With more iterations, it seems that it will converge.

My guess is that this is enough for your to proceed with your work.

Best regards,
Bruno
Attached Images
File Type: jpg groovy6_slight_adjustment.jpg (26.1 KB, 40 views)
Attached Files
File Type: gz boundary.gz (649 Bytes, 7 views)
File Type: gz 0.tar.gz (1.3 KB, 6 views)
Majed likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 17, 2015, 12:01
Default
  #24
New Member
 
Join Date: Mar 2014
Posts: 23
Rep Power: 12
Majed is on a distinguished road
Hello Bruno,

I really appreciate your help! I hope your guess will be right!

Thank you

Hessam
Majed is offline   Reply With Quote

Old   January 19, 2016, 00:25
Default
  #25
New Member
 
Join Date: Mar 2014
Posts: 23
Rep Power: 12
Majed is on a distinguished road
Hello Bruno,

I hope that you are fine. I am still working on the permeable wall in my case. Since I could not find a way for defining an appropriate BC on the permeable wall I divided the porous medium into 23 parts and defined Cyclic and Wall BCs alternatively on each part (just a more precise form of the methodology that you proposed).

The results have improved, however I am not satisfied yet! I want to find a way to make the permeable wall as a wall in which there are many holes (depending on the porosity of the materials). I am really impressed by the geometry that I found in paper entitled: "Direct numerical simulations of interface dynamics to link capillary pressure and total surface energy". I am attaching a photo of the geometry to this post. I guess that making such a geometry would be difficult (specifically for me as a beginner). I think since I want to test this geometry, instead of making holes I can replace them with squares. But, anyway I don't know how make such a geometry.

Could you tell me what the easiest way is to make a surface which looks the same as the attached figure?

Your help would be greatly appreciated.

Best regards,

Hessam
Attached Images
File Type: jpg Untitled-2.jpg (169.2 KB, 43 views)
Majed is offline   Reply With Quote

Old   January 31, 2016, 09:49
Default
  #26
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Hessam,

Sorry, these past few weeks have been very busy for me and only today did I finally manage to properly start looking into questions here on the forum.

Quote:
Originally Posted by Majed View Post
I am really impressed by the geometry that I found in paper entitled: "Direct numerical simulations of interface dynamics to link capillary pressure and total surface energy". I am attaching a photo of the geometry to this post.
Nice idea! To actually make the small holes into the wall, therefore to try to properly representing the porous-wall effect.

OK, so there are 2 details that we need to take into account:
  1. Is the mesh 3D or pseudo-2D?
  2. Is the wall meant to have thickness or is it a thin surface with no thickness?
I have a very vague idea that your case was a 3D case with a wall that has no thickness. If this is the case, we can use setSet or topoSet to select faces on the wall surfaces and to change them back into normal mesh... either that, or to change the faceZones before the baffles are created.

Let me find a tutorial in OpenFOAM that we can use for practice... A quick search:
Code:
find $FOAM_TUTORIALS -name Allrun | xargs grep createBaffles
It will get us the possible tutorial "multiphase/interFoam/ras/damBreakPorousBaffle" as a good one to hack into.

Attached is the package "damBreakPorousBaffle.tar.gz", for which I used OpenFOAM 3.0.x.
To use it:
  1. Download it.
  2. Run:
    Code:
    mkdir -p $FOAM_RUN
    run
    pwd
  3. Place the downloaded package in the folder indicated by the last command.
  4. Unpack the package with this command:
    Code:
    tar -xf damBreakPorousBaffle.tar.gz
  5. Now to run the case:
    Code:
    cd damBreakPorousBaffle
    ./Allrun
  6. Later on, to clean it up for running it again:
    Code:
    foamCleanTutorials
So, what's so magical about this case? Well, check the contents of the following files:
  1. "Allrun"
  2. "system/topoSetDict" - this is where the magic is done for selecting all of the faces that will become baffles, while afterwords it unselects (delete from selection) the faces that are not meant to be part of the baffle.
  3. "system/createBafflesDict"
Then compare with the original tutorial case to check the differences, because I don't have time right now to write more details


Best regards,
Bruno
Attached Files
File Type: gz damBreakPorousBaffle.tar.gz (4.0 KB, 13 views)
__________________
wyldckat is offline   Reply With Quote

Old   September 16, 2016, 05:28
Default
  #27
New Member
 
Join Date: Aug 2016
Posts: 12
Rep Power: 9
sage is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Hessam,

Well, unfortunately I don't have the time needed for implementing a proper boundary condition for this, specially because I don't have enough experience in this kind of advanced boundary condition you're looking for... i.e, it would likely take me several days to do it.

Nonetheless, the "groovy6" case you provided gave similar results and after some tests, it seems attached files can get the job done:
  • "groovy6_slight_adjustment.jpg" - shows the results at t=200.0 (i.e. iteration 2000, because you have deltaT=0.1) - these seem close enough to the geometry you have.
  • "boundary.gz" - this file was slightly adjusted, because there was a typo in "secondHalfporousWall_2" and it wasn't a "mappedWall".
  • "0.tar.gz" - this has the boundary conditions that were adjusted to achieve the result on the image. Essentially I simply made it zero gradient on both sides for the turbulence fields.
At 2000 iterations, the residuals seemed to be low enough for the results to be representative (U and p were around 1e-4):
Code:
Time = 200

smoothSolver:  Solving for Ux, Initial residual = 2.0294e-06, Final residual = 2.54496e-07, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.000210234, Final residual = 1.55541e-05, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.000114592, Final residual = 3.30167e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000465951, Final residual = 2.30545e-05, No Iterations 1
time step continuity errors : sum local = 1.93143e-05, global = 6.60033e-06, cumulative = 0.0276762
smoothSolver:  Solving for omega, Initial residual = 3.4969e-06, Final residual = 3.54347e-07, No Iterations 1
smoothSolver:  Solving for k, Initial residual = 3.60996e-06, Final residual = 8.3163e-07, No Iterations 1
ExecutionTime = 911.31 s  ClockTime = 955 s
With more iterations, it seems that it will converge.

My guess is that this is enough for your to proceed with your work.

Best regards,
Bruno
Hello Bruno!
I have a much simpler suggestion, why not use darcy equation for the porous region and the usual Navier Stokes for the other medium? Much like conjheat case, only that instead of coupling the temperature equations, use darcy equation? However, I'm not exactly sure if we'd need to make two separate meshes and then couple them together.

Also i have another question, the case described by Majed is much more complicated than mine. I'm not looking to model the porous media for now, only the domain through which the fluid flows. I'm running a desalination case. Its single phase but with dissolved salts. The walls need to be made permeable for water while it rejects the salts. Is there any predefined boundary condition or a tutorial similar to my case?

Regards,
Gohar Shoukat
sage is offline   Reply With Quote

Old   May 22, 2017, 05:03
Default
  #28
New Member
 
Stefan
Join Date: Oct 2015
Posts: 24
Rep Power: 10
StefanW is on a distinguished road
Hi Foamers,

i'm facing more or less the same problem searching a BC for a permeable wall.

I followed your discussion, but i cant figure out what would be the best solution to get rid of this situation

Could you archive any sucess until now?

Best Regards

Stefan
StefanW is offline   Reply With Quote

Old   January 15, 2018, 10:53
Default
  #29
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Hessam,

So, what's so magical about this case? Well, check the contents of the following files:
  1. "Allrun"
  2. "system/topoSetDict" - this is where the magic is done for selecting all of the faces that will become baffles, while afterwords it unselects (delete from selection) the faces that are not meant to be part of the baffle.
  3. "system/createBafflesDict"
Then compare with the original tutorial case to check the differences, because I don't have time right now to write more details


Best regards,
Bruno
It was very interesting to read through this thread. I'm looking at something similar. I haven't found a solution yet, and the attached case here couldn't run on my machine. I'm getting (core dumped) errors for each of the commands in Allrun. Wonder what's wrong!

I have a query about the topoSetDict, though. How is the solver informed about when it is to do selection of faces for baffles and deletion of the same? The blocks with actions of "new" and "delete" follow one after the other.
deepbandivadekar is offline   Reply With Quote

Reply


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
Wall treatment with OpenFOAM roby OpenFOAM Running, Solving & CFD 48 May 28, 2021 11:38
Enhanced Wall Treatment paduchev FLUENT 24 January 8, 2018 11:55
Porous and permeable wall narmada STAR-CCM+ 0 May 20, 2014 14:19
Radiation interface hinca CFX 15 January 26, 2014 17:11
permeable wall peter.zhao Main CFD Forum 0 October 23, 2000 08:06


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