# Oblique Shock - CFD Simulation

Source: https://help.sim-flow.com/tutorials/oblique-shock
Last updated: 2026-10-14

[Video](https://help.sim-flow.com/tutorials/images/oblique-shock.mp4)

## 1. Introduction

In this tutorial, you will learn how to perform a 2D analysis of a supersonic flow past a 15-degree inclined wedge in a tunnel. It uses a density-based solver (Rho Central), and as a result, you will obtain plots similar to Schlieren photography presenting the shock wave.

## 2. Download SimFlow

SimFlow is a general-purpose [CFD Software](https://sim-flow.com/download/cfd-simulation-software/)

To follow this tutorial, you will need the SimFlow free version. You may download it via the following link:
[Download SimFlow](https://sim-flow.com/download-simflow/)

## 3. Create Case

Open SimFlow and create a new case named *oblique shock*

1. Click **New**
2. Provide name `oblique shock`
3. Click **Create** to open a new case

![simflow-launcher](https://help.sim-flow.com/tutorials/images/launcher-oblique_shock.png)

## 4. Import Geometry

Firstly, we need to [Download GeometryOblique_shock](https://help.sim-flow.com/tutorials/downloads/oblique-shock/oblique_shock.stl) and save it to the hard drive. Then:

1. Click **Import Geometry**
2. Select already downloaded geometry file *oblique_shock.stl*
3. Click **Open**

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-02-import-geometry.png)

## 5. Imported Geometry Units

The STL format does not contain the unit information which is defined during the geometry export. If we do not know the exported unit, we can estimate it based on the total size of the model. It is displayed next to the *Geometry size* label. In our case, the default unit meter is correct.

1. To confirm default unit *meter*, press **OK**

![os 2 unit](https://help.sim-flow.com/tutorials/images/oblique-shock/os-2-unit.png)

## 6. Geometry

After import, the tunnel geometry will be displayed in the graphics window.

1. Click **Fit View** to zoom the geometry

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-03-geometry.png)

## 7. Creating Face Group - Inlet

We are dealing with an internal flow problem. The imported geometry determines the bounds of the fluid domain. To inform the program where different boundaries should be created, we will create appropriate face groups.

1. Select the inlet face by holding `CTRL` key and clicking on the geometry face in a 3D view. The selection should be marked in red
2. Click on the *Face Group* button in the graphics context toolbar
3. Press `Esc` key to clear the selection

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-04-geometry-inlet.png)

## 8. Creating Face Group - Outlet

Rotate the view in a way you will be able to see the second end of the tunnel.

1. Select the outlet face by holding `CTRL` key and clicking on the geometry face
2. Click on the *Face Group* button in the graphics context toolbar
3. Press `Esc` key to clear the selection

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-05-geometry-outlet.png)

## 9. Creating Face Group - Top

Now, select the top face of the tunnel.

1. Select the top face by holding `CTRL` key and clicking on the geometry face
2. Click on the *Face Group* button in the graphics context toolbar

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-06-geometry-top.png)

## 10. Rename Face Groups

In the *Geometry Panel* , under the *oblique_shock* geometry, we can find four face groups. The first group, named *default* , contains all non-selected surfaces. These surfaces will form the bottom walls of the tunnel. The next two groups represent the inlet and outlet of the fluid domain, respectively. The last one represents the top wall of the tunnel. We will rename these groups to make the resulting boundary names more readable.

1. Select *oblique_shock* geometry
2. Expand *Geometry Faces*
3. Change face group names accordingly (double-click on its name and start editing)
   *group_1* \(\rightarrow\) `inlet`
   *group_2* \(\rightarrow\) `outlet`
   *group_3* \(\rightarrow\) `top`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-07-geometry-name.png)

## 11. Meshing Parameters - Geometry

When the geometry is ready, we can move to the meshing step. We will define the boundary layer on the bottom and top wall of the tunnel.

1. Go to *Hex Meshing* panel
2. Select the *oblique_shock* component
3. Enable *Mesh Geometry*
4. Enable *Create Boundary Layer Mesh*
5. Mark *top* face group to be inflated with a boundary layer

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-08-hex-meshing.png)

## 12. Base Mesh - Domain

In order to create a 2D mesh, we will use a *Plate* base mesh type.

1. Go to *Base* tab
2. Select *Plate* as a *Base Mesh Type*
3. Click on **Autosize**
4. Define the number of divisions
   *Division*`320``100`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-09-base-mesh.png)

## 13. Solid Mesh - Material Point

Material Point tells the meshing algorithm on which side of the geometry the mesh is to be retained. Since we are considering flow inside the tunnel, we need to place the material point inside the geometry.

1. Go to *Point* tab
2. Specify location inside the tunnel
   *Material Point*`0``0.6``0`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-10-material-point.png)

## 14. Start Meshing

Everything is now ready for meshing.

1. Switch to *Mesh* tab
2. Start the meshing process with **Mesh** button

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-11-meshing.png)

## 15. Mesh

After the meshing process is finished, the mesh should appear on the screen.

1. Set the XY orientation *View XY*
2. Click *Fit View*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-12-mesh.png)

## 16. Boundaries

To be able to assign inlet and outlet boundary conditions, we have to adjust the mesh boundary types.

1. Define boundary types accordingly
   *empty* *Empty*
   *oblique_shock* *Wall*
   *oblique_shock_inlet* *Patch*
   *oblique_shock_outlet* *Patch*
   *oblique_shock_top* *Wall*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-13-boundaries.png)

## 17. Simulation Type

We want to analyze high-speed compressible flow inside the tunnel. For this purpose, we will use a single-phase, supersonic, density-based simulation to capture shock waves.

![Simulation Panel](https://help.sim-flow.com/assets/images/go-to-simulation-panel@2x.png)

![Step 1](https://help.sim-flow.com/assets/images/solvers-selection/rhoCentralFoam/01_single_phase@2x.png)

![Step 2](https://help.sim-flow.com/assets/images/solvers-selection/rhoCentralFoam/02_supersonic@2x.png)

![Step 3](https://help.sim-flow.com/assets/images/solvers-selection/rhoCentralFoam/03_density-based@2x.png)

![Step 4](https://help.sim-flow.com/assets/images/solvers-selection/rhoCentralFoam/04_apply@2x.png)

## 18. Parameters - Velocity

SimFlow allows users to create parameters that can be used instead of numbers. This allows you to easily change a single property without the need to edit all inputs where a given property is used. In this tutorial, we will create a velocity parameter equal to 3 times the speed of sound. The speed of sound for \(0^{\circ}C \; (273.15K)\) is \(331.5\; m/s\). To compute its value for a temperature of 300K, we will use the following formula:
\(c_{air}=331.5 \cdot \sqrt{300/273.15}\)

1. Go to *Parameters* panel
2. Define the new parameter name and formula and press `Enter`
   *Name*`u`
   *Formula*`3*331.5*sqrt(300/273.15)`
3. The newly created parameter will be shown in the parameters list.

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-15-u-param.png)

## 19. Boundary Conditions - Inlet - Flow

Now, we will define the inlet and outlet boundary conditions. At the inlet, we will set constant fluid velocity using parameter *u* .

1. Go to *Boundary Conditions* panel
2. Select *oblique_shock_inlet* boundary
3. Set the *Velocity Inlet* character
4. Set the inlet velocity
   *U* *Reference Value \({\sf [m/s]}\)*`u`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-16-bc-inlet.png)

## 20. Boundary Conditions - Inlet - Thermal

1. Switch to *Thermal* tab
2. Set constant temperature at the inlet
   *T* *Type* *Fixed Value*
   *T* *Value \({\sf [K]}\)*`300`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-17-bc-inlet-therm.png)

## 21. Boundary Conditions - Outlet

At the outlet, we are going to apply the *Wave Transmissive* boundary condition. This type allows the pressure waves to freely escape the domain and prevents reflecting them from the outlet boundary.

1. Select *oblique_shock_outlet*
2. Set the pressure type
   *p* *Type* *Wave Transmissive*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-18-bc-outlet.png)

## 22. Monitors – Sampling

During calculation, we can observe intermediate results on a section plane. To add sampling data on a plane, we need to define the plane and also select fields that will be sampled. Note that runtime postprocessing can only be defined before starting calculations and cannot be changed later on.

1. Go to *Monitors* panel
2. Switch to *Sampling* tab
3. Select *Create Slice*
4. Expand *Fields* list
5. Select pressure *p* , velocity *U* and Temperature *T*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-19-monitors-slice.png)

## 23. Run - Time Control

For any simulation, it is very convenient to let the solver automatically determine the proper time step value. To use this option, we need to define time step constraints by providing the initial time step (adjusted by the solver during computations), maximal time step value and the Courant number.

1. Go to *RUN* panel
2. Set the *Simulation Time [s]* to `0.1`
3. Change *Time Stepping* to *Automatic*
4. Set initial time step, maximum time step and the Courant number accordingly
   *Initial \(\Delta t\) \({\sf [s]}\)*`1e-05`
   (solver will start computation with this value and adjust it in the next iterations)
   *Max \(\Delta t\) \({\sf [s]}\)*`1e-04`
   *Max Co \({\sf [-]}\)*`0.5`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-20-time-control.png)

## 24. Run - Output

We can control how often results should be saved on the hard drive. Only this data will be available for postprocessing.

1. Switch to *Output* tab
2. Set the *Interval [s]* to `1e-03`

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-21-output.png)

## 25. Run - CPU

To speed up the calculation process, take advantage of parallel computing and increase the number of CPUs based on your PC’s capability. The free version allows you to use only one processor (serial mode). To get the full version, you can use the contact form to [Request 30-day Trial](https://license.sim-flow.com/trial)

Estimated computation time for serial mode: 30 minutes

1. Switch to *CPU* tab
2. Click **Run Simulation** button

![run cpu serial](https://help.sim-flow.com/tutorials/images/run-cpu-serial.png)

## 26. Residuals

When the calculation is finished, you should see a similar residual plot.

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-23-residuals.png)

## 27. Slice - Velocity Field

During computation, the *Slices* tab will appear next to the *Residuals*. Under this tab, we can preview results on the section plane.

1. Change tab to *Slices*
2. Select the pressure *p*
3. Click *Adjust range to data*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-24-results.png)

## 28. Calculate Mach Number

The Mach number is not being computed by default during solver computations. In order to visualize it, we will compute the Mach number using the existing data.

1. Go to *Calculate* panel
2. Set the *Time Range* to *Full Time Range*
3. Set the *Field* to *Mach Number*
4. Click on **Calculate**

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-25-mach-number.png)

## 29. Postprocessing - ParaView

Start ParaView to visualize the shock wave.

1. Go to *POSTPROCESSING* panel
2. Click on **Run ParaView**

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-26-postprocessing-paraview.png)

## 30. ParaView - Load Results

Load the results into the program.

1. Select *oblique_shock*
2. Uncheck *Skip Zero Time*
3. Click **Apply** to load results into ParaView
4. Click **Refresh**
5. Select Mach number *Ma* from the list

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-27-pv-load-results.png)

## 31. ParaView - Mach Number

The Mach number contour plot will be displayed in the graphics window.

1. Play with animation buttons to track the flow history

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-28-pv-results-mach.png)

## 32. ParaView - Pressure Gradient (I)

In order to see shock waves more clearly, we will display gradients of pressure p which will indicate the discontinuity region.

1. While holding the `Ctrl` key push the `Spacebar`
2. Start typing *Gradient of Unstructured DataSet* and press `Enter` to select this command

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-29-pv-gradient.png)

## 33. ParaView - Pressure Gradient (II)

Now we will display the magnitude of the pressure gradient in the 3D view. We can adjust the coloring scheme to see the shock waves more clearly.

1. Click **Apply** to display Pressure Gradient
2. Select *Gradients* from the Coloring list
3. Click *Choose preset*

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-30-pv-gradient2.png)

## 34. ParaView - Coloring

We would like to have similar plots to the [*Schlieren photography*](https://en.wikipedia.org/wiki/Schlieren_photography) which is often used in experiments to visualize density variation. For this purpose, we will use the *X Ray* preset.

1. Select *X Ray* preset.
2. **Apply** changes
3. **Close** window

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-31-pv-gradient3.png)

## 35. ParaView - Shock Wave - Results

Shock waves can be identified at the locations of the largest pressure gradient, which corresponds to the dark color in the image. The shock wave angle depends on the wedge angle and Mach number.
In our case, the shock wave angle equals 31 degrees and is very close to the theoretical value. The analytical solution of this problem is well known and, for instance, it can be found in:
Anderson J. Modern Compressible Flow: With Historical Perspective. McGraw-Hill Series in Aeronautical and Aerospace Engineering. McGraw-Hill, 2004. ISBN 9780071241366

![image](https://help.sim-flow.com/tutorials/images/oblique-shock/os-32-pv-results-grad.png)

## 36. Advanced Postprocessing with ParaView

This concludes the tutorial, covering all the aspects we intended to showcase. For a finely tuned presentation of the results, you may take advantage of the more advanced features.

In ParaView, you can display streamlines, contour plots, vector fields, line or time plots, calculate volume or surface integrals and create animations.

To familiarize yourself with the ParaView capabilities, it’s worth checking out our video tutorial, *Paraview CFD Tutorial - Advanced Postprocessing in ParaView*, in which we demonstrate some of the most commonly used postprocessing techniques.

[Paraview CFD Tutorial - Advanced Postprocessing in ParaView](https://www.youtube.com/watch?v=5M6VgXyHB60&list=PLy7xPqn9xXckoD2gZgPpv8mrxillJ9PWU&index=21)
