Difference between revisions of "AMR supersonic sphere Re300 Ma1dot2 by Michael Alletto"

From OpenFOAM Wiki
Jump to navigation Jump to search
Line 56: Line 56:
  
 
[[File:Setup_sphereMa1dot2Re300_alletto.png.png|800px|center|set up]]
 
[[File:Setup_sphereMa1dot2Re300_alletto.png.png|800px|center|set up]]
 +
 +
===Mesh generation===
 +
 +
The next figures shows the meshing strategy adopted. The figures show
 +
the coarse mesh. The difference between the coarse and fine mesh is the
 +
innermost refinement level. For the coarse we use a level of 4 and for the
 +
fine one a level of 6. The purpose was to compare the solutions achieved on
 +
this two meshes with the solution achieved with the AMR starting with the
 +
coarse mesh and allowing a refinement of level 6.
 +
Five refinements regions are chosen to gradually increase the resolution
 +
from the coarsest level to the finest level around the sphere. The initial
 +
grid had hexagonal cells of 1.83 × 10<sup>−5</sup> m side length. Note that it is very
 +
important to start with cells which are cubes to get a high wall layer coverage
 +
near the surface if wall layers are used. The fourth refinement level has a
 +
cell side length of 1.14 × 10<sup>−6</sup> m and the sixth refinement level has a cell side
 +
length of 2.86 × 10<sup>−7</sup> m. This strategy results in a mesh of approximately
 +
23 000 cells for the coarse mesh and 130 000 cells for the fine mesh. Five
 +
layers are used to increase the wall normal resolution to capture the sharp
 +
velocity gradients near the wall. The layer coverage is 100%.
 +
 +
[[File:mesh_sphereMa1dot2Re300_alletto.png|800px|center|set up]]
 +
 +
[[File:meshZoomed_sphereMa1dot2Re300_alletto.png|800px|center|set up]]
  
 
==References==
 
==References==

Revision as of 09:16, 25 November 2020

AMR of the supersonic flow around a sphere at Re = 300 and Ma = 1.2

You can download the case file [1] here.

Introduction

In this tutorial we will simulate the compressible flow over a sphere at a Reynolds number Re of Re = 300 and a Mach number Ma = 1.2. We will also compare the resutls with the DNS of [4,5]. The purpose of this tutorial is twofold: First we want to evaluate the capabilities of the pressure based compressible solver rhoPimpleFoam to compute supersonic flows. The mesh is generated by snappyHexMesh to allow partial conclutions of the capabil- ity of the combination snappyHexMesh with the pressure based compressible solvers to compute the flow in complicated industrial relevant configurations. In the tutorial collection we already have two cases where we simulate the compressible transonic flow over a 2D wing (https://wiki.openfoam.com/NACA0012_by_Michael_Alletto ) and a 3D wing (https://wiki.openfoam.com/OneraM6_by_Michael_Alletto) and two tutorial of supersonic 2D cases (https://wiki.openfoam.com/Compressible_flows_by_Joel_Guerrero https://wiki.openfoam.com/Compressible_flows_by_Joel_Guerrero2). For this reason the simulation of a supersonic flow is the next logical step to check the performance of the compressible pressure based solver in OpenFOAM in a 3D geometry. The supersonic flow over a sphere is characterized by a bow shock wave in front of the sphere which influences the pressure distri- bution around the sphere and hence also the drag ( [4, 5]). This localized region with strong gradients away from the wall represents an ideal test case to show the advantages of the adaptive mesh refinement implemented in OpenFOAM. Note that a good description of how the mesh refinement in OpenFOAM works can be found in [2]. He also pointed out that the refinement of the wall layer generated by snappyHexMesh leads to errors. The same observation was also found here.

Set up

The next figure shows the simulated geometry. In order to save computa- tional power, the full sphere is cut by two symmetry planes reducing the size of the domain by a factor of four. This will not explude any possible solutions, since [4, 5] reported that for a Re = 300 and a Ma = 1.2 the flow around a sphere is steady and rotational symmetric. The Reynolds number Re is defined as Re = Ud/ν . U is the inflow velocity, d the diamter of the sphere and ν the dynamic viscosity at the inflow. The Mach number is defined as Ma = U/c . c is the speed of sound at the inflow. The flow at the inflow is directed in x-direction. The planes cutting the sphere are defined as symmetry plans. For all other planes a inflow-outflow boundary condition is applied. This means that for the velocity and energy if the flow is pointing inside the computational domain a fixed value boundary condi- tion is applied and if the flow leaves the domain a zero gradient boundary condition is applied. For the pressure it is the way around: If the flow is directed inside the domain a zero gradient condition is used and if the flow is pointing outside the domain a fixed value condition is used. Since the flow at this Re is laminar, no other equations are solved. The extension of the computational domain was 20 diameters upstream and downstream of the sphere. In lateral directions it was also 20 diameters. Two different meshes (a coarse and fine one) are compared with each other. Furthermore two additional AMR simulations are performed: the two simulations differ in the threshold for which the mesh is refined.

set up

Mesh generation

The next figures shows the meshing strategy adopted. The figures show the coarse mesh. The difference between the coarse and fine mesh is the innermost refinement level. For the coarse we use a level of 4 and for the fine one a level of 6. The purpose was to compare the solutions achieved on this two meshes with the solution achieved with the AMR starting with the coarse mesh and allowing a refinement of level 6. Five refinements regions are chosen to gradually increase the resolution from the coarsest level to the finest level around the sphere. The initial grid had hexagonal cells of 1.83 × 10−5 m side length. Note that it is very important to start with cells which are cubes to get a high wall layer coverage near the surface if wall layers are used. The fourth refinement level has a cell side length of 1.14 × 10−6 m and the sixth refinement level has a cell side length of 2.86 × 10−7 m. This strategy results in a mesh of approximately 23 000 cells for the coarse mesh and 130 000 cells for the fine mesh. Five layers are used to increase the wall normal resolution to capture the sharp velocity gradients near the wall. The layer coverage is 100%.

set up
set up

References

[1] Jeremy Hanke and Martin Krcmar. Adaptive mesh refinement of hypersonic shock and wake structures in simcenter star-ccm+. In AIAA AVIATION 2020 FORUM, page 3227, 2020.

[2] Saumitra Vinay Joshi. Adaptive mesh refinement in openfoam with quantified error bounds and support for arbitrary cell-types. 2016.

[3] Fadl Moukalled, L Mangani, Marwan Darwish, et al. The finite volume method in computational fluid dynamics, volume 113. Springer, 2016.

[4] T Nagata, T Nonomura, S Takahashi, and K Fukuda. Direct numerical simulation of subsonic, transonic and supersonic flow over an isolated sphere up to a reynolds number of 1000. Journal of Fluid Mechanics, 904, 2020.

[5] Takayuki Nagata, Taku Nonomura, Shun Takahashi, Yusuke Mizuno, and Kota Fukuda. Investigation on subsonic to supersonic flow around a sphere at low reynolds number of between 50 and 300 by direct numerical simulation. Physics of Fluids, 28(5):056101, 2016.

[6] J Sinclair and Xinjun Cui. A theoretical approximation of the shock standoff distance for supersonic flows around a circular cylinder. Physics of Fluids, 29(2):026102, 2017.