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

Udf for species concentration (interfacial area udf)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2021, 11:33
Default Udf for species concentration (interfacial area udf)
  #1
New Member
 
Jam
Join Date: Aug 2021
Posts: 15
Rep Power: 5
marijam is on a distinguished road
Hello,



I am writing 3 different udfs for calculating the concentration of 3 different species of mine. I also have a mass transfer coefficient in another UDF.

I need to use that mass transfer coefficient in one of the concentration UDFs. part of udf is as follows:

OXN = C_YI(c,t,2) * C_R(c,t)+kl*a*(0.08- C_YI(c,t,2) * C_R(c,t)); /*O2 concentration*

I stored kl in a UDM and will replace it in the above line but for a (interfacial area)

So here ''a'' is the interfacial area between gas and liquid. So in case I use a single bubble size in my model I can write the following code for the interfacial area and then store in another UDM and use it in the line mentioned above.



/************************************************** *******************

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]);



area_intf = 6.*vof_j/diam;



C_UDMI(c,t,1)=area_intf;

return area_intf;

}





1- I wanted to make sure if this is correct?, since I get 0 for data stored in C_UDMI(c,t,1).



2- Also I wanted to see if anyone knows how do I define interfacial area when I am using '''''' interfacial area concentration model'''''' with a range of bubbles from 2mm to 1 cm?

3- Is there any specific macro for interfacial area that can read it from fluent and I can directly use (similar to density, viscosity ,...)? Or do I need to find the interfacial area for different bubble categories? (sth similar to PBM) and

3-1- in this case, what is the bubble size macro for the interfacial area concentration model?



Many thanks,
marijam is offline   Reply With Quote

Old   November 23, 2021, 00:14
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
udf seems to be correct.
UDM could be 0 in two cases:
1. vof_j = 0
2. you didn't hook udf properly, so it is not executed

I can't answer other questions
marijam likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   November 23, 2021, 10:08
Default
  #3
New Member
 
Jam
Join Date: Aug 2021
Posts: 15
Rep Power: 5
marijam is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
udf seems to be correct.
UDM could be 0 in two cases:
1. vof_j = 0
2. you didn't hook udf properly, so it is not executed

I can't answer other questions

Thank you for your response. I am using interfacial area concentration in my model and in this case bubble size is not fixed.
Do you happen to know if I should use another Macro for bubble diameter in this case?

Thanks,
marijam is offline   Reply With Quote

Old   November 23, 2021, 14:36
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Try this :

Code:
C_UDMI(c,t,1)=5+area_intf;
Just to see if you still get zero everywhere or not.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   December 10, 2021, 17:42
Default
  #5
New Member
 
Chris
Join Date: Mar 2021
Posts: 23
Rep Power: 5
cbooks77 is on a distinguished road
Hi are you using Fluents species mass transfer model and attaching a kl UDF there or are you developing your own interphase mass transfer model?

I use the species mass transfer alot for bioreactor kLa calculations I usually add my own kL UDF for Higbie Mass transfer/Surface Renewal theory and use the Henrys Law option. I generally start with a monodispersed single bubble size to figure out the average bubble size by tuning it until it matches the experimental volumetric kLa. Then I employ the QMOM PBM. I've never really had any luck with the IAC model and even PBM is very difficult to get a meaningful bubble distribution at times especially without experimental data.
cbooks77 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
how to calculate the area of a boundary in UDF? peter FLUENT 2 May 31, 2021 21:54
VOF Interfacial Area - 2D/3D Reconstruction Method Greg Perkins Main CFD Forum 2 September 10, 2012 05:05
UDF code for concentration distribution szw_china Fluent UDF and Scheme Programming 0 July 22, 2012 22:35
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22
multiphase interfacial area density model Paul Main CFD Forum 0 August 5, 2003 18:33


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