Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Access Equilibrium Mass Fraction in a Fluent UDF

    • Kai Bittner
      Subscriber

      Hello,

      in order to model a mixture in a complete chemical equilibrium state at a membrane surface, I am trying to overwrite the species mass fractions with the corresponding equilibrium mass fractions calculated by the "Relax to Chemical Equilibrium" model using a UDF. I can access the field function of the equilibrium mass fraction in the GUI, but I have not found a macro for it yet.

      Is it possible to access the equilibrium mass fraction of a species in a UDF? Furthermore, is there a function to have these variables calculated within a UDF without having the model enabled in Fluent?

       

      Regards,

      Kai

    • Rob
      Forum Moderator

      You can code your own model up, but without the model the macro/value won't be calculated so you can't not turn it on and expect Fluent to know the value. 

      There are macros listed in the documentation, so have a look there.  I suspect this isn't what you're after, but may give you a hint  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_udf/flu_udf_ModelSpecificDEFINE.html%23flu_udf_relax_equil 

    • Kai Bittner
      Subscriber

      Thanks for the reply!
      Unfortunately I cannot open the link as it directs me to the customer support area, but I suspect it refers to the DEFINE_RELAX_TO_EQUILIBRIUM command. I don't think this macro can help me with my issue, since it seems to be only meant to change the value of characteristic time and the equilibrium mass fraction is not an argument in the function.
      What I am looking for is a macro to access the cell value of the equilibrium mass fraction, such as C_STORAGE_R(c,t,nv), where nv would be something like Mass_fraction_equilibrium[species_index], or a workaround for this issue. However, I have not found any information on this yet. I also searched the fluent/src footer, but did not find any clues there either.

       

       

    • Rob
      Forum Moderator

      Click on Help in Fluent then paste the link into the browser that opens. The solvers have a token/cookie/biscuit to bypass the log in requirements. 

      Unfortunately if it's not in the manual I can't comment. If you've been looking in /src read everything carefully and note some of those calls change between releases. 

Viewing 3 reply threads
  • The topic ‘Access Equilibrium Mass Fraction in a Fluent UDF’ is closed to new replies.