|
[Sponsors] |
February 8, 2003, 02:58 |
Mass Diffusion via UDF
|
#1 |
Guest
Posts: n/a
|
I am trying to implement mass diffusion in a mixture of CH4 and H2 in my model. Because I'm trying to reproduce a model of the same process done by someone in homemade code I am trying to implement the same mass diffusion coefficient calcs they used, namely Chapman-Enskog (sp?). My thoughts for implementing are to use DEFINE_DIFFUSIVITY in a udf. My question is what to do about the argument 'i' or 'index' required by the DEFINE_DIFFUSIVITY function. I know 'i' refers to species, but will I need a case structure or if then statement to evaluate which species the solver contains or something? Thanks in advance for any clearer explanation. The Fluent documentation is surprisingly lacking in the explanation of this 'i' argument.
|
|
February 12, 2003, 02:23 |
Re: Mass Diffusion via UDF
|
#2 |
Guest
Posts: n/a
|
Hi,
The "i" is species index , as you know. "i" can be got from 0 to the number of species you defined. If you push the edit button on Define-Material-Mixture species panel ,you can see "Selected Species". For example, If the "Selected Species" are defined as h2o, o2, n2 in sequence ,this h2o is represented by i=0. As the same manner, o2 is represented by i=1, n2 is i=2. Regards, Keil |
|
February 12, 2003, 19:25 |
Re: Mass Diffusion via UDF
|
#3 |
Guest
Posts: n/a
|
My Understanding is the kinetic theory model built-in is in fact the same as the Chapman-Enskog model.
If you want to code it yourself, you can use the DEFINE_DIFFUSIVITY udf. Fluent have not documented all the internal species details - you'd have to ask them etc. You can look in the.h files to get some insights, but its not very time efficient. I've written similar functions, and to avoid all the hassles getting info from Fluent, I simply implement my own database internally - or from a file - and make sure that my internal species are the same as those define in you species panel in Fluent. Its not perfect but it works ok and you avoid all this stuffing around with the fact you don't know whats going on in Fluent. Greg |
|
February 13, 2003, 00:56 |
Re: Mass Diffusion via UDF
|
#4 |
Guest
Posts: n/a
|
Thanks Greg and Keil for your responses. Greg: I found out soon after posting here that the kinetic-theory model was essentially the same as the Chapman-Enskog method. The best I could come up on my udf was that when using DEFINE_DIFFUSIVITY the i argument is passed to the udf by function and takes on any value 0...n-1 where you have n species. I have implemented my model with kinetic-theory, but at some point I plan to shift to the udf. Like you, sometimes I'm more comfortable with udf overkill so that I know exactly what the code is doing. Thanks again.
Ryan |
|
February 13, 2003, 01:10 |
Re: Mass Diffusion via UDF
|
#5 |
Guest
Posts: n/a
|
Just as a matter of interest how did you calculate the collision integral in the kinetic theory model?
When I did it I used Bird et al 1960 etc. and got data from there and used Excel to develop a correlation which I implemented as a C macro. This seems to work well enough, since it gave about 1% maximum deviation from Fluent's own model. I originally developed this for multiphase flows where I used my own multiphase model and hence had to multiply the diffusion by a factor - but alas had to write the diffusivity routine myself. Anyway let me know how you did it? Greg |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to measure Mass Flow Rate | a.lynchy | Fluent UDF and Scheme Programming | 31 | October 4, 2018 15:10 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | FLUENT | 0 | August 19, 2010 04:01 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | Main CFD Forum | 0 | August 19, 2010 04:01 |
Diffusion UDF | visuja | FLUENT | 0 | June 21, 2009 19:16 |
Mass diffusion | Haritz | FLUENT | 0 | December 15, 2006 13:48 |