Abstract
A short overview of the application of schlieren and shadowgraph image construction has been presented, focusing on its use in interpreting compressible CFD data. Numerical flow visualisation methods have been used for the validation of numerical models of real flow fields but are also a valuable tool for identifying and inter-preting flow field features and provide a useful means for extracting information from the numerical data that may not be readily apparent.
Compressible flow; Computational Fluid Dynamics; Flow Visualisation
1 Introduction
Most of the post-processing techniques used to present computational data have a flow visualisation analogue of one form or another. Examples include the form of ribbon traces in Computational Fluid Dynamics (CFD) data that are comparable to dye or smoke trail injection into a flow field, or the use of thermochromic paint to produce the experimental equivalent of a colour flood plot of temperature variation on a surface due to flow as demonstrated by Atkins et al. [1]. The application of simulated shadowgram and schlieren images to interpret CFD data is becoming a generally well-accepted method. Recent articles by Kumar et al. [2] (2D) and Luthman et al. [3] (3D) demonstrate the interpretation of CFD results using this. Tecplot has now added a shadowgraph feature to its data analysis suite for post processing of numerical data.
Kumar et al. [2] demonstrated the application of numerical shadowgraph and schlieren imaging of a 2D simulation in OpenFOAM of a Mach 3 flow over a forward-facing step. While the images are of poor quality, this has more to do with the implementation method and resolution of the simulation. The results of Kumar et al. [2] clearly show that the qualitative information required to describe the flow features is more readily apparent in the shadowgram and schlieren images than compared to a flood plot of density gradient.
While the work of Kumar et al. [2] and Luthman et al.[3] are two of many recent examples, the technique has been around for some time and is used extensively within the engineering and shock wave research communities, as demonstrated by the work of Law and Skews [4].
As CFD has become an increasingly important investigation tool for compressible flow research, it was logical to begin applying experimental flow visualisation techniques to CFD data. This was done primarily as a means to qualitatively validate the numerical models by comparing them to experimental images as these were often the primary type of experimental data. An example of this is shown in Fig. 1 where a side-by-side comparison of experimental and numerical results is presented for a shock interacting with a rigid grid. The numerical result gives insight into the flow in the gaps, which would ordinarily not be possible given the requirement for structural support of the grid in the shock tube. Since there is a good qualitative agreement between the experiment and the numerical image for the flow field below the grid, it was assumed that the numerical simulation had adequately captured the flow field in the gaps [4]. It was then possible to describe the flow field in the gaps and infer the behaviour of the flow field from this descriptive model.
Using a ray tracing technique, Luthman et al. [3] provide a mathematical description of the calculation of the planar light intensity distributions that would be typical of a 3D flow field. They go on to apply the method to Large Eddy Simulations of a jet in supersonic cross flow. Their experimental and numerical 3D flow field images compare well. An alternative to this approach is the line integral approach as presented initially by Merzkirch [5].
This study will provide a brief overview of the use of flow visualisation methods as a way of interpreting and interrogating CFD data drawing largely on a small sample of the experimental and numerical studies undertaken since 2002 by the Flow Research Unit (FRU) at the University of the Wit-watersrand. The objective is to present a case for using flow visualisation methods as a standard approach to interrogating numerical data.
2 Contour and Vector Plots
While contour and contour flood plots give a good representation of quantitative variations in a flow field, it can be very difficult to identify the position of features in the flow field or the type of phenomena that make up a flow field. As an example, a shear layer or slipstream in a flow field represents a discontinuity in velocity, temperature or density but will not appear on a pressure contour plot. Depending on the range of density variation difference across the slipstream, it can be difficult to identify or locate such a feature on a contour plot. This is illustrated in Fig. 2 and 3.
The Mach number of the wedge and shock represents a unique case in shock-wave moving body interactions where the velocity of the flow relative to the wedge changes as the impinging shock passes over it, but the Mach number of the shock remains unchanged. This is counterintuitive but is evident from the bow shock angle which is the same on either side of the impinging shock [6]. The slipstream generated at the four shock interaction points in Fig. 2 is unclear. A contour is a line of constant value, so a density contour is a line of constant density, but such a line can be distorted by the small variations in density due to the numerical noise inherent to any simulated flow field. This noise can create contours in steady flow regions, highlighting the slight variations in the flow field that are typical in a numerical simulation. Usually, these noise contours can be reduced by reassigning the contours by either increasing or decreasing the number and spacing of contours. This can be seen by comparing the streamlines around the four shock interaction points in the upper and lower halves of the images.
Vector plots and their associated streak- and streamline plots are a good indicator of flow direction and stability, but can be difficult to interpret and are not recommended for locating flow phenomena. The plots are also highly sensitive to the reference frame in which they are made. The normal conquence of 2D fields, calculating the change in intensity distributions and summing them. The discrete nature of the numerical model makes the density gradient a function of cell size which places an upper limit on the image resolution. This is seen in Fig. 1 where all flow discontinuities are thicker than could be obtained experimentally.
The image generation was originally implemented using the Matlab image processing toolbox and a set of custom scripts. This is still used at times if the dataset is small enough, but it is possible to generate shadowgrams and schlieren images directly in Tecplot, including three-colour schlieren. Three-colour schlieren is very memory intensive as an intensity map is required for each of the three colours.
3.1 Shadowgraphs
Shadowgraph images have a long association with compressible gas flow research. A typical light bench setup for a schlieren system is illustrated in Fig. 4b however, by removing the knife edge, the system then becomes a shadowgraph system. Merzkirch [5] derives an expression for the light intensity distribution within a shadowgraph image, by analysing the path of a ray of light through a shadowgraph system and shows that:
In Eqn. 2, the z direction is parallel to the undisturbed light beam path and
is a normalised ratio of the variation in light intensity through the test section along a ray. Given that the numerical model is two-dimensional, the test section width, l, as it appears in Eqn. 2 would be zero. Instead, a pseudotest section of fixed width l is assumed and the image is constructed accordingly. Since the model is two-dimensional and the variations in density are small compared to the rate at which density varies within a compressible flow field, it can be shown that:
where
and c represents an intensity factor used to control the contrast of the image - analogous to adjusting the light source intensity in an optical system. Experience has shown that an exact value of F is not strictly necessary and a value of F = 16 was found to work well for most of the images presented here that are drawn from earlier work such as Fig. 3.
The image can then be constructed by:
1. Calculating
across the grid using a first-order finite differencing scheme.
2. Thresholding the data by a factor of F. This is done by multiplying the data generated in the previous step by F and then setting all terms in the dataset greater than 1 equal to 1 and all negative terms equal to zero.
3. Generating grey scale flood plots of the intensity distribution generated in the previous step.
Depending on how the method is applied, it may be necessary to apply interpolation to the two-dimensional light intensity distribution, to convert it from the original CFD data and mesh structure to a structured rectangular grid with the number of grid elements in each direction being directly proportional to the resolution of the image in each direction. This step is typically required when using the image processing toolbox in Matlab to convert the intensity maps into images. Where the computational dataset is large, it may be preferable to perform this interpolation before calculating the image intensity maps. Adjusting F allows for the contrast of the image to be modified.
In the case of most post-processing software, the calculation of the intensity maps would be done using the original dataset. This may require either the use of a user-defined function to calculate the derivatives of the density distributions or the calculation of the density gradients using a post-processing package such as Tecplot. Using Tecplot as an example, a shadowgraph image is obtained by calculating the intensity distribution using Eq. 3 and then generating a grey-scale flood plot of the light intensity distribution.
3.2 Schlieren Imaging
As with shadowgraph imaging, Merzkirch [5] derives an expression for the light intensity distribution within a schlieren image by analysing the path of a ray of light through a schlieren system and shows that:
where a is the height of the light source image perpendicular to the light source mask on the imaging plane and f2 is the focal length of the schlieren head. From this, it can be shown that:
where
is a constant similar to that of Eqn. 3 and ζ is a direction perpendicular to the knife edge of the light source. A conventional schlieren system is restricted to showing variations in density gradient in one direction only which is perpendicular to the knife edge. Three-colour schlieren techniques were developed to provide an experimental imaging system which is sensitive to density variations in all directions in the flow field. A typical example of such a system was that of Seitz, Scott and Skews [11] developed using three coloured light sources inclined at 120° to each other. This three-colour system was applied to numerical images in the method described below.
Given that the three light sources are each masked in a different direction, the intensity matrix for each colour needs to be generated separately. The schlieren images can then be generated by:
1. Calculating
using an appropriate finite difference scheme.
2. For a grey-scale schlieren image; skip step 3 and proceed to the next.
3. Calculating
for each of the colours using:
where θcol is the angle of incidence of the colour-specific knife edge under consideration. These are θred = 0° for the red light source, θgreen = 120° for green and θblue 240° for blue, as applied by [11].
4. Thresholding each density gradient map by F using the same method as before. Changing F will change the sensitivity of the schlieren image so that finer changes in density can be detected by increasing F. It is important to note that a value for F which is too large, will make the image appear overexposed and too small will make it appear underexposed. The image can also be biased toward one of the colours by using a larger threshold value for that colour. This is analogous to allowing more light through for one of the colours and is typically done in 3 colour systems to ensure enough light in the test section to illuminate the model.
5. For a grey scale schlieren image, continue as per step 3 of the shadowgraph procedure. For a three-colour image, each of the 3 datasets needs to be turned into a grey-scale flood plot which then needs to be tinted to the colour associated with the dataset (red, green or blue). These are then overlayed and set to 50 % transparency to create the final colour image.
The final step is much simpler to accomplish in Matlab as the three-colour intensity maps can be turned into an image directly. The same comment applies as before regarding interpolation between an unstructured mesh and a structured grid however, along with the associated loss of image quality.
While shadowgraphs are sensitive to large changes in density gradient such as would occur across a shock or in a vortex, schlieren images are sensitive to the density gradient only, such as typically associated with expansion fans. Often strong features will be difficult to identify in experimental schlieren images and details of shock position and shape are better determined using shadowgraphs. Shadowgraph images tend not to be as sensitive to the weaker density gradients that are introduced by a 3D flow field.
3.3 Interpreting the Data
It is possible to perform interferometric image construction on the numerical data as well and this has been used in the past by the Flow Research Unit. The experimental setup usually requires a laser light source and the cost and complexity do not warrant the level of detail which today can be obtained from a well-validated simulation.
None of the flow visualisation or data presentation techniques described here is the ideal data presentation method. Each has its own strengths and weaknesses so the ideal form of numerical data interpretation lies in the use of a combination of the techniques. Since the imaging algorithms use the same numerical data, generating synchronous colour schlieren and shadowgraph images of the numerical flow field is possible. These images can then be combined with contour and other plots, to provide a detailed analysis of the numerical flow field. An approach similar to that applied in analysing experimental images can then be applied to the numerical results. The combined information from all the plots and images provides a much richer picture that can be used to understand subtleties in the flow field that are not readily apparent from just viewing contour or flood plots, or the images on their own.
Imaging lends itself far more readily to the geometric analysis of flow fields, while vector and contour plots give a better idea of the size and type of flow property change. By using all of the techniques described, a clearer understanding of the numerical results, and comparisons with analytical modelling can be made with greater certainty.
4 Application to High Order Accurate DNS Calculations of a Shock Diffracting over a Wedge
Law et al. [12] used a hybrid 6th/3rd order summation by parts (SBP) direct numerical simulation (DNS) solver with a weak slip boundary formulation to simulate the diffraction of a Mach 1.5 shock over a complex, convex wall. Eriksson et al. [13] discussed the numerical solver's details with a focus on how the order of the SBP solver was lowered around the discontinuities in the flow field to preserve numerical stability. Law et al. [12] looked at the effect of viscosity on the flow field while the geometry and Mach number were kept constant. A detailed demonstration of the convergence and validation of the models was presented and a series of schlieren images were used to demonstrate the change in flow features with Reynolds number. The computational results for a Mach 1.5 shock at a Reynolds number of 200 × 103 have been reprocessed here to demonstrate the use of flow visualisation imaging interpreting CFD data. Fig. 5 contains traditional colour flood plots of density and Mach number for the flow around the first corner.
In Fig. 5 it is possible to identify a series of shocks in the flow field and a small oval region of low density. By using the Mach contour and density plots together, it is possible to clearly identify a shear layer propagating from the corner, and the shocks can be seen to form a lambda shock pattern that is typical of this type of flow field. It is much easier to identify these features when you expect them to be there and know what to look for. This should be compared to Fig. 6 where the strong features (shocks and shear layer) are clearly identifiable.
Something that was not apparent from Fig. 5 is that the shear layer rolls up into a vortex resulting in the oval low-density region. What can also be seen from Fig. 6 is that there are a series of supersonic flow regions, weak shocks and interactions with the shock waves that have propagated through the shear layer. In addition, a contact surface can be seen near the right edge of the image. At the time, computational resource constraints meant that it was not possible at the time to re-run the simulations with greater mesh refinement in the region of the shear layer and vortex.
While Fig. 6 clearly shows the many shocks and the shear layer, it is possible to identify these features by examining various flood plots and streamline overlays in combination. This would typically require an examination of a number of images in combination. The schlieren image makes it possible to rapidly identify the many interesting features in the flow.
The images in Fig. 7 combine the flood plots of Fig. 5 with a 50 % transparent grey-scale schlieren image sensitive to vertical variations in the density gradient.
By overlaying the two types of images, it is possible to readily correlate features that were identified in the schlieren image with density variations and changes in Mach number as illustrated in Fig. 7. Note that the contact surface shown in Fig. 6 is very difficult to identify in Fig. 5a. and not at all visible in Fig. 5b. This contact surface represents the signal propagation front that separates the flow that is induced by the passage of the diffracting shock front only from the disturbances initiated at the corner.
5 Conclusion
A brief description of how to convert CFD data into shadowgraph and schlieren images has been provided. This is accompanied by examples of where these flow visualisation reconstructions have been used to identify flow features that were captured in the numerical data. Numerical flow visualisation provides a powerful means of quickly doing a qualitative comparison between experimental and numerical data. It can also identify weak features in the flow field such as contact surfaces that are not readily apparent in most forms of CFD data presentation. The combined information from traditional flood plots can be combined with flow visualisation reconstruction images to provide a much richer picture that can be used to understand subtleties in the flow field that are not readily apparent when using traditional CFD post-processing on its own.
References
- [1] Atkins MD, Kienhöfer FW, Lu TJ, and Kim T, Local heat transfer distributions within a rotating pin-finned brake disk, ASME. J. Heat Transfer, 142(11), 2020.
- [2] Kumar A, Dubey P, and Kannan BT, Numerical flow visualization of supersonic flow using OpenFOAM, InFirst International Conference on Mathematical Techniques and Applications, 2020.
- [3] Luthman E, Cymbalist N, LangD, Candler G, and Dimotakis P, Simulating schlieren and shadowgraph images from LES data, Experiments in Fluids, 60(134), 2019.
- [4] Law C and Skews B, Numerical modelling of shock porous body interactions, In Proceedings of the 7th South African Conference on Computational and Applied Mechanics SACAM10, 2010.
- [5] Merzkirch W, Flow Visualization, Academic Press, 1987.
- [7] Law C and Skews B, Flow effects resulting from relative motion between shocks and supersonic bodies, Shock Waves, 13(4), 271-281, 2003.
- [8] Law C, Felthun LT, and Skews B, Two-dimensional numerical study of planar shockwave/moving-body interaction part i, Shock Waves, 13(5), 381-394, 2003.
- [10] Merzkirch W, AGARD-AG-302:TECHNIQUES OF FLOW VISUALIZATION, NATO Science and Technology Organisation, 1987.
Revised form 20 August 2024
Accepted 6 September 2024






