Lesson 3 Batch Processing
Lesson 3 Batch Processing
Static Angle of
Repose Test
Lesson 3 – Batch-Processing
1.1.1. OBJECTIVES
The purpose of this tutorial is to study how the Static Angle of Repose (SAOR) behaves using different
Static and Dynamic Frictions for the particle-particle interactions.
Note:
• Input Variables
• PrePost Scripts
• Materials Interactions
1.1.2. PROJECT
1. If you completed either Part A or Part B of this tutorial, ensure that one of those Rocky projects
are open. (Part C can continue from where either of these parts left off.)
2. If you did not complete Part A nor Part B, ensure that you have downloaded and extracted the
dem_tut02_files folder, and then open the tutorial_02_pre-processing.rocky project.
Important:
To make use of the Rocky project file provided, you must have Rocky 2024 R1 or later.
If you have an earlier version of Rocky, please upgrade Rocky to the latest version, or
complete the setup portion of Part A from scratch.
Note:
You do not need to process the simulation for this particular tutorial.
To do this without losing the prior simulation's results, we will create multiple, similar projects and
change only the two friction values in the new ones.
To avoid recreating these new projects from scratch, we will create a copy of the current project's
setup parameters, and specifically NOT copy its results.
2. From the Save Options dialog, click Save as a New Project WITHOUT copying Simulation
Results, and then click OK.
We also want to name this new file in a specific way so that it is easier to track multiple copies later.
1. From the Save File window, create a new folder named friction_03 in the same location as the
original project (as shown).
3. Enter tutorial_02_friction_03.rocky for the File name, and then click Save.
For Input variables, you can enter into the parameter text fields a variable name on its own.
In this way, you can create dynamic relationships between parameters, and then change and update
placeholder values quickly.
2. From the Expressions/Variables panel, ensure the Input tab is selected, and then click the Add
button.
3. From the Variable Name dialog, set the Variable Name as ff (as shown), and then click OK.
4. From the entry row that was added, double-click the Value, and then set it to 0.3 (as shown).
1. Click Materials Interactions in the Data panel. The Data Editors panel then displays the editable
parameters.
2. From the left drop-down list, select Default Particles, and from the right drop-down list, select
Default Particles.
When you click away from this field, the Static Friction field will show the value you set for the
ff variable (as shown).
Whenever you use an Input Variable to define a parameter, the Expressions/Variables panel lists
which variables were used for which parameters (as shown).
To do so, we must save it in the Project scripts tab, and then define it as a Post Script:
• Scripts saved to the Project scripts tab are eligible for running automatically in two ways:
• This is done through the PrePost Script sub-entity on the Data panel under the Solver entity (as
shown).
1. Ensure the PrePost Scripts panel is still shown. (From the Tools menu, select PrePost Scripts.)
3. From the dem_tut02_files folder you downloaded earlier, find the script folder, and then copy
and paste the provided script script_calibration_SAOR.py into the directory you just opened.
The new script will appear in the PrePost Script panel on the Project scripts tab (as shown).
2. From the Data Editors panel, within the Run after simulation list, enable the Calibration 1:
SAOR checkbox (as shown).
We already have the first copy defined (tutorial_02_friction_03.rocky), so let's now use it to create
two more project copies.
1. In the same root folder where you saved your original project, create another new folder named
friction_05.
3. From the Save File dialog, find and open the new folder you just created, enter the File name
as tutorial_02_friction_05.rocky, and then click Save.
4. From within this new copy, change Input Variable ff to 0.5 (as shown).
6. Repeat this process to create another folder called Friction_09 containing another project copy
named tutorial_02_friction_09.rockywith both friction values (ff) changed to 0.9. (Remember
to save your changes.)
• You should now have the following three additional cases saved:
• For the original case we analyzed in Part B, we already have the Angles of Repose results.
– If you did not complete Part B, you can review the results in the original_case_results folder,
inside the dem_tut02_files you extracted previously.
• We will get the results for these three new cases by running them through the Rocky Scheduler.
In this way, several cases can be run automatically without your constant involvement.
Each Resource used will require one instance of the Rocky solver for processing.
Therefore, you are limited by your Rocky license as to how many Jobs you can process at once.
• Most users have a single-instance Rocky license and can therefore process only one job at a time.
• Only those users with unnumbered Rocky licenses can process many jobs at the same time.
1. To set up the Scheduler, from the Resources section, click the Add Resource (green plus) button.
2. From the Add Resource dialog, set the Resource Type to CPU, enter the Caption and Number
of Processors (as shown), and then click OK.
1. From the Jobs section, click the Add Job (green plus) button (as shown).
1. Multi-select all three jobs. (Hold the Shift or Ctrl key and then click each job to select it).
3. From the Assign Resources dialog, enable the Main Resource checkbox, and then click OK (as
shown).
All three jobs should now list the same Resource (as shown).
• RUNNING shows when the file is currently being processed (as shown).
• QUEUED shows if the file is not currently processing but will once the resource is available.
• PAUSED shows when the file has been partially run but isn't processing currently.
Tip:
To filter the Jobs list by progress type, click the button you want from the Show list (as
shown). To turn off a filter, click the same button again.
1.1.11. RESULTS
After all three jobs are done processing, all three Progress columns show FINISHED 100% and you
will see that the Results folders were created inside of each of the created project folders.
Inside each folder there will be two files: angles.json and experiment_data_points.csv.
When using the Scheduler, the figures are not generated. If you want to generate the figures,
you must open each project in Rocky and run the script again.
From the values provided in the four .json files, a graph can be built outside of Rocky (as shown).
• For sake of simplicity, the particle count of this tutorial was reduced.
• Thus, the angle values you end up with in your real-world projects may vary significantly
from the ones shown in this tutorial.
• This is because the angles of repose calculations are very sensitive to the system resolu-
tion (proportion between the particle size and the cylinder size).
• In order to achieve more accurate results you should increase particle count (reduce the
particle size or increase the cylinder size).
• Automatic post-processing reports. For more details, access the Calibration Suite page.
For further information on any topic presented, we suggest searching the User
Manual, which provides in-depth descriptions of the tools and parameters.
To access this manual, from the main Toolbar click Help, point to Manuals, and then
click the User Manual.
Note:
Other simulations must be completed in order to calibrate the particle model in full.
• Save the project without results to create a copy of just the setup parameters.
• Add a Project Script and then use PrePost Scripts to run it automatically after processing
completes.
What's Next?
• If you completed this tutorial successfully, then you are ready to move onto the next tutorial.