|
[Sponsors] |
February 2, 2016, 01:55 |
UFD code for sink term
|
#1 |
New Member
anubhav
Join Date: Sep 2014
Posts: 8
Rep Power: 12 |
I am trying to write a ufd code for nucleation of zinc vapor. As a result of nucleation the concentration of zinc vapor decrease. Can anybody help me from where i should start ? Should I treat this(nucleation) as mass sink term? If yes then how should I add this sink term in my model.
My model can be assumed a simple rectangle with one inlet and outlet.The zinc vapor are introduced from inlet at high temperature and as it proceeds to outlet there is drop in temperature. As a result of this temperature drop nucleation occurs. |
|
February 2, 2016, 06:40 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
so the nucleation has a dependence on temperature (does it depends on position)? Can you post the formula?
You need to add a source term in the specie you want to decrease and also the same term in the mass equation (continuity), otherwise your balance wont match. |
|
February 3, 2016, 06:26 |
|
#3 |
New Member
anubhav
Join Date: Sep 2014
Posts: 8
Rep Power: 12 |
The formula for nucleation rate (m^-3 S^-1) is
Nucleation rate = (4*pi*r^2)*(exp(-del G/KT)) In short it depends upon temperature and mass concentration of zinc vapor rest all are constant. |
|
February 3, 2016, 06:49 |
|
#4 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Quote:
#include "udf.h" #define PI 3.14159265 DEFINE_SOURCE(nucleation_source,c,t,dS,eqn) { real T, K, r; T = C_T(c,t); r = .......................; K = ......................; source = (4.0*PI*pow(r,2.0))*(exp(-del G/K*T)); dS[eqn] = 0.0; return source; } |
||
February 3, 2016, 07:19 |
|
#5 |
New Member
anubhav
Join Date: Sep 2014
Posts: 8
Rep Power: 12 |
Dear Bruma
In Ansys help it is written that: Note that if you define a mass source for a cell zone, you should also define a momentum source and, if appropriate for your model, energy and turbulence sources. If you define only a mass source, that mass enters the domain with no momentum or thermal heat. The mass will therefore have to be accelerated and heated by the flow and, consequently, there may be a drop in velocity or temperature. This drop may or may not be perceptible, depending on the size of the source. (Note that defining only a momentum, energy, or turbulence source is acceptable.) Is it necessary in mine case also? |
|
February 3, 2016, 07:23 |
|
#6 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How would you code this simple term into OpenFOAM? | CHARLES | OpenFOAM Programming & Development | 1 | April 23, 2014 22:32 |
URGEN Is any one used CAFFAC code with source term | Arash | Main CFD Forum | 3 | January 8, 2002 19:55 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |
UDF Scalar Code: HT 1 | Greg Perkins | FLUENT | 8 | October 20, 2000 13:40 |