|
[Sponsors] |
June 17, 2010, 10:29 |
Writing UDF for Eulerian model
|
#1 |
Member
farhad
Join Date: Mar 2010
Location: Tehran
Posts: 32
Rep Power: 16 |
Dear all
I have a question about writing UDF for Eulerian model. I need to write some codes for diameter of particles in DEFINE_PROPERTY Macrose. I want to apply a linear changing diameter in my code, but I do not know that the diameter is function of what?(depth or time or ....) I hope some persons help me in writng this UDF. Best regards, Golriz |
|
December 16, 2010, 03:56 |
|
#2 |
New Member
Join Date: Jan 2010
Location: Netherlands
Posts: 28
Rep Power: 16 |
@golriz
did u find a way to code?? i want to change the phase diameter after a certain number of flow time steps. |
|
December 17, 2010, 01:54 |
|
#3 |
Member
farhad
Join Date: Mar 2010
Location: Tehran
Posts: 32
Rep Power: 16 |
Hi akm,
Unfortunately, I can not find it! Regards, |
|
December 18, 2010, 10:53 |
|
#4 |
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16 |
Phase diameter can be changed according to whatever rules you'd like to impose -- this is a relatively standard Fluent capability. Bubble/droplet diameters are, however, influenced by fairly complex physics. Imagine a single bubble of air rising in a column of water:
Now, think about many bubbles in a column. Not only will they undergo some of the things above, but you'd also have to worry about coalescence of the bubbles. At any rate, below is a code (untested, not checked for syntax errors) which should show geometry dependent bubble behavior. Code:
DEFINE_PROPERTY(bubble_diam, cell, thread) { real bubble_diam_function_of_height; real max_size,min_size; /* Arbitrary physics -- geometry (height) dependent bubbles */ real xc[ND_ND]; C_CENTROID(xc,cell,thread); max_size=1e-1; min_size=1e-6; /* Assumes that the base of the geometry has a y-coordinate 0 */ /* Assumes that bubbles grow linearly with decreasing depth (unlikely purely linear) */ /* Assumes that bubbles have a 1 micron diameter at the base of the geometry */ bubble_diam_function_of_height=(1.54244e-08)*xc[1]+1.e-6; if (bubble_diam_function_of_height > max_size) { bubble_diam_function_of_height = max_size; } else if (bubble_diam_function_of_height < min_size) { bubble_diam_function_of_height = min_size; } return bubble_diam_function_of_height; } Let me know if this answers your question. ComputerGuy Last edited by ComputerGuy; December 18, 2010 at 14:26. |
|
December 23, 2010, 08:53 |
|
#5 |
Member
farhad
Join Date: Mar 2010
Location: Tehran
Posts: 32
Rep Power: 16 |
Thanks for your answer and I’m sorry for being so late in my reply.
Your code helps me very much, but regarding your explanation I have to mention some points about my modeling: - In my modeling I have to impose eight diameters for particles (bubbles) in all of the inlet cells. In other words I have different size of particles in one cell. - The diameters of particle never change with any other things such as temperature or density and only have different size at inlet and also in one cell. - Inlet cells have completely similar conditions. Now how can I impose this condition to the model? Regards, |
|
December 23, 2010, 14:31 |
|
#6 |
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16 |
Golriz,
If I understand you correctly, you have two phases: let's say air (which makes up the bubbles) and water. You want to simulate the air phase as a series of 8 separate bubble diameters, which are unaffected by coalescence, breakup, temperature, pressure etc... I don't know what version of Fluent you're using, but the simplest way to do this (in terms of problem setup, not computation) is the following: 1) Create two fluid materials: air and water, for example. 2) Make the model multiphase, and have 9 phases 3) The primary phase is water 4) The secondary phases (i.e., phases 2-9) are air, with bubble diameters as you'd like. Phase diameters can therefore remain fixed throughout the simulation, and each "phase" or "bubble diameter's" drag/momentum behavior is solved without the need for complex UDFs. 5) The phase fraction (bubble distribution) of every phase can be specified at the inlet Of course, if you have Fluent 12 (or the appropriate add-on license in Fluent 6), you could simply enable the population balance module and perform a simulation with discrete bin sizes for a single secondary phase (air). It's a little more elegant (and likely computationally less intensive) than the simple solution I've proposed above, but for the physics you're describing, shouldn't be much different in terms of results. Regards, ComputerGuy Last edited by ComputerGuy; December 23, 2010 at 16:23. |
|
December 24, 2010, 13:37 |
|
#7 |
Member
farhad
Join Date: Mar 2010
Location: Tehran
Posts: 32
Rep Power: 16 |
ComputerGuy,
Thanks again for your solution. You understood me correctly. This way is only time-consuming. Regards, Golriz |
|
November 3, 2011, 06:30 |
udf code for rosin-rammler distribution
|
#8 | |
New Member
Thanh
Join Date: Feb 2010
Posts: 11
Rep Power: 16 |
Quote:
I am also dealing with the Eulerian multiphase model for the solid-gas fluidization. I would like to simulate with the non-uniform distributuon of the solid particles. But I dont know how to write a udf code for the granular diameter distribution such as Rosin-Rammler. So, could you give me some suggestions about that, or if possible could you give a sample code of diameter distribution for the secondary phase in tre Eulerian-granular multiphase model. Thank you so much in advance! Thanh |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF VOF model on Fluent | baechtel | Fluent UDF and Scheme Programming | 7 | January 20, 2016 19:13 |
udf: volume fraction gradient in eulerian model | jwwang | FLUENT | 22 | April 15, 2015 07:27 |
Problem with udf radiation model in 2d combustion model..???? | shshiva17 | FLUENT | 0 | July 28, 2009 10:44 |
How to model a Casson flow in UDF | MKS | FLUENT | 1 | September 26, 2006 21:37 |
UDF for fuel cell model | Anant | FLUENT | 0 | January 3, 2005 08:27 |