Shockwave in Compressible Flow

shock_animation.gif

This tutorial will cover the basics of setting up and running the problem of a compressible flow with a shockwave passing over a stationary spherical object(sometimes called a 'particle' in this example). Additionally, a comparison of Loci-Stream results to experimental data will be presented. Files for running the case yourself can be found here: LOCI-STREAM RUN FILES

In this problem a high pressure region is created upstream of a rigid particle(represented by the simulation boundary), and a shockwave forms and propagates across the domain and over the particle. There is experimental data for the force that a particle epxeriences under a flow condition like this one. This example will also include a comparison of the force that the simulated particle feels and the measured force from an experiment. 


ComputatIOnal Domain

domain_diagram.png
domain_grid_image_2.png

The domain is rectangular with all boundaries being the slipwall and symmetry type besides a subsonicInlet. Loci-Stream does not run in a purely 2D mode, rather it uses 3D extrusions of 2D geometry. For this geometry the extrusion is done by rotating a 2D plane by 1 degree to create a pie-slice shaped 3D grid that is very thin. This is done to run in an axisymmetric mode. This example was created before an update to Loci-Stream that has introduced a true axisymmetric mode.

The inlet boundary is prescribed using the Loci-Stream syntax: subsonicInlet(v=116.7856 m/s, T=347.8651 K) . The flux scheme used for this example is the "SLAU" scheme, specified using the syntax: inviscidFlux: SLAU.

To see the Loci-Stream control file click HERE.


Running the Code

Loci-Stream is an MPI based parallel code, so execution of the code is started with a call to mpirun. A template call is shown below where the terms in brackets(<>) are replaced by the specifics of your case.
mpirun -np <np> <path_to_stream_exec> --scheduleoutput -q solution <casename> <restart> > /dev/null >run.out 2>&1 &

For this example the call is:
mpirun -np 16 /home/user/Loci-Stream/bin/stream --scheduleoutput -q solution shock  > /dev/null >run.out 2>&1 &


Validation Results

The metric used to compare the simulation results to the experimental data is the drag coefficient on the particle as a function of time. The streamwise drag coefficient is just the force that the particle experiences along the horizontal axis divided by a parameter that is related to the downstream conditions and the cross-sectional area of the particle. The plot below shows the simulation results(in blue) capture the overall behavior of the experimental data. There is an underprediction of the peak force by about 5%.

X_Drag_Plot.png

The 'extract' utility is used to view the results of a simulation. For this case we view the simulation at the 5,000th time step. In the run directory extract the solution using: extract -vtk shock 5000 P v r t . This will generate a solution directory with files in the Paraview VTK format which can be opened by Paraview. The case name is 'shock' and the timestep is '5000', and the variables to extract are the pressure(P), velocity(v), density(r), and temperature(t). Below is a contour plot of the pressure field showing the primary and seconary reflected shockwaves that occur during the passage of the initial planar shockwave.

Pressure_plot_timestep_5000.png