Chapter 21: Tutorial - Bottling Line

(Part A) Set up and process a simulation that makes use of Custom Inputs, which enables you to define specific positions, release times, and orientations for particles.

(Part B) Analyze the bottle transportation to identify stuck and tipped over bottles, and pin-point possible sources of bottle damage due to impact.

21.1. Part A: Project Setup and Processing

21.1.1. OBJECTIVES

The main purpose of this tutorial is to learn to set up and process a simulation that makes use of Particle Custom Inlets, which enables you to define specific positions, release times, and orientations for particles.

The scenario considered in this tutorial is a Bottling Line operation that transports filled champagne bottles while also consolidating them into a single line.

You will learn how to:

  • Use a Particle Custom Inlet to inject particles in specific positions, times, and orientations.

  • Define custom Center of Mass and Moments of Inertia for a particle shape.

And you will use these features:

  • Particle Custom Inlet

  • Particle Mass Center and Moment of Inertia Properties

21.1.2. PREREQUISITES


Important:  This ADVANCED tutorial contains fewer details, screenshots, and procedures than other Rocky tutorials.

  • An ADVANCED tutorial is designed for users who are more familiar with the Rocky user interface (UI), and already have a good understanding of the common setup and post-processing tasks.

  • If you do not already have this level of familiarity, it is recommended that you complete at least Tutorials 01 - 05 before beginning this one.


21.1.3. GEOMETRIES

 

The geometries in this tutorial are composed of:

  • (1) Rail (single component)

  • (2) Conveyor Belts (13 separate components)

These 14 items will be imported as .stl files, which can be found in the tutorial directory.

21.1.4. PROJECT CREATION

To get started with this tutorial, do the following:

  1. Download the dem_tut21_files.zip file here .

  2. Unzip dem_tut21_files.zip to your working directory.

  3. Open Rocky 2025 R2.

  4. Create a new project.

  5. Save the empty project to a location of your choosing.

  6. Use the information in the table that follows to start setting up your Rocky project.


    Tip:  If you run into settings or procedures in these tables that you are not yet familiar with, please refer to the Rocky User Manual and/or other Tutorials (via the Introductory Tutorials and Advanced Tutorials) to find the detailed instructions you need.


    StepData EntityEditors LocationParameter or ActionSettings
    AStudyStudyStudy NameBottling Line
    BPhysicsPhysics | MomentumNumerical Softening Factor0.1 [ - ]
    CModulesModulesInter-particle Collisions Statistics(Enabled)
    DModules

    ﹂Inter-particle Collisions Statistics

    Inter-particle Collisions StatisticsNormal Impact Velocity(Enabled)
    EGeometriesImport WallRail.stl (one file) and from Belt_01.stl to Belt_13.stl (thirteen files) with "mm" for Import Unit

21.1.5. MOTION FRAMES

To achieve the goals of both safely transporting the bottles and consolidating them into a single line, the 13 conveyors must increase in velocity while the rail lines up the bottles.

For the Motion Frames step, we will create one motion frame for each conveyor belt.

  1. Use the information in the table that follows to set up your first motion frame.

    StepData EntityEditors LocationParameter or ActionSettings
    AMotion FramesCreate Motion Frame
    BMotion Frames

    Frame <01>

    FrameNameBelt Velocity <01>
    Keep in PlaceGlobal ⯆
    Add motion
    Velocity0.1676, 0, 0 [m/s]
    CGeometries

    Belt_01

    GeometryMotion FrameBelt Velocity <01> ⯆
    MaterialDefault Belt ⯆

  2. Repeat the previous steps for all twelve remaining conveyors using one of the following two methods:

    • Manual Method: Use the values in the table below to create and assign these additional Motion Frames to their respective belts manually.

       

    • Automatic Method: To save setup time, use a script that completes this step for you. To make use of the script, do the following:

      1. From the Tools menu, ensure that the Python Shell checkbox is enabled.

         

      2. Navigate to the dem_tut21_files folder that you previously downloaded, find the script folder, and then open the tutorial_21_script.txt file.

      3. In the text reader, press Ctrl+A to select all the content, and then copy and paste it into the Python Shell panel (as shown). The commands run automatically.

         

All the thirteen Motion Frames should now be created and assigned to their respective belts.

In addition, each belt should have their Material correctly set to Default Belt.

21.1.6. CONTINUE PROJECT SETUP

Now that the Motion Frames are defined, we can continue setting up our project.

  1. Use the information in the table that follows to define Materials Interactions, and import a Custom Particle shape.

    StepData EntityEditors LocationParameter or ActionSettings
    AMaterials Interactions… | Default Particles

    Default Belt

    Static Friction0.4 [ - ]
    Dynamic Friction0.4 [ - ]
    … | Default Particles ⯆

    Default Boundary

    Static Friction0.1 [ - ]
    Dynamic Friction0.1 [ - ]
    … | Default Particles ⯆

    Default Particles

    Static Friction0.1 [ - ]
    Dynamic Friction0.1 [ - ]
    BParticlesCreate Particle
    CParticles

    Particle <01>

    ParticleNameBottle
    ShapeCustom Polyhedron ⯆
    Select file to importBottle.stl with "m" for Import Unit

21.1.7. CONVEX AND CONCAVE DETECTION

  1. From the Convert to Convex? dialog, select 1 - Keep the shape as is., and then click OK (as shown).

     

In this case, we want Rocky to treat the particle as Concave in order to preserve its shape.

Otherwise, it would convert the geometry to Convex and we would lose some of the Bottle's details.


Tip:  For further information about Convex and Concave detection, refer to Tutorial - Tablet Coater.


21.1.8. PARTICLE GROUP DEFINITION

To properly represent the behavior of a Filled Bottle, we must the change the Center of Mass and the Moments of Inertia of the particle.

  1. From the Data Editors panel, select the Movement sub-tab.

  2. Enable the Change Mass Properties checkbox.

    In Rocky, the Center of Mass Offset is expressed as a percentage of the particle size in each direction.

    For this tutorial, we consider that the Center of Mass Offset for a filled Bottle is 5% (of the height) lower than the empty Bottle.

  3. Set the Center of Mass Offset (as shown).

    In Rocky, the custom Moments of Inertia are expressed in second moments of volume (length5) relative to the Principal axes, assuming a sieve size of 1.


    Tip:  You may compute these values using CAD software.


  4. Set also the Principal Moment of Inertia.

     


    Note:  We'll leave the X, Y and Z directions as default since our Bottle is already approximately aligned with its principal axes.


  5. From the Size tab, ensure Sieve Size is selected for Size Type and then enter the Size (as shown).

     

    It is important that we ensure the volume produced by this sieve size matches the real-life volume of the bottle (353ml). We will do this by using the values on the Info tab.

  6. From the Info tab, verify the Volume value.

     

  7. Now that the size is set, it is important to View the Particles Details window and note the minimum Y-coordinate (as shown).

This value will be used later to prescribe the desired Particle Custom Inlet position.


Note:  In this particle view, the Geometric Center (orange dot) is in (0,0,0) position, relative to the local coordinate system of the particle; and the Center of Mass (blue dot) is located a little below it due to the Center of Mass Offset we defined earlier.


 

21.1.9. PARTICLE CUSTOM INLET DEFINITION

For this tutorial, we want the Bottles to be injected at given positions and times.

In Rocky, this is possible by using the Particle Custom Inlet feature, which uses an imported .csv file to define each particle's injection properties.

Within the .csv file, the particle properties are defined as header columns, and each particle is set on a separate row.

The particle properties (and their respective units) you can define in your .csv file are explained on the next slide.

Property columns you can define in a Particle Custom Inlet .csv file:

  • x, y, and z (required) are the global coordinates (in meters (m)) in which the given particle's Geometric Center will be placed.

  • size (optional) is the Sieve Size (in meters (m)) of the injected particle.

  • release (optional) is the time (in seconds (s)) when the particle is injected. If there is any obstruction at the given time, the injection will be delayed and a warning will be displayed in the Simulation Log panel.

  • angle, nx, ny, and nz (optional) define the rotation of each particle around a unit vector (nx, ny, nz). The angle is defined in radians (rad) and the vector is defined in meters (m).

  • temperature (required only if Thermal Modeling is enabled) is the temperature (in Kelvin (K)) of the particle.

  • ux, uy, and uz (optional) are the initial velocities of the particle in each direction, as measured in meters per second (m/s).

  • wx, wy, and wz (optional) are the initial angular velocities of the particle in each direction, as measured in radians per second (rad/s).

    For this tutorial we have provided you with a .csv file (as shown) that will inject rows of bottles in the Bottling Line inlet.

 

Note that only the x, y, z, and release properties are necessary for our purposes in this tutorial.


Important:  When creating your own .csv file, ensure that it uses commas as a separator.


21.1.10. INPUT DEFINITION

Now, we'll create a Particle Custom Inlet to inject the particles into the domain.

  1. Use the information in the table that follows to set up your inlet.

    StepItemLocationParameter or ActionSettings
    AInlets and OutletsCreate Particle Custom Inlet
    BInlets and Outlets

    Particle Custom Inlet <01>

    Custom InputParticleBottle ⯆
    Load File
    CSelect file to import (dialog box)File namecustom_bottle_injection.csv

Under File Info, we can verify summarized info, such as the Number of Particles and the Min and Max values of the various Properties that were defined inside the .csv we loaded.

 


Note:  The min (0.063) and max (0.063) values of the y property indicate that all the particles will be injected 0.063m above the conveyors. If you recall, this is approximately the distance between the geometric center and the bottom of the bottle, that we noted earlier on slide 15.


21.1.11. CONTINUE PROJECT SETUP

In this tutorial, the height of the bottles is higher than the Rail height (as shown)

 

As a consequence, a portion of the particles would be outside of the domain if we use the geometries limits as boundaries.

Therefore, we will set the boundary limits manually.

  1. Use the information in the table that follows to finish setting up your project.

    StepData EntityEditors LocationParameter or ActionSettings
    ADomain SettingsDomain SettingsUse Boundary Limits(Cleared)
    Min Values-0.1, 0, -0.3 [m]
    Max Values5.4, 0.5, 1 [m]
    BSolverSolver | TimeSimulation Duration40 [s]
    Output Settings | Time Interval0.01 [s]
    Solver | GeneralSimulation TargetCPU ⯆

21.1.12. SETUP CONFIRMATION

With a 3D View window opened, your Data panel and Workspace should look similar to the below image.

 

21.1.13. SIMULATE PROJECT

  1. From the Solver entity, click Start.

The Simulation Summary screen appears (as shown), then processing begins.

 

 


Tip:  You can use the Auto Refresh checkbox to view in a 3D View window the results during processing.


21.1.14. CONCLUSION

This completes Part A of this tutorial.

Rocky was used to set up and process a Bottling Line simulation.

During this tutorial, it was possible to:

  • Import a Custom Polyhedron particle shape and define a custom Center of Mass and Moments of Inertia.

  • Create a Particle Custom Inlet injection method.

What's Next? If you completed this tutorial successfully, then you are ready to move on to Part B and post-process this project.

21.2. Part B: Post-Processing

21.2.1. OBJECTIVES

The purpose of this tutorial is to use the results from the simulation we set up and processed in Part A to analyze the bottle transportation on the various conveyors.

You will learn how to:

  • Identify different periods of operation.

  • Verify if there are obstructions or stuck bottles in the line.

  • Verify if any bottles fell or flipped during transport.

  • Identify bottles and zones with the highest velocity of impact.

And you will use these features:

  • Particle Properties and Curves

  • Time Plots

  • 3D View Windows

21.2.2. PREREQUISITES


Important:  This ADVANCED tutorial contains fewer details, screenshots, and procedures than other Rocky tutorials.

  • An ADVANCED tutorial is designed for users who are more familiar with the Rocky user interface (UI), and already have a good understanding of the common setup and post-processing tasks.

  • If you do not already have this level of familiarity, it is recommended that you complete at least Tutorials 01 - 05 before beginning this one.


21.2.3. OPEN PROJECT

  1. If you completed Part A of this tutorial, ensure that project is open in Rocky. (Part B will continue from where Part A left off.)

  2. If you did not complete the project from Part A, do all of the following:

    1. Download the dem_tut21_files.zip file here .

    2. Unzip dem_tut21_files.zip to your working directory.

    3. Open Rocky 2025 R2.


      Important:  To make use of the Rocky project file provided, you must have Rocky 2025 R2 or later. If you have an earlier version of Rocky, please upgrade to the latest version, or complete Part A from scratch.


    4. From the Rocky program, click the Open Project button, find the dem_tut21_files folder, then from the tutorial_21_A_pre-processing folder, open the tutorial_21_A_pre-processing.rocky file.

    5. Process the simulation. (From the Solver entity, click the Start button.)

  • Once the simulation is finished processing, you are ready to start Part B.

21.2.4. PARTICLES COUNT

A simple way to identify if there are any major obstructions somewhere inside the domain is to plot the Particles Count for each output.

  1. From the Particles entity, on the Curves tab, right-click Particles Count, and then click Show curve in new Plot.

 

The time plot shows that between approximately 13s (when the first bottle exits the domain) and 23s (when the last bottle is injected), the amount of particles inside the domain remains stable.

This analysis proves that there is no obstruction preventing the bottles from exiting the domain.

21.2.5. RESIDENCE TIME

The Residence Time of a particle is the amount of time it spends inside the domain.

In a period of continuous operation, all the particles should spend approximately the same amount of time within the domain.

Therefore, the Maximum Residence Time of a given timestep should be stable. Let's verify:

  1. From the Particles entity, on the Properties tab, right-click Residence Time, point to Time Plot, point to Show in selected Time Plot, and then click Max.

 

The maximum Residence Time curve shows that during the continuous operation period, each particle spent around 14s inside the domain.

21.2.6. BOTTLE ORIENTATION

Now we will check if there are any bottles that fall or flip during transport, which is an undesired outcome. We can make use of the particles Y-coordinate to analyze this.


Note:  (a) The bottle Geometric Center (GC) coordinate is (0, 0, 0) (see the image below).

(b) The distance between the bottom of the bottle and the GC is 0.0628m.

(c) The bottle maximum radius is 0.032 m. (As shown)


 

Considering that the Y-coordinate for the particles into the simulation domain is measured from the bottom (as shown below), we can assume that:

  • A fully upright bottle has a Y-coordinate of 0.0628 m.

  • A bottle lying on the rail has a Y-coordinate of 0.032 m.

 

To perform this analysis, do the following:

  1. From the Particles entity, on the Properties tab, right-click Coordinate : Y, point to Time Plot, point to Show in new Time Plot, and then click Min.


    Note:  You may get different results from the ones presented in this tutorial due to the sensibility of this simulation.



    Tip:  If your plot is showing any peak or valley with values with a relevant difference if compared with the initial ones, you can check which bottle(s) fell in the rail at the time that the peak or valley ocurred in a 3D View.


 

The resulting plot shows that the minimum particle Coordinate : Y is approximately the expected value for all outputs, which indicates that all the bottles remained upright.

21.2.7. BOTTLE IMPACT VELOCITY

Another source of possible damage to the bottles is during impact with other bottles or conveyor components.

To measure the amount of impact, we will use the Relative Average Velocity data that is collected during collisions.

The higher the Relative Average Velocity of a collision, the higher the impact energy (and the more likely for damage).

As a reminder, we already enabled the collection of this data in Part A of this tutorial when we turned on the Inter-particle Collision Statistics module and enabled the Normal Impact Velocity component.

To start this analysis, do the following:

  1. From the Particles entity, on the Properties tab, right-click Velocity : Impact : Normal : Mean, point to Time Plot, point to Show in new Time Plot, and then click Max.

  2. To see the exact time in which that impact happens, select the Table tab (as shown).

     

 

The table shows that the maximum velocity impact occurs at 19.65 s.


Note:  Your results may differ from these ones. Select the Time properly.


  1. Identify which bottles have this impact velocity and where it happens by using the information in the table below to create a 3D View window.

    StepItemLocationParameter or ActionSettings
    ATime ToolbarTime19.65 s ⯆
    BParticles | Velocity : Impact : Normal : MeanShow in new 3D View

 

The view shows that the highest impact velocity occurs near the final "S-curve" of the rails, when the bottles are conveyed by the fastest belt.

Besides that collision, if we move the slider to investigate times around this point, we see that most of the highest impact velocities occur near this same location.

21.2.8. CONCLUSION

This completes Part B of this tutorial.

Rocky was used to post-process a simulation of a Bottling Line.

During this tutorial, it was possible to:

  • Use the Particle Count curve to identify different periods of operation and detect a possible major obstruction.

  • Use the Residence Time property to identify if any bottles got stuck during transport.

  • Use the Particle Coordinate : Y property to identify bottles that did not remain fully upright.

  • Use the Inter-particle Collision Statistics we collected in Part A to analyze where and when the highest Impact Velocities occurred.

What's Next? If you completed this tutorial successfully, then you are ready to move on to next tutorial.