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

How to calculate interfacial area in just one phase?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2022, 11:06
Default How to calculate interfacial area in just one phase?
  #1
Member
 
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8
ROY4 is on a distinguished road
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
ROY4 is offline   Reply With Quote

Old   February 15, 2022, 23:21
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   February 16, 2022, 06:38
Default
  #3
Member
 
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8
ROY4 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
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
Dear Alexander,

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.
ROY4 is offline   Reply With Quote

Old   February 16, 2022, 23:46
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   February 22, 2022, 06:56
Default
  #5
Member
 
Roy
Join Date: Sep 2017
Posts: 80
Rep Power: 8
ROY4 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
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

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
ROY4 is offline   Reply With Quote

Old   February 22, 2022, 20:51
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ 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
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


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