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

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!

Best Answers

Answers

  • RobRob UKForum Coordinator

    It depends. Most species enter with the flow, so you set a velocity or mass flow boundary and a mass fraction for the species.

  • 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"

    DEFINE_PROFILE(mass_y_flux, thread, var)

    {

    face_t f;

    real Vx;

    begin_f_loop(f, thread) 

    {

    Vx = F_U(f, thread);

    F_PROFILE(f, thread, var) = (0.001) + (0.001*Vx);

    }

    end_f_loop(f,thread)

    }


    And the following are boundary's names:


  • 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:

    1. 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.
    2. 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!😄

  • @Rob Please reply to me! Thanks!

This discussion has been closed.