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

Mass Diffusion via UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Keil
  • 1 Post By Greg Perkins

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2003, 01:58
Default Mass Diffusion via UDF
  #1
Ryan
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.
  Reply With Quote

Old   February 12, 2003, 01:23
Default Re: Mass Diffusion via UDF
  #2
Keil
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
hda likes this.
  Reply With Quote

Old   February 12, 2003, 18:25
Default Re: Mass Diffusion via UDF
  #3
Greg Perkins
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
souza.emer likes this.
  Reply With Quote

Old   February 12, 2003, 23:56
Default Re: Mass Diffusion via UDF
  #4
Ryan
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
  Reply With Quote

Old   February 13, 2003, 00:10
Default Re: Mass Diffusion via UDF
  #5
Greg Perkins
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

  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
UDF to measure Mass Flow Rate a.lynchy Fluent UDF and Scheme Programming 31 October 4, 2018 14:10
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari FLUENT 0 August 19, 2010 03:01
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari Main CFD Forum 0 August 19, 2010 03:01
Diffusion UDF visuja FLUENT 0 June 21, 2009 18:16
Mass diffusion Haritz FLUENT 0 December 15, 2006 12:48


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