Vous êtes sur la page 1sur 18

Readme for program:

SPH Simulator

Readme
January, 2012
David Schellander
Christian Doppler Laboratory on Particulate Flow Modelling
Johannes Kepler University | Linz | Austria

Overview
2D - SPH Simulator
Free Software published under G
GNU GENERAL PUBLIC LICENSE

You can read it under:


http://www.gnu.org/licenses/gpl-3.0.txt

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

Overview
2D - SPH Simulator
Smoothed Particle Hydrodynamics
File System
Project Structure
Geometry files
Simulation save files
Simulation video files
Variables
Future
Contact

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

Overview
Main

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

Smoothed Particle Hydrodynamics


Main

Meshfree Simulation of Flows


SPH overview can be found in many papers, especially in
Computerrgraphics
Typical SPH Simulations
Damm breaking problem

Free Surface flows


Used in computergraphics and movies for water
simulations

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

File System
Main
Create Main folder with project name
Create in this folder, a folder with name simulation
Main folder:
Contains save files of project
Contains tempSave.txt
Temporary Savefile which can be used to restart
simulation if it is crashed
Subfolder simulation:
Contains particle positions at special time
Used for showing the simulation
Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

File System
Setup Project

Start the program


Click on Load Simulation
Select save file of project, or file to initialize project
Now working directory is loaded
Calculate from loaded simulation status
Show simulations which are already calculated

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

File System
Geometry File Structure
First line contains info if safe file or geometry file
Geometry\n
Second Line contains general Parameters
dt;gX;gY;timestep;time\n
Third line contains fluid parameters
dx;h;rhoInit;alpha;beta;c\n
Following line contains Geometry data
Each line represents one Geometry

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

File System
Geometry File Structure
Possible Geometries
Line
Line;x1;y1;x2;y2;rho;isWall \n
Triangle
Triangle;x1;y1;x2;y2;x3;y3;rho;isWall \n
Rectangle
Rectangle;x1;y1;x2;y2;x3;y3;x4;y4;rho;isWall \n
The positions for rectangle and triangle geometries must be
set counter clockwise in correct order.
Circle
Circle;x1;y1;radius;rho;isWall \n

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

File System
Geometry File Structure

First all fluid geometries must be declared


At the end, all wall and obstacle geometries can be declared
If two particles intersect, then only the first particle will be set!

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

10

File System
Save File Structure
First line contains info if safe file or geometry file
Safe\n
Second Line contains general Parameters
dt;gX;gY;timestep;time\n
Third line contains fluid parameters
dx;h;rhoInit;alpha;beta;c\n
Following line contains particle data
Each line represents one particle
posX;posY;velX;velY;rho;pressure;E;U;isWall\n

Such a file can easily be created for the initializing a simulation


with Office or OpenOffice
Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

11

File System
Video file structure

Filename is: sim_time_%time.txt


With%time as actual simulation time
Used to sort files after loading
Each line contains particle data
nr;time;posX;posY\n

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

12

Variables
Variables
Variable

Meaning

dt

Time step size in seconds

gX, gY

Gravity in x and y direction

timestep

Nr of timestep

time

Simulation time

dx

Initial distance between particles in m

Smoothing length in m

rhoInit

Initial density

alpha

Alpha in viscosity model


(for water around 0,1 to 0,01)

beta

Beta in viscosity model

Speed of sound (m/s)

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

13

Variables
Variables
Variable

Meaning

posX, posY

Position of particle

velX, velY

Velocity of particle

rho

Density of particle

pressure

Pressure at particle position

Energy (not used)

Internal energy (not used)

isWall

0 is fluid, 1 is wall

nr

Particle number

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

14

Variables
Example projects

In directory examples
3 example projects can be found
One working with geometry data
Two with safe-files
Open it and run it, then you can use the simulation button to
show the simulation results

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

15

Future
Is there any?

Find idea how to display velocities in simulation


Can be easily extended to 3D problems, but its better to use
LIGGGHTS for complex 3D problems
3D needs much more particles
Parallelization would be important in 3D

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

16

Contact
Contact

David Schellander Dipl.-Ing.


david.schellander@jku.at

Christian Doppler Laboratory on Particulate Flow Modelling

www.particulate-flow.at

17

Thank you for using or testing


this software
Dipl.-Ing. Schellander David
Contact and more details: david.schellander@gmx.at
Christian Doppler Laboratory on Particulate Flow Modelling
Johannes Kepler University | Linz | Austria

Vous aimerez peut-être aussi