sph readme

Upload: sudip-adhikari

Post on 02-Jun-2018

267 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 SPH Readme

    1/18

    Readme for program:

    SPH Simulator

    Readme

    January, 2012

    David Schellander

    ChristianDoppler Laboratory on Particulate Flow ModellingJohannes Kepler University | Linz | Austria

  • 8/10/2019 SPH Readme

    2/18

  • 8/10/2019 SPH Readme

    3/18

    Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 3

    Overview

    2D - SPH Simulator

    Smoothed Particle Hydrodynamics

    File System

    Project Structure

    Geometry files

    Simulation save files

    Simulation video files

    Variables

    Future

    Contact

  • 8/10/2019 SPH Readme

    4/18

    Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 4

    Overview

    Main

  • 8/10/2019 SPH Readme

    5/18

    Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 5

    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

  • 8/10/2019 SPH Readme

    6/18

    Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 6

    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

  • 8/10/2019 SPH Readme

    7/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 7

    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

  • 8/10/2019 SPH Readme

    8/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 8

    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

  • 8/10/2019 SPH Readme

    9/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 9

    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

  • 8/10/2019 SPH Readme

    10/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 10

    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!

  • 8/10/2019 SPH Readme

    11/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 11

    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

  • 8/10/2019 SPH Readme

    12/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 12

    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

  • 8/10/2019 SPH Readme

    13/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 13

    Variables

    Variables

    Variable Meaningdt 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

    h 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

    c Speed of sound (m/s)

  • 8/10/2019 SPH Readme

    14/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 14

    Variables

    Variables

    Variable MeaningposX, posY Position of particle

    velX, velY Velocity of particle

    rho Density of particle

    pressure Pressure at particle position

    E Energy (not used)

    U Internal energy (not used)

    isWall 0 is fluid, 1 is wall

    nr Particle number

  • 8/10/2019 SPH Readme

    15/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 15

    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

  • 8/10/2019 SPH Readme

    16/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 16

    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

  • 8/10/2019 SPH Readme

    17/18Christian Doppler Laboratory on Particulate Flow Modelling www.particulate-flow.at 17

    Contact

    Contact

    David Schellander Dipl.-Ing.

    [email protected]

  • 8/10/2019 SPH Readme

    18/18

    Thank you for using or testingthis software

    Dipl.-Ing. Schellander DavidContact and more details: [email protected]

    ChristianDoppler Laboratory on Particulate Flow Modelling

    Johannes Kepler University | Linz | Austria