CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

How to set up a semi-permeable interface?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2024, 13:36
Default How to set up a semi-permeable interface?
  #1
New Member
 
Join Date: Mar 2024
Posts: 6
Rep Power: 2
voidcrow is on a distinguished road
I am attempting to simulate an alkaline water electrolyzer, which has a porous separator that is supposed to block the flow of gases (hydrogen, oxygen) but not the liquid solution (water + potassium hydroxide). Here's what I tried so far, unsuccessfully:

  • Set the inverse absolute permeability (viscous resistance) of the separator to a very high value for the gas phase only. I used the FLT_MAX macro defined in float.h (DBL_MAX leads to immediate solution divergence). With FLT_MAX as the viscous resistance, the mass fraction profile obtained after convergence is not as expected, there is still a very large amount of gas inside the separator (not even close to being negligible).
  • Set both the inverse absolute permeability to a very high value and the diffusivity of the gas to a very low value (FLT_MIN) inside the separator cell zone. I did not notice a significant difference in the concentration profile obtained versus the first attempt.
  • Change the boundary condition from interior to wall. This allows me to use the zero mass flux boundary condition for the gas phase (which is what I want ultimately), but now for the liquid phase the only option I have is to set the mass fraction either as a fixed value (which it is not) or with an UDF DEFINE_PROFILE. I tried to write an UDF to set the mass fraction of the liquid species to be equal to the mass fraction found in the cell adjacent to it, using the F_C0 (or F_C1) macro to obtain the adjacent cell index. Example for water, the UDF hooked to the liquid phase:
Code:
DEFINE_PROFILE(mass_fraction_bc, t, i) {
    face_t f; 
    cell_t c1; 
    real y; 
    begin_f_loop(f, t) {
        c1 = F_C1(f, t); 
        y = C_YI(c1, t, i);
        F_PROFILE(f, t, i) = y;
    } end_f_loop(f, t)
}
This last approach doesn't work (even with the 'specified shear' condition set to 0), because the concentration of component ends up being non-zero on the wall but not in the inner cells (i.e., there is no 'flow' from the wall to the cell region).


It seems this would be something so simple to do. Any help is appreciated.

Last edited by voidcrow; May 3, 2024 at 12:06.
voidcrow 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
Using gnuplot to plot probe data Rotidpor OpenFOAM 3 March 9, 2022 05:44
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 22:28
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
how to set the interface? poiu FLUENT 13 September 8, 2009 03:40


All times are GMT -4. The time now is 15:41.