We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Named Expression Syntax for TUI Script

    • robR_CFD
      Subscriber

      Hello Amazing Fluent Friends,

      I use TUI scripts to set up cases for runs on a remote HPC.

      I would like to be able to use a named expression to control the flow velocity at the inlet.

      For example, varying the velocity with the Y-Axis coordinate - say velocity = "some constant" * Y-coord

      I have found the command:

      define/named-expression/add

      but I do not understand how to form the actual expression in the next step.

      Hopefully there is someone out there who can help!

      Thanks

      Rob

    • Rob
      Forum Moderator
      Build a simple case locally and use that to experiment. Can you set up a model locally using the GUI and then send it to the cluster? TUI scripts are incredibly powerful but do require a higher level of experience to use well.
    • robR_CFD
      Subscriber
      Hey Rob Thanks for the response. Not exactly what I am looking for.... I've been building TUI scripts for a while, just never had the need to handle named-expressions to cater for this sort of variability.
      I did some trawling last night and found knowledge resource #2060231.
      It has an example....
      Answer:
      You can use TUI commands within an ANSYS Fluent Journal File, e.g. to change the expression "uprof":
      Line 1: /define/named-expressions/edit "uprof" def "x / 1.0 [m]*2.0 [m s^-1]"
      so, when I get a chance to play later it looks like what I have been missing is to have the "def" switch and enclose the statement in quotes.
      Once I get my research project finished I'm thinking I'll create a TUI tips and hacks page to bridge the gaps on the magic.... Cheers

    • Rob
      Forum Moderator
      Sounds good, thank you. We'll check it, and it'll give me something else to prod the back end team with for a solutions/publications section.
    • robR_CFD
      Subscriber
      Hey rob def did the trick.
      a few examples in the back of the tui manual would be helpful!
    • Rob
      Forum Moderator
      There is a short lecture on the ALH too - I wrote it!
Viewing 5 reply threads
  • The topic ‘Named Expression Syntax for TUI Script’ is closed to new replies.