Fluids

Fluids

Gradients of Calculated Cell Quantities

    • steppenwolf
      Subscriber
      Hi,nI'm new to UDF's and I need to calculate the gradient of a vector field (which is a function several flow variables) as a post-process tool by using the DEFINE_ON_DEMAND function. I managed to store x, y, z components of the vector for each cell in 3 UDM's but I was not able compute the gradients.nI thought that I need to use C_UDSI_G(c,t) (I defined them) but I was not able use it either. nDo I have to iterate to be able to use C_UDSI_G? Or am I missing something else? Basically what need is something like C_UDM_G.nThanks
    • Rob
      Ansys Employee
      Check in the documentation, there's a flag to set via the TUI and several macros to give the gradient of various values. n
    • steppenwolf
      Subscriber
      I think you are referring to solve/set/expert 'Keep temporary solver memory from being freed?' yes option and some macros like C_P_G and C_P_RG. I'm aware of these but I'm mentioning gradient of a variable which is a function (a complicated one) of flow variables. Is there a macro that I can use to calculate gradient of this variable?nThanksnn
    • DrAmine
      Ansys Employee
      You use UDS for that if you have your own custom variable.n
Viewing 3 reply threads
  • You must be logged in to reply to this topic.