Fluids

Fluids

Getting Density Gradient in a Pressure-Based Solver (FLUENT)

    • holaagee
      Subscriber

      Greetings,


      I am trying to simulate methane combustion using ANSYS Fluent with a pressure-based solver, where I include source terms defined by UDFs. The source terms are functions of the density gradient. Since the cell macro C_R_G(c,t) can only be used in the density-based solver, is it possible to get a density gradient in a pressure-based solver so that I can use it in my UDF code? 


      Thanks y'all


      Ghadeer

    • DrAmine
      Ansys Employee

      Check the official way to get the gradients of variables as documented in the manual.

    • holaagee
      Subscriber

      Thank you for answering. I looked through the manuals, I am not sure what you mean by the "official way". Is it using the cell macros? 


       

    • DrAmine
      Ansys Employee
      Check the gradient paragraph in customization manual.
    • SEANGHAI
      Subscriber
      Hello! Everyone, if you want to get the gradient results of all variables in ANSYS FLUENT, you can go to the following link that has a video of getting gradient results of all variables without UDF. Here is the link:
    • Karthik R
      Administrator
      hi,nYou could do it a couple of ways. Using the UDF is one. Yes, you can use C_R_G(c,t) for this.nYou can also use Fluent expressions to define your source term if this is an analytical expression. In order to retain the gradient data, you can prevent the solver from freeing up memory by enabling the following text command: nsolve/set/advanced/retain-temporary-solver-memnThis should open up additional variables for post-processing. nPlease see the following link for additional details. nBest Regards,nKarthikn
Viewing 5 reply threads
  • You must be logged in to reply to this topic.