Blunt body problem
The Fortran 90 program "bluntbody" allows to solve the astrophysical hypersonic blunt body problem using the method first described in Schneider, W. 1968, J. Fluid Mech., 31, 397 (Erratum: Schneider, W. 1968, J. Fluid Mech., 32, 829), as extensively discussed in Schulreich, M. M. & Breitschwerdt, D. 2011, Astron. Astrophys., 531, A13 (hereafter SB11).
Input data can either be provided directly via the console or through an ASCII input file with the default name "input.dat". This optional file must contain the full list of input parameters in the following order:
Line | Parameter name | Data type | Description |
---|---|---|---|
1 | j |
integer | flow geometry parameter (plane flow: j = 0 ; axisymmetric flow: j = 1 ) |
2 | gam |
float | adiabatic index (ratio of specific heats) |
3 | M |
float | upstream Mach number |
4 | uinf |
float | upstream flow (or obstacle) velocity (in cm s$^{-1}$) |
5 | rhoinf |
float | upstream fluid density (in g cm$^{-3}$) |
6 | mu |
float | mean molecular weight (fluid with solar metallicity: mu = 0.62 ) |
7 | a |
float | bow shock geometry parameter (parabola equation: $r(z)=(a z)^{1/\alpha}$) |
8 | alpha |
float | bow shock geometry parameter |
9 | scale_l |
float | length scale of the problem (in cm) |
10 | zhatmin |
float | lower limit for shock-normal computations (in units of scale_l ) |
11 | zhatmax |
float | upper limit for shock-normal computations (in units of scale_l ) |
12 | plines |
integer | desired amount of shock normals (must not exceed 99999) |
The code comes packed with an exemplary input file, called "input_test.dat". Just change its name to "input.dat" for using it together with the unaltered version of the program.
The following files are generated during code execution:
- "shock.dat": contains variables directly behind the bow shock wave,
- "body.dat": contains variables along the obstacle's surface,
- "probeX.dat" (with X lying between 00001 and
plines
): contains variables along the shock normals that reside within the shock layer betweenzhatmax
andzhatmin
.
Each output file comprises of the following set of variables:
- the plane/axisymmetric coordinate $z$ (in cm)
- the plane/axisymmetric coordinate $r$ (in cm)
- the downstream fluid pressure $P$ (in dyn cm$^{-2}$)
- the downstream fluid density $\rho$ (in g cm$^{-3}$),
- the downstream fluid temperature $T$ (in K),
- the downstream fluid velocity in $x$-direction $u$ (in cm s$^{-1}$),
- the downstream sound speed $c$ (in cm s$^{-1}$),
- a measure for the downstream fluid specific entropy, $P/\rho^{\gamma}$.
The probe-files additionally contain
- the shock-oriented coordinate $y$ (in cm).
Compiling and running the code
We recommend usage of the provided Makefile. Open a console window and type
make
./bluntbody
In certain situations one wants to get rid of the generated object and executable files. This can be conveniently achieved via
make clean
To erase all output files, type
make cleanout
Both operations are bundled into the command
make cleanall
Post-processing
For the purpose of data visualization, several Gnuplot scripts have been put into the subdirectory "pp". Each of them can be executed via
gnuplot "<name of script file>"
No changes are needed for analyzing the data generated with the sample input file. If there are any errors, make sure to have an up-to-date version of Gnuplot installed on your system.
Implicit user agreement
You may use the program freely as is or modify it for your own applications. If you use the code for publications it would be appreciated (1) that you cite our method paper (SB11), and (2) that you include an acknowledgement.
Please note that the code does not come with any guarantees. However, feel free to send bug reports to schulreich@astro.physik.tu-berlin.de.
Download
Version history
- 1.0 (July 2009): Original Fortran 77 version that was used to generate the results presented in SB11. Integrations were performed with the routine
qromb
from the Numerical Recipes. - 2.0 (Sept. 2016): Completely rewritten Fortran 90 version that uses a different (but equally reliable) Romberg integrator. Added second option for data input via text file (sample file included). Extended the list of output variables. Greatly enhanced effiency by performing shock-normal computation on a logarithmic mesh. Further added a simple Makefile for the gfortran compiler and a small collection of Gnuplot visualization scripts.