Fill out the form to download

Required field
Required field
Not a valid email address
Required field


Tutorial: Compressible CFD Simulation of a Golf Ball

This tutorials shows how a compressible simulation of a golf ball can be created.

golf ball streamlines results
Figure 1: Visualization of the pressure distribution across streamlines that flow around the golf ball.

This tutorial teaches how to:

  • set up and run a compressible simulation
  • assign topological entity sets in SimScale
  • assign boundary conditions, material and other properties to the simulation
  • mesh with the SimScale standard meshing algorithm

We are following the typical SimScale workflow:

  1. Preparing the CAD model for the simulation
  2. Setting up the simulation
  3. Creating the mesh
  4. Run the simulation and analyze the results

1. Prepare the CAD Model and Select the Analysis Type

1.1.Import the CAD Model Into Your Workbench

First of all click the button below. It will copy the tutorial project containing the geometry into your own Workbench.

The following picture demonstrates what should be visible after importing the tutorial project.

import cad workbench
Figure 2: Imported CAD model of the golf ball in the SimScale Workbench

1.2. CAD Mode

The first step for this simulation is the creation of an enclosure. This will be the domain that will be used for the external CFD analysis. To enter the CAD mode click on the following icon:

Figure 3: Clicking on this icon will redirect you to the CAD mode interface.

Select ‘Create flow volume’, at the top right of the page:

top menu of CAD mode containing all the operation options
Figure 4: All of the available features are located at the top of the page.

The ‘External’ option that is listed on the drop down menu is used to create the flow domain around the model:

flow volume options on the CAD Mode external and internal
Figure 5: There are two available options for the flow volume extraction depending on the type of analysis. For external aerodynamics use ‘External’.

Then fill in the dimensions of the domain, like below, where L is the diameter of the golf ball:

enclosure reference length
Figure 6: The size of the domain according to the reference length of the model

In more details, the size of the domain is as following. After you apply the dimensions, click on ‘Seed face’, and proceed to select a face of the ball that is inside the domain:

the sizing and seed face for the enclosure creation around a golf ball
Figure 7: The dimensions and seed face inside the enclosure

After you are done, click ‘Apply‘. Then select the ‘Delete’ feature next to the Body section, to remove the whole solid part:

deleting the solid body from the model so the flow region is the only part used for the incompressible analysis
Figure 8: The ball must also be removed from the model, so only the flow region remains.

Select the solid body from the scene tree on the right and click ‘Apply’:

deleting the ball after selecting it from the geometry tree.
Figure 9: The necessary removal of the solid body using the geometry tree in the CAD mode

When the operation is finished and the ball is removed successfully, click on the ‘Finish’ option at the top right so you get redirected to the Workbench:

finishing with the CAD mode operations and exiting the interface to proceed with the set up
Figure 10: Go back to the Workbench when only the flow region is present, and the space where the solid part was located is now hollow.

When the Workbench loads, another geometry appears, which is the copy created from the original model, after the CAD mode operations. You can delete the initial version:

delete original CAD model after CAD mode edit
Figure 11: Deleting the CAD model can help avoid confusion between different versions.

Then rename the new version as ‘Golf ball’:

rename the new CAD model after CAD Mode
Figure 12: To rename the new version, place your cursor next to the checkmark, until the icon above appears. Then click on it to enter the name.

1.3. Create Topological Entities

Create a topological entity set for the golf ball:

  • Hide the walls of the Enclosure by selecting each one of them on the Workbench, then right-click and choose the ‘Hide selection’ option.
enclosure faces hide selection workbench
Figure 13: Hiding the walls of the domain.
  • Activate the box selection at the top of the page.
  • Drag it across the model until all the faces are selected.
  • Click on the ‘+’ next to the Topological Entity Sets.
  • Name your new set and click on the checkmark.
add topological entity set golf ball
Figure 14: Adding a topological entity set containing all the faces of the golf ball.

1.4. Create the Simulation

After you finish with the topological entity set, proceed to click the ‘Create simulation‘ option to get started.

create simulation around golf ball
Figure 15: Creating a new simulation.

Select the ‘Compressible‘ analysis, which is used for cases where the Mach number in any point of the domain reaches a value bigger than 0.3. This golf ball simulation will be using a high velocity, so the compressible analysis is the best fitting.

compressible fluid flow
Figure 16: The compressible fluid flow analysis type.

Switch the Turbulence model to ‘k-omega SST‘ in the panel that appears:

simulation properties turbulence model k-omega SST
Figure 17: Choosing the k-omega SST turbulence model for the compressible CFD analysis.

2. Assigning the Material and Boundary Conditions

Now we will set up the physics for the simulation.

2.1. Define a Material

In this simulation, we want to analyze the airflow around a solid body. Therefore we need to assign properties to the fluid region. Click on the ‘+’ icon next to the Materials option of the simulation tree on the left of the page, and then choose ‘Air‘ in the panel that pops up, and apply:

air assignment
Figure 18: Material list for a compressible fluid flow analysis.

The flow region that was created due to the Geometry operation at the beginning of the simulation is automatically selected for the material.

material assignment region air
Figure 19: Properties of air for the flow region material assignment.

Just confirm the selection by hitting the check button next to the material’s name. You can also create a custom fluid by changing the properties and the materials name.

2.2. Assign the Boundary Conditions

In order to assign Boundary Conditions on the golf ball, click on the ‘+’ icon next to the Boundary Conditions, and click on the types described in this section.

add boundary condition simulation tree
Figure 20: Adding a boundary condition.

In order to have an overview, the following picture shows the boundary conditions applied for this simulation:

overview boundary conditions compressible simulation of a golf ball
Figure 21: Overview of the boundary conditions for the golf ball.

a. Velocity Inlet

Assign a ‘Velocity Inlet‘ of 59 \(m/s\). This is close to the average Ball Speed an average male golf player achieves[1].

velocity inlet fixed value
Figure 22: Velocity inlet for the airflow around the golf ball.

b. Pressure Outlet

Assign a ‘Pressure Outlet‘ condition of 101325 (Pa) at the highlighted face below:

pressure outlet assignment
Figure 23: Pressure outlet boundary condition.

c. Slip Walls

Add a Slip Wall boundary condition on the top, bottom, and right face of the domain. Leave only the symmetry plane unassigned.

slip walls assignment
Figure 24: Slip walls boundary condition.

d. Symmetry

Assign a Symmetry condition on the symmetry plane. If you want to learn more about this boundary condition, click here.

symmetry condition assignment
Figure 25: Applying a symmetry boundary condition.

e. Rotating Walls

Did you know?

The golf ball rotates like the following photo, so the negative z direction is chosen for the rotation axis, in regards to the coordinate system of the CAD model.
magnus effect of rotation of a ball
Figure 26 : Rotation of a golf ball.
Source: ( [2])

We will define the condition according to the spin rate of an average male golf player. Create a new ‘wall’ boundary condition:

rotating walls assignment golf ball
Figure 27: Applying a rotating walls boundary condition to the ball.
  • Select ‘Rotating wall’ for (U) velocity.
  • Set the Turbulence wall to ‘full resolution’.
  • The spin rate of an average male golf player (rotational velocity) is 343 \(rad \over \ s \) [1].
  • According to the coordinate system, we need to orientate it on the negative z-direction.
  • Assign it to the topological entity set of the golf ball by clicking on it as you can see below:
assign topological entity golf ball
Figure 28: Assigning the boundary condition to the topological entity of the golf ball.

2.3. Simulation Control & Numerics

Fill the simulation control panel in like below:

simulation control properties
Figure 29: Simulation control panel.

Leave the Numerics panel at its’ default state.

3. Mesh

Access the global mesh settings by clicking on ‘mesh’ in the simulation tree:

mesh standard algorithm automatic boundary layers fineness
Figure 30: Mesh properties panel.

Choose the ‘Standard‘ algorithm, and keep the default settings.

3.1. Meshing Refinements

This project needs some refinements. If you want to learn more about using the Standard meshing tool, and using refinements, click on this.

a. Create Geometry Primitives

Prior to adding refinements, you must create some Geometry Primitives sets.

geometrical primitive creation
Figure 31: Creation of a new geometry primitive.
  • Click on the ‘+’icon under the Geometry Primitives at the right of the screen.
  • Choose the ‘Sphere‘ option.
geometrical primitive creation  sphere
Figure 32: Dimensions of the first spherical geometry primitive.
  • Name your entities, and define its’ center and 0.1 (m) radius.

Create a second Sphere with a smaller radius (0.05 (m)):

geometrical primitive creation  sphere
Figure 33: Dimensions of the second spherical geometry primitive.

b. Assign Region Refinements to the Spheres

In order to add refinement regions, click on the under the Mesh:

region refinement new standard mesh
Figure 34 : Adding region refinements.

Add a region refinement to the first sphere:

sphere region refinement settings maximum edge length
Figure 35: Region refinement for the big spherical region.

And one more fine region refinement to the smaller sphere, to create a more dense mesh there:

sphere region refinement settings maximum edge length
Figure 36: Region refinement for the small spherical region.

Watch out!

Do not click on the ‘Generate’ button after you are done with the mesh settings, otherwise the physics of the simulation will not be taken into consideration during the meshing procedure. Instead of generating it at this point, your mesh will be automatically created after you start a new run later on.

4. Start the Simulation

After all the settings are completed, proceed to clicking the ‘+’ icon next to the Simulation Runs, in order to get started with the analysis. Initially, your mesh will be generated, and then the program will go on with the run.

new simulation run simulation tree
Figure 37: Create a new simulation run

While the results are being calculated you can already have a look at the intermediate results in the post-processor.

Did you know?

Your results are being updated in real time! That means that you can already look into the intermediate results during the solver calculates the simulation.

5. Post-Processing

5.1. Convergence Plot

When the simulation is completed, you can check the convergence of the simulation. You can access them under the completed run:

simulation run finished results convergence plot
Figure 38: The results of the simulation can be seen under Convergence plot

The convergence plot indicates whether the solution is reliable, or whether some changes should be made in the settings, like making the mesh finer, or increasing the simulation time. In the following picture you can see how the residuals of your simulations will appear in the plot if you set the end time to 2000 seconds and let it fully converge:

convergence plot variables of golf ball analysis
Figure 39: Convergence plot of the simulation for the involved flow variables

5.2 Surface Visualization

In order to view the results of your golf ball simulation, click on the ‘Solution Fields’ tab under your finished run. This will redirect you to the post-processor.

simulation run finished results solution fields
Figure 40: This time click on the ‘Solution Fields’ under the completed run, so you can access the post-processing environment.

You can use several post-processing filters to further analyze the results. If you wish to see the pressure distribution on your golf ball :

  • Make sure the post-processor shows the results for the final timestep – 2000 \(sec\)-;
  • Go to the Parts Color and choose ‘Pressure’ from the Coloring drop-down menu. When entering the post-processor, the whole model may be colored with this parameter at default. Feel free to change the parameter if you wish;
  • Click on the faces of the enclosure, then right-click on the Workbench, and choose the ‘Hide selection’ option:
select walls and hide them to show pressure distribution on the golf ball
Figure 41: To set the visualization of the pressure distribution across the ball during the final timestep, the walls must be hidden.

Make sure to right-click on the color scale at the bottom of the screen and select the ‘Use continuous scale option’, for smoother transition between color contours:

continuous legend pressure distribution results post processor golf ball
Figure 42: Applying the continuous legend feature on the pressure results in a smoother display of the value distribution on the surface.

This is how the results will appear afterwards if you include the symmetry plane too:

continuous legend pressure distribution on golf ball and symmetry plane
Figure 43: The pressure distribution on the symmetry plane and the golf ball with the use of the continuous scale

It is seen that at the front of the ball, an area of high pressure is created, and a low-pressure region is observed at the back. As the velocity is decelerating when reaching the back of the ball, there is flow separation, resulting in this low-pressure area.

5.3 Streamlines

Finally, for streamline visualization:

  • Click on the ‘Add Filter’ option;
  • Select ‘Particle Trace’.
adding a new filter particle trace
Figure 44: Selecting ‘Particle Trace’ from the Filters panel to add a new set.
  • Click on the circle icon next to the Pick Position;
  • Apply the seed point on the inlet face, as close to the symmetry face and the center of the y-axis as possible;
  • The # Seeds horizontally represents the number of streamline rows along the z-axis. Set it to ‘2’. The # Seeds vertically represents the number of rows along the y-axis. Make sure it is big enough that it covers the whole y dimension of the domain. An input of ‘100′ should be fine for this case;
  • Select ‘Velocity’ as Coloring;
  • For this case, you can have the Trace both directions option disabled, as the flow here travels from the inlet only towards the positive x-direction.
seed point particle tracer post processor golf ball
Figure 45: Setting the particle trace seeds near the symmetry plane so they are created as a slice of horizontally aligned streamlines colored in the velocity values.

With these settings, this is how the streamlines will finally appear:

particle trace filter post processor streamlines around golf ball
Figure 46: The resulting streamlines colored in the velocity values present the flow behavior before, during, and after encountering the object.

In Figure 39, the behavior of the flow can be observed. The decrease in velocity is obvious in the downstream, where low pressure was previously noticed (Figure 36). Towards the end of the domain, the streamlines gradually tend to become parallel again, reaching ambient conditions.

5.4 Animation

Animations can be started by choosing ‘Animation’ from the Filters panel:

adding a new animation as filter
Figure 47: The Filters panel contains an ‘Animation’ option that you must pick.

Click the play button to start the animation. Below is an example of animating the streamlines , colored with the velocity magnitude, during the final timestep:

animation streamlines velocity magnitude
Animation 1: With the streamlines animation, you can monitor the gradual flow behavior around the golf ball.

For more information, have a look at our post-processing guide to learn how to use the post-processor.
Congratulations! You finished the tutorial!


If you have questions or suggestions, please reach out either via the forum or contact us directly.

Last updated: April 22nd, 2021

Data Privacy