Required field
Required field
Required field
Required field

# Tutorial: Compressible CFD Simulation of a Golf Ball

In this tutorial, a compressible aerodynamic simulation of a golf ball is performed.

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. Prepare the CAD model for the simulation
2. Set up the simulation
3. Create the mesh
4. Run the simulation and analyze the results

Attention!

This tutorial performs simulation with the Compressible analysis type which is only accessible to users with a Professional plan and those who are already on the Community plan. New Community users or those recently downgraded to the Community plan will not longer be able to perform this tutorial. See our pricing page to request additional features.

## 1. Prepare the CAD Model and Select the Analysis Type

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.

The first step for this simulation is the creation of a flow region volume. This will be the domain used for the external CFD analysis. To enter the CAD mode, click the ‘Edit in CAD mode’ button as shown in the picture:

Select ‘Create – Flow volume’, from the top bar:

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

Then, fill in the dimensions of the domain like shown below. Here, L represents the diameter of the golf ball:

In more details, the dimensions of the domain are as follows. Notice that only half of the domain is included, to leverage the symmetry of the model and save con computational resources. After you apply the dimensions, click on ‘Seed face’, and proceed to select a face of the ball that is inside the domain:

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

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

When the operation is finished and the ball is removed, click on the ‘Export’ button at the top right so the edits are saved and imported into the Workbench:

When the Workbench loads, another geometry will appear. It corresponds to the updated copy of the original model, after the CAD mode operations. You can delete the initial version:

Then, rename the new version as ‘Golf ball’:

### 1.3. Create Topological Entities

Create a topological entity set for the golf ball surface:

• Hide the walls of the flow volume by selecting each one of them (6 in total) from the 3D viewer, then right-click, then choose the ‘Hide selection’ option from the drop-down menu.
• 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 ‘Ball’ and click the ‘Create new set’ button.

### 1.4. Create the Simulation

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

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.

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

## 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 panel, then choose ‘Air‘ in Material pop up, and finally Apply:

The flow region that was created in the CAD mode at the beginning of the tutorial is automatically selected for the material, because it is the only one present.

Just confirm the selection by hitting the check button at the top of the panel. You can also create a custom fluid by changing the parameters and giving it a proper name.

### 2.2. Assign the Boundary Conditions

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

The following picture shows an overview of the boundary conditions used in this simulation:

a. Velocity Inlet

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

b. Pressure Outlet

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

c. Slip Walls

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

d. Symmetry

e. Rotating Walls

Did you know?

The golf ball rotates like the in following figure, thus the negative z direction is chosen for the rotation axis.

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

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

### 2.3. Simulation Control & Numerics

Fill the simulation control panel parameters like below:

Under Numerics, please make sure that the Relaxation type is set to ‘Automatic’:

## 3. Mesh

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

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

### 3.1. Meshing Refinements

This project needs some mesh refinements in the region around the golf ball. 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.

• Click on the ‘+’icon under the Geometry Primitives in the GEOMETRY panel, at the right.
• Choose the ‘Sphere‘ option.
• Name your entity, and define its’ center and 0.1 (m) radius.

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

b. Assign Region Refinements to the Spheres

In order to add mesh refinement regions, click on ‘+’ icon next to Refinements under Mesh:

Add a region refinement to the first sphere:

And a second, finer region refinement to the smaller sphere, to create a denser mesh:

Watch out!

Do not click on the ‘Generate’ button after you are done with the mesh settings. Instead of generating the mesh at this point, it will be automatically created after you start the simulation 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 computation. Initially, your mesh will be generated, and then the platform will go on with the run.

While the computation is running, you can 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 while the solver computes the final solution.

## 5. Post-Processing

### 5.1. Convergence Plot

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

The convergence plot indicates whether the solution is reliable, or whether some changes should be made in the settings. For example, making the mesh finer, or increasing the simulation time. In the following picture you can see how the convergence of the residuals of your simulations will appear in the plot:

### 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 online graphical post-processor.

You can use several post-processing filters to further analyze the results. For instance, 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;
• Delete the default Cutting Plane filter with the trash-can icon, if any.
• Click on the faces of the flow region, then right-click on the Workbench, and choose the ‘Hide selection’ option:

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:

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

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 separating, resulting in this low-pressure area.

### 5.3 Streamlines

Finally, for streamline visualization, select ‘Particle Trace’ from the top bar:

• Click on the circle icon next to 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 Magnitude’ as Coloring;
• For this case, you can optionally have the Trace both directions option disabled, as the flow here travels from the inlet only towards the positive x-direction.

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

In Figure 46, the behavior of the flow can be observed. The decrease in velocity is obvious in the downstream, where low pressure was previously noticed (Figure 43). 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:

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

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

Note

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

In this tutorial, a compressible aerodynamic simulation of a golf ball is performed.

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. Prepare the CAD model for the simulation
2. Set up the simulation
3. Create the mesh
4. Run the simulation and analyze the results

Attention!

This tutorial performs simulation with the Compressible analysis type which is only accessible to users with a Professional plan and those who are already on the Community plan. New Community users or those recently downgraded to the Community plan will not longer be able to perform this tutorial. See our pricing page to request additional features.

## 1. Prepare the CAD Model and Select the Analysis Type

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.

The first step for this simulation is the creation of a flow region volume. This will be the domain used for the external CFD analysis. To enter the CAD mode, click the ‘Edit in CAD mode’ button as shown in the picture:

Select ‘Create – Flow volume’, from the top bar:

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

Then, fill in the dimensions of the domain like shown below. Here, L represents the diameter of the golf ball:

In more details, the dimensions of the domain are as follows. Notice that only half of the domain is included, to leverage the symmetry of the model and save con computational resources. After you apply the dimensions, click on ‘Seed face’, and proceed to select a face of the ball that is inside the domain:

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

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

When the operation is finished and the ball is removed, click on the ‘Export’ button at the top right so the edits are saved and imported into the Workbench:

When the Workbench loads, another geometry will appear. It corresponds to the updated copy of the original model, after the CAD mode operations. You can delete the initial version:

Then, rename the new version as ‘Golf ball’:

### 1.3. Create Topological Entities

Create a topological entity set for the golf ball surface:

• Hide the walls of the flow volume by selecting each one of them (6 in total) from the 3D viewer, then right-click, then choose the ‘Hide selection’ option from the drop-down menu.
• 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 ‘Ball’ and click the ‘Create new set’ button.

### 1.4. Create the Simulation

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

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.

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

## 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 panel, then choose ‘Air‘ in Material pop up, and finally Apply:

The flow region that was created in the CAD mode at the beginning of the tutorial is automatically selected for the material, because it is the only one present.

Just confirm the selection by hitting the check button at the top of the panel. You can also create a custom fluid by changing the parameters and giving it a proper name.

### 2.2. Assign the Boundary Conditions

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

The following picture shows an overview of the boundary conditions used in this simulation:

a. Velocity Inlet

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

b. Pressure Outlet

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

c. Slip Walls

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

d. Symmetry

e. Rotating Walls

Did you know?

The golf ball rotates like the in following figure, thus the negative z direction is chosen for the rotation axis.

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

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

### 2.3. Simulation Control & Numerics

Fill the simulation control panel parameters like below:

Keep the settings under Numerics as default:

## 3. Mesh

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

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

### 3.1. Meshing Refinements

This project needs some mesh refinements in the region around the golf ball. 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.

• Click on the ‘+’icon under the Geometry Primitives in the GEOMETRY panel, at the right.
• Choose the ‘Sphere‘ option.
• Name your entity, and define its’ center and 0.1 (m) radius.

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

b. Assign Region Refinements to the Spheres

In order to add mesh refinement regions, click on ‘+’ icon next to Refinements under Mesh:

Add a region refinement to the first sphere:

And a second, finer region refinement to the smaller sphere, to create a denser mesh:

Watch out!

Do not click on the ‘Generate’ button after you are done with the mesh settings. Instead of generating the mesh at this point, it will be automatically created after you start the simulation 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 computation. Initially, your mesh will be generated, and then the platform will go on with the run.

While the computation is running, you can 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 while the solver computes the final solution.

## 5. Post-Processing

### 5.1. Convergence Plot

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

The convergence plot indicates whether the solution is reliable, or whether some changes should be made in the settings. For example, making the mesh finer, or increasing the simulation time. In the following picture you can see how the convergence of the residuals of your simulations will appear in the plot:

### 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 online graphical post-processor.

You can use several post-processing filters to further analyze the results. For instance, 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;
• Delete the default Cutting Plane filter with the trash-can icon, if any.
• Click on the faces of the flow region, then right-click on the Workbench, and choose the ‘Hide selection’ option:

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:

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

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 separating, resulting in this low-pressure area.

### 5.3 Streamlines

Finally, for streamline visualization, select ‘Particle Trace’ from the top bar:

• Click on the circle icon next to 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 Magnitude’ as Coloring;
• For this case, you can optionally have the Trace both directions option disabled, as the flow here travels from the inlet only towards the positive x-direction.

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

In Figure 46, the behavior of the flow can be observed. The decrease in velocity is obvious in the downstream, where low pressure was previously noticed (Figure 43). 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:

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

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

Note

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

Last updated: November 25th, 2021