|
[Sponsors] |
Population Balance Modeling (PBM) - Ansys Fluent |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 4, 2018, 13:21 |
|
#141 | |
New Member
nilesh
Join Date: Jan 2017
Posts: 22
Rep Power: 9 |
Quote:
w = pi/4*(d_1+d_2)^2*n_i*n_j*u_ij In fluent, the coalescence rate is given as, product of aggregation kernal and product of number densities of two colliding bubbles. So, we just need to pass on collision frequency mentioned above as w = pi/4*(d_1+d_2)^2*u_ij i.e. by eliminating n_i*n_j Please check if I am correct. |
||
May 12, 2019, 03:14 |
|
#142 |
New Member
Dhiraj Lote
Join Date: Jul 2015
Location: Mumbai, India
Posts: 20
Rep Power: 11 |
Hello,
Can you please help me, how to reconstruct bubble size distribution from QMOM. I read in litereture, but I dont find any clue how to predict bubble size distribution from QMOM or SMOM. Thanks |
|
May 12, 2019, 03:16 |
Population balance modelling with QMOM
|
#143 | |
New Member
Dhiraj Lote
Join Date: Jul 2015
Location: Mumbai, India
Posts: 20
Rep Power: 11 |
Quote:
Hello, Can you please help me, how to reconstruct bubble size distribution from QMOM. I read in litereture, but I dont find any clue how to predict bubble size distribution from QMOM or SMOM. Thanks |
||
May 13, 2019, 01:47 |
|
#144 | |
New Member
Dhiraj Lote
Join Date: Jul 2015
Location: Mumbai, India
Posts: 20
Rep Power: 11 |
Quote:
Do you know how to reconstruct bubble size distribution from QMOM |
||
July 9, 2019, 10:56 |
|
#145 |
New Member
Dhiraj Lote
Join Date: Jul 2015
Location: Mumbai, India
Posts: 20
Rep Power: 11 |
||
July 9, 2019, 10:58 |
Divergence detected in AMG solver
|
#146 |
New Member
Dhiraj Lote
Join Date: Jul 2015
Location: Mumbai, India
Posts: 20
Rep Power: 11 |
Hello, I have written UDF for Wang aggregation Kernel in fluent. Udf is as follows
/************************************************** ********************** UDF that computes the particle aggregation rate ************************************************** ***********************/ #include "udf.h" #include "sg_pb.h" #include "sg_mphase.h" DEFINE_PB_COALESCENCE_RATE(aggregation_kernel_Wang ,cell,thread,d_1,thread_2,d_2) { real agg_kernel, epsi, w_ag, p_ag, A, B, C, void_s, void_max = 0.6; real rho_c = 998.2, sig = 0.072, C1=1.1107, mu_c = 0.001003, u_crit = 0.08; /*calculating void fraction of secondary phase*/ void_s = C_VOF(cell, thread); /*Thread *tm = THREAD_SUPER_THREAD(thread);*/ /*passed thread is phase*/ /*epsi = C_D(cell, tm);*/ /*calculation of aggregation freaquency of collision*/ A = exp(-pow((pow(void_max, 1/3)/pow(void_s, 1/3))-1,2)); B = 1-(exp(pow(void_max,1/3.)*pow(void_s, 1/3)*3/(pow(void_max, 1/3)-pow(void_s, 1/3)))); w_ag = C1*A*B*pow(epsi, 1/3)*(d_1+d_2)*(d_1+d_2)*pow(pow(d_1, (2/3))+pow(d_2, (2/3)), 0.5); /*probability of aggregation*/ C = 1.4142*pow(epsi, 1/3)*pow(pow(d_1, (2/3))+pow(d_2, (2/3)), 0.5); p_ag = MIN((u_crit/C),1); /*compute agregation kernel*/ agg_kernel = (w_ag)*(p_ag); return agg_kernel; } When i interpret it in fluent it shows no error and it get interpret well. But when I start the simulation it shows following messase and run could not start. the message is as follows. # Divergence detected in AMG solver: bin-0-fraction -> Increasing relaxation sweeps! # You may try the enhanced divergence recovery with (rpsetvar 'amg/protective-enhanced? #t) Divergence detected in AMG solver: bin-0-fraction Divergence detected in AMG solver: bin-1-fraction Divergence detected in AMG solver: bin-2-fraction Divergence detected in AMG solver: bin-3-fraction Divergence detected in AMG solver: bin-4-fraction Divergence detected in AMG solver: bin-5-fraction Divergence detected in AMG solver: bin-6-fraction Divergence detected in AMG solver: bin-7-fraction Divergence detected in AMG solver: bin-8-fraction Divergence detected in AMG solver: bin-9-fraction Divergence detected in AMG solver: bin-10-fraction Divergence detected in AMG solver: bin-11-fraction Divergence detected in AMG solver: bin-12-fraction Error at host: floating point exception Error at Node 0: floating point exception Error at Node 1: floating point exception Error at Node 2: floating point exception Error at Node 3: floating point exception Error at Node 4: floating point exception Error at Node 5: floating point exception Error: floating point exception Error Object: #f any suggestion or comment is highly appreciated. |
|
April 11, 2020, 15:31 |
|
#147 |
New Member
John E
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Hi,
Do you have any tutorial about crystallization process? Thank you~ |
|
April 11, 2020, 17:03 |
|
#148 | |
Member
George Corner
Join Date: Dec 2016
Posts: 30
Rep Power: 10 |
Quote:
Can you please check the Ansys portal. But in ansys population balance theory guide, at the end of theory guide, there is one UDF showing how to write UDF related to crystallization. Maybe you find example in Ansys customer portal. |
||
April 11, 2020, 21:26 |
|
#149 | |
New Member
John E
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Quote:
Of course, I'm following the PBM guide now. But I have confused that how to set up the species transport condition? |
||
April 12, 2020, 04:35 |
|
#150 | |
Member
George Corner
Join Date: Dec 2016
Posts: 30
Rep Power: 10 |
Quote:
|
||
April 12, 2020, 10:31 |
|
#151 | |
New Member
John E
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Quote:
|
||
October 22, 2020, 09:37 |
|
#152 | |
New Member
Lamp
Join Date: Sep 2020
Posts: 11
Rep Power: 6 |
Quote:
I am new in PBM coupling method , I would like to use this model to simulate my axial flow pump operating in two phase gas-liquid: 1) How can I know the bin that my inlet bubble diameter falls and is there any UDF which can predict the bin of my bubbles size ? 2) I have alpha1,2,3,4,5 and 6 volume fraction how can I implement the volume fraction in my inlet boundary conditions? 3)because the fraction of water, should the sum of all the bin fraction should be equal to 1? 4) should my outlet have same bin as the inlet with same volume fraction? 5) how can I calculate the totale bubbles ? |
||
October 22, 2020, 10:14 |
|
#153 | |
New Member
Lamp
Join Date: Sep 2020
Posts: 11
Rep Power: 6 |
Quote:
Hello my Dears, I am new in PBM coupling method , I would like to use this model to simulate my axial flow pump operating in two phase gas-liquid: 1) How can I know the bin that my inlet bubble diameter falls and is there any UDF which can predict the bin of my bubbles size ? 2) I have alpha1,2,3,4,5 and 6 volume fraction how can I implement the volume fraction in my inlet boundary conditions? 3)because the fraction of water, should the sum of all the bin fraction should be equal to 1? 4) should my outlet have same bin as the inlet with same volume fraction? 5) how can I calculate the totale bubbles ? |
||
November 15, 2020, 09:09 |
|
#154 | |||
New Member
Simar Sethi
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Quote:
Quote:
Quote:
Please help |
||||
June 14, 2021, 08:18 |
vof-PBM
|
#155 | |
New Member
zahra asgari
Join Date: Jun 2021
Posts: 1
Rep Power: 0 |
Quote:
can't we use VOF model and PBM model at the same time? if we can, could you explain how I can active PBM with VOF in fluent? :) thank you for your attention. |
||
June 14, 2021, 09:14 |
|
#156 |
New Member
Lamp
Join Date: Sep 2020
Posts: 11
Rep Power: 6 |
Hi, yes for sure go to: the console and you type : define hit enter , model hit enter and add hit enter again , when you scroll down you will 5 which corresponds to pbm then you enter 5 and hit enter .( define >>model>>add>>5)
|
|
March 21, 2022, 17:51 |
Homogenous nucleation of n-butanol with helium carrier gas
|
#157 |
New Member
Wee Piin Huah
Join Date: Mar 2022
Posts: 2
Rep Power: 0 |
I am simulating the nucleation of n-butanol using multiphase eulerian in laminar flow. As for the population balance model, I have activated the nucleation feature and input my UDF (kindly refer to my UDF below).
The experiment is a 2D counter-flow setup where there are two jet inlets, hot and cold. The hot inlet consists of hot saturated n-butanol+helium vapour whereas the cold inlet consists of cold helium vapour. The fluids from both inlets will collide at the stagnation plane (at the centre) and nucleation will occur (saturation ratio>1). However, from my results in Fluent, I simulated that nucleation occurs at the walls of the hot inlet jet and not at the stagnation plane. This is not ideal, and I have no idea why this phenomenon happens. Please help. An IMG of my setup in details and the contours of the nucleation in the form of number density in one of the "bin" size is attached below. *Kindly refer* #include "udf.h" #include "sg_pb.h" #include "sg_mphase.h" # define PI 3.14159265 # define K 1.38064852e-23 /* Boltzmann constant */ # define butane_mol_wt 0.07412 /* n-butanol molecular weight */ # define helium_mol_wt 0.004003 /* helium molecular weight */ # define ro_gas 0.179 /* helium gas density */ DEFINE_PB_NUCLEATION_RATE(nuc_rate, cell, thread) { real J; /* nucleation */ real T, butane_mol_frac, butane_mass_frac, helium_mass_frac, sigma, ro_liquid, vap_press, sat, d, v, m, r, ar, v_c, m_c, delta_G, scc, jbd; Thread *tc = THREAD_SUPER_THREAD(thread); /* obtain mixture thread */ Thread **pt = THREAD_SUB_THREADS(tc); /* pointer to sub_threads */ Thread *tp = pt[S_PHASE]; /* secondary phase thread */ T = C_T(cell,tp); /* Temperature of second phase in Kelvin */ butane_mol_frac = C_VOF(cell,tp); /* mole fraction of n-butanol vapor in primary phase (helium) */ butane_mass_frac = (butane_mol_frac*butane_mol_wt)/((butane_mol_frac*butane_mol_wt)+((1-butane_mol_frac)/helium_mol_wt)); helium_mass_frac = 1.0 - butane_mass_frac; sigma = (4.833e-2)-((8.181e-5)*T); /*surface tension */ ro_liquid = 990.9563548-(0.524148*T)-(0.00032*pow(T,2.0)); /* density of n-butanol liquid */ vap_press = exp(98.494-(9412.6064/T)-(10.54*(double)log((double)T))); /* equilibrium vapor pressure */ sat = (butane_mol_frac/vap_press)*101325.0; /* supersaturation */ d = (sigma*m)/(ro_liquid*K*T*((double)log((double)sat))); /* diameter of critical cluster */ v = (4.0/3.0)*PI*(pow(d/2,3.0)); /* volume of a single particle with size 1 nm */ m = (ro_liquid)*v; /* mass of one n-butanol molecule*/ r = d/2.0; /*radius of critical cluster */ ar = 4.0*PI*(pow(r,2.0)); /* surface area */ v_c = (4.0/3.0)*PI*(pow(r,3.0)); /* volume of critical cluster */ m_c = (ro_liquid)*(v_c); /* mass of critical cluster */ delta_G = ((4.0*PI)/3.0)*(pow(r,2.0))*sigma; /* free energy formation of critical cluster */ scc = (1.0/sat)*(exp((ar*sigma)/(K*T))); jbd = ((pow((ro_gas*butane_mass_frac),2.0))/(ro_liquid*butane_mol_wt))*(pow(((2.0*sigma)/(PI*butane_mol_wt)),0.5))*(exp(-delta_G/(K*T)))*(pow((m_c/butane_mol_wt),(2.0/3.0))); if (sat<=1.0) { J = 0.; } else { J = scc*jbd; } return J; } Attached IMG: https://ibb.co/F4ZTQvk |
|
March 23, 2022, 11:24 |
|
#158 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi edypw1,
Running CFD calculations is a really time-consuming way to debug your function for nucleation rate, and it needs debugging. You need to be confident that each line gives a sensible answer for the entire range of input parameters. (For full resilience, you could make your functions give sensible answers even if called with input parameters way outside the sensible range. I have occasionally seen Fluent UDFs called with temperature = 0.0 kelvin, in a weird pre-initialisation state.) You might find it easier to debug the functions in a spreadsheet, but after that it would also be good to run the exact code that you intend to run in your UDF -- for example, to eliminate errors copying from the spreadsheet to C. Or maybe not the exact code, but near enough -- to run the UDF code as standalone C, you need to change "real" to "double" etc. Currently, your function does not give sensible answers -- see the example standalone C code below. Good luck! Ed Code:
#include <stdio.h> #include <stdlib.h> #include <math.h> # define PI 3.14159265 # define K 1.38064852e-23 /* Boltzmann constant */ # define butane_mol_wt 0.07412 /* n-butanol molecular weight */ # define helium_mol_wt 0.004003 /* helium molecular weight */ # define ro_gas 0.179 /* helium gas density */ double nuc_rate(double butane_mol_frac, double T) { double J; /* nucleation */ double butane_mass_frac, helium_mass_frac, sigma, ro_liquid, vap_press, sat, d, v, m, r, ar, v_c, m_c, delta_G, scc, jbd; butane_mass_frac = (butane_mol_frac*butane_mol_wt)/((butane_mol_frac*butane_mol_wt)+((1-butane_mol_frac)/helium_mol_wt)); helium_mass_frac = 1.0 - butane_mass_frac; sigma = (4.833e-2)-((8.181e-5)*T); /*surface tension */ ro_liquid = 990.9563548-(0.524148*T)-(0.00032*pow(T,2.0)); /* density of n-butanol liquid */ vap_press = exp(98.494-(9412.6064/T)-(10.54*(double)log((double)T))); /* equilibrium vapor pressure */ sat = (butane_mol_frac/vap_press)*101325.0; /* supersaturation */ d = (sigma*m)/(ro_liquid*K*T*((double)log((double)sat))); /* diameter of critical cluster */ v = (4.0/3.0)*PI*(pow(d/2,3.0)); /* volume of a single particle with size 1 nm */ m = (ro_liquid)*v; /* mass of one n-butanol molecule*/ r = d/2.0; /*radius of critical cluster */ ar = 4.0*PI*(pow(r,2.0)); /* surface area */ v_c = (4.0/3.0)*PI*(pow(r,3.0)); /* volume of critical cluster */ m_c = (ro_liquid)*(v_c); /* mass of critical cluster */ delta_G = ((4.0*PI)/3.0)*(pow(r,2.0))*sigma; /* free energy formation of critical cluster */ scc = (1.0/sat)*(exp((ar*sigma)/(K*T))); jbd = ((pow((ro_gas*butane_mass_frac),2.0))/(ro_liquid*butane_mol_wt))*(pow(((2.0*sigma)/(PI*butane_mol_wt)),0.5))*(exp(-delta_G/(K*T)))*(pow((m_c/butane_mol_wt),(2.0/3.0))); if (sat<=1.0) { J = 0.; } else { J = scc*jbd; } return J; } int main(int argc, char*argv[]) { double Tmin,Tmax,deltaT,T,J; double butane_mol_frac; Tmin = 275; Tmax = 450; deltaT = 25; butane_mol_frac = atof(argv[1]); printf("butane_mol_frac = %12.6f\n",butane_mol_frac); T = Tmin; while(T <= Tmax){ J = nuc_rate(butane_mol_frac,T); printf("T = %12.6g J = %12.6g\n",T,J); T = T + deltaT; } exit(EXIT_SUCCESS); } Code:
gcc testJ_0001.c -o testJ_0001.exe Code:
./testJ_0001.exe 0.01 Or, much much better, compile it with strict warning messages: Code:
gcc testJ_0001.c -o testJ_0001.exe -Wall -Wextra -pedantic -std=c99 One last point, that actually is UDF-related: It is interesting that you look up temperature from the secondary phase. This will work for some models (obviously, where temperature is different for the phases), but not others. As usual, it is worth checking that a simple line such as "T = C_T(cell,tp);" produces sensible results. Yet again, running the whole CFD simulation is a crude way to check. |
|
November 8, 2022, 12:24 |
Population Balance Model
|
#159 |
New Member
Jann Unkhoff
Join Date: Nov 2022
Posts: 3
Rep Power: 4 |
Hello everybody!
In the Users Guide it is stated that the DEFINE macros of the Population Balance model are executed at the beginning of every time step. 1. Does that mean that the Population Balance Model or at least the UDFs are not suitable for steady state? 2. I'd also love to know whether the PBE is calculated along the transport equations or at a different location in the algorithm? Any help would be much appreciated! |
|
November 8, 2022, 12:36 |
Hooking UDF PBM
|
#160 |
New Member
Jann Unkhoff
Join Date: Nov 2022
Posts: 3
Rep Power: 4 |
Hi!
I started experimenting with UDFs for the PBM and immediately ran into problems: I compiled the following UDF (no error was thrown) DEFINE_PB_NUCLEATION_RATE(nucrate, cell, thread){ real J = 1.0e7; return J; } However when I select the UDF for the nucleation rate in the PBM dialogue box and press Apply the UDF is deselected and simply the previous constant value is displayed. Has anybody experienced anything similar? Any help would be much appreciated? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modeling porous media with FLUENT | newcomer | FLUENT | 4 | September 26, 2013 01:08 |
Loading of Temperature datas from ansys to fluent! need help!! | tensun | FLUENT | 0 | November 6, 2010 01:35 |
Import Soliworks geometry to Ansys Fluent 12.0 | nunolopes | FLUENT | 0 | October 7, 2010 12:24 |
FSI, Fluent Ansys coupling | Greg Carnie | FLUENT | 5 | January 7, 2010 20:15 |
Population Balance Theory | student | Main CFD Forum | 2 | August 10, 2008 05:12 |