Script

iota.session.Script()

Description Iota Script object.

Methods

Variables

  • name (str) mesh name

  • description (str) mesh description

  • id (int) mesh Id

Methods

Execute the method contained in the script In order to attach the script to other analysis, like Coarse Graining, this method must accept the scenario as argument No return is expected from this method

Arguments

  • scenario: (iota.session.Scenario) scenario object (Default: None)

  • **kwargs: any arguments the script may require

Example

mixing_script = my_scenario.get_script('calculate mixing index')
mixing_script.run(
  scenario = my_scenario,
  var1 = 2,
  var2 = [2,3]
  )

Execute the method that returns a scalar numeric variable In order to attach the script to a tale of variables, this method must accept the scenario as argument

Arguments

  • scenario: (iota.session.Scenario) scenario object (Default: None)

  • **kwargs: any arguments the script may require

Example

mixing_KPI = my_scenario.get_script('mixing performance indicator')
value = mixing_KPI.evaluate(
  scenario = my_scenario,
  test_case = value_2
  )
print('Performance for scenario "{}" is {}'.format(
  my_scenario.name, value))

Delete script from the project

Example

my_script = my_scenario.get_script('my script')
my_script.delete()

Last updated

Was this helpful?