ISEC Model Respository

SPHysics FAQs

  1. What is SPHysics and what can it do?
  2. What platforms does SPHysics run on?
  3. What are its main features?
  4. What does SPHysics need as input?
  5. What does SPHysics create as output?
  6. How do I try it out?
  7. Are there any restrictions on SPHysics use?
  8. How do I visualize the results?
  9. Who wrote SPHysics?
  10. Has SPHysics been validated?
  11. What if I find a bug in the code?
  12. How can I contribute to the development of SPHysics?

What is SPHysics and what can it do?

SPHysics is a Smoothed Particle Hydrodynamics (SPH) code written in fortran for the simulation of potentially violent free-surface hydrodynamics. For release version 1.0, the SPHysics code can simulate various phenomena including wave breaking, dam breaks, sloshing, sliding objects, wave impact on a structure, etc.


What platforms does SPHysics run on?

The SPHysics source code can run on any operating system or platform where you have a Fortran compiler. During development every effort has been made to ensure that the SPHysics code is as portable as possible. The code has been tested on the following operating systems and compilers: Windows: Compaq Visual Fortran; Linux: GPL gfortran compiler, Intel fortran compiler; Mac: GPL gfortran;

What are its main features?

      2-D and 3-D versions
      Variable timestep
      Choice of two types of solid boundary condition:
            dynamic and repulsive force
      Periodic open boundary conditions
      Choice of:
            Artificial Viscosity
            Laminar Viscosity
            Sub-Particle Scale (SPS) Turbulence Model
      Different Types of Moving Objects (forced motion only)
            Moving Gate
            Wavemaker
            Sliding Wedge
      Visualization routines using Matlab or ParaView


What does SPHysics need as input?

As input, you specify which compiler you wish to use: gfortran or Intel fortran

What does SPHysics create as output?

A raw data file is written; code is also provided for visualizing the results.

How do I try it out?

Download a version. It includes all the files needed to set up and run SPHysics, then visualize
the results. Test cases are provided so you can run it by just specifying the compiler type.

Under Windows, the code has been developed to run using Compaq Visual Fortran, but it
should also compile with other Fortran compilers.

Under Linux, the SPHysics code comes with batch files which are used to compile the source
code using the gfortran compiler or Intel compiler and then run the codes.

Are there any restrictions on SPHysics use?

The source code for SPHYSICS is freely redistributable under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation

How do I visualize the results?

Basic visualization tools are included with the source code, allowing results to be visualized with either Matlab or ParaView. In order to use ParaView, the raw data files require some processing, which at present is done using Matlab code; this will be converted to fortran source code soon.

Who wrote SPHysics?

SPHysics was written by a number of contributors from universities from around the world. The code took several years to develop, apply to test cases and improve

Has SPHysics been validated?

The code has been validated for a number of different test cases including dam breaks, waves hitting structures, breaking waves at beaches, Poiseuille flow, Couette flow. Interested readers are referred to the publication list for more detailed information.

What if I find a bug in the code?

A good rule of thumb is that in a commerical code there is a bug every 100 lines of code. If you find a bug in the SPHysics code, please let the developers know, using the Discussion Forum.

How can I contribute to the development of SPHysics?

For starters you can buy the main developers a drink of beer at the next conference or workshop. Failing that, you can post any new subroutines that you want to share with other users to the Forum. The core developers of SPHysics meet periodically to discuss future developments and directions. If your new subroutines are considered to be an invaluable addition to the code, they will be considered for inclusion in the next release version.