Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Passing variables between DEFINE_ON_DEMAND macros

TAGGED: 

    • Kenneth.Fung
      Subscriber

      I have two define_on_demand macros called "run1" and "run2".

      "run1" spits out an output x. "run2" uses x, as well as a parameter y obtained from Get_Input_Parameter, to spit out another output z, so z = z(x,y).

      I am trying to build a workflow that does something like this:
      1. Call "run1" to get x.
      2. Set a value of y, call "run2" to get z, save results.
      3. Repeat previous step for different values of y.

      The reason I do not want to combine "run1" and "run2" into a single define_on_demand macro is because I only need to execute "run1" once. If I combine it into a single macro with "run2", then "run1" would execute every single time with "run2", which is unnecessary and potentially time-consuming.

      Is there a way to do this?

    • Kenneth.Fung
      Subscriber

      I forgot to add, is x an array. I'm aware that I can achieve the above by using scheme variables, but this would only work if x is real or an integer. Is it possible to do this if x is an array?

Viewing 1 reply thread
  • The topic ‘Passing variables between DEFINE_ON_DEMAND macros’ is closed to new replies.
[bingo_chatbox]