|
[Sponsors] |
How to calculate interfacial area in just one phase? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 15, 2022, 11:06 |
How to calculate interfacial area in just one phase?
|
#1 |
Member
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8 |
Hello everyone,
I am simulating a bioreactor with an impeller rotating in the middle. The tank is filled with liquid phase up to some height and there is a free surface volume at the top as well, which is filled with air (Attached Figure). There is also gas injection at the bottom with constant bubble size. I need to calculate the interfacial area (a) of the bubbles, a=(6*gas-volume-fraction)/bubble-diameter but when I use custom field functions, the value of air volume fraction is calculated for the whole volume. I only need to calculate this value in the liquid phase where the gas is dispersed in it and exclude the air volume fraction at the free surface area at the top. Can anyone help me figure out how I can do this? Do I need to use a UDF? tank.png |
|
February 15, 2022, 23:21 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
my vision is you need UDF to do that
make a loop of cell over domain, check if the C_VOF is 1 (means its liquid) and calculate a=(6*gas-volume-fraction)/bubble-diameter however could be a problem if gas and air are the same phase
__________________
best regards ****************************** press LIKE if this message was helpful |
|
February 16, 2022, 06:38 |
|
#3 | |
Member
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8 |
Quote:
Thank you so much for your answer. May I ask what you mean by gas and air are the same phase? My gas phase is air, which exists at the top of the bioreactor and also is injected at the bottom from a sparger in the form of bubbles. And my liquid phase is a media, with properties close to water. Therefore, I have only two phases here. I have found a UDF in ANSYS UDF Manual and modified it by adding an if/else condition to it, the code is as below; /************************************************** ******************* UDF for specifying interfacial area ************************************************** ********************/ #include "udf.h" real area_intf; DEFINE_EXCHANGE_PROPERTY(custom_ia,c,t,i,j) { /* i -- liquid-phase; j -- vapor-phase */ Thread **pt = THREAD_SUB_THREADS(t); real diam = C_PHASE_DIAMETER(c, pt[j]); real vof_i = C_VOF(c,pt[i]); real vof_j = C_VOF(c,pt[j]); if (vof_j<1.0) { area_intf = 6.*vof_j/diam; } else { area_intf= 0 } end if C_UDMI(c,t,1)=area_intf; return area_intf; } Do you think this code is correct? Kind regards, Roy Last edited by ROY4; February 16, 2022 at 11:34. |
||
February 16, 2022, 23:46 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you have few typos
Code:
#include "udf.h" real area_intf; DEFINE_EXCHANGE_PROPERTY(custom_ia,c,t,i,j) { /* i -- liquid-phase; j -- vapor-phase */ Thread **pt = THREAD_SUB_THREADS(t); real diam = C_PHASE_DIAMETER(c, pt[j]); real vof_i = C_VOF(c,pt[i]); real vof_j = C_VOF(c,pt[j]); if (vof_j<1.0) { area_intf = 6.*vof_j/diam; } else { area_intf= 0; } C_UDMI(c,t,0)=area_intf; return area_intf; } to check C_UDMI(c,t,0) you need to allocate user defined memory location in fluent GUI (put 1 instead of default 0) also I would change 1.0 to 0.9 or even less, cause this "(vof_j<1.0)" is too strict condition
__________________
best regards ****************************** press LIKE if this message was helpful |
|
February 22, 2022, 06:56 |
|
#5 | |
Member
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8 |
Quote:
Dear Alexander, Thank you for your response. While interpreting my code, I got this error; Error: Z:/P...files/dp0/FLTG/Fluent/udf.c: line 42: parse error. Error: Z:/P...files/dp0/FLTG/Fluent/udf.c: line 51: parse error. Do you have any idea why I might get this error? By the way, I only interpreted my code, without compiling it and using visual basics. Kind regards, Roy |
||
February 22, 2022, 20:51 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
looks like there is some problem with fluent
I recommend you to run fluent stand alone and compile udf code above is been compiled on my machine without errors
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access phase fraction field in a phase change model | hend | OpenFOAM Programming & Development | 0 | October 17, 2019 05:03 |
Direct numerical simulation of species transport equation with phase change | Pmaroul | Main CFD Forum | 2 | October 12, 2018 16:02 |
[swak4Foam] mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam | xpqiu | OpenFOAM Community Contributions | 8 | June 17, 2015 02:08 |
calculate for water phase in multiphase | congsu | FLUENT | 0 | April 30, 2012 23:03 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 1, 2003 23:32 |