As discussed in the Lecture, kernel density estimates are the key pillar of smoothed particle hydrodynamics
(for an general overview on density estimations, see this
survey of existing methods.
Kernel density estimators are used to smooth a discretized distribution of tracer particles to obtain
continuous fields needed in hydrodynamics. Therefore it is important to understand the intrinsic properties
of such kernel density estimators.
Start with this picture
taken from this paper, figure 1 and think about:
The global properties of kernels have a significant impact on the performance of SPH. Make yourself familiar with some common choices of kernels (especially the spline and Wendland ones), as summarized in table 1 and figure 1 of this article.
You can start from the configuration of the code as obtained in T00 and collect some different particle distributions.
cp $HOME/Hydro/glass_10x10x10 .
You can now run the program using different kernels and different neighbour numbers. To do so, you can:
Config.sh
file, the standard, Cubic Spline kernel is used.
QUINTIC_KERNEL
, WENDLAND_C2_KERNEL
,
WENDLAND_C4_KERNEL
, or WENDLAND_C6_KERNEL
in the
Config.sh
file to to different kernels. Do not forget to re-compile after changing the kernel.
DesNumNgb
parameter in the
box.param
file, and re-run the simulation.
Now you can compare the resulting densities for the different particle distribution.
Goal of this tutorial is that you learn better how to change the setup of the simulation and parameters.
What do you have to change to get only one output for each simulations?
Can you create a script to run the test with varying parameters?
How to produce a plot with multiple lines from different simulations?
How to produce one graph from the result of different simulations?
cp $HOME/Hydro/grid_10x10x10 .
BoxSize 1
in the parameter file!
cp $HOME/Hydro/packed_12x12x12 .
BoxSize 1
in the parameter file!
cp $HOME/Hydro/glass_10x10x10 .
BoxSize 100000
in the parameter file!BoxSize 1
in the parameter file![updated Nov 18]
idl -e show_kernels
ifort -g -traceback -check all -fpe0 -o meandensity meandensity.f90
bash runsims
[updated Nov 15]
gnuplot meandensity.plt
gv meandensity.ps
gnuplot density.plt
close_packed_lattice_new.pro
in IDL