0% found this document useful (0 votes)
74 views

Lesson 3 Batch Processing

Uploaded by

farhad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

Lesson 3 Batch Processing

Uploaded by

farhad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Rocky Tutorial

Static Angle of
Repose Test
Lesson 3 – Batch-Processing

2024 R1 - © ANSYS, Inc. All rights reserved // 1


1.1. Lesson 3 (Part C): 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:

This tutorial can be continued from either Part A or Part B.

You will learn how to:

• Save the project setup parameters without the simulation results

• Use input variables to parameterize materials interactions properties

• Schedule scripts to run automatically before and after the simulation

• Use the Rocky Scheduler to run multiple Rocky projects in sequence

And you will use these features:

• Input Variables

• PrePost Scripts

• Materials Interactions

• Rocky Scheduler program

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.

2024 R1 - © ANSYS, Inc. All rights reserved // 2


1.1.3. SAVE COPIES WITHOUT RESULTS
In this tutorial, we want to vary the Static and Dynamic Friction coefficients of the particle-particle
interactions and see how that changes the particle behavior.

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.

1. From the File menu, click Save project as....

2. From the Save Options dialog, click Save as a New Project WITHOUT copying Simulation
Results, and then click OK.

2024 R1 - © ANSYS, Inc. All rights reserved // 3


We want to save the project in another folder so the current Results folder won't be rewritten by
the newly created project results.

We also want to name this new file in a specific way so that it is easier to track multiple copies later.

To accomplish these tasks, do the following:

1. From the Save File window, create a new folder named friction_03 in the same location as the
original project (as shown).

2. Double-click the new folder to open it.

3. Enter tutorial_02_friction_03.rocky for the File name, and then click Save.

1.1.4. INPUT VARIABLES


For this tutorial, a single Input Variable will be set up for both Static Friction and Dynamic Friction.

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.

2024 R1 - © ANSYS, Inc. All rights reserved // 4


1. First, enable the Expressions/Variables panel by selecting it from the Tools menu.

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).

2024 R1 - © ANSYS, Inc. All rights reserved // 5


1.1.5. INTERACTIONS BETWEEN MATERIALS
To assign the variable to the interaction properties, do the following:

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.

3. Type ff in the Static Friction text box.

When you click away from this field, the Static Friction field will show the value you set for the
ff variable (as shown).

2024 R1 - © ANSYS, Inc. All rights reserved // 6


4. Repeat for the Dynamic Friction.

Whenever you use an Input Variable to define a parameter, the Expressions/Variables panel lists
which variables were used for which parameters (as shown).

2024 R1 - © ANSYS, Inc. All rights reserved // 7


1.1.6. SCHEDULED PREPOST SCRIPTS
Next, we want the script we used in Part B to automatically run and save the output files right after
the simulation is processed.

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:

– Right BEFORE the simulation starts processing (Pre Script)

– Right AFTER the simulation is done processing (Post Script)

• This is done through the PrePost Script sub-entity on the Data panel under the Solver entity (as
shown).

2024 R1 - © ANSYS, Inc. All rights reserved // 8


In this way, you can further automate your setup and post-processing tasks, especially when running
many similar kinds of cases.

1.1.7. PROJECT SCRIPTS


Now, we will set this script to automatically run right after the simulation completes.

1. Ensure the PrePost Scripts panel is still shown. (From the Tools menu, select PrePost Scripts.)

2024 R1 - © ANSYS, Inc. All rights reserved // 9


2. From the PrePost Scripts panel, select the Project scripts tab and then click the Open Scripts
Directory button (as shown).

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).

1.1.8. POST SCRIPT


Now, we will set this script to automatically run right after the simulation completes.

2024 R1 - © ANSYS, Inc. All rights reserved // 10


1. From the Data panel, expand the Solver entity and then select PrePost Scripts.

2. From the Data Editors panel, within the Run after simulation list, enable the Calibration 1:
SAOR checkbox (as shown).

3. Save the project.

1.1.9. SAVE COPIES WITHOUT RESULTS


For this tutorial, we will run three cases in addition to the original case that we analyzed in Part B.

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.

2. In Rocky, from the File menu, click Save project as....

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).

2024 R1 - © ANSYS, Inc. All rights reserved // 11


5. From the File menu, click Save project.

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:

– tutorial_02_friction_03.rocky: both frictions equal to 0.3

– tutorial_02_friction_05.rocky: both frictions equal to 0.5

– tutorial_02_friction_09.rocky: both frictions equal to 0.9

7. Once these cases are created, you can close Rocky.

2024 R1 - © ANSYS, Inc. All rights reserved // 12


We will now evaluate how the Angles of Repose behave in these cases.

• 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.

1. Open Rocky Scheduler 2024 R1.

1.1.10. ROCKY SCHEDULER


Rocky Scheduler is a separate program that allows multiple simulation projects (Jobs) to be processed
on specific hardware configurations (Resources) sequentially (one after the other) without having to
use the Rocky User Interface (UI).

In this way, several cases can be run automatically without your constant involvement.

Each Job requires at least one Resource to be assigned to it.

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.

2024 R1 - © ANSYS, Inc. All rights reserved // 13


For this tutorial, we will add only one CPU resource and run the jobs sequentially.

1. To set up the Scheduler, from the Resources section, click the Add Resource (green plus) button.

2024 R1 - © ANSYS, Inc. All rights reserved // 14


• The Add Resource dialog appears with a Resource Type list that shows all the resources
available on your computer (as shown).

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.

2024 R1 - © ANSYS, Inc. All rights reserved // 15


The resource you defined now appears on the Resources list.

Next, we will add our three projects to the Jobs queue:

1. From the Jobs section, click the Add Job (green plus) button (as shown).

2024 R1 - © ANSYS, Inc. All rights reserved // 16


2. From the Choose Rocky project files dialog, select the tutorial_02_friction_03.rocky project
we created previously, and then click Open.

3. Repeat this process for the tutorial_02_friction_05.rocky and tutorial_02_friction_09.rocky


files. The three new jobs appear in the queue (as shown).

To assign the same Resource to all three jobs, do the following:

1. Multi-select all three jobs. (Hold the Shift or Ctrl key and then click each job to select it).

2024 R1 - © ANSYS, Inc. All rights reserved // 17


2. While holding the Shift key, double-click the last selected of the three Click to assign resources
bars (as shown).

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).

Now, let's start the simulations:

1. Click the Start Scheduler (green triangle) button (as shown).

2024 R1 - © ANSYS, Inc. All rights reserved // 18


The first job in the list begins processing. You can view the Progress column to see the processing
status and percentage complete.

• 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.

• FINISHED shows when processing is complete.

• ERROR shows when processing can't continue due to errors.

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.

The angles.json files are shown below.

2024 R1 - © ANSYS, Inc. All rights reserved // 19


Note:

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).

2024 R1 - © ANSYS, Inc. All rights reserved // 20


Note:

• 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).

1.1.12. CALIBRATION SUITE AND MATERIAL WIZARD


For additional particle calibration tests, consider making use of following resources.

The Rocky Calibration Suite contains:

• Eight pre-made Rocky projects representing common bench tests

• Simplified project setup using pre-processing scripts

• Automatic post-processing reports. For more details, access the Calibration Suite page.

2024 R1 - © ANSYS, Inc. All rights reserved // 21


The Material Wizard can be used as a time-saving starting point for your calibration
process. For more details, access the Material Wizard page.

1.1.13. HELP – USER MANUAL


This completes Part C of this tutorial.

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.

2024 R1 - © ANSYS, Inc. All rights reserved // 22


1.1.14. CONCLUSION
The Rocky Scheduler was used to run multiple projects and analyze how the SAOR
values vary when different particle-particle Dynamic and Static Frictions are used.

Note:

Other simulations must be completed in order to calibrate the particle model in full.

During this tutorial, it was possible to:

• Save the project without results to create a copy of just the setup parameters.

• Use Input Variables to parameterize materials interactions properties.

• Add a Project Script and then use PrePost Scripts to run it automatically after processing
completes.

• Use the Rocky Scheduler to run multiple projects sequentially.

What's Next?

• If you completed this tutorial successfully, then you are ready to move onto the next tutorial.

2024 R1 - © ANSYS, Inc. All rights reserved // 23


2024 R1 - © ANSYS, Inc. All rights reserved // 24

You might also like