Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

writing an expression involving concentration gradient

    • Ramesh Chandra Mishra
      Subscriber

      Hi

      I am trying to evaluate the following equation using custom field functions

      but getting stuck because of concentration gradient. Does anyone know how to evaluate concentration gradient using expression or custom field functions so that above equation can be calculated.

    • Rob
      Forum Moderator

      Some of the derivatives are available in solver, otherwise you may need to look at UDM. 

    • Ramesh Chandra Mishra
      Subscriber

      So there is no way I can solve this without using UDF?

       

    • Rob
      Forum Moderator

      Possibly not, check the Derivatives and if you can patch a solver result (concentration) to UDM and if that has an available derivative. Otherwise, you may need a UDF. 

    • Ramesh Chandra Mishra
      Subscriber

      There is no option for concentration in the derivatives. I was wondering if I can do it using gradient option in expressions?

       

    • Rob
      Forum Moderator

      I'm not sure there's an option for the gradients in the Expression system. It's rapidly evolving feature so that may change with 2024Rx, otherwise the gradients are available for UDM as UDF macros. 

    • Ramesh Chandra Mishra
      Subscriber

      This is what I am talking about. But I have a bit problem with this . It's syntax is Gradient but how to know if it is gradient wrt to x, y or z.

      Secondly, can you guide me a bit towards UDF. As far as i know, concentration can be obtained by multiplying mass fraction with density. Not so sure about concentration gradient though. Can you help me proceed in this regard?

    • Rob
      Forum Moderator

      Concentration is equivalent to volume fraction, and mass fraction is available so you may need to do some maths to convert. 

    • Ramesh Chandra Mishra
      Subscriber

      That part is fine by me but suppose I get the concentration, how do I convert it to gradient is my question. I can see macros for temperature and pressure gradient in the manual but could not find one for concentration gradient.

    • Ramesh Chandra Mishra
      Subscriber

      Is it possible to get the gradient of a variable created in the udf?

    • Rob
      Forum Moderator

      Check the User Defined Memory (UDM) macros - https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v232/en/flu_udf/flu_udf_DataAccessMacros.html%23flu_udf_example_udm_uds_usage

Viewing 10 reply threads
  • The topic ‘writing an expression involving concentration gradient’ is closed to new replies.