|
[Sponsors] |
January 18, 2016, 16:33 |
[Population balance] C_PB_DISCI
|
#1 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
Hi all,
I'm working on an UDF for a population balance model, and need to include the number of bubbles in binsize i. This can of course be calculated using the bin volume fraction, C_PB_DISCI(c,t,i). Now my question is, how do I get i. As far as I know, the solver passes d_1 and d_2, which are the diameter of bins i and j. Also, thread and thread_2 are passed, but for a discrete or qmom simulation, these are the same. So, how can I get the correct i (and j), that match the given diameters? Any ideas would be awesome! Best regards, Cees |
|
January 22, 2016, 07:57 |
|
#2 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
Unfortunately I have not yet solved the issue; any advice is highly welcome!
Best regards, Cees |
|
March 15, 2016, 11:02 |
|
#3 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
Still open for suggestions here
|
|
March 15, 2016, 19:21 |
|
#4 |
Senior Member
Join Date: Mar 2014
Posts: 375
Rep Power: 13 |
what do you mean they are the same?
Will they all not be in the same mixture level thread anyways? Have you tried using hard integers? '0' for bin-0, '1' for bin-1 etc? |
|
March 16, 2016, 04:43 |
|
#5 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
Hi hwet,
Indeed they are in the same mixture thread, which is why I can't use the thread values to distinguish between the size class. As far as I understand the population balance approach works, the solver passes 2 bubble classes to the UDF, which calculates the coalescence rate between those classes, and feeds that back to the solver. Then the process repeats for the next 2 bubble classes, until all combinations were explored. This mechanism is confirmed by printing d_1 and d_2 to the console for 1 gridcell, I get all possible combinations for d_1 and d_2 in series. So the thing is, I want to know for that given d_1 and d_2 how many bubbles there are in that particular class. So hardcoding 0,1,.. directly doesn't work; I can of course set some if loop that contains (in pseudocode) Code:
if d_1 == size, i = associated class So I was hoping there was a more direct way to get the bubble class associated with the passed diameters. |
|
April 24, 2018, 01:43 |
|
#6 | |
New Member
nilesh
Join Date: Jan 2017
Posts: 22
Rep Power: 9 |
Quote:
I tried with 'if loop' but it is showing some parse error. Did you solve your case with this udf? I am also trying to correct my udf (i have attached .c file). Thanks. |
||
|
|