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

source of species with UDF, please!!!!!!!!!

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 5, 2007, 04:56
Default source of species with UDF, please!!!!!!!!!
  #1
Jason
Guest
 
Posts: n/a
Hi,

I have a flow of air and water vapor that there is a source of water vapor through some of my boundary cells to that flow. My question is that do I have to implement it with both continuity and transport of species equations as source terms?
  Reply With Quote

Old   November 5, 2007, 14:50
Default Re: source of species with UDF, please!!!!!!!!!
  #2
Allan Walsh
Guest
 
Posts: n/a
It isn't clear (at least to me) why you are using a UDF for the sources. Why don't you just specify the cells as a boundary or a special fluid zone with source terms and let Fluent worry about the terms?

If you really need to use a UDF, it will depend on how you implement it. Will directly add the water vapor to the storage terms or will you use the UDF source macro?

From my experience with adding source terms in UDFs, is best to try it. Add your source term and then run a case to make sure that both continuity and the species (and energy) balance out.
  Reply With Quote

Old   November 5, 2007, 15:58
Default Re: source of species with UDF, please!!!!!!!!!
  #3
Jason
Guest
 
Posts: n/a
Thanks for your reply,

First, I use UDF because my source Term of water vapor is not constant and it will be calculated through my UDF.

Second, I want implement it with the DEFINE_SOURCE throgh my UDF.

Third,if it is possible could you explain about what I must do? How can I make sure that both continuity and the species (and energy) balance out?
  Reply With Quote

Old   November 6, 2007, 08:36
Default Re:please HELP!!!!!!!!!
  #4
Jason
Guest
 
Posts: n/a
Thanks
  Reply With Quote

Old   November 6, 2007, 12:55
Default Re:please HELP!!!!!!!!!
  #5
Jason
Guest
 
Posts: n/a
PLEAS PLEASE PLEASE COULD ANYBODY HELP!!!
  Reply With Quote

Old   November 6, 2007, 15:26
Default Re: source of species with UDF, please!!!!!!!!!
  #6
Allan Walsh
Guest
 
Posts: n/a
You seem to be in a bit of a time crunch - you probably know that you need to budget a week or so for even a simple UDF modification.

A few years ago when we developed a UDF to describe particle drying (and a source of water vapor in the gases) we had intended to use DEFINE_SOURCE. But, as a short-cut, we just directly added the amount of water vapor to the variable C_STORAGE_R(cell,thread,water_v_index). This worked fine, and we never went back to use DEFINE_SOURCE.

My recollection though was that the DEFINE_SOURCE macro was quite well documented.

If you don't have time to do a UDF, as an approximation, we have just designated the specific cells where we want a mass source (and energy sink) of water - say as porous cells. Then, you can directly specify sources. If your source of water vapor is a function of other variables, like temperature, you could have multiple zones with different calculated rates. Perhaps not as fancy as a UDF, but at least the mass and energy balance will work out.

If you do a UDF, then you just need to check that if you put 1 kg of water in that you get 1 kg out. And if you have 10 kg of other fluid and 1 kg of water vapor, that 11 kg comes out.

  Reply With Quote

Old   November 10, 2007, 15:57
Default Re: source of species with UDF, please!!!!!!!!!
  #7
Jason
Guest
 
Posts: n/a
thanks allan for your reply,

could you explain about C_STORAGE_R(cell,thread,water_v_index)? I couldn't find any explanation about it in the UDF manual.

Thanks in advance.
  Reply With Quote

Old   November 12, 2007, 13:57
Default Re: source of species with UDF, please!!!!!!!!!
  #8
Allan Walsh
Guest
 
Posts: n/a
You might want to check the header files for description of variables.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for source term in momentum equation Enrico FLUENT 9 May 30, 2014 11:34
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
I have problem of UDF with turbulent premx source. Z FLUENT 0 February 16, 2005 04:34
heat source UDF error co2 FLUENT 8 May 18, 2004 07:47


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