How to use condition and workflow as input

1. Main steps

  • Import Example

  • Condition as input

  • Set workflow as input

  • Make a loop running an array of conditions

2. Import example

  1. Import the example: Get_started_with_plotting_step1.stask

3. Condition as input

  1. Open the workflow called Initial

    • Click on Simple_Flexible_Riser.initial

  2. Click on the Input condition checkbox.

  3. The input slot condition is added

SIMA will add a counter on the name if an task with the same name is already present in the workspace, i.e. Simple_Flexible_Riser2.initial in the picture to the right.
fig1a
arrow right
fig1b
arrow right
fig1c
  • Add the model input from the Palette

  • Select condition as Type

  • Select the Initial condition

  • Rename the box to a user-friendly name and connect the model input to the input slot

fig2a
arrow right
fig2b
arrow right
fig2c

4. Workflow as input

  • Make a new workflow

fig3a
  • Move the post processing part in the workflow Initial to wf_plot

fig3b
  • in the workflow sheet wf_plot, do

fig4a

5. In the workflow called Initial

  1. Replace the post processor part with a workflow

  2. Link the workflow to wf_plot

fig5a
  1. Check-off Input as workflow

fig5b
  1. Add model Input

  2. Rename to wf_as_input (or something you prefer)

  3. Connect the model input output slot to the slot called workflow

fig5c
The workflows used as input must have identical input and output. In this example Wf_plot and Wf_example
  • The example to the right have one identical input (signal) and no outs

  • The upper make a plot, the lower one does nothing

fig5d
fig5e

6. Run a set of conditions

A set is simiar to a loop
The approach is similar if you want to run a set of workflow as input
  • Make a new environment in the Riflex task (Pierson Moskowitz, PM)

    • Make a condition using the new environment

fig6



  • Make a new workflow

fig7a
  • Give a new name (example: run_a_set_of_conditions)

fig7b
  • Add a workflow set from the palette to the workflow run_a_set_of_conditions

  • Give the workflow set a name (example: run a set of conditions)

fig7c

6.1. Final step ..

  • Add model input from the palette and rename to conditions

  • Check off for array

  • Choose type condition

  • Add conditions; here

    • Initial

    • CO_PM

fig8a
  • To compare the results add a workflow output in the Initial workflow

fig9a
  • Add the output to the workflow calling Initial

  • Add a plot box to look at the the signals

fig9b