Steady inviscid flow over a cylindrical bump using the compressible Euler equations. The flow at the inlet is supersonic with Ma = 1.4 resulting in a series of reflected shock waves as the flow hits the obstacle [1].
Tutorial
This model is available as an automated tutorial by selecting Model Examples and Tutorials... > Fluid Dynamics > Supersonic Flow over an Obstacle from the File menu. Or alternatively, follow the step-by-step instructions below. Note that the CFDTool interface differ slightly from the FEATool Multiphysics instructions described in the following.
- To start a new model click the New Model toolbar button, or select New Model... from the File menu.
- Select the Euler Equations physics mode from the Select Physics drop-down menu. (Note that for CFDTool the physics selection is done in the Equation settings dialog box.)
- Press OK to finish the physics mode selection.
- To create a rectangle, first click on the Create square/rectangle Toolbar button. Then left click in the main plot axes window, and hold down the mouse button. Move the mouse pointer to draw the shape outline, and release the button to finalize the shape.
- Select R1 in the geometry object Selection list box.
- To modify and edit the selected rectangle, click on the Inspect/edit selected geometry object Toolbar button to open the Edit Geometry Object dialog box.
- Enter
-1
into the xmin edit field.
- Enter
4
into the xmax edit field.
- Enter
0
into the ymin edit field.
- Enter
2
into the ymax edit field.
- Press OK to finish and close the dialog box.
- To create a circle or ellipse, first click on the Create circle/ellipse Toolbar button. Then left click in the main plot axes window, and hold down the mouse button. Move the mouse pointer to draw the shape outline, and release the button to finalize the shape.
- Select E1 in the geometry object Selection list box.
- To modify and edit the selected ellipse, click on the Inspect/edit selected geometry object Toolbar button to open the Edit Geometry Object dialog box.
- Enter
0.5 0.042-(0.5^2/0.042+0.042)/2
into the center edit field.
- Enter
(0.5^2/0.042+0.042)/2
into the xradius edit field.
- Enter
(0.5^2/0.042+0.042)/2
into the yradius edit field.
- Press OK to finish and close the dialog box.
- Select R1 and E1 in the geometry object Selection list box.
- Select Combine Objects... from the Geometry menu.
- Enter
R1 - E1
into the Geometry Formula edit field.
- Press OK to finish and close the dialog box.
- Switch to Grid mode by clicking on the corresponding Mode Toolbar button.
- Enter
0.05
into the Grid Size edit field.
- Press the Generate button to call the grid generation algorithm.
- Switch to Equation mode by clicking on the corresponding Mode Toolbar button. (Note that the Equation Settings dialog box may look different for CFDTool.)
- Enter
rho0
into the Initial condition for rho edit field.
- Enter
u0
into the Initial condition for u edit field.
- Enter
v0
into the Initial condition for v edit field.
- Enter
p0
into the Initial condition for p edit field.
- Press OK to finish the equation and subdomain settings specification.
- Press the Constants Toolbar button, or select the corresponding entry from the Equation menu, to open the Model Constants and Expressions dialog box. Enter the following expressions for the fluid parameters, and inlet velocity.
Name | Expression |
Ma | 1.4 |
rho0 | 1 |
p0 | 1 |
u0 | Ma*sqrt(1.4*p0/rho0) |
v0 | 0 |
- Switch to Boundary mode by clicking on the corresponding Mode Toolbar button.
- Select 4 in the Boundaries list box.
- Select Inlet/outlet from the Euler Equations drop-down menu.
- Enter
rho0
into the Density edit field.
- Enter
u0
into the Velocity in x-direction edit field.
- Enter
v0
into the Velocity in y-direction edit field.
- Enter
p0
into the Pressure edit field.
- Select 2 in the Boundaries list box.
- Select Neutral/no stress boundary/outlet from the Euler Equations drop-down menu.
- Press OK to finish the boundary condition specification.
- Switch to Solve mode by clicking on the corresponding Mode Toolbar button.
- Now that the problem has been defined, press the Solve Mode Toolbar button to switch to solve mode, and press the Settings button to open the Solver Settings dialog box.
- Press the Settings Toolbar button.
- In the Non-Linear Solver Settings section of the Solver Settings dialog box increase the Maximum non-linear iterations to
50
, and decrease the Non-linear relaxation parameter to 0.9
, to allow for the non-linear problem to converge.
- To start the solver with the chosen settings press the Solve button, or press OK and then the = Toolbar button.
After the problem has been solved FEATool will automatically switch to postprocessing mode and here display the magnitude of the computed velocity field where the shock pattern can easily be seen. Plot the mach number and verify that the minimum and maximum span between Ma = 1 and 1.8.
- Press the Plot Options Toolbar button.
- Select Mach number from the Predefined surface plot expressions drop-down menu.
- Press OK to plot and visualize the selected postprocessing options.
The supersonic flow over an obstacle fluid dynamics model has now been completed and can be saved as a binary (.fea) model file, or exported as a programmable MATLAB m-script text file (available as the example ex_compressibleeuler4 script file), or GUI script (.fes) file.
Reference
[1] Lynn JF, van Leer B, Lee D. Multigrid solution of the euler equations with local preconditioning. In Fifteenth International Conference on Numerical Methods in Fluid Dynamics, Lecture Notes in Physics, vol 490, Springer, 1997.