# ACU-T: 2100 Turbulent Flow Over an Airfoil Using the SST Turbulence Model

This tutorial provides the instructions for setting up and using the SST and K-Omega turbulence models in AcuSolve. The application that is investigated is the flow over a NACA0012 airfoil at an angle of attack of 5 degrees. AcuSolve is used to extract the lift and drag forces on the airfoil. This tutorial is designed to introduce you to the modeling concepts necessary to perform external aerodynamic simulations using the SST and K-Omega turbulence models.

- Use of the SST and/or K-Omega turbulence models
- Use of the farfield boundary condition type
- Use of the Variable Manager to store variables and expressions
- Entry of expressions into the panel area.

## Prerequisites

You should have already run through the introductory tutorial, ACU-T: 2000 Turbulent Flow in a Mixing Elbow. It is assumed that you have some familiarity with AcuConsole, AcuSolve, and AcuFieldView. You will also need access to a licensed version of AcuSolve.

Prior to running through this tutorial, copy AcuConsole_tutorial_inputs.zip from <Altair_installation_directory>\hwcfdsolvers\acusolve\win64\model_files\tutorials\AcuSolve to a local directory. Extract NACA0012.x_t from AcuConsole_tutorial_inputs.zip.

## Analyze the Problem

An important first step in any CFD simulation is to examine the engineering problem to be analyzed and determine the settings that need to be provided to AcuSolve. Settings can be based on geometrical components (such as volumes, inlets, outlets, or walls) and on flow conditions (such as fluid properties, velocity, or whether the flow should be modeled as turbulent or as laminar).

The problem to be addressed in this tutorial is shown schematically in the figure below. It consists of a cylindrical bounding region containing air that flows past a NACA0012 airfoil profile. The simulation is performed as 2D by including only a single layer of extruded elements in the airfoil span direction. The velocity vector at the far field boundary of the domain is specified to yield an angle of attack of 5 degrees and a Reynolds Number of 1.0e6. The airfoil chord is 1 meter, and standard air material properties are used for the simulation.

The diameter of the cylindrical bounding volume for the airfoil is set to 500 times the airfoil chord. This large bounding volume is selected to ensure that the farfield boundaries are sufficiently far from the airfoil to prevent any influence of blockage of the domain on the solution.

The initial simulation of this airfoil will be considered fully turbulent and use the SST turbulence model. These simulation conditions correspond to a scenario where the boundary layer on the leading edge of the airfoil is tripped with some type of roughness elements to produce a fully turbulent boundary layer over the length of the airfoil.

## Define the Simulation Parameters

### Start AcuConsole and Create the Simulation Database

In this tutorial, you will begin by creating a database and loading some predefined variables, populating the geometry-independent settings, loading the geometry, creating groups, setting group attributes, adding geometry components to groups and assigning mesh controls and boundary conditions to the groups. Next you will generate a mesh and run AcuSolve to converge on a steady state solution. Finally, you will review the results using AcuFieldView and AcuProbe.

In the next steps you will start AcuConsole, create the database for storage of AcuConsole settings and set the location for saving mesh and solution information for AcuSolve.

### Define Expressions and Variables Using the Variable Manager

In this step, you will use the Variable Manager in AcuConsole to create a list of expressions that will be used during the model setup process.

The Variable Manager is a useful utility that allows you to define variables and expressions that can later be referenced as inputs to the various settings used throughout the process of building your model. When a model is constructed in terms of variables, it is very easy to update the entire model with a simple change of a single parameter from the Variable Manager. This process will be illustrated in this tutorial.

Name | Expression |
---|---|

volumeFlowRate | =2*2 |

Name | Expression |
---|---|

inletArea | 2.0 |

averageVelocity | 2.0 |

volumeFlowRate | :=inletArea*averageVelocity |

Using this syntax, the formula for volumeFlowRate is stored in the database and will automatically update whenever the inletArea or averageVelocity are updated. Any variables that are defined in the Variable Manager can be referenced when specifying an integer or floating point value in the panels area. The same expression syntax can be used.

### Set General Simulation Parameters

In the next steps you will set parameters that apply globally to the simulation. To simplify this task, you will use the BAS filter in the Data Tree Manager. The BAS filter limits the options in the Data Tree to show only the basic settings.

The general attributes that you will set for this tutorial are for turbulent flow, and steady state time analysis.

### Set Solution Strategy Parameters

In the next steps you will set the parameters that control the behavior of AcuSolve as it progresses during the transient solution.

### Set Material Model Parameters

In the next steps you will modify the pre-defined material properties of air using an expression that was created in the Variable Manager.

## Import the Geometry and Define the Model

### Import Airfoil Geometry

### Create a Volume Group and Apply Volume Parameters

Volume groups are containers used for storing information about volumes. This information includes the list of geometric volumes associated with the container, as well as parameters such as material models and mesh sizing information.

When the geometry was imported into AcuConsole, all volumes were placed into the default volume container.

In the next steps you will rename the default group to Fluid, set the material for that group and add the volume from the geometry to that volume group.

### Create Surface Groups and Apply Surface Parameters

Surface groups are containers used for storing information about a surface. This information includes the list of geometric surfaces associated with the container, as well as parameters such as boundary conditions, surface outputs and mesh sizing information.

In the next steps you will define surface groups, assign the appropriate parameters for each group in the problem and add surfaces to the groups.

#### Set Farfield Boundary Conditions

In the next steps you will define a surface group for the farfield boundary, set the inlet velocity and add the corresponding surface from the geometry to this group.

#### Set Remaining Boundary Conditions

In the next steps you will define surface groups for slip and wall boundaries.

### Define Nodal Initial Conditions

In the next steps you will define the nodal initial conditions.

For the SST and K-Omega turbulence models, you need to enter the initial values for Kinetic energy and Eddy frequency. If you have a reasonable estimate of these values, you can enter them directly in the fields. One option is to use the same values that are assigned at the inlet boundary. In the absence of good estimates for the initial conditions, it is also possible to let AcuSolve perform an automatic initialization of the turbulence variables. By leaving these values set to zero, AcuSolve will trigger an automatic initialization of these variables.

## Assign Mesh Controls

### Set Global Meshing Parameters

Now that the simulation has been defined, parameters need to be added to define the mesh sizes that will be created by the mesher.

- Global mesh controls apply to the whole model without being tied to any geometric component of the model.
- Zone mesh controls apply to a defined region of the model, but are not associated with a particular geometric component.
- Geometric mesh controls are applied to a specific geometric component. These controls can be applied to volume groups, surface groups or edge groups.

### Set Mesh Process Parameters

- Locally reduce the number of layers in the boundary layer stack to maintain high quality boundary layer elements.
- Locally reduce the height of the boundary layer stack, but keep the total number of layers constant. Using this approach, the height of each layer is scaled by a constant factor to reduce the total height of the stack and avoid the creation of the poor quality boundary layer elements.

### Set Surface Mesh Parameters

The surface mesh size on the airfoil is controlled through a combination of the mesh size set on the perimeter edges of the airfoil and the mesh size applied directly to the surface. In this tutorial you will also use the region of influence option of the surface mesh to create a refined mesh at a specified distance from the airfoil surface.

### Set Edge Mesh Parameters

To create an optimum mesh on the surface of the airfoil, it is necessary to have high levels of refinement near the leading and trailing edges and a large element size near the mid chord. Since the surface mesh size was set to constant to serve as the size that is propagated into the volume for the region of influence refinement, you will use an edge mesh parameter to control the placement of nodes along the airfoil surface. To accomplish this, you will first need to create an edge group that contains the perimeter edges of the airfoil.

### Set Mesh Extrusion Parameters

The final step in the setup of the meshing for the airfoil is the creation of a mesh extrusion attribute. This extrusion will be defined such that a single element is created across the span of the airfoil.

### Generate the Mesh

In the next steps you will generate the mesh that will be used when computing a solution for the problem.

## Compute the Solution and Review the Results

### Run AcuSolve and Examine the .log File

In the next steps, you will launch AcuSolve to compute the solution for this case.

### Monitor the Solution with AcuProbe

While AcuSolve is running, you can monitor the kinetic energy using AcuProbe.

### Start AcuFieldView

### Display Square Root of the Eddy Period

In the next steps you will create a boundary surface to display contours of a new
variable, called the square root of the eddy period. When solving for the SST and
k-omega turbulence models, AcuSolve introduces three new
variables to the output; `kinetic_energy` (k),
`eddy_frequency `(ω) and `sqrt_eddy_per `($\frac{1}{\sqrt{\omega}}$ ). The `sqrt_eddy_per` variable is useful for visualizing
the turbulent time scale since the `eddy_frequency` variable has
such a large range of values, it is often times easier to visualize
`sqrt_eddy_per`.

These steps are provided with the assumption that you are able to manipulate the view in AcuFieldView. If you are unfamiliar with basic AcuFieldView operations, refer to Manipulate the Model View in AcuFieldView.

### Post-Process to Calculate Flow Coefficients

AcuSolve is shipped with a number of utility scripts to facilitate the pre and post-processing of a problem solved using the solver. You will be introduced to two of these scripts, AcuLiftDrag and AcuGetCpCf in this section, and their usage. These two scripts are focused on aerodynamic simulations as the ones solved in this tutorial.

#### Run AcuLiftDrag

AcuLiftDrag is a utility script used to calculate the lift and drag coefficients for an airfoil.

In the Analyze the Problem section, it was described that the simulation is performed as 2D by including only a single layer of extruded elements in the airfoil span direction. When solving a problem in such a way, the span of the airfoil should be set equal to the thickness of the domain in the extrusion direction. When solving a 3D problem, the actual span of the airfoil should be used.

To execute the AcuLiftDrag script for this position, follow the steps below:

#### Run AcuGetCpCf

AcuGetCpCf is another utility script used to calculate the pressure coefficient (Cp) for the airfoil.

To execute the AcuGetCpCf script for this problem, follow the steps below:

### Change the Angle of Attack and Compute the Solution

Because this database was set up using variables and expressions, it is easy to
re-run the simulation again using a different angle of attack. To accomplish this,
open the Variable Manager, and set “alpha” to
`0.0`. Because the xVelocity and yVelocity variables that
were defined for the initial and boundary conditions are a function of this
parameter, the database will automatically be updated to reflect the new settings.
You can simply write the input again and run the solver to obtain a different angle
of attack solution.