Fluids

Fluids

DEFINE_UDS_FLUX with C_UDMI

    • Bibill
      Subscriber

      Dear all,

      I am writing some UDFs to solve a UDS equation in Fluent. For that, I defined its Flux, Diffusivity and Source term.

      I have checked separately the three UDFs and I have an issue regarding the DEFINE_UDS_FLUX one.


      My goal is to modify the default convective flux (rho*[u,v,w]) by a convective flux built with C_UDMIs i.e. rho*[UDMI(0),UDMI(1),UDMI(2)]

      Here is an attempt:

      DEFINE_UDS_FLUX(UDS_flux,f,t,i)

      {

        real NV_VEC(psi), NV_VEC(A);

        NV_D(psi, =, F_UDMI(f,t,0), F_UDMI(f,t,1), F_UDMI(f,t,2));

        NV_S(psi, *=, F_R(f,t));

        F_AREA(A,f,t);

        return NV_DOT(psi,A);

      }


      However, I only have cell values (C_UDMI) instead of Face UDMI (F_UDMI), it therefore yields to some issues. Does anyone know how to "transfer" my cell values into F_UDMI? Or does anyone know how to modify the convective flux with C_UDMI?


      Thanks in advance!

    • Karthik R
      Administrator
      Hello:
      You can run a "begin_c_loop ...... end_c_loop", identify the cells next to the face thread you are looking for, and then copy the cell UDMI values into the face UDMIs.
      Karthik
Viewing 1 reply thread
  • You must be logged in to reply to this topic.