Skip to content

Adapted to Linux/GNU FORTRAN from the Windows/Intel FORTRAN presented in "Smoothed Particle Hydrodynamics a meshfree particle method" by Liu and Liu (2003). Added a Makefile build system, more output options, and python scripts for plotting output.

Notifications You must be signed in to change notification settings

QuantumWarlock/LiuBook_SPH3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPH3D

3D Smoothed Particle Hydrodynamics FORTRAN code. Adapted from source in Smoothed Particle Hydrodynamics a meshfree particle method by G.R. Liu and M.B. Liu (2003). To aid building and analysis of results, a make system and several python scripts were created.

Linux:

Build:

>make

This command will execute the Makefile script. This script will create, if they don't already exist, the build, movie, and data directories. It will compile the FORTRAN, i.e. *.f and *.f90, files in the source directory and the link them to create the executable sph.x.

Clean:

There are 3 levels: clean, cleaner, sanitize. The commands to use them and what they do are as follows:

>make clean

This will delete the executable and the object files in the build directory.

>make cleaner

This will do clean plus delete the data files in the data directory.

>make sanitize

This will do cleaner plus remove the build, movie and data directories.

Execute:

>./sph.x

Scripts:

Currently, the scripts are focused on the 1D shock tube simulation. While they are specific to that problem, they do provide a starting point for adaptation and generalization to plot outputs to match the full capability of the SPH code.

plot_LaL_SPH_IF.py

Execute:

>python3 plot_LaL_SPH_IF.py

Plots the initial and final states of the shock tube simulation for velocity, pressure, density, and internal energy as a function of particle position.

plot_LaL_SPH_Movie.py

Execute:

>python3 plot_LaL_SPH_Movie.py

Creates an animated gif file and then plots movie of the time evolution of the shock tube simulation for velocity, pressure, density, and internal energy as a function of particle position.

About

Adapted to Linux/GNU FORTRAN from the Windows/Intel FORTRAN presented in "Smoothed Particle Hydrodynamics a meshfree particle method" by Liu and Liu (2003). Added a Makefile build system, more output options, and python scripts for plotting output.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published