Attached you will find a script that is used to run multiple speeds or RPMs in succession automatically. Here are the steps to follow:

  • After installing Python 3.6, you may find that one component, win32api, was not installed by default and must be installed separately. To do so, open a Windows command prompt and type “python –m pip install pypiwin32” without the double quotes (if you don't know how to open a command prompt in your version of Windows, search "how to open a command prompt in Windows").

  • Next you need to make a few changes in the attached script for your specific setup. If you open the .py file in a text editor there are several comments labeled “Step 1, Step 2” … These should be self-explanatory. When specifying the path to the folder, notice that there are two backslashes \\. Once you have finished editing the script, it's easiest if you save the script in your user folder, because this is the folder you will be in when you open a Windows command prompt (e.g., c:\Users\yourname).

  • Now you should open each .spro file to build the mesh and make any changes to the default values for Number of Time Steps, Results Saving Frequency, etc. (remember that by default, Results are saved only at the end of a run). You may want to increase the default Number of Time Steps, just to be sure that the analysis has converged before moving on to the next analysis. Make any desired changes, and then save the .spro file. Now when you run the script it will use the values that you specified.

  • Now you should be ready to go. Open a command prompt and type “python” without the double quotes. It should start the first run. When running Simerics from Python it will not open a user interface, so the only clues you have that it is doing something is (a) the command line has not returned back to the prompt and (b) you can look at the Simerics output files (e.g. …integrals.txt) and see that the information in them is growing. You can stop the process by closing the command prompt by clicking on the red X. You will get feedback at the command line when a simulation has finished and the next one is starting. The run is considered finished when the convergence criteria (defined in the python script) have been met, or the Number of Time Steps have been completed.