# Drag coefficient of a sphere - CFD analysis

The drag coefficient of a sphere is calculated using a CFD analysis. The flow around the sphere detaches forming a rear wake which contributes to the high levels of the sphere drag coefficient, typically around 0.2 to 0.5:

The sphere drag coefficient is affected by the Reynolds number, as the Reynolds number increases the separation region behind the sphere becomes smaller reducing the overall drag coefficient. The sphere drag coefficient  also shows a dip when the flow becomes fully turbulent at around Re 10.000 (see picture below):

In this tutorial the Re value will be around 30.000, but since we are going to carry out a K-Omega RANS simulation the flow will be fully turbulent so we expect the sphere drag coefficient to be slightly underpredicted.

## What is the drag coefficient?

The drag coefficient is an adimensional number which defines the air resistance for a given shape. It is defined as the drag force (Fd) divided by dynamic pressure (which is 1/2 air density multiplied for the square of the speed v) and multiplied by the reference area A of the shape:

\begin{gather} Cd =\frac{Fd}{\frac{1}{2}\rho v^{2} A} \end{gather}

Using the drag coefficient makes it possible to calculate the actual drag force for any given speed or air density. Also it is a useful tool to compare the performance of objects with different shapes.

## Setting up a CFD simulation

In the following tutorial we will assess a sphere drag coefficient in a CFD simulation using out free CFD software Simworks. The sphere size is 78 mm, which is equivalent to a baseball ball.

The first step is to download SimWorks, which is completely free and unrestricted and does not require to provide your registration details, and install it following our installation guide.

Before starting the tutorial simply download SimWorks if you have not already and the tutorial geometry, it is free and there is no requirement for registration:

## Create a new simulation

The first step after opening SimWorks is to create a new project, a new geometry and a new simulation if you have not already done any of those steps:

1. Click on Create new project
2. Click on Create new geometry
3. Click on Create new simulation

To load up the geometry in SimWorks complete the following steps:

1. Browse geometry icon → select the baseball_ball.igs file
2. Select mm as the Geometry units
3. Load the geometry → select the baseball_ball.igs file
4. Rename the simulation to sphere in the popup which will appear

## Define the boundary conditions

We will now define the outer domain (OD) dimensions and position and the boundary conditions on its faces

1. Define the OD dimensions as 800 400 200 and the OD position as 100 0 0 as we want to simulate properly the fully developed sphere wake
2. From the Layering menu in the Geometry viewer select the Boundary conditions type menu

3. Define on front face a boundary condition type Velocity Normal of 5 m/s

4. On the right face a boundary condition Pressure Outlet with value 0 Pa

Since we are going to assess the sphere drag coefficient it is important to correctly specify the reference values for velocity and dimensions:

1. The Reference velocity should be 5 m/s which is the same speed we defined for the Outer domain inlet
2. The reference length and area should be 0.076 m (sphere diameter) and 0.004534 m2 (sphere frontal area)
3. Make sure that the drag direction is 1 0 0 which means that the drag is aligned with the X axis

## Mesh parameters

In the Mesh tab in the Simulation editor window we can now define all the mesh parameters for the sphere simulation. The point in mesh defines which portion of space has to be meshed, its size is purely defined for visual purposes.We will also define 3 prism layers on the sphere surface which are very important to correctly simulate the boundary layer and correctly assess the overall sphere drag coefficient. To correctly capture the sphere wake we also need to refine the mesh behind the sphere. To do that we will add a refinement box which is a region where the mesh density is increased with respect to the base cell size.

1. Define the Base size of the mesh as 10 mm
2. The point in mesh defines which portion of the space is to be meshed, so define the Point in mesh (position) as -100 0 0 and its Radius as 5 mm
3. Surface level and Edge level define the number of refinements next to the surface so the value of 4 means a local refinement of 24 = 16, so a local cell size of 10/16=0.625 mm next to the sphere surface
4. The First cell height of 0.5 mm and the Number of layers of 3 with an Expansion ratio of 1.2 will define 3 prism layers on the sphere surface 0.5mm, 0.6mm and 0.72mm high respectively
1. On the Simulation editor window click on the Add refinement box icon
2. Type 2 for the nex refinement box level and define the dimensions as 300 140 140 and the position as 100 0 0

## Output parameters

In the Output tab in the Simulation editor window it is possible to specify what we want to output for the sphere simulation. We will need more planes in the X direction to assess the development of the wake behind the sphere

1. Select the Output tab in the Simulation editor window
2. Define 20 planes in X from X -100 mm to X 400 mm
3. Define for both Y and Z 10 planes from -100 mm to 100 mm1

## Run setup and Mesh phases

We will complete the Run setup to write all the simulation parameters just defined and complete the Mesh phase to visualise the results of the mesh parameters defined in the previous point paragraph. Optionally define the Numbers of processes as 8 in the Simulation editor window to run the example in parallel.

1. Complete the Run setup phase
2. Run mesh
3. The live data window will automatically appear showing the live feed from of the mesher
4. Finally the mesh progress bar will be 100% complete, right click on it → select Fields → Load to visualise the mesh

## Mesh quality assessment

From the Fields window it is possible to scroll through the planes in any direction and assess the mesh quality and dimensions.

1. Expand the side menu in the Fields window and select the Selection tab
2. Select the sections (planes) normal to X and Y and leave the Z one unthicked
3. Select X and scroll the planes with the lower arrows until the central plane is displayed, to reset the view in case the part it too zoomed in simply press ‘r’ from the keyboard. Repeat the process with the Y plane, you should now see the sphere in the middle and the central planes in X and Y around it.

Zoom in a bit more around the sphere and we can notice that the mesh is much finer next to the sphere as we specified in the mesh parameters above. In particular:

1. 3 prism layers have been successfully added with the parameters specified in the mesh param
2. Since the sphere CAD had a central line in the middle of the sphere this central symmetry plane has been further refined with clearly smaller mesh cells in the area
3. The mesh transitions from one refinement level to the next leaving 2 cells every time, this can be changed with the Cells between levels value in the Mesh tab in the Simulation editor window
4. The limit of the refinement box defined previously are now evident

## Run the simulation

Now it is time to run the simulation and analyse the postpro, depending on the machine if we run it on 4 processors the simulation is completed in 300 iterations (both parameters available in the Setup tab in the Simulation editor window)

1. Click on the Run simulation icon in the Simulation manager window
2. The Live data window will be populated with the solver feedback and the simulation residuals and forces. The progress bar will be updated with the simulation progress, when it reaches 100% the simulation is complete
3. Once completed as already done to check the mesh right click on the progress bar and select Fields → Load, this way the mesh visualisation will be overwritten with the actual CFD simulation results

## Analyse the results

From the Field viewer window it is possible to analyse the wake behind the sphere

1. Trigger the Show/Hide edges to hide all the cell edges and have a smooth view, important to note that the planes in this case are fully triangulated to improve the results calculation, so comparing this with the mesh visualisation the edges represent the actual cell size but with additional splitting
2. Select only the Y plane in the center of the sphere as already done in the Mesh analysis phase
3. Select the U as displayed variable and set the range to 0 min and 10 max
4. The flow slows down in front of the sphere
5. And accelerates around the sphere
6. Finally it separates from the sphere surface defining the sphere wake which is the area of low velocity, sluggish flow behind the sphereF

To analyse the effect of the wake on the overall flow energy it is useful to analyse the Cp0 which is defined as the sum of the static and the dynamic pressure. When it is around 1 the flow energy is maximum, for example at the inlet of our example, when it is 0 the flow is fully separated, and this is the example of the sphere wake.

1. Select Cp0 in the Variable tab and define the range from 0 to 1
2. Select the Line tool from the window menu
3. Select 2 points vertically on the sphere wake you can see that even a few distances downstream of the sphere the flow energy is less than the freestream value having lost roughly 35% of energy in the middle of the wake.

## Calculate the sphere drag coefficient from the CFD simulation

1. From the Simulation editor window right click on the simulation results and select Plots → Load
2. The Live plots console shows that the final drag value is 0.37
3. The Cd plot in the Plots window is showing that the Cd value has fully converged without showing big oscillations

## Conclusions - sphere drag coefficient and flow features

This is an example of a steady simulation using a K-Omega RANS turbulence model. As the level of turbulence is in this case generally overpredicted the flow tends to stay attached for longer to the sphere surface generally leading to a reduced wake and therefore a lower drag coefficient with respect to experimental results.

The Reynolds number of our simulation is 25000. Here you can find two interesting pictures from The Album of Fluid Motions by Milton Van Dyke [1] of a sphere with full turbulent flow at 30.000 Re:

Both the images above show a good flow structure agreement with the results of the simulation.

## Resources

[1] Drag on a sphere – Nasa

[2] An Album of Fluid Motion – Milton Van Dyke – 1982

Try the free version of SimWorks or contact us to find out more