Chapter 20: Tutorial - Fertilizer Spreader

(Part A) Set up and run a simulation that uses the 1-Way Constant CFD Coupling method.

(Part B) Use multiple, nested user processes to create a Cumulative Mass Field in order to understand how the fertilizer particles are distributed by the spreader.

20.1. Part A: Project Setup and Processing

20.1.1. OBJECTIVES

The main purpose of this tutorial is to learn how to set up a simulation that uses the 1-Way Constant CFD Coupling method.

  • The scenario considered is evaluating the performance of a crop spreader, such as those used for broadcasting seed or fertilizer onto fields.

You will learn how to:

  • Define a rotation motion

  • Set up CFD Coupling using the 1-Way Constant method

  • Set custom domain limits

And you will use these features:

  • Motion Frames

  • CFD Coupling

  • Domain Settings

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


20.1.3. GEOMETRY

 

The geometries in this tutorial are composed of:

  • (1) Spreader

  • (2) Walls

In the tutorial directory, the .stl files can be found.


Note:   Due to the relatively high particle count expected for this tutorial, no geometry representing the ground will be included.

This allows us to speed up processing by reducing the amount of particles that remain active in the simulation while still allowing us to see the full spreading effects.


20.1.4. PROJECT CREATION

To get started with this tutorial, do the following:

  1. Download the dem_tut20_files.zip file here .

  2. Unzip dem_tut20_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 tables that follow 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 to find the detailed instructions you need.


    StepData EntityEditors LocationParameter or ActionSettings
    AStudy <01>StudyStudy NameSpreader
    BGeometriesImport WallSpreader.stl and Wall.stl with "m" for Import Unit
    Create Rectangular Surface
    CGeometries

    Rectangular Surface <01>

    Rectangular SurfaceCenter Coordinates-0.11, 0.15, 0 [m]
    Length0.05 [m]
    Width0.04 [m]
    DMotion FramesCreate Motion Frame
    EMotion Frames

    Frame <01>

    FrameNameRotation Motion
    Add motion
    Motions | TypeRotation ⯆
    … | Initial Angular Velocity0, 810, 0 [rev/min]
    FGeometries

    Spreader

    WallMotion FrameRotation Motion ⯆
    GMaterials

    Default Boundary

    MaterialYoung's Modulus1e+08 [N/m2]
    HMaterials

    Default Particles

    MaterialUse Bulk Density(Cleared)
    Density1000 [kg/m3]
    Young's Modulus1e+06 [N/m2]
    IParticlesCreate Particle
    JParticles

    Particle <01>

    ParticleName3mm
    Size0.003 [m] @ 100%
    KParticlesCreate Particle
    LParticles

    Particle <01>

    ParticleName4mm
    Size0.004 [m] @ 100%
    MInlets and OutletsCreate Particle Inlet
    NInlets and Outlets

    Particle Inlet <01>

    Particle InletEntry PointRectangular Surface <01> ⯆
    Particle Inlet | ParticlesAdd row (x2)
    (1) Particle | Mass Flow Rate3mm ⯆ 0.6 [t/h]
    (2) Particle | Mass Flow Rate4mm ⯆ 1.2 [t/h]

20.1.5. CFD COUPLING - 1-WAY CONSTANT

For this tutorial, we want the particles to be spread over the domain in the presence of still (non-moving) air.

In this case, the particles will experience air resistance when launched.

The images below show how important is to consider air resistance in this scenario.

A simulation without air resistance results in particles spreading much farther than when air resistance is considered in the project.

 

To represent this behavior, we will make use the 1-Way Constant CFD coupling method, which has the following key benefits:

  • Useful in cases where you have a known, unchanging fluid field.

  • Does not require a separate CFD program. (The functionality is included in Rocky.)

  • Enables you to define constant values for density, velocity, viscosity and (optional) thermal properties.

Define this coupling method by doing the following:

  1. From Study, click Enable CFD Coupling and select 1-Way Constant (Fluid > Particle) from the Coupling Mode list (as shown).

     

  2. From the Data panel, select the newly created 1-Way Constant item.

  3. From the Interactions tab, select the 3mm item from the Particle list (as shown).

     

    The CFD Laws that can be set for the selected particle group will appear.

    For this tutorial, the CFD Laws for both particle groups will be left as they were set by default. (No changes.)

  4. Select the Fluid Flow tab.

     

    Since we want to simulate still air and the default values already represent this condition, no changes will be made.

20.1.6. CONTINUE PROJECT SETUP

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

    StepData EntityEditors LocationParameter or ActionSettings
    ADomain SettingsDomain SettingsUse Boundary Limits(Cleared)
    Min Values-3,-1, -1 [m]
    Max Values7, 1, 9 [m]
    BSolverSolver | TimeSimulation Duration2 [s]
    Solver | GeneralOutput Settings | Time Interval0.005 [s]
    Simulation TargetCPU ⯆

20.1.7. SETUP CONFIRMATION

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

 

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


20.1.9. CONCLUSION

This completes Part A of this tutorial, during which Rocky was used to set up and process a Fertilizer Spreader simulation.

During this tutorial, it was possible to:

  • Use Motion Frames to set up a rotation motion.

  • Set up the 1-Way Constant method of CFD Coupling.

  • Define custom Domain Settings limits.

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

20.2. Part B: Post-Processing

20.2.1. OBJECTIVES

The main purpose of this tutorial is to learn how to use multiple, nested user processes to understand how the fertilizer particles are distributed by the spreader we simulated earlier in Part A.

  • Part B will continue from where Part A left off.

You will learn how to:

  • Layer multiple, nested User Processes to achieve a specific result.

  • Create a custom property for Eulerian Statistics.

And you will use these features:

  • User Processes, including:

    • Cube

    • Filter

    • Particles Time Selection

    • Eulerian Time Statistics

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


20.2.3. OPEN PROJECT

  1. If you completed Part A of this tutorial, ensure that project is open in Rocky. The 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_tut20_files.zip file here .

    2. Unzip dem_tut20_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 Rocky to the latest version, or complete Part A from scratch.


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

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

20.2.4. POST PROCESSING - CUMULATIVE MASS FIELD

Once the simulation finishes processing, you are ready to start Part B.

  • In this tutorial, we want to understand how the Fertilizer Spreader distributes the particle mass throughout the domain.

  • To do that, we will create a Cumulative Mass Field to see how different regions of the domain receive different amounts of particle mass.

To evaluate the performance of the spreader, it is useful to measure the fertilizer distribution across the entire crop area.

The Cumulative Mass Field that results from the spreader operating at steady-state as simulated in this tutorial can be used to extrapolate the mass distribution across the entire crop field.

 

To accomplish the cumulative mass field, we will need to layer different User Processes on top of each other.

We will make use of four User Processes to do this:

  • (1) Particles Time Selection

  • (2) Cube (on top of Particles Time Selection)

  • (3) Eulerian Statistics (on top of Cube)

  • (4) Filter (on top of Eulerian Statistics)

20.2.5. POST PROCESSING - PERIOD SELECTION

But before we create our first layer, we need to choose a period of time for the analysis. Specifically:

  • We will choose a period of time in which the system is in a steady-state.

  • In other words, the amount of particles being injected is approximately the same amount of particles leaving the domain.

We can obtain that information by plotting the Particles Count and then selecting a period of time in which the curve is stable.

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

  2. Press the Shift key while left-clicking the top of the Curve to see the values (as shown).

     

We can see that steady-state is reached after about 0.7 (s).

We now know that for our analysis, we want to select a time period after this point.

20.2.6. LAYER 1 - PARTICLES TIME SELECTION

We want to analyze how the particles would be distributed on the ground.

However, to speed up the processing time in Part A, we did not include a geometry representing the ground; therefore, the particles in this tutorial leave the domain soon after they fall far enough in the Y direction.

In a case like this, a good approach is to analyze the mass distribution in a layer right before the particles leave the domain.

To accomplish this, we will define a Particles Time Selection, which in this case, will record the last position of every particle that passed inside the domain within a particular time range.


Note:  A Particles Time Selection can also be applied to a particular region, such as a Cube or Cylinder.


Furthermore, the particles that left the domain due to the absence of a ground geometry will be recorded very close to the bottom of the domain. This is similar to where the particles would be if they were actually on the ground.

20.2.7. LAYER 1 - PARTICLES TIME SELECTION

Now, we are going to select all the particles that passed through the domain during the 1s to 2s period. (Based upon earlier measurements, we know this is during steady state.)

  1. Use the information in the table below to create the first layer of this analysis.

    StepData EntityEditors LocationParameter or ActionSettings
    AParticlesCreate a Particle Times Selection User Processes
    BUser Processes

    Particles Time Selection <01>

    Time SelectionDomain RangeTime Range ⯆
    Initial1 [s]
    Final2 [s]

  2. Open a 3D View by pressing Ctrl+D.

    • By default, particles are displayed in Automatic/Rich mode, which displays the fully-rendered particles at their original size.

    • At this domain view, the particles are much too small to see, so we will change to Simple mode, which will render the particles as fixed-sized points instead.

    • We will also reduce the size of the points in the view for better visibility.

  3. From the Data Editors panel, select the Coloring tab, and then do both of the following (as shown):

    1. Ensure Visible is enabled.

    2. From the Level of Detail list, select Simple.

    3. Under Nodes, define the Point size as 2.

       

The 3D View now shows all the particles that passed through the domain from 1s to 2s.

Each particle was recorded in its last position either just prior to its leaving the domain or wherever it was at the last timestep, including any particles that were still traveling through the air at that time.

 

20.2.8. LAYER 2 - CUBE

We want to generate a Mass Field to analyze the distribution of particles on the ground. Thus, we must exclude the particles that were still traveling through the air during the last time step.

Therefore, we are going to create a Cube user process over Particles Time Selection <01> to select only the layer of particles closest to the ground.

  1. Use the information in the table below to create the second layer of this analysis.

    StepData EntityEditors LocationParameter or ActionSettings
    AUser Processes

    Particles Time Selection <01>

    Create a Cube User Process
    BUser Processes

    Cube <01>

    CubeCenter2, -0.95, 4 [m]
    Magnitude20, 0.1, 20 [m]
    ColoringLevel of DetailSimple ⯆
    Nodes | Point Size2 [ - ]

  2. From the Data panel, hide Particles Time Selection <01> from the view.

The 3D View now shows the particles of the Particles Time Selection <01> that are next to the ground, inside the Cube <01>.

 

20.2.9. LAYER 3 - EULERIAN STATISTICS

In order to generate a Mass Field from these selected particles, we need to create a Eulerian Statistics User Process over the Cube we just created.

  1. Use the information in the table below to create the third layer in this analysis.

    StepData EntityEditors LocationParameter or ActionSettings
    AUser Processes

    Cube <01>

    Create a Eulerian Statistics User Process
    BUser Processes

    Eulerian Statistics <01>

    Eulerian StatisticsWidth Divisions20 [ - ]
    Heigth Divisions1 [ - ]
    Depth Divisions20 [ - ]

Next, to compute the particle mass in each Eulerian Statistics cell, we must add a new property, derived from Particles.

  1. Use the information in the table below to continue with this analysis.

    StepItemLocationParameter or ActionSettings
    AUser Processes

    Eulerian Statistics <01>

    PropertiesAdd and edit properties for source entity (button)
    BAdd or edit eulerian properties (dialog box)Add property (button)
    CAdd new property (dialog box)OperationSum ⯆
    Particle PropertyParticle Mass ⯆
    Add property (button)

  2. From the Data Editors panel, on the Properties tab, drag-and-drop the newly created Sum of Particle Mass onto the 3D View.


Tip:  You may need to use the eye icons on the Data panel to hide the other User Processes.


 

20.2.10. LAYER 4 - FILTER

Now we will filter the resulting Cumulative Mass Field to show only where the particle mass is above a specific value.

To achieve that, we are going to apply a Filter User Process over the Eulerian Statistics.

  1. Use the information in the table below to create the fourth layer in this analysis.

    StepData EntityEditors LocationParameter or ActionSettings
    AUser Processes

    Eulerian Statistics <01>

    Create a Filter User Process
    BUser Processes

    Filter <01>

    FilterPropertySum of Particle Mass ⯆
    ModeCut ⯆
    TypeRange ⯆
    Minimum Value0.001 [kg]
    Maximum Value1 [kg]

  1. From the Filter <01> entity, select the Properties tab, select Sum of Particle Mass, and then drag-and-drop it onto the 3D View. (Results shown.)


    Tip:  Hide Eulerian Statistics <01> by using its Data panel eye icon.


     

We can then smooth out the faces visualization of the property by enabling Show on Node option.

  1. From the Data Editors panel, select the Coloring tab, enable the Show on Node? checkbox, and then clear the Edges checkbox.

 

20.2.11. CUMULATIVE MASS FIELD - EXTENSIONS

Instead of simulating distribution across the entire crop field, which might require running costly simulations using millions of particles, simulating a steady-state field like we have done in this tutorial can be used to reduce computational time.

Additional analyses can be achieved in the following ways:

  • Superpose this same field along several points of the trajectory to generate the mass distribution across the entire crop field.

  • Use the PrePost Scripting functionality to extract the values of each cell and then develop a Python script that computes the trajectory and superposed computations.

20.2.12. CONCLUSIONS

This completes Part B of this tutorial, which makes use of Rocky to analyze how a Fertilizer Spreader distributes particles throughout the domain.

During this tutorial, it was possible to:

  • Layer multiple User Processes to achieve a specific result.

  • Create a custom property for Eulerian Statistics.

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