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.

Matlab-Fluent Interfacing

    • ATIKADAR
      Subscriber

      I am trying to interfacing between Ansys Fluent and Matlab. I can run my Fluent simulation via Matlab. Now I am trying to calculate mass weighted average temperature of a volume and I have used this Matlab code 


      iFluentTuiInterpreter.doMenuCommandToString('report volume-integrals mass-avg (channel) temperature n')


      This code can measure the temperature and can print the value in Matlab command window. But now I want to save this value in another variable so that I can use this number in post-processing. I am trying to use this command


      iFluentTuiInterpreter.doMenuCommandToString('define variable pick report volume-integrals mass-avg (channel) temperature n')


      but its not working. Can someone please help?


      Thank you. 

    • Rob
      Forum Moderator

      The first command looks to be pretty much the text user [TUI] command we'd use to get the mass average temperature in the channel volume.  That will be output the Fluent TUI window. Where do you expect the second command to store the data?

    • ATIKADAR
      Subscriber

      Yes. you are right. First line is basically a journal command and it works fine in Matlab. For the next command, I would like to save the temperature value in a variable-


      X=iFluentTuiInterpreter.doMenuCommandToString('define variable pick report volume-integrals mass-avg (channel) temperature n');


      I want to save the computed value in the variable X?

    • Rob
      Forum Moderator

      If you put that command into Fluent what happens? Just the Fluent part of it to check you're using the correct Fluent TUI command. 

    • ATIKADAR
      Subscriber

      (define x (pick-a-real "report/surface-integrals/mass-weighted-avg (outlet) temperature n"))----this journal works fine in Fluent and it store only the number is the variable x. I want to do the same in via Matlab. 

    • Rob
      Forum Moderator

      You want the Fluent value that's reported into Matlab for manipulation in Matlab? 

    • ATIKADAR
      Subscriber

      Yes. 

    • Rob
      Forum Moderator

      Given the value has been taken from Fluent and displayed into Matlab won't you be better off asking on a Matlab forum?  Please post the answer back into this thread. 

Viewing 7 reply threads
  • The topic ‘Matlab-Fluent Interfacing’ is closed to new replies.