Fluids

Fluids

Question about using Macro F_FLUX(f,t)

    • Kazem
      Subscriber

      Hello everybody,


      I want to implement an equation (governing equation of flow in porous media) which is very similar to Navier-Stokes equation, in ansys fluent. I have attached a photo of the equation. As can be seen from the photo i need to manipulate the convective term. In fact the convective term is multiplied by a constant (1/phi^2 phi is porosity). I have developed UDF and fortunately it works fine. It would be highly appreciated if anyone let me know whether my UDF accurately manipulate convective terms or not? or is there any other way to change convective term. Below is the UDF i have developed:


      DEFINE_ADJUST(set_convective_flux, d)


      {


      real porosity = 0.95;


      Thread *t;


             face_t f; 


        thread_loop_f(t,d)


        {


      begin_f_loop(f,t)


      {


         F_FLUX(f,t) = F_FLUX(f,t)/(porosity*porosity);


      }


      end_f_loop(t, d)


        }


       


      }

    • DrAmine
      Ansys Employee

      What do you mean it works fine? Is using the physical velocity formulation not enough for you?

    • Kazem
      Subscriber

      Thank you very much for your reply. The UDF compiled successfully and i ran the simulation without any error. What i am not sure about is the way i have implemented the equation. During solving momentum equations convective fluxes should be multiplied by a constant (1/porosity^2). Does DEFINE_ADJUST Macro do this? .I think it is not possible to access velocity and pressure when solving momentum equations. 

    • DrAmine
      Ansys Employee

       Again: is the physical velocity not enough?

    • Kazem
      Subscriber

      Unfortunately now i do not have any validation cases to realize whether the physical velocities are valid. I just need to know if i use the appropriate macro. 

Viewing 4 reply threads
  • You must be logged in to reply to this topic.