Importing a Dataset into a Scenario

This is an example of a script that creates a new scenario and imports a EDEM 2017+ into it. As part of the importing process, the temporal evolution graphs of the reaction force and torque for each geometry present in EDEM simulation is created and saved into the scenario:

''' This scripts starts a new session, loads the project "Backhoe optimization", creates a new scenario and imports
the EDEM simulation "Initial design.dem" into the scenario. Also, the reaction force and torque graphs are 
calculated and saved into the scenario during the import dataset'''

import sys                              
import os
import iota
sys.path.append(os.getenv('IOTA_PATH'))                                         # Add iota directory to Python paths

username = 'stephen'                                                            # Set Iota username
home_path = 'C:/Users/stephen/'                                                 # Set user's home directory

my_session = iota.session(username,home_path + 'ParticleAnalytics/config.ini')  # Start new session

my_new_project = my_session.get_project('Backhoe optimization')                 # Load the project "Backhoe optimization"        

my_new_scenario = my_new_project.add_scenario(name='Initial design', description='This is my new scenario')  # Create a new scenario

EDEM_dataset, graphs = my_scenario.import_dataset(file = 'C:/Users/stephen/Backhoe_simulations/Initial design.dem', 
    name = 'Backhoe Initial desing', data_format = 'EDEM 2017',include_graphs = True)  # Import the EDEM simulation and reaction force & torque graphs

Last updated

Was this helpful?