Euler Bump 3d
Euler Bump 3d
2a
This model is licensed under the COMSOL Software License Agreement 5.2a.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
This example models 3D supersonic flow, including the effect of shocks, in a straight
channel with a small obstacle on one of the walls. As the flow hits the obstacle, shock waves
are diffracted from the obstacle and the channel walls. The propagating shock waves form
a pattern in the velocity profile and density distribution. The model makes use of the
adaptive mesh refinement feature in COMSOL Multiphysics. This feature is important as
the shock waves should be well resolved by the mesh, but predetermination of their
position is very difficult. This example is based on a 2D case that has been widely used in
earlier studies of inviscid compressible flow (Ref. 1).
Model Definition
The flow is compressible and inviscid, and the problem is governed by the compressible
Euler equations without external forces or heat sources:
∂ρ
------ + ∇ ⋅ ( ρu ) = 0
∂t
∂ ( ρu ) T
--------------- + ∇ ⋅ ( ρuu ) + ∇p = 0
∂t
∂ ( ρE 0 )
------------------ + ∇ ⋅ ( ( ρE 0 + p )u ) = 0
∂t
where ρ is the density, u the velocity vector, p the pressure, and ρE0 the total energy per
unit volume. The perfect gas assumption is used to close the system of 5 variables:
p = ( γ – 1 ) ρE 0 – --- ρ u
1 2
2
where γ is the ratio of specific heats. The speed of sound, denoted c, is calculated as
p
c = γ ---
ρ
u
M = -------
c
Figure 1 shows the geometry of the channel. The length of the channel is 5 m, the height
2 m and it has a thickness of 0.5 m. The bump is a circular arc with a chord of 1 m and a
thickness of 4.2% of the chord, which forms an angle of 30° with respect to the inlet
surface.
Outlet
Inlet
Walls
Disturbance
This example is solved using the High Mach Number Flow, Laminar interface in
COMSOL Multiphysics. This interface does not solve the compressible Euler equations,
but the compressible Navier-Stokes equations. In order to model an inviscid and
non-conducting compressible fluid, the dynamic viscosity and thermal conductivities must
be equal or close to zero. The adaptive mesh refinement feature is used to refine the mesh
near the shocks.
Inlet Condition
The flow at the inlet is supersonic with a flow speed corresponding to a Mach number of
1.4. The inlet flow condition is specified in terms of static properties, where the static
pressure is defined as 1 atm and the static temperature is 273.15 K.
Outlet Condition
The flow at the outlet is supersonic, and no constraints are imposed. The outlet condition
is modeled using an Outlet node with the Flow condition set to Supersonic.
The flow is inviscid and the walls must be modeled as slip walls:
u⋅n = 0
Another interesting plot, Figure 4, is the mesh obtained after refinement. It is clearly
shown that the adaptive mesh feature is able to resolve the zones of the domain where the
gradients in Mach number are large.
The linear system of equations for the initial mesh can be solved with a direct solver.
However, when the mesh is refined, the number of degrees of freedom of the problem
increases and the problem becomes more expensive to solve. An iterative solver is a good
option to reduce the computational resources needed to solve the problem.
Reference
1. J.F. Lynn, Multigrid Solution of the Euler Equations with Local Preconditioning,
Dissertation, University of Michigan, 1995.
Modeling Instructions
From the File menu, choose New.
NEW
In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select Physics tree, select Fluid Flow>High Mach Number Flow>High Mach Number
Flow, Laminar (hmnf).
3 Click Add.
4 Click Study.
5 In the Select Study tree, select Preset Studies>Stationary.
6 Click Done.
Parameters
On the Home toolbar, click Parameters.
GLOBAL DEFINITIONS
Parameters
1 In the Settings window for Parameters, locate the Parameters section.
2 In the table, enter the following settings:
GEOMETRY 1
First, build the rectangular channel.
Block 1 (blk1)
1 On the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Width text field, type 5.
4 In the Depth text field, type 0.5.
5 In the Height text field, type 2.
6 Locate the Position section. In the x text field, type -1.
Now, build a cylinder that will be used to create the obstacle.
Plane Geometry
In the Model Builder window, under Component 1 (comp1)>Geometry 1>Work Plane 1 (wp1)
click Plane Geometry.
Circle 1 (c1)
1 On the Work Plane toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type (0.5^2/0.042+0.042)/2.
4 Locate the Position section. In the xw text field, type 0.5.
5 In the yw text field, type 0.042-(0.5^2/0.042+0.042)/2.
6 On the Work Plane toolbar, click Build All.
7 In the Model Builder window, click Geometry 1.
Distances (m)
-0.5
4 Click to expand the Displacements section. In the [[displ]] table, enter the following
settings:
Difference 1 (dif1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object blk1 only(rectangular channel) in the Objects to add subsection.
3 In the Settings window for Difference, locate the Difference section.
4 Find the Objects to subtract subsection. Select the Active toggle button.
5 Select the object ext1 only(the cylinder)
6 Click Build All Objects.
7 Click the Zoom Extents button on the Graphics toolbar(see the figure below).
DEFINITIONS
In the Model Builder window, under Component 1 (comp1) right-click Definitions and choose
View.
View 3
1 In the Model Builder window, expand the Definitions node, then click View 3.
2 In the Settings window for View, locate the View section.
3 Select the Lock camera check box.
H I G H M A C H N U M B E R F L O W, L A M I N A R ( H M N F )
This problem does not require to use Pseudo-Time stepping for stationary equation form.
The convergence of the model will be faster if this option is not selected.
1 In the Model Builder window’s toolbar, click the Show button and select Advanced Physics
Options in the menu.
2 In the Model Builder window, expand the View 3 node, then click Component 1 (comp1)>
High Mach Number Flow, Laminar (hmnf).
3 In the Settings window for High Mach Number Flow, Laminar, click to expand the
Advanced settings section.
4 Locate the Advanced Settings section. Find the Pseudo time stepping subsection. Clear
the Use pseudo time stepping for stationary equation form check box.
Fluid 1
1 In the Model Builder window, under Component 1 (comp1)>High Mach Number Flow,
Laminar (hmnf) click Fluid 1.
Wall 1
1 In the Model Builder window, under Component 1 (comp1)>High Mach Number Flow,
Laminar (hmnf) click Wall 1.
2 In the Settings window for Wall, locate the Boundary Condition section.
3 From the Boundary condition list, choose Slip.
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>High Mach Number Flow,
Laminar (hmnf) click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 Specify the u vector as
uin x
0 y
0 z
Symmetry 1
1 On the Physics toolbar, click Boundaries and choose Symmetry.
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
3 In the Settings window for Inlet, locate the Flow Condition section.
4 From the Flow condition list, choose Supersonic.
5 Locate the Flow Properties section. In the p0,stat text field, type pin.
6 In the T0,stat text field, type Tin.
7 In the Ma0 text field, type Min.
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
3 In the Settings window for Outlet, locate the Flow Condition section.
4 From the Flow condition list, choose Supersonic.
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Normal.
4 Click Build All.
STUDY 1
Step 1: Stationary
1 In the Settings window for Stationary, click to expand the Study extensions section.
2 Locate the Study Extensions section. Select the Adaptive mesh refinement check box.
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node.
3 In the Model Builder window, expand the Study 1>Solver Configurations>Solution 1
(sol1)>Stationary Solver 1 node, then click Adaptive Mesh Refinement.
4 In the Settings window for Adaptive Mesh Refinement, locate the General section.
5 In the Maximum number of refinements text field, type 2.
Depending on the amount of computer memory available the Maximum number of
refinements may be increased to improve the resolution of shock waves.
The amount of computational resources needed to solve the problem after refinning the
mesh can be reduced by means of an iterative solver:
RESULTS
Slice
1 In the Model Builder window, expand the Velocity (hmnf) node.
2 Right-click Slice and choose Delete.
Velocity (hmnf)
In the Model Builder window, under Results right-click Velocity (hmnf) and choose Surface.
Surface 1
1 On the Velocity (hmnf) toolbar, click Plot.
2 Click the Zoom Extents button on the Graphics toolbar.
Pressure (hmnf)
1 In the Model Builder window, under Results click Pressure (hmnf).
Surface
In the Model Builder window, expand the Pressure (hmnf) node.
Pressure (hmnf)
1 Right-click Surface and choose Delete.
2 On the Pressure (hmnf) toolbar, click Plot(see Figure 3).
Plot the Mach number:
3D Plot Group 5
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, type Mach Number in the Label text field.
3 Locate the Data section. From the Data set list, choose Study 1/Adaptive Mesh Refinement
1 (sol2).
Surface 1
1 Right-click Mach Number and choose Surface.
2 In the Settings window for Surface, locate the Expression section.
3 In the Expression text field, type hmnf.Ma.
4 On the Mach Number toolbar, click Plot(see Figure 2).