-->
SPHYSICS FAQ

From SPHYSICS

(Difference between revisions)
Jump to: navigation, search
(What platforms does SPHYSICS run on?)
Line 1: Line 1:
Welcome to the SPHYSICS FAQ Page.  If you do not find the answer to the question you were looking for, please try the other [[SPHYSICS_Forum| Forum]] pages:
+
Welcome to the SPHysics FAQ Page.  If you do not find the answer to the question you were looking for, please try the other [[SPHYSICS_Forum| Forum]] pages:
  
  
#'''[[#What is SPHYSICS and what can it do?| What is SPHYSICS and what can it do?]]'''
+
#'''[[#What is SPHysics and what can it do?| What is SPHysics and what can it do?]]'''
#'''[[#Where can I download SPHYSICS?| Where can I download SPHYSICS?]]'''
+
#'''[[#Where can I download SPHysics?| Where can I download SPHysics?]]'''
#'''[[#Who wrote SPHYSICS?| Who wrote SPHYSICS?]]'''
+
#'''[[#Who wrote SPHysics?| Who wrote SPHysics?]]'''
#'''[[#What platforms does SPHYSICS run on?| What platforms does SPHYSICS run on?]]'''
+
#'''[[#What platforms does SPHysics run on?| What platforms does SPHysics run on?]]'''
#'''[[#How do I generate a geometry using SPHYSICS?| How do I generate a geometry using SPHYSICS?]]'''
+
#'''[[#How do I generate a geometry using SPHysics?| How do I generate a geometry using SPHysics?]]'''
#'''[[#How do I run SPHYSICS on windows?| How do I run SPHYSICS on windows?]]'''
+
#'''[[#How do I run SPHysics on windows?| How do I run SPHysics on windows?]]'''
#'''[[#How do I run SPHYSICS on Linux| How do I run SPHYSICS on Linux]]'''
+
#'''[[#How do I run SPHysics on Linux| How do I run SPHysics on Linux]]'''
 
#'''[[#How do I visualize the results?| How do I visualize the results?]]'''
 
#'''[[#How do I visualize the results?| How do I visualize the results?]]'''
#'''[[#For which cases has SPHYSICS been validated?| For which cases has SPHYSICS been validated?]]'''
+
#'''[[#For which cases has SPHysics been validated?| For which cases has SPHysics been validated?]]'''
 
#'''[[#What if I find a bug in the code?| What if I find a bug in the code?]]'''
 
#'''[[#What if I find a bug in the code?| What if I find a bug in the code?]]'''
#'''[[#How can I contribute to the development of SPHYSICS?| How can I contribute to the development of SPHYSICS?]]'''
+
#'''[[#How can I contribute to the development of SPHysics?| How can I contribute to the development of SPHysics?]]'''
 
__NOTOC__
 
__NOTOC__
  
=== What is SPHYSICS and what can it do? ===
+
=== 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.  More information on the technical capabilities can be found on the [[SPHYSICS_Home_Page| SPHYSICS home page]].
+
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.  More information on the technical capabilities can be found on the [[SPHYSICS_Home_Page| SPHysics home page]].
  
=== Where can I download SPHYSICS? ===
+
=== Where can I download SPHysics? ===
  
 
Please see the [[Downloads| Downloads Page]].
 
Please see the [[Downloads| Downloads Page]].
  
=== Who wrote SPHYSICS? ===
+
=== Who wrote SPHysics? ===
  
SPHYSICS was written by a number of contributors from universities from around the world.  For a list of code authors please see the '''[[Contributors| Contributors]]''' page.  The code took several years to develop, apply to test cases and improve.
+
SPHysics was written by a number of contributors from universities from around the world.  For a list of code authors please see the '''[[Contributors| Contributors]]''' page.  The code took several years to develop, apply to test cases and improve.
  
=== What platforms does SPHYSICS run on? ===
+
=== What platforms does SPHysics run on? ===
  
The SPHYSICS source code is downloadable from the main [[Downloads| Downloads page]].  Therefore, the code can run on any operating system or platform where you have a fortran compiler.  (please see the following webpage for '''[http://www.thefreecountry.com/compilers/fortran.shtml fortran compilers]''' available on the internet).  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:
+
The SPHysics source code is downloadable from the main [[Downloads| Downloads page]].  Therefore, the code can run on any operating system or platform where you have a fortran compiler.  (please see the following webpage for '''[http://www.thefreecountry.com/compilers/fortran.shtml fortran compilers]''' available on the internet).  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:
  
  
Line 42: Line 42:
 
GPL gfortran
 
GPL gfortran
  
=== How do I generate a geometry using SPHYSICS? ===
+
=== How do I generate a geometry using SPHysics? ===
  
The SPHYSICS code comes with 4 example cases in 2-D and 3 example cases in 3-D to give users an idea on how to generate their own geometries.  The SPHYSICSgen_2D.f and SPHYSICSgen_3D.f codes can generated different geometries depending on the input (we use input files or keyboard entry). To create the geometry-generating program before running the SPHYSICS code, follow these steps for 2-D (for 3-D just change 2D to 3D throughout):
+
The SPHysics code comes with 4 example cases in 2-D and 3 example cases in 3-D to give users an idea on how to generate their own geometries.  The SPHYSICSgen_2D.f and SPHYSICSgen_3D.f codes can generated different geometries depending on the input (we use input files or keyboard entry). To create the geometry-generating program before running the SPHysics code, follow these steps for 2-D (for 3-D just change 2D to 3D throughout):
  
 
Change to the directory: source\SPHYSICSgen2D\
 
Change to the directory: source\SPHYSICSgen2D\
Line 54: Line 54:
 
Then change to the relevant directory (run_directory/CaseN where N is a number) to run  one of the example test cases (see below).
 
Then change to the relevant directory (run_directory/CaseN where N is a number) to run  one of the example test cases (see below).
  
=== How do I run SPHYSICS on windows? ===
+
=== How do I run SPHysics on windows? ===
  
 
This depends whether you are using an Intergrated Development Environment (IDE).  Generally, your compiler will produce SPHYSICS.exe which are then run from the command line:
 
This depends whether you are using an Intergrated Development Environment (IDE).  Generally, your compiler will produce SPHYSICS.exe which are then run from the command line:
Line 66: Line 66:
 
This will call SPHYSICSgen_2D/3D which will generate the geometry and subsequently compile the executable SPHYSICS_2D/3D under the directory \execs.  The code will then start to run writing the output to a file called "sph.out". Note the input files (CaseN.txt) require you to specify which compiler you wish to use (the last line); for the CVF compiler use the value 3.
 
This will call SPHYSICSgen_2D/3D which will generate the geometry and subsequently compile the executable SPHYSICS_2D/3D under the directory \execs.  The code will then start to run writing the output to a file called "sph.out". Note the input files (CaseN.txt) require you to specify which compiler you wish to use (the last line); for the CVF compiler use the value 3.
  
=== How do I run SPHYSICS on Linux ===
+
=== How do I run SPHysics on Linux ===
  
The SPHYSICS code comes with batch files which are used to compile the source code and then run the codes.  For example, for Case1 which is supplied with the code (under run_directory), at the command prompt, type:   
+
The SPHysics code comes with batch files which are used to compile the source code and then run the codes.  For example, for Case1 which is supplied with the code (under run_directory), at the command prompt, type:   
  
 
./Case1_linux.bat
 
./Case1_linux.bat
Line 78: Line 78:
 
Some basic visualisation tools are included with the source code.  The results can be visualized either with Matlab or ParaView.  In order to use ParaView, the raw data files require some processing which at present is done using some Matlab code.  This will be converted to fortran source code soon.
 
Some basic visualisation tools are included with the source code.  The results can be visualized either with Matlab or ParaView.  In order to use ParaView, the raw data files require some processing which at present is done using some Matlab code.  This will be converted to fortran source code soon.
  
=== For which cases has SPHYSICS been validated? ===
+
=== For which cases 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 following publications for more detailed information '''[[SPHYSICS_Publications| Publication list]]'''.
 
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 following publications for more detailed information '''[[SPHYSICS_Publications| Publication list]]'''.
Line 84: Line 84:
 
=== What if I find a bug in the code? ===
 
=== 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 [[SPHYSICS_Forum| Forum]] pages.
+
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 [[SPHYSICS_Forum| Forum]] pages.
  
=== How can I contribute to the development of SPHYSICS? ===
+
=== 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 pages.  Periodically the core developers of SPHYSICS will meet and discuss future developments and directions of SPHYSICS.  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.
+
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 pages.  Periodically the core developers of SPHysics will meet and discuss future developments and directions of SPHysics.  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.

Revision as of 09:33, 28 August 2007

Welcome to the SPHysics FAQ Page. If you do not find the answer to the question you were looking for, please try the other Forum pages:


  1. What is SPHysics and what can it do?
  2. Where can I download SPHysics?
  3. Who wrote SPHysics?
  4. What platforms does SPHysics run on?
  5. How do I generate a geometry using SPHysics?
  6. How do I run SPHysics on windows?
  7. How do I run SPHysics on Linux
  8. How do I visualize the results?
  9. For which cases has SPHysics been validated?
  10. What if I find a bug in the code?
  11. 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. More information on the technical capabilities can be found on the SPHysics home page.

Where can I download SPHysics?

Please see the Downloads Page.

Who wrote SPHysics?

SPHysics was written by a number of contributors from universities from around the world. For a list of code authors please see the Contributors page. The code took several years to develop, apply to test cases and improve.

What platforms does SPHysics run on?

The SPHysics source code is downloadable from the main Downloads page. Therefore, the code can run on any operating system or platform where you have a fortran compiler. (please see the following webpage for fortran compilers available on the internet). 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

How do I generate a geometry using SPHysics?

The SPHysics code comes with 4 example cases in 2-D and 3 example cases in 3-D to give users an idea on how to generate their own geometries. The SPHYSICSgen_2D.f and SPHYSICSgen_3D.f codes can generated different geometries depending on the input (we use input files or keyboard entry). To create the geometry-generating program before running the SPHysics code, follow these steps for 2-D (for 3-D just change 2D to 3D throughout):

Change to the directory: source\SPHYSICSgen2D\ Use one of the following options depending on your compiler: (i) gfortran on linux: make -f SPHYSICSgen_gfortran.mak (ii) ifort on linux: make -f SPHYSICSgen_ifort.mak (iii) CVF on windows: NMAKE/f"SPHYSICSgen_cvf.mak"

Then change to the relevant directory (run_directory/CaseN where N is a number) to run one of the example test cases (see below).

How do I run SPHysics on windows?

This depends whether you are using an Intergrated Development Environment (IDE). Generally, your compiler will produce SPHYSICS.exe which are then run from the command line:

SPHYSICS.exe

The code includes special subroutines to generate the appropriate compilation make files which can be adjusted for other compilers and operating environments. The code has been developed to run on Windows using Compaq Visual Fortran. For example, If you are using the Compaq Visual Fortran Compiler to run Case1, you can use the batch file:

.\Case1_cvf.bat

This will call SPHYSICSgen_2D/3D which will generate the geometry and subsequently compile the executable SPHYSICS_2D/3D under the directory \execs. The code will then start to run writing the output to a file called "sph.out". Note the input files (CaseN.txt) require you to specify which compiler you wish to use (the last line); for the CVF compiler use the value 3.

How do I run SPHysics on Linux

The SPHysics code comes with batch files which are used to compile the source code and then run the codes. For example, for Case1 which is supplied with the code (under run_directory), at the command prompt, type:

./Case1_linux.bat

This will call SPHYSICSgen_2D/3D which will generate the geometry, the makefile SPHYSICS.mak and subsequently compile the executable SPHYSICS_2D/3D under the directory execs/. The code will then start to run writing the output to a file called "sph.out". Note the input files (CaseN.txt) require you to specify which compiler you wish to use (the last line); for the gfortran compiler use the value 1, and for the Intel Compiler use the value 2.

How do I visualize the results?

Some basic visualisation tools are included with the source code. The results can be visualized either with Matlab or ParaView. In order to use ParaView, the raw data files require some processing which at present is done using some Matlab code. This will be converted to fortran source code soon.

For which cases 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 following publications for more detailed information Publication list.

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 Forum pages.

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 pages. Periodically the core developers of SPHysics will meet and discuss future developments and directions of SPHysics. 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.