# 8.5. Drag Prediction of Common Research Model#

## 8.5.1. Introduction#

The purpose of this case study is to compute the turbulent flow past NASA’s Common Research Model (CRM) (a transonic wing-body-tail model) from the 4th AIAA CFD Drag Prediction Workshop. The goal of the workshop is to assess the state-of-the-art computational methods as practical aerodynamic tools for aircraft force and moment prediction of industry relevant geometries. The workshop allows comparisons to be made between different solvers and equation sets, and for performance and accuracy to be assessed.

In this case study, we will use mesh created in Pointwise and run it through the Flow360 CFD solver developed by Flexcompute Inc. We will demonstrate how to upload a mesh, run a case and view results. Performance of results from Flow360 will be compared with flow solutions from FUN3D, which were presented at the 4th AIAA CFD Drag Prediction Workshop (DPW-4).

## 8.5.2. Problem Description#

The problem considers the flow around the CRM at a freestream Mach number of 0.85 ($$M_{\infty} = 0.85$$) to achieve a target lift coefficient of 0.5 (CL= 0.5). The geometry of the CRM with a wing-body-tail configuration can be downloaded from here, and is shown in Fig. 8.5.1. The aircraft has a mirror symmetry. Summary of the geometric parameters is given below.

• Mean aerodynamic chord (MAC) = 275.8 in, located at y=468.75 in.

• Wing semi-span (b/2) = 1156.75 in.

• Reference area of the semi-span model = Sref/2 = 297,360.0 in2.

• Moment reference center (MRC): x = 1325.90 in, y = 468.75 in, z = 177.95 in.

• Aspect Ratio (AR) = b2/Sref = 9.0.

And the corresponding flow conditions are:

• Freestream Mach Number, $$M_{\infty} = 0.85$$.

• Target Lift Coefficient, CL= 0.5.

• Tail Incidence angle = 0°.

• Reynolds Number (based on MAC) = 5 Million.

• Reference Temperature = 310.93 K.

## 8.5.3. Mesh#

Grids were developed using Pointwise. Flow360 supports mesh file formats in ugrid, cgns, and their .gz or .bz2 compressions. For the purpose of this case study a cgns mesh file format and a medium-resolution mesh, with mixed hexahedral, tetrahedral, prism, and pyramid elements and with about 11.3M nodes was used.

## 8.5.4. Setup and Solution#

### 8.5.4.1. Upload the Mesh File#

The first thing you need to do is to upload the mesh file and the mesh configuration file to Flow360 cloud. These files can be obtained from here:

We will do this step-by-step using the Python API. Open your Python interpreter and import the Flow360 client, json module and read the configuration of mesh.

python3
import flow360client
import json



Now upload the mesh using the following command:

meshId = flow360client.NewMesh(fname='/path/to/dpw4.cgns',
meshJson=meshJson,
meshName='DPW4_medium',
tags=[]
)


Replace the file paths in meshJson and NewMesh with your own file paths. Mesh name and tags are optional. Executing this command will return a meshId, which can be used in the next step to run the case.

### 8.5.4.2. Run the Case#

To run a case, first download the the configuration file, named Flow360.json, of the CFD solver from here. This file has been configured to run for this medium-resolution mesh. If you decide to run a case with another mesh or flow condition, the configuration parameters need to be adjusted accordingly. A detailed description of the configuration parameters can be found in our API Reference section. The case can be submitted using the following command:

caseId = flow360client.NewCase(meshId=meshId,
config='/output/path/for/Flow360.json',
caseName='DPW4_case',
tags=[]
)


Replace the file path in config with your own. You could provide a caseName, which is “Flow360” by default. The tags are optional.

flow360client.case.DownloadSolverOut(caseId, fileName='path/to/log')


The second argument fileName is optional, its default value is ‘solver.out’.

The surface data (surface distributions and slices) and the entire flow field can be downloaded, respectively, using:

flow360client.case.DownloadSurfaceResults(caseId, fileName='path/to/surfaceSol')


The second argument fileName is optional, its default value is “volumes.tar.gz” for volume solution and “surfaces.tar.gz” for surface/slice solution.

The residuals history and total forces can be downloaded, respectively, using the following commands:

flow360client.case.GetCaseResidual(caseId)
flow360client.case.GetCaseTotalForces(caseId)


Finally, you can download the surface forces by their component names using the following commands:

flow360client.case.GetCaseSurfaceForcesByNames(caseId, <list of boundaryNames>)


Replace the caseId with your own case’s ID and <list of boundaryNames> with names of the boundaries. There is a script to download all of the above stuff by: python3 downloadAll.py caseId.

## 8.5.5. Grid Convergence#

The grid convergence of the chosen mesh in this case study has been done by comparing the angles of attack, coefficients of total drag, pressure drag, skin friction drag and pitching moment obtained from Flow360 with solutions presented by FUN3D at the Drag Prediction Workshop. This grid convergence is presented in Fig. 8.5.3, and the number of nodes and cells for a coarse, medium and fine grids are presented in Table 8.5.1.

Table 8.5.1 Mesh Statistics for different grid sizes#

# of Nodes

# of Cells

Coarse

5.5 M

10.2 M

Medium

11.3 M

18.7 M

Fine

43 M

84.4 M

## 8.5.6. Results#

The results data obtained from the previous step can be post-processed in either ParaView or Tecplot. You may specify your preference in the Flow360.json configuration file under the outputFormat argument. The coefficients of skin friction (Cf) and pressure (Cp) can be viewed on our Web UI under the visualization tab.

Fig. 8.5.4 shows the contour plots of coefficient of skin friction

Fig. 8.5.5 shows contour plots of coefficient of pressure

Fig. 8.5.6 shows the Q-criterion plot, colored by Mach number. The threshold for Q-criterion for this case is 1.35e-7, which can be calculated using:

(8.5.1)#$Q_{threshold} = (\frac{Freestream\ Mach\ Number}{Wing\ Span})^2 = (\frac{M_{\infty}}{b})^2$

## 8.5.7. Summary#

This tutorial demonstrated how to set up, solve and present results of an external aerodynamics flow over NASA’s Common Research Model (CRM) from the Drag Prediction Workshop using Flow360’s Python API. The Angle of Attack, CD, CD,p, CD,vis, and CMy data for a target CL of 0.5 obtained through Flow360 has been compared with the FUN3D solutions presented at the 4th Drag Prediction Workshop for accuracy.