# ACU-T: 2400 Supersonic Flow in a Converging-Diverging Nozzle

## Prerequisites

This tutorial provides instructions for modeling a supersonic flow in a converging diverging nozzle using HyperWorks CFD. Prior to starting this tutorial, you should have already run through the introductory tutorial, ACU-T: 1000 Basic Flow Set Up, and have a basic understanding of HyperWorks CFD and AcuSolve. To run this simulation, you will need access to a licensed version of HyperWorks CFD and AcuSolve.

Prior to running through this tutorial, copy HyperWorksCFD_tutorial_inputs.zip from <Altair_installation_directory>\hwcfdsolvers\acusolve\win64\model_files\tutorials\AcuSolve to a local directory. Extract ACU-T2400_CD_Nozzle.hm from HyperWorksCFD_tutorial_inputs.zip.

Note: This tutorial does not cover steps related to geometry cleanup.

## Problem Description

The problem to be addressed in this tutorial is shown schematically in Figure 1. It is based on the popular de Laval or converging-diverging nozzle. It consists of a tube that is pinched in the middle making an axisymmetric hourglass shape. Air at high pressure enters the inlets and the flow accelerates as the area of the nozzle decreases. The flow reaches sonic speed at the throat and becomes chocked. A region of supersonic flow forms just downstream of the throat. Unlike a subsonic flow, the supersonic flow accelerates as the area gets bigger. This region of supersonic acceleration is terminated by a normal shock wave. The shock wave produces a near-instantaneous deceleration of the flow to subsonic speed. This subsonic flow then decelerates through the remainder of the diverging section and exhausts as a subsonic jet.

The exit to throat area ratio of the nozzle is 1.5. The radius at the inlet is 0.892 m, while the radius at the outlet is 0.691 m. The inlet stagnation pressure and the inlet temperature are 123,567 Pa and 309.072 K, respectively. The static pressure at the outlet is set to 101,325 Pa. The fluid in this problem is air, where the flow is assumed inviscid (viscosity and conductivity are zero) and density is based on the ideal gas model.

The problem is rotationally periodic about the longitudinal axis, and it is assumed that the resulting flow is also rotationally periodic, allowing for modeling with the use of a wedge-shaped section. For this tutorial, a 60° section of the geometry is modeled, as shown in the figure. Modeling a portion of a rotationally periodic geometry leads to reduced computation time while still providing an accurate solution.

The AcuSolve simulation will be set up to model a transient supersonic flow where the flow variables reach an asymptotic state to determine the stable flow solution.

## Start HyperWorks CFD and Open the HyperMesh Database

1. Start HyperWorks CFD from the Windows Start menu by clicking Start > Altair <version> > HyperWorks CFD.
2. From the Home tools, Files tool group, click the Open Model tool.
The Open File dialog opens.
3. Browse to the directory where you saved the model file. Select the HyperMesh file ACU-T2400_CD_Nozzle.hm and click Open.
4. Click File > Save As.
5. Create a new directory named CD_Nozzle and navigate into this directory.
This will be the working directory and all the files related to the simulation will be stored in this location.
6. Enter CD_Nozzle as the file name for the database, or choose any name of your preference.
7. Click Save to create the database.

## Validate the Geometry

The Validate tool scans through the entire model, performs checks on the surfaces and solids, and flags any defects in the geometry, such as free edges, closed shells, intersections, duplicates, and slivers.

To focus on the physics part of the simulation, this tutorial input file contains geometry which has already been validated. Observe that a blue check mark appears on the top-left corner of the Validate icon on the Geometry ribbon. This indicates that the geometry is valid, and you can go to the flow set up.

## Set Up Flow

### Define Material Properties

1. From the Flow ribbon, click the Material Library tool.
The Material Library dialog opens.
2. Under Settings, click Ideal Gas, then click the My Material tab.
3. Click to add a new ideal gas model.
4. Keep the default values for the Gas constant and the Specific heat and set the Viscosity and Conductivity values to 0.
5. Rename the model to Air Ideal Inviscid.

### Set Up the Simulation Parameters and Solver Settings

1. From the Flow ribbon, click the Physics tool.
The Setup dialog opens.
2. Under the Physics models setting:
1. Select the Supersonic radio button under Single phase flow.
2. Set the Ideal gas model to Air Ideal Inviscid.
3. Set the Time step size to 0.000125.
4. Set the Final time to 0.3125.
5. Verify that the Turbulence model is set to Laminar.
3. Click the Solver controls setting.
4. Set the Transient update factor to 0.5.
Note: Since we are interested in a solution that reaches a steady state, the transient update factor can be set to a non-zero value without affecting the solution accuracy.
5. Set the Maximum stagger iterations to 5.
6. Close the dialog and save the model.

### Verify the Material Selection

1. From the Flow ribbon, click the Material tool.
2. Verify that the Air Ideal Inviscid material has been assigned to the volume domain.
3. Click on the guide bar.

### Define Flow Boundary Conditions

1. From the Flow ribbon, Pressure tool group, click the Stagnation Pressure tool.
2. Click on the inlet face highlighted in the figure below.
3. In the microdialog, enter the following values for the stagnation pressure and temperature.
4. On the guide bar, click to execute the command and exit the tool.
5. Click the Outlet tool.
6. Select the face highlighted in the figure below, enter the 101325 as the static pressure value, and then click on the guide bar.
7. Click the Slip tool.
8. Select the face highlighted in the figure below and then click on the guide bar.
9. Click the Periodic > Rotation tool.
10. Select the face highlighted below as the Source.
11. Click Target on the guide bar then select the opposite face.
12. Click on the guide bar.

## Generate the Mesh

The meshing parameters for this tutorial are already set in the input file.
1. From the Mesh ribbon, click the Batch tool.
The Meshing Operations dialog opens.
Note: If the model has not been validated, you are prompted to create the simulation model before running the batch mesh.
2. Check that the Average element size is 0.1 and the Mesh growth rate is 1.3.
3. Accept all other default parameters.
4. Click Mesh.
The Run Status dialog opens. Once the run is complete, the status is updated and you can close the dialog.
Tip: Right-click on the mesh job and select View log file to view a summary of the meshing process.

## Run AcuSolve

1. From the Solution ribbon, click the Run tool.
2. Set the Parallel processing option to Intel MPI.
3. Optional: Set the number of processors to 4 or 8 based on availability.
4. Expand Default initial conditions and enter the values as shown below.
5. Leave the remaining options as default and click Run to launch AcuSolve.
The Run Status dialog opens. Once the run is complete, the status is updated and you can close the dialog.
Tip: While AcuSolve is running, right-click on the AcuSolve job in the Run Status dialog and select View Log File to monitor the solution process.

## Post-Process the Results with HW-CFD Post

In this step, you will check the contours of pressure on a mid slice plane.

1. Once the solution is completed, navigate to the Post ribbon.
2. From the menu bar, click File > Open > Results.
3. Select the AcuSolve log file in your problem directory to load the results for post-processing.
The solid and all the surfaces are loaded in the Post Browser.
4. Move the animation slider to the end to load the last time step data.
5. Click the Slice Planes tool.
6. Select the x-y plane in the modeling window.
7. In the slice plane microdialog, click to create the slice plane.
8. In the display properties microdialog, set the display to pressure and activate the Legend toggle.
9. Click and set the Legend location to Upper Center, the Legend Orientation to Horizontal, and the Colormap name to Rainbow Uniform.
10. Click on the guide bar.
11. In the Post Browser, hide the Flow Boundaries surfaces to display the pressure contours on the slice plane.
Similarly, you can display the Mach number contour.