Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

TUI – Execute commands Error

    • Marek Sawicki
      Subscriber

      Hello All,
      Currently I am strugling with TUI expression that will do following things :

      1. Firstly it will check if value stored in report is more than specified and if so
      2. It will change boundary condition of mass-flow inlet to value 0

      I wrote following execute command which instead of changing boundary condition just stop the simulation :
      (if (> (pick-a-real "/solve/report-definitions/compute fluid_plane") 0.5) (set! mstop? #t))

      And it works! But...

      When I want to change this "action" from ending the simulation to boundary condition of mass-flow inlet to value 0, code looks like this :

      (if (> (pick-a-real "/solve/report-definitions/compute fluid_plane") 0.5) (define b-c m-f-i mass_inlet liquid yes no 0))
      And in this case I got error of unbound variable .

      Also i did record the macro to change value of mass flow to 0 and also following code is not working due to unbound variable present.
      (if (>(pick-a-real "solve report-definitions compute fluid_plane") 0.5)
      (file/execute-macro macro1))

      May you help me to resolve this issue ?
      Thanks

    • Rob
      Forum Moderator

      Changing boundary conditions via Scheme can be problematic. I assume the command works if you try 

      /define b-c m-f-i mass_inlet liquid yes no 0     

      manually? 

    • Marek Sawicki
      Subscriber

       

      Thanks for reply!
      Yes it works when I just do it manually but I have to write this via TUI command to be executed by external cumputational cluster

       

    • Rob
      Forum Moderator

      I wonder if the solver needs to be stopped first?  Triggering Scheme when the solver is running could cause some issues. 

    • pratheeba.chandanagarajan
      Subscriber

      Rob,

       

      I would like to learn TUI commands, as I am going to launch my simulation in a cluster. I am new to TUI and launching project on clusters. Is there any tutorial for learning/using TUI commands with logical expressions? Also, the basic TUI commands that can be used with a .cas file? Please let me know if there are tutorials available.

      Thank you

      Pratheeba

    • Rob
      Forum Moderator

      There isn't much on the TUI other than an extra lecture I wrote for the Learning Hub a few years ago. Whilst we used to use the TUI exclusively (ie before Fluent had a GUI) it's now considered an advanced option. There was a TUI section in the manual, but that only covered the top two-three levels of the menus so wasn't overly useful. If you put terms into the "Quick Search" box in Fluent you may get the TUI commands too. 

      My general advice is to set the model up using the GUI, save and then use as few TUI commands as possible. The logical IF/AND expressions, strictly, are Scheme and I don't have anything on those: messing with Fluent at that level is very much at your own risk as you can really mess up the case file if you're not careful. 

    • pratheeba.chandanagarajan
      Subscriber

      Thank you Rob. Is the link to that lecture in the Learning Hub available now? Can you please share if it's available. 

      Thank you

      Pratheeba

    • Rob
      Forum Moderator

      It was, but as we're revising the site I nolonger have links. If you have a subscription check the scripting section in Fluids. 

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