Fluids

How can I input Mass flux of a species on the boundary in fluent?

• SEANGHAI
Subscriber

Hello! I am having a hard time to find out how to input mass flux of a species in fluent, some people told me to write UDF, then I already wrote UDF for mass flux of that species (Define_Profile(mass_y_flux..)), but I am curious that, which boundary condition should I use for the boundary that I need to input species mass flux ? Mass flux boundary condition or Wall Boundary condition? Thank you in advance for your help!

• Rob
Ansys Employee
It depends. Most species enter with the flow, so you set a velocity or mass flow boundary and a mass fraction for the species.
• SEANGHAI
Subscriber
Thank you for your reply! Of course, I want to input only mass flux of a species which this species will spread out to the whole domain by the velocity coming from the inlet1, but the boundary that I input mass flux of a species is the Wall Boundary condition, and its name is inlet 2. However, In the Wall BC, there is only one tap to input species, it is mass fraction, so I cannot input mass flux as I want, then, I started to write UDF and interpreted it into the mass fraction tap, and I expected that even though UDF written in mass flux was interpreted in the mass fraction tap, it will become the mass flux according to UDF, but finally it is not like that, the values calculated in the UDF became the mass fraction value as I see in the plot of mass fraction of a species. Or is it because my UDF is wrong ?
I want to confirm you that the reason why I do not use Mass flux boundary condition, because, if use it, there will be Y-velocities on the inlet 2, it is different to the real situation that velocities coming from the inlet 1(Velocity Inlet BC, velocity= 1m/s) and go through the inlet 2 to the outlet and make only X-velocities on the inlet 2, no Y-velocities, this is why I use Wall BC in stead of Mass flux BC.
Please help me, because I have been having this problem for a few month ago, I am a University student, I have to graduate soon, but because of this problem, I cannot finish my research, then I cannot graduate as well.
Please see the attached figures below, they are the boundary's names. And also you can see my UDF for mass flux, is it correct or not?
The following are my UDF code for species mass flux:
#include "udf.h"
{
face_t f;
real Vx;
{
F_PROFILE(f, thread, var) = (0.001) + (0.001*Vx);
}
}

And the following are boundary's names:

• Rob
Ansys Employee
You may want to look at source terms too, that may be a better approach than trying to fix the near wall species fraction.
• SEANGHAI
Subscriber
Thank you for your idea! I am about to try to input the source term (Area source [kg/m┬▓s]), but when I look at it, I realize that there are two problem that I faced:
There is only Mass source [kg/m┬│s] even I write UDF, I am curious that, is there a way that I can convert mass source [kg/m┬│s] to area source [kg/m┬▓s] in UDF? because I am very young in UDF, so I do not know about it clearly.
That source in fluent will apply to the whole domain, but in my case, I want to input that source on the Inlet 2 (Wall Boundary), therefore, can I ask fluent to input area source on Inlet 2 by writing UDF?
I will always appreciate your help!
• SEANGHAI
Subscriber