We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

define mass diffusion coefficients for porous media and multiphase

    • guan shengyi
      Subscriber

      Hi all
      I am trying to use an UDF to define mass diffusion coefficients for fluid in the system.
      I am attempting to redefine the fluid diffusion coefficient using `DEFINE_DIFFUSIVITY`, but I am encountering issues. My goal is to modify the diffusion coefficient based on a pressure condition using a scaling factor, and I am using `C_DIFF_EFF(c,t,i)` to retrieve the diffusion coefficient. However, when storing this value in a User-Defined Memory (UDMI) variable, it remains 0. Can you help me identify the issue? Below is my UDF.
      DEFINE_DIFFUSIVITY(DD, c, t,i)/*two-phase fluid*/
      {
      real Kg;/*diffusion coefficient*/

      if (C_P(c, t) < 20e+05)
      {
      Kg = 10e-20*C_DIFF_EFF(c, t, 1);


      }

      else if (C_P(c, t) > 20e+05)
      {
      Kg = C_DIFF_EFF(c, t, 1);


      }
      C_UDMI(c, t, 0) = C_DIFF_EFF(c, t, 1);

      return Kg;


      }

    • Saurabh R Patil
      Ansys Employee

      Hi,

      I suggest you to initialized kg to zero and try to store the modified kg in UDMI.

Viewing 1 reply thread
  • The topic ‘define mass diffusion coefficients for porous media and multiphase’ is closed to new replies.