Fluids

Fluids

Fluent -udf-density computation of species.

    • sooraj546
      Subscriber

      In my UDF code i want to convert my species mass fraction into concentration of the species . So the best way to do it is to multiply with density 

      Y_co2=C_YI(c, t, 2); /*Mass fraction */
      Y_co=C_YI(c, t, 5);

      X_co2=Y_co2*C_R(c, t); /*( kg/m3 )*/
      X_co=Y_co*C_R(c, t);

      But  i should multiply with the species density rather than density of the unit cell like i have done here. ............how to get it through UDF?

    • DrAmine
      Ansys Employee

      Hi, 


      To get the molar fraction(Yi) you need to calculate the mixture molar mass (Molar_Mix) and then get the mole fraction by Yi=Xi*Molar_Mix/Molar_i.


      For mass concentration ou just need to multiply mass fraction (Xi) by the mixture density. The latter one is accessible though C_R(c,t). So the expression you are using is correct but I guess you are referring to some other definition which I dunno? 


       


      A: 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.