Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Parameterize Arrhenius factors in Fluent

    • Mike H.
      Subscriber

      Hi,

      I am trying to figure out how to run a parametric study in Fluent where I can quickly update the activation energy for one of my chemical reactions (I have 24 reactions, 18 species), then iterate to get the new solution. I can't find a TUI command to directly access a reaction's kinetics. I can use define/material/change-create, but that makes me step through every piece of data for every reaction...very slow.

      Alternatively, I would have to write a UDF to alter the reaction rate of a specific reaction, but that seems like overkill.

      Finally, I can't set the Arrhenius values as input parameters that Workbench can use (at least I don't think I can).

      Thanks!

    • Rob
      Ansys Employee

      Not everything is exposed for parameters, expressions or simple UDFs. The TUI commands can be a little complex, and this is one of the reasons for the PyFluent work. 

      What are you trying to get from the study? Ie do you need a number at the end of this or to optimise something based on the result? Just wondering if a batch script/journal would be an easier option (set up & initialise all 24 cases outside Workbench then use a journal to run them sequentially). 

    • Mike H.
      Subscriber

      Rob, thanks for your reply. I would like to run many studies, overnight if possible, by changing Activation Energy a bit, then seeing its effect on my outlet temperature and species. I would do this for several of my 24 reactions. Eventually, optimizing such values would be desired.

      I could do a journal file, but the define/material/change command has dozens of inputs for the mechanism: it wants species, stoich, arrhenius, etc, for each reaction. Figuring out that long text string would likely have many errors.

      Last resort is iteratively changing the Arrhenius values by hand in the GUI each time, then running, post-processing, then repeat.

      Thanks, Mike 

    • Rob
      Ansys Employee

      If you use the Simulation Reports in Fluent then that's Post semi-automated. I suspect the Arrhenius value(s) aren't exposed as someone will then try and adjust during a calculation which will probably end badly. Check the Ansys Github for PyFluent - there may be a way using that. 

    • Mike H.
      Subscriber

      I was able to print the activation energy value for my reaction #4 using this Scheme command:

      > (list-ref (list-ref (list-ref (list-ref (list-ref (list-ref (%rpgetvar 'materials) 9) 4) 1) 4) 5) 2)

      2.607e+08

      Here, 9=material, 4=reactions, 1=finite rate, 4=reaction #, 5=arrhenius, 2=activation energy.

      Question: does anyone know the Scheme command to change that value?

      Thanks.

    • Rob
      Ansys Employee

      Just a word of caution when messing with Scheme commands. Save everything first and don't overwrite the file. It is possible to corrupt the case messing with them, and you'll need to set up from the mesh file again. 

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