Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Passing variables between DEFINE_ON_DEMAND macros

TAGGED: 

    • K
      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?

    • K
      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
  • You must be logged in to reply to this topic.