CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   source of species with UDF, please!!!!!!!!! (https://www.cfd-online.com/Forums/fluent/46512-source-species-udf-please.html)

Jason November 5, 2007 03:56

source of species with UDF, please!!!!!!!!!
 
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?

Allan Walsh November 5, 2007 13:50

Re: source of species with UDF, please!!!!!!!!!
 
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.

Jason November 5, 2007 14:58

Re: source of species with UDF, please!!!!!!!!!
 
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?

Jason November 6, 2007 07:36

Re:please HELP!!!!!!!!!
 
Thanks

Jason November 6, 2007 11:55

Re:please HELP!!!!!!!!!
 
PLEAS PLEASE PLEASE COULD ANYBODY HELP!!!

Allan Walsh November 6, 2007 14:26

Re: source of species with UDF, please!!!!!!!!!
 
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.


Jason November 10, 2007 14:57

Re: source of species with UDF, please!!!!!!!!!
 
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.

Allan Walsh November 12, 2007 12:57

Re: source of species with UDF, please!!!!!!!!!
 
You might want to check the header files for description of variables.


All times are GMT -4. The time now is 15:59.