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

Semi-permeable membrane

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2015, 04:13
Default Semi-permeable membrane
  #1
New Member
 
Stefan
Join Date: Mar 2015
Location: Bavaria
Posts: 7
Rep Power: 11
deve is on a distinguished road
Hi Foamers,

i'm trying to simulate the flow inside a cavity with a two phase solver. The two phases(resin and air) flow through porous media, which works fine.
I now have to implement a semi-permeable membrane (which let's the air pass but not the resin). See picture below:

Membrane.jpg

What i wanted to achieve is that alpha gets 1 little by little over time until it reaches the membrane (green).
I came up with the following ideas and would be happy for EVERY idea you guys might have. (of course i prefer the most simple solution possible, but i guess i chose a rather difficiult task; moreover i searched the forum for possible solutions and realized that i'm not the first person with this problem)

Idea 1)
Define a Face inside my cavity and set alpha uniformly equal 0 so that no more flow can get through the faces. Sadly, that didn't work because i imported a mesh from hypermesh (fluent-type) and while converting it, openfoam ignores the face since inside the mesh, if i understood that correctly.
Is that generally possible?
What do i have to do that Openfoam will accept the face inside?

Idea 2)
Define a new Boundary Condition which keeps sucking air (due to p = 0) but i have to f*cking idea how to do that! It would be find if the membrane is not in the acutal cavity but represented by a BC.
Is that possible without have a PHD in C++ programming?

Idea 3)
Create a new Element type!?!? which is porous but only for fixed alphas


You may see that some(or all) of my ideas are total bullsh*t, feel free to tell me!
Any other ideas are highly welcome!

Greetings
Stefan

Last edited by deve; April 1, 2015 at 07:22. Reason: typo
deve is offline   Reply With Quote

Old   November 7, 2016, 10:40
Default Mass transfer through membrane
  #2
New Member
 
Max
Join Date: Sep 2016
Location: Delft
Posts: 22
Rep Power: 9
WildeCat is on a distinguished road
Hi Deve,

I am currently working on a similar problem, I need a mass transfer boundary condition from a fluid region into a porous medium. I was curious to know if you could solve your problem, and how you solved it, if you dont mind sharing.

Thanks in advance
Max
WildeCat is offline   Reply With Quote

Old   November 10, 2016, 04:03
Post Multi-region oneway coupling of all variables
  #3
New Member
 
Max
Join Date: Sep 2016
Location: Delft
Posts: 22
Rep Power: 9
WildeCat is on a distinguished road
Hello everyone,

I would like to give an update for all people who are attempting to couple to fluid regions.

Two way temperature coupling can be achieved with the thermal boundary conditions. Many different exist. More information can be found on:

http://openfoam.org/release/2-3-0/thermal/

Apart from temperature, in some cases it is necessary to couple also other variables such as rho, U or p. In these cases, as far as I know, no two way coupling exists. If however you know that you only need to transfer information from one region to the other, so not coupling it, you can use mappedField. This boundary condition allows to map the conditions at one patch to another patch on different regions. The source guide may help you to understand this boundary condition better.

http://cpp.openfoam.org/v4/a01446.html

Since the source guide is for OF4.x, but I use OF2.3.x, where it is implemented somewhat differently, I will add here how to implement this boundary condition. Make sure the interface between the regions is a mappedWall.

Code:
    <interfacePatchName>
    {
        type                  mappedField;
        sampleMode      nearestPatchFace;
        sampleRegion    <neighbourRegion>;
        samplePatch      <interfacePatchNameOnOtherRegion>;
        fieldName          <vairable>; // scalar or vector
        setAverage        no;
        average             (0 0 0); // 0 for scalar
        value                 uniform (0 0 0); // placeholder, 0 for scalar
    }
I am currently working on writing two way coupling between different regions for U. Depending on my case I may be able to solve it differently, but should i find a suitable solution, I'll try to post it here.

Hope I could help
WildeCat 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
Seeking help in designing three types of deformable membrane boundary. beancurd70 OpenFOAM Programming & Development 2 October 1, 2013 16:23
semi permeable wall moun139 Main CFD Forum 0 February 16, 2012 03:15
gas diffusion through membrane sosat1012 CFX 0 September 8, 2010 08:14
Membrane and Darcy's law NewFoamer OpenFOAM Programming & Development 0 August 29, 2010 07:41
mass transfer from fluids to membrane Peter FLUENT 0 August 2, 2002 14:27


All times are GMT -4. The time now is 04:49.