├── .gitignore ├── CMakeLists.txt ├── CPP_Interface ├── inputReader.cpp ├── paraview.cpp └── writeField.cpp ├── CPP_Main ├── Neighborhood_performance.cpp └── SPH.cpp ├── CPP_Physics ├── Geometry.cpp ├── Init.cpp ├── Kernel.cpp ├── MPI.cpp ├── Neighborhood.cpp ├── TimeIntegration.cpp ├── navierStokes.cpp ├── updateMovingSpeed.cpp └── viscosityComputation.cpp ├── CPP_Tools ├── CleanUp.cpp ├── ConsistencyCheck.cpp ├── MemUsage.cpp └── sizeField.cpp ├── Headers ├── Interface.h ├── Main.h ├── Physics.h ├── Structures.h ├── Tools.h ├── paraview.h └── swapbytes.h ├── MakeFile&Batch ├── Makefile_FIRST └── Neighboor_performance.sh ├── Matlab ├── GUI.m ├── LouisGoffin.m ├── Playground.m ├── TestCases.m ├── performance.m ├── performance_nic4.m ├── scaling.m ├── scalingNew.m └── timeMemScaling.m ├── Playground.txt ├── Playgrounds ├── BWGeom.kzr ├── BWPara.kzr ├── Bathymetry_Geom.kzr ├── Bathymetry_Para.kzr ├── BeachReal_Geom.kzr ├── BeachReal_Para.kzr ├── Beach_Geom.kzr ├── Beach_Para.kzr ├── CrashCubeGoffin_Geom.kzr ├── CrashCubeGoffin_Para.kzr ├── CrashCube_Geom.kzr ├── CrashCube_Para.kzr ├── CrespoWaveGeom.kzr ├── CrespoWaveParam.kzr ├── Dam2_Geom.kzr ├── Dam2_Para.kzr ├── Dam3_Geom.kzr ├── Dam3_Para.kzr ├── Dam4_Geom.kzr ├── Dam4_Para.kzr ├── DamWet2_Geom.kzr ├── DamWet3_Geom.kzr ├── DamWet4_Geom.kzr ├── DamWet5_Geom.kzr ├── DamWet7_Geom.kzr ├── DamWet9_Geom.kzr ├── DamWet_Geom.kzr ├── DamWet_Para.kzr ├── Dam_Geom.kzr ├── Dam_Para.kzr ├── FFC_Geom.kzr ├── FFC_Para.kzr ├── FreeFallingCube_Geom.kzr ├── FreeFallingCube_Para.kzr ├── HugeWave_Geom.kzr ├── HugeWave_Para.kzr ├── Jump_Geom.kzr ├── Jump_Para.kzr ├── MaunaLona.dat ├── MaunaLona_Geom.kzr ├── MaunaLona_Para.kzr ├── PPMs │ ├── MaunaLona.ppm │ ├── beachReal.ppm │ ├── beachRough.ppm │ ├── beachRough2.ppm │ ├── beachSmooth.ppm │ ├── beachWall.ppm │ └── ppmToBath.cpp ├── Piston_Geom.kzr ├── Piston_Para.kzr ├── Pool_Geom.kzr ├── Pool_Para.kzr ├── StationaryWave_Geom.kzr ├── StationaryWave_Para.kzr ├── Tsunami_Geom.kzr ├── Tsunami_Para.kzr ├── Turbine_Geom.kzr ├── Turbine_Para.kzr ├── WaveBeach_Geom.kzr ├── WaveBeach_Para.kzr ├── WaveD_Geom.kzr ├── WaveD_Para.kzr ├── WaveTest_Geom.kzr ├── Wave_Geom.kzr ├── Wave_Para.kzr ├── Wavelisse_Geom.kzr ├── Wavelisse_Para.kzr ├── beachReal.dat ├── beachRough.dat ├── beachRough2.dat ├── beachSmooth.dat ├── beachWall.dat ├── obliqueProfile.txt ├── obliqueWave.dat ├── smoothSlope.txt ├── soup.geom ├── soup.para ├── soup.txt ├── soup2.txt ├── soupGeom.kzr ├── soupPara.kzr ├── vortex │ ├── vortex1_Geom.kzr │ ├── vortex2_Geom.kzr │ ├── vortex_Geom.kzr │ ├── vortex_Para.kzr │ ├── vortexlarge1_Geom.kzr │ ├── vortexlarge_Geom.kzr │ └── vortexlargesmall_Geom.kzr ├── vortex_test │ ├── vortex10_Para.kzr │ ├── vortex1_Geom.kzr │ ├── vortex1_Para.kzr │ ├── vortex2_Geom.kzr │ ├── vortex2_Para.kzr │ ├── vortex3_Para.kzr │ ├── vortex4_Para.kzr │ ├── vortex5_Para.kzr │ ├── vortex6_Para.kzr │ ├── vortex7_Para.kzr │ ├── vortex8_Para.kzr │ └── vortex9_Para.kzr ├── waveSpeed1_Geom.kzr ├── waveSpeed1_Para.kzr ├── waveSpeed2_Geom.kzr ├── waveSpeed3_Geom.kzr ├── waveSpeed4_Geom.kzr ├── waveSpeedOblique_Geom.kzr └── zeroSlope.txt ├── README.md ├── Results └── README.doc ├── SPH_PROJECT.pdf ├── SPH_Presentation.pdf ├── SPH_Report.pdf ├── cmake_install.cmake ├── compilation.sh ├── nic4Results ├── rboman ├── .gitignore ├── CMakeLists.txt ├── README.md ├── cube.cpp ├── paraview.cpp ├── screenshot.png ├── sph.cpp └── sph.h ├── scriptTest.sh ├── soup.sh └── weak.m /.gitignore: -------------------------------------------------------------------------------- 1 | # list of ignored files/folders 2 | 3 | build/ 4 | sph 5 | *~ 6 | *.o 7 | *.obj 8 | *.bak 9 | *.vtk 10 | *.out 11 | *.exe 12 | *.log 13 | *.asv 14 | *.eps 15 | *h.gch 16 | Makefile 17 | test.* 18 | Test.* 19 | .DS_Store 20 | .vscode/ 21 | !CMakeLists.txt 22 | Results/ 23 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(SPH CXX) 2 | cmake_minimum_required(VERSION 2.7) 3 | include(CheckCXXCompilerFlag) 4 | 5 | IF(NOT CMAKE_BUILD_TYPE) 6 | SET( CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) 7 | ENDIF() 8 | 9 | IF(MSVC) 10 | add_definitions(-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE) 11 | ENDIF(MSVC) 12 | 13 | # -------------------------------------------------------------- 14 | # Finds MPI (including MSMPI) 15 | # -------------------------------------------------------------- 16 | if(WIN32) 17 | FIND_PATH(MPI_INCLUDE_PATH NAMES mpi.h HINTS "$ENV{MSMPI_INC}") 18 | if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) 19 | set(MS_MPI_ARCH_DIR x64) 20 | find_library(MPI_LIBRARIES msmpi PATHS "$ENV{MSMPI_LIB64}") 21 | else() 22 | set(MS_MPI_ARCH_DIR x86) 23 | find_library(MPI_LIBRARIES msmpi PATHS "$ENV{MSMPI_LIB32}") 24 | endif() 25 | message(STATUS "MPI_LIBRARIES = ${MPI_LIBRARIES}") 26 | IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU") 27 | add_definitions(-DMSMPI_NO_SAL -D"__int64=long long") # MinGW 28 | ENDIF() 29 | else() 30 | find_package(MPI REQUIRED) 31 | endif() 32 | include_directories(SYSTEM ${MPI_INCLUDE_PATH}) 33 | # -------------------------------------------------------------- 34 | 35 | check_cxx_compiler_flag("-std=c++11" STD11CHECK) 36 | IF(STD11CHECK) 37 | ADD_DEFINITIONS(-std=c++11 ) 38 | ENDIF() 39 | 40 | FILE(GLOB SRCS1 CPP_Interface/*.cpp) 41 | #FILE(GLOB SRCS1 CPP_Interface/ParaView.cpp CPP_Interface/writeField.cpp) 42 | FILE(GLOB SRCS1 CPP_Interface/*.h CPP_Interface/*.cpp) 43 | FILE(GLOB SRCS2 CPP_Physics/*.h CPP_Physics/*.cpp) 44 | FILE(GLOB SRCS3 CPP_Tools/*.h CPP_Tools/*.cpp) 45 | FILE(GLOB SRCS4 Headers/*.h Headers/*.cpp) 46 | 47 | INCLUDE_DIRECTORIES(CPP_Interface CPP_Physics CPP_Tools Headers) 48 | 49 | FIND_PACKAGE(ZLIB) 50 | IF(ZLIB_FOUND) 51 | add_definitions(-DUSE_ZLIB) 52 | INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} ) 53 | ENDIF() 54 | 55 | ADD_EXECUTABLE(sph ${SRCS1} ${SRCS2} ${SRCS3} ${SRCS4} CPP_Main/SPH.cpp) 56 | #ADD_EXECUTABLE(neighbors ${SRCS1} ${SRCS2} ${SRCS3} ${SRCS4} CPP_Main/Neighborhood_performance.cpp) 57 | 58 | IF(ZLIB_FOUND) 59 | TARGET_LINK_LIBRARIES(sph ${ZLIB_LIBRARY} ) 60 | ENDIF() 61 | 62 | target_link_libraries(sph ${MPI_LIBRARIES}) 63 | 64 | IF(MINGW) 65 | TARGET_LINK_LIBRARIES(sph psapi) # for "GetProcessMemoryInfo" 66 | #TARGET_LINK_LIBRARIES(neighbors psapi) 67 | ENDIF(MINGW) 68 | 69 | # - OpenMP -- 70 | if(POLICY CMP0012) 71 | cmake_policy(SET CMP0012 OLD) # "if() recognizes numbers and boolean constants." 72 | endif() 73 | find_package(OpenMP) 74 | if(OPENMP_FOUND) 75 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 76 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 77 | endif() 78 | -------------------------------------------------------------------------------- /CPP_Physics/Init.cpp: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// SOURCE: Functions to initialise a field and compute pressure from density. 3 | ///************************************************************************** 4 | #include "Main.h" 5 | #include "Physics.h" 6 | #define R 8.314 7 | /* 8 | *Input: 9 | *- field: field whose speeds will be initialised 10 | *- parameter: pointer the the structure containing parameters 11 | *Decscription: 12 | *Initialise speed from field. 13 | */ 14 | void speedInit(Field* field, Parameter* parameter) 15 | { 16 | for(int j=0 ; j<3 ; j++) 17 | // Initial state is zero speed; other choice could be implemented 18 | field->speed[j].assign(field->nTotal, 0.0); 19 | if (field->nMoving != 0) { 20 | int start=field->nFree+field->nFixed; 21 | int end=field->nTotal; 22 | for(int i=start ; idensityRef; 41 | double B = parameter->B; 42 | double gamma = parameter->gamma; 43 | double g = parameter->g; 44 | 45 | switch (parameter->densityInitMethod) 46 | { 47 | case hydrostatic: 48 | { 49 | double zMax = 0.0; 50 | double H; 51 | 52 | for (int j = 0; j < field->nTotal; j++){ 53 | if (field->type[j] == freePart && field->pos[2][j] > zMax){ 54 | zMax = field->pos[2][j]; 55 | } 56 | } 57 | switch (parameter->stateEquationMethod) 58 | { 59 | case quasiIncompressible: 60 | 61 | for (int i = 0; i < field->nTotal; i++){ 62 | if(field->type[i] == freePart){ 63 | H = zMax - field->pos[2][i]; 64 | double rho = (1 + (1 / B)*rho_0*g*H); 65 | field->density.push_back(rho_0*pow(rho, 1.0 / gamma)); 66 | } 67 | } 68 | break; 69 | 70 | case perfectGas: 71 | for (int i = 0; i < field->nTotal; i++){ 72 | if(field->type[i] == freePart){ 73 | H = zMax - field->pos[2][i]; 74 | double rho = rho_0*(1 + (parameter->molarMass/R/parameter->temperature)*rho_0*g*H); 75 | field->density.push_back(rho); 76 | } 77 | } 78 | break; 79 | } 80 | // Boundaries have constant densities 81 | for (int k = 0; k < field->nTotal; k++){ 82 | if(field->type[k] != freePart) 83 | field->density.push_back(parameter->densityRef); 84 | } 85 | } 86 | break; 87 | 88 | case homogeneous: 89 | field->density.assign(field->nTotal, rho_0); 90 | break; 91 | } 92 | } 93 | 94 | /* 95 | *Input: 96 | *- field: field whose pressure will be initialised 97 | *- parameter: pointer the the structure containing parameters 98 | *Decscription: 99 | *Initialise pressure from field. 100 | */ 101 | void pressureInit(Field* field, Parameter* parameter) 102 | { 103 | field->pressure.resize(field->nTotal); 104 | for(int i =0; inTotal;i++) 105 | { 106 | pressureComputation(field, parameter, i); 107 | } 108 | } 109 | 110 | /* 111 | *Input: 112 | *- field: field whose pressure will be updated 113 | *- parameter: pointer the the structure containing parameters 114 | *Decscription: 115 | *Compute pressure from field. 116 | */ 117 | void pressureComputation(Field* field, Parameter* parameter, int particleID) 118 | { 119 | //Parameter withdrawal 120 | double rho_0 = parameter->densityRef; 121 | double B = parameter->B; 122 | double gamma = parameter->gamma; 123 | double g = parameter->g; 124 | 125 | switch (parameter->stateEquationMethod) 126 | { 127 | case quasiIncompressible: 128 | { 129 | double rho = field->density[particleID]; 130 | double p = B*(pow(rho / rho_0, gamma) - 1); 131 | field->pressure[particleID] = p; 132 | } 133 | break; 134 | 135 | case perfectGas: 136 | { 137 | double rho = field->density[particleID]; 138 | double p = rho*R*parameter->temperature/parameter->molarMass; 139 | field->pressure[particleID] = p; 140 | } 141 | break; 142 | } 143 | } 144 | 145 | /* 146 | *Input: 147 | *- field: field whose masses are initialised 148 | *- parameter: pointer the the structure containing parameters 149 | *Decscription: 150 | *Initialise mass from field. 151 | */ 152 | void massInit(Field* field, Parameter* parameter, std::vector &vol) 153 | { 154 | for (int i = 0; inTotal; i++) 155 | { 156 | double m = field->density[i] * vol[i]; 157 | field->mass.push_back(m); 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /CPP_Physics/navierStokes.cpp: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// SOURCE: Function to implement continuity and momentum equations 3 | ///************************************************************************** 4 | #include "Main.h" 5 | #include "Physics.h" 6 | 7 | /* 8 | *Input: 9 | *- particleID: ID of the particle for which equation is computed 10 | *- neighbors: vector of the ID of the particles surrounding the particle for which the equation is computed 11 | *- kernelGradients[i]: kernel gradients between the particle for which equation is computed and its neighbors 12 | *- currentField: field containing information about all particles 13 | *Output: 14 | *- densityDerivative: derivative of the density of particleID 15 | */ 16 | double continuity(int particleID, std::vector& neighbors, std::vector& kernelGradients,Field* currentField) 17 | { 18 | double densityDerivative = 0.0; 19 | double scalarProduct; 20 | for (int i = 0; i < neighbors.size(); i++) 21 | { 22 | scalarProduct = 0.0; 23 | //Compute scalar product present in the formula 24 | for (int j = 0; j <= 2; j++) 25 | { 26 | scalarProduct += (currentField->speed[j][particleID] - currentField->speed[j][neighbors[i]]) 27 | * kernelGradients[3*i + j]; 28 | } 29 | densityDerivative += currentField->mass[neighbors[i]] * scalarProduct; 30 | } 31 | return densityDerivative; 32 | } 33 | 34 | 35 | /* 36 | *Input: 37 | *- particleID: ID of the particle for which equation is computed 38 | *- neighbors: vector of the ID of the particles surrounding the particle for which the equation is computed 39 | *- kernelGradients[i]: kernel gradients between the particle for which equation is computed and its neighbors 40 | *- currentField: field containing information about all particles 41 | *- speedDerivative: vector containing the derivative of speed in each direction for each free particle 42 | *Decscription: 43 | * Compute the speed derivative related to particleID and store it in the speedDerivative vector 44 | */ 45 | void momentum(int particleID, std::vector& neighbors, std::vector& kernelGradients,Field* currentField , Parameter* parameter, std::vector& speedDerivative, std::vector &viscosity) 46 | { 47 | viscosity.resize(neighbors.size()); 48 | viscosityComputation(particleID, neighbors, currentField, parameter, viscosity); 49 | 50 | for (int j = 0; j <= 2; j++) 51 | { 52 | for (int i = 0; i < neighbors.size(); i++) 53 | { 54 | speedDerivative[3*particleID + j] -= currentField->mass[neighbors[i]] 55 | * ( currentField->pressure[neighbors[i]] / ((currentField->density[neighbors[i]]*(currentField->density[neighbors[i]]))) 56 | + currentField->pressure[particleID] / ((currentField->density[particleID]*(currentField->density[particleID]))) 57 | + viscosity[i] ) 58 | * kernelGradients[3*i + j]; 59 | } 60 | } 61 | speedDerivative[3*particleID + 2] -= parameter->g; // Gravitational acceleration 62 | } 63 | 64 | void xsphCorrection(int particleID, std::vector &neighbors, std::vector& kernelValues, Field* currentField, Parameter* parameter, std::vector& positionDerivative){ 65 | 66 | for (int j = 0; j <= 2; j++){ 67 | double particleSpeed = currentField->speed[j][particleID]; 68 | positionDerivative[3*particleID + j] = particleSpeed; 69 | 70 | for (int i = 0; i < neighbors.size(); i++){ 71 | positionDerivative[3*particleID + j] += parameter->epsilonXSPH * (currentField->speed[j][neighbors[i]] - particleSpeed) 72 | * kernelValues[i] * currentField->mass[neighbors[i]] / currentField->density[neighbors[i]]; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /CPP_Physics/viscosityComputation.cpp: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// SOURCE: Function to implement the several viscosity equations. 3 | ///************************************************************************** 4 | #include "Main.h" 5 | #include "Physics.h" 6 | 7 | /* 8 | *Input: 9 | *- particleID: ID of the particle for which equation is computed 10 | *- neighbors: vector of the ID of the particles surrounding the particle for which the equation is computed 11 | *- currentField: field containing information about all particles 12 | *- parameter: user defined parameter stored in a structure 13 | *- viscosity: vector that is filled with the computed viscosities 14 | *Decscription: 15 | *Computes an artificial viscosity and stores it in the vector viscosity 16 | */ 17 | void viscosityComputation(int particleID, std::vector& neighbors, Field* currentField, Parameter* parameter,std::vector& viscosity) 18 | { 19 | double h = parameter->h; 20 | double maxMu = 0.0; 21 | double mean_rho = 0.0; 22 | 23 | switch(parameter->viscosityModel) 24 | { 25 | case violeauArtificial : 26 | for (int i = 0; i < neighbors.size(); i++) 27 | { 28 | double ux = currentField->speed[0][particleID]-currentField->speed[0][neighbors[i]]; 29 | double uy = currentField->speed[1][particleID]-currentField->speed[1][neighbors[i]]; 30 | double uz = currentField->speed[2][particleID]-currentField->speed[2][neighbors[i]]; 31 | double rx = currentField->pos[0][particleID]-currentField->pos[0][neighbors[i]]; 32 | double ry = currentField->pos[1][particleID]-currentField->pos[1][neighbors[i]]; 33 | double rz = currentField->pos[2][particleID]-currentField->pos[2][neighbors[i]]; 34 | double Rij_Uij = ux*rx+ry*uy+rz*uz; 35 | if(Rij_Uij < 0.0) 36 | { 37 | double Rij2 = rx*rx+ry*ry+rz*rz; 38 | double nu2 = parameter->epsilon*h*h; 39 | double mu = (h*Rij_Uij)/(Rij2+nu2); 40 | double rho = 0.5 * (currentField->density[particleID] + currentField->density[neighbors[i]]); 41 | 42 | viscosity[i] = ( -parameter->alpha*parameter->c*mu + parameter->beta*mu*mu ) / (rho); 43 | 44 | if (maxMu < mu) 45 | { 46 | maxMu = mu; 47 | } 48 | mean_rho += rho; 49 | } 50 | else 51 | { 52 | viscosity[i]=0.0; 53 | } 54 | } 55 | mean_rho = mean_rho/neighbors.size(); 56 | break; 57 | 58 | default : 59 | viscosity.assign(neighbors.size(),0.0); 60 | break; 61 | 62 | } 63 | 64 | // Adaptative Time Step 65 | switch(parameter->adaptativeTimeStep) 66 | { 67 | case yes : 68 | { 69 | double t_cv, t_f; 70 | 71 | 72 | t_f = 0.25 * sqrt(h/parameter->g); 73 | 74 | if(1) 75 | { 76 | t_cv = 0.4 * (h/(parameter->c+0.6*parameter->alpha*parameter->c+0.6*parameter->beta*maxMu)); 77 | } 78 | else 79 | { 80 | double gamma_air = 1.4; 81 | double c = sqrt(gamma_air* currentField->pressure[particleID] /mean_rho); 82 | t_cv = 0.4 * (h/(c+0.6*parameter->alpha*c+0.6*parameter->beta*maxMu)); 83 | } 84 | if (t_f < t_cv) 85 | currentField->nextK = t_f ; 86 | else if(t_cv < t_f) 87 | currentField->nextK = t_cv ; 88 | } 89 | break; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /CPP_Tools/CleanUp.cpp: -------------------------------------------------------------------------------- 1 | #include "Main.h" 2 | #include "Interface.h" 3 | 4 | // Clear the boxes content 5 | void boxClear(std::vector > &boxes) 6 | { 7 | for(int i=0 ; inTotal; 29 | for (int i = 0; i < 3; i++) 30 | { 31 | copiedField->l[i] = sourceField->l[i]; 32 | copiedField->u[i] = sourceField->u[i]; 33 | } 34 | copiedField->nFree = sourceField->nFree; 35 | copiedField->nFixed = sourceField->nFixed; 36 | copiedField->nMoving = sourceField->nMoving; 37 | copiedField->nTotal = nTotal; 38 | 39 | copiedField->mass = sourceField->mass; 40 | copiedField->type = sourceField->type; 41 | copiedField->pressure = sourceField->pressure; 42 | copiedField->density = sourceField->density; 43 | 44 | for(int j=0 ; j<3 ; j++){ 45 | copiedField->pos[j] = sourceField->pos[j];//.resize(nTotal);// 46 | copiedField->speed[j] = sourceField->speed[j];//.resize(nTotal); 47 | } 48 | } 49 | 50 | /* 51 | *Input: 52 | *- hopField/cornField: fields to swap 53 | *Description: 54 | *Exchange the content of the two fields because rotation of the cultures increases the fertility of fields. 55 | */ 56 | void swapField(Field** hopField, Field** cornField) 57 | { 58 | Field *tmpField; 59 | tmpField = *hopField; 60 | *hopField = *cornField; 61 | *cornField = tmpField; 62 | } 63 | -------------------------------------------------------------------------------- /CPP_Tools/ConsistencyCheck.cpp: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// SOURCE: Check the coherence of input values. 3 | ///************************************************************************** 4 | #include "Main.h" 5 | #include "Interface.h" 6 | 7 | Error consistencyParameters(Parameter* parameter) 8 | { 9 | int cntError = 0; 10 | 11 | if(parameter->kh <= 0.0) 12 | { 13 | std::cout << "Invalid kh.\n" << std::endl; 14 | cntError++; 15 | } 16 | 17 | if( (parameter->k <= 0.0) || (parameter->k > parameter->T) ) 18 | { 19 | std::cout << "Invalid timestep.\n" << std::endl; 20 | cntError++; 21 | } 22 | 23 | if(parameter->densityRef <= 0.0) 24 | { 25 | std::cout << "Invalid reference density.\n" << std::endl; 26 | cntError++; 27 | } 28 | 29 | if(parameter->B < 0.0) 30 | { 31 | std::cout << "Invalid B.\n" << std::endl; 32 | cntError++; 33 | } 34 | if(parameter->gamma < 0.0) 35 | { 36 | std::cout << "Invalid gamma.\n" << std::endl; 37 | cntError++; 38 | } 39 | if(parameter->writeInterval < parameter->k) 40 | { 41 | std::cout << "Invalid writeInterval.\n" << std::endl; 42 | cntError++; 43 | } 44 | if(parameter->c < 0.0) 45 | { 46 | std::cout << "Invalid speed of sound.\n" << std::endl; 47 | cntError++; 48 | } 49 | if(parameter->alpha < 0.0) 50 | { 51 | std::cout << "Invalid alpha.\n" << std::endl; 52 | cntError++; 53 | } 54 | if(parameter->beta < 0.0) 55 | { 56 | std::cout << "Invalid beta.\n" << std::endl; 57 | cntError++; 58 | } 59 | if(parameter->epsilon < 0.0) 60 | { 61 | std::cout << "Invalid epsilon.\n" << std::endl; 62 | cntError++; 63 | } 64 | if(parameter->temperature < 0.0) 65 | { 66 | std::cout << "Invalid temperature.\n" << std::endl; 67 | cntError++; 68 | } 69 | if(parameter->molarMass < 0.0) 70 | { 71 | std::cout << "Invalid molarMass.\n" << std::endl; 72 | cntError++; 73 | } 74 | if( (parameter->theta <= 0.0) || (parameter->theta > 1.0) ) 75 | { 76 | std::cout << "Invalid theta.\n" << std::endl; 77 | cntError++; 78 | } 79 | if (cntError != 0) 80 | { 81 | return consistencyError; 82 | } 83 | else 84 | { 85 | return noError; 86 | } 87 | } 88 | 89 | 90 | Error consistencyField(Field* field) 91 | { 92 | int cntError = 0; 93 | if( (field->u[0]l[0]) || (field->u[1]l[1]) || (field->u[2]l[2]) ) 94 | { 95 | std::cout << "Lower and higher domain dimension are not consistent.\n" << std::endl; 96 | cntError++; 97 | } 98 | 99 | int cntOutOfDomain = 0; 100 | for(int i = 0; i < field->nTotal; i++) 101 | for (int j=0;j<3;j++) 102 | { 103 | { 104 | if(field->pos[j][i] > field->u[j]) 105 | { 106 | cntOutOfDomain++; 107 | break; 108 | } 109 | else if (field->pos[j][i] < field->l[j]) 110 | { 111 | cntOutOfDomain++; 112 | break; 113 | } 114 | } 115 | } 116 | if(cntOutOfDomain != 0) 117 | { 118 | std::cout << cntOutOfDomain << " particles out of the domain.\n" << std::endl; 119 | cntError++; 120 | } 121 | 122 | if (cntError != 0){return consistencyError;} 123 | else{return noError;} 124 | } 125 | -------------------------------------------------------------------------------- /CPP_Tools/sizeField.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Main.h" 3 | #include "Interface.h" 4 | -------------------------------------------------------------------------------- /Headers/Interface.h: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// HEADER: Function That Load/Read Input Files And Generate Output Files 3 | ///************************************************************************** 4 | 5 | #ifndef INTERFACE_H 6 | #define INTERFACE_H 7 | #include "Structures.h" 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | // inputReader.cpp 16 | Error readParameter(std::string filename, Parameter* parameter); 17 | Error readGeometry(std::string filename, Field* currentField,Parameter* parameter, std::vector* volVector); 18 | Error initializeField(std::string filename, Field* currentField, Parameter* parameter); 19 | 20 | // writeField.cpp 21 | std::string creatDirectory(std::string dirname); 22 | 23 | void writeField(Field* field, double t, Parameter* parameter, 24 | std::string const ¶meterFilename="Undefined", 25 | std::string const &geometryFilename="Undefined", 26 | std::string const &filename="result"); 27 | 28 | void matlab(std::string const &filename, 29 | std::string const ¶meterFilename, 30 | std::string const &geometryFilename, 31 | int step, Parameter* parameter, Field* field); 32 | 33 | // ConsistencyCheck.cpp 34 | Error consistencyParameters(Parameter* param); 35 | Error consistencyField(Field* field); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Headers/Main.h: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// HEADER: Common Library Used By All Functions 3 | ///************************************************************************** 4 | 5 | #ifndef MAIN_H 6 | #define MAIN_H 7 | 8 | // Library used by everybody 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | extern std::clock_t startExperimentTimeClock; 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Headers/Structures.h: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// HEADER: Contains All Structures 3 | ///************************************************************************** 4 | 5 | #ifndef STRUCTURES_H 6 | #define STRUCTURES_H 7 | #include "Main.h" 8 | 9 | // Error types 10 | enum Error {noError, argumentError, parameterError, geometryError, consistencyError, NB_ERROR_VALUE}; 11 | 12 | // Kernel Types 13 | enum Kernel {Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline, NB_KERNEL_VALUE}; 14 | 15 | // model of viscosity formulation 16 | enum ViscosityModel {violeauArtificial, NB_VISCOSITY_VALUE}; 17 | 18 | // integrationMethod = euler ou RK2 19 | enum IntegrationMethod {euler, RK2, NB_INTEGRATION_VALUE}; 20 | 21 | // AdaptativeTimeStep 22 | enum AdaptativeTimeStep {no, yes, NB_ADAPTATIVE_VALUE}; 23 | 24 | // densityInitMethod = hydrosatic, etc. 25 | enum DensityInitMethod {hydrostatic, homogeneous, NB_DENSITYINIT_VALUE}; 26 | 27 | // stateEquationMethod = quasiIncompressible, perfectGas, etc. 28 | enum StateEquationMethod {quasiIncompressible, perfectGas, NB_STATEEQUATION_VALUE}; 29 | 30 | // massInitMethod = violeau2012 (all particles have same volumes), etc. 31 | enum MassInitMethod {violeau2012, NB_MASSINIT_VALUE}; 32 | 33 | // speedLaw = Will dictate the behaviour of moving boundaries: constant, sine, exponential 34 | enum PosLaw {constant, sine, exponential,rotating, NB_SPEEDLAW_VALUE}; 35 | 36 | // angleLaw = Will dictate the behaviour of moving boundaries: linear, sine, exponential 37 | enum AngleLaw {linearAngle, sineAngle, exponentialAngle, NB_ANGLELAW_VALUE}; 38 | 39 | // Write Format output 40 | enum Matlab {noMatlab, fullMatlab, NB_MATLAB_VALUE}; 41 | enum Paraview {noParaview, fullParaview, nFreeParaview, nMovingFixedParaview, nFree_nMovingFixedParaview, NB_PARAVIEW_VALUE}; 42 | 43 | // Particle type (Necessary to impose value here!) 44 | enum ParticleType {freePart=0, fixedPart=1,movingPart=2}; 45 | 46 | enum BathType {dat=0,txt=1}; 47 | 48 | struct Parameter { 49 | double kh, h, k, T, densityRef, B, gamma, g, writeInterval, c, alpha, beta, epsilon, molarMass, temperature, theta, epsilonXSPH; 50 | Kernel kernel; 51 | ViscosityModel viscosityModel; 52 | IntegrationMethod integrationMethod; 53 | AdaptativeTimeStep adaptativeTimeStep; 54 | DensityInitMethod densityInitMethod; 55 | StateEquationMethod stateEquationMethod; 56 | MassInitMethod massInitMethod; 57 | std::vector teta[3]; 58 | std::vector posLaw; 59 | std::vector angleLaw; 60 | std::vector charactTime; 61 | std::vector movingDirection[3], rotationCenter[3]; 62 | std::vector amplitude; 63 | Matlab matlab; 64 | Paraview paraview; 65 | }; 66 | 67 | 68 | struct Field { 69 | int nFree, nFixed, nMoving, nTotal; 70 | double l[3]; 71 | double u[3]; 72 | double nextK=0.0; 73 | double currentTime = 0.0; 74 | std::vector pos[3]; 75 | std::vector speed[3]; 76 | std::vector density; 77 | std::vector pressure; 78 | std::vector mass; 79 | std::vector type; 80 | }; 81 | 82 | struct SubdomainInfo{ 83 | int procID, nTasks; 84 | int startingBox, endingBox; 85 | int startingParticle, endingParticle; 86 | double boxSize; 87 | }; 88 | 89 | 90 | #endif 91 | -------------------------------------------------------------------------------- /Headers/Tools.h: -------------------------------------------------------------------------------- 1 | ///************************************************************************** 2 | /// HEADER: Function Used As Tools (Memory, CPU, Clean,...) 3 | ///************************************************************************** 4 | 5 | #ifndef TOOLS_H 6 | #define TOOLS_H 7 | #include "Structures.h" 8 | 9 | #if defined(_WIN32) || defined(WIN32) || defined(__WIN32) && !defined(__CYGWIN__) 10 | #include 11 | #include 12 | #pragma comment( lib, "psapi.lib" ) 13 | 14 | #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__)) 15 | #include 16 | #include 17 | #include 18 | #include "sys/types.h" 19 | //#include "sys/sysinfo.h" 20 | 21 | #if defined(__APPLE__) && defined(__MACH__) 22 | #include 23 | 24 | #elif defined(__linux__) || defined(__linux) || defined(linux) || defined(__gnu_linux__) 25 | #include 26 | #include "sys/types.h" 27 | #include "sys/sysinfo.h" 28 | extern struct sysinfo memInfo; 29 | 30 | #endif 31 | 32 | #else 33 | #error "Cannot define GetMemory( ) or GetMemoryProcessPeak( ) or GetMemoryProcess() for an unknown OS." 34 | #endif 35 | 36 | // Memory and CPU consumption 37 | size_t GetMemory(bool screen, bool print); 38 | size_t GetMemoryProcess(bool screen, bool print); 39 | size_t GetMemoryProcessPeak(bool screen, bool print); 40 | 41 | // CleanUp.cpp 42 | std::clock_t getTime(); 43 | void boxClear(std::vector > &boxes); 44 | void copyField(Field *sourceField,Field *copiedField); 45 | void swapField(Field** hopField, Field** cornField); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Headers/paraview.h: -------------------------------------------------------------------------------- 1 | #ifndef PARAVIEW_H 2 | #define PARAVIEW_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | enum PFormat 9 | { 10 | LEGACY_TXT = 0, 11 | LEGACY_BIN = 1, 12 | XML_BIN = 2, 13 | XML_BINZ = 3 14 | }; 15 | 16 | void paraview(std::string const &filename, 17 | int step, 18 | std::vector const (&pos)[3], 19 | std::map *> const &scalars, 20 | std::map (*)[3]> const &vectors, 21 | int nbpStart, int nbpEnd, 22 | PFormat format); 23 | 24 | #endif // PARAVIEW_H 25 | -------------------------------------------------------------------------------- /Headers/swapbytes.h: -------------------------------------------------------------------------------- 1 | #ifndef SWAPBYTES_H 2 | #define SWAPBYTES_H 3 | 4 | // from http://stackoverflow.com/questions/2182002/convert-big-endian-to-little-endian-in-c-without-using-provided-func 5 | 6 | #include 7 | 8 | //! Byte swap unsigned short 9 | inline uint16_t swap_uint16( uint16_t val ) 10 | { 11 | return (val << 8) | (val >> 8 ); 12 | } 13 | 14 | //! Byte swap short 15 | inline int16_t swap_int16( int16_t val ) 16 | { 17 | return (val << 8) | ((val >> 8) & 0xFF); 18 | } 19 | 20 | //! Byte swap unsigned int 21 | inline uint32_t swap_uint32( uint32_t val ) 22 | { 23 | val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF ); 24 | return (val << 16) | (val >> 16); 25 | } 26 | 27 | //! Byte swap int 28 | inline int32_t swap_int32( int32_t val ) 29 | { 30 | val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF ); 31 | return (val << 16) | ((val >> 16) & 0xFFFF); 32 | } 33 | 34 | inline int64_t swap_int64( int64_t val ) 35 | { 36 | val = ((val << 8) & 0xFF00FF00FF00FF00ULL ) | ((val >> 8) & 0x00FF00FF00FF00FFULL ); 37 | val = ((val << 16) & 0xFFFF0000FFFF0000ULL ) | ((val >> 16) & 0x0000FFFF0000FFFFULL ); 38 | return (val << 32) | ((val >> 32) & 0xFFFFFFFFULL); 39 | } 40 | 41 | inline uint64_t swap_uint64( uint64_t val ) 42 | { 43 | val = ((val << 8) & 0xFF00FF00FF00FF00ULL ) | ((val >> 8) & 0x00FF00FF00FF00FFULL ); 44 | val = ((val << 16) & 0xFFFF0000FFFF0000ULL ) | ((val >> 16) & 0x0000FFFF0000FFFFULL ); 45 | return (val << 32) | (val >> 32); 46 | } 47 | 48 | #endif //SWAPBYTES_H 49 | -------------------------------------------------------------------------------- /MakeFile&Batch/Makefile_FIRST: -------------------------------------------------------------------------------- 1 | .PHONY: cleanall, mrproper 2 | 3 | .SUFFIXES: 4 | 5 | # Compile parameters 6 | COMP=g++ 7 | FLAGS= -std=c++11 -W -Wall -g --pedantic 8 | 9 | all: sph 10 | 11 | # Objects used 12 | sph: Geometry.o ParaView.o Neighborhood.o MemUsage.o Neighborhood_performance.o #SPH.o 13 | $(COMP) $^ $(FLAGS) -o $@ 14 | 15 | #SPH.o: SPH.hpp 16 | Neighborhood_performance.o: SPH.hpp 17 | 18 | Neighborhood.o: SPH.hpp 19 | 20 | Geometry.o: SPH.hpp 21 | 22 | ParaView.o: SPH.hpp 23 | 24 | MemUsage.o: SPH.hpp 25 | 26 | # Compilation : 27 | %.o: %.cpp 28 | $(COMP) -c $< $(FLAGS) -o $@ 29 | 30 | cleanall: 31 | -rm -rf *.o 32 | 33 | mrproper: cleanall 34 | -rm -rf sph 35 | # End of Makefile 36 | -------------------------------------------------------------------------------- /MakeFile&Batch/Neighboor_performance.sh: -------------------------------------------------------------------------------- 1 | #Shell script for performance testing 2 | echo "N influence for equally spaced particules" 3 | ./sph 1 1.2 3 0 4 | ./sph 1 1.2 5 0 5 | ./sph 1 1.2 7 0 6 | ./sph 1 1.2 10 0 7 | ./sph 1 1.2 12 0 8 | ./sph 1 1.2 15 0 9 | ./sph 1 1.2 18 0 10 | 11 | 12 | echo "kh influence for equally spaced particules, N = 14^3" 13 | ./sph 1 1.2 13 0 14 | ./sph 1 1.5 13 0 15 | ./sph 1 1.7 13 0 16 | ./sph 1 2.3 13 0 17 | ./sph 1 2.5 13 0 18 | ./sph 1 2.7 13 0 19 | ./sph 1 3.0 13 0 20 | 21 | echo "N influence for equally spaced particules" 22 | ./sph 1 1.2 3 0.2 23 | ./sph 1 1.2 5 0.2 24 | ./sph 1 1.2 7 0.2 25 | ./sph 1 1.2 10 0.2 26 | ./sph 1 1.2 12 0.2 27 | ./sph 1 1.2 15 0.2 28 | ./sph 1 1.2 18 0.2 29 | 30 | 31 | echo "kh influence for equally spaced particules, N = 14^3" 32 | ./sph 1 1.2 13 0.2 33 | ./sph 1 1.5 13 0.2 34 | ./sph 1 1.7 13 0.2 35 | ./sph 1 2.3 13 0.2 36 | ./sph 1 2.5 13 0.2 37 | ./sph 1 2.7 13 0.2 38 | ./sph 1 3.0 13 0.2 39 | -------------------------------------------------------------------------------- /Matlab/GUI.m: -------------------------------------------------------------------------------- 1 | %************************************************************************** 2 | % GUI: Pseudo Graphical Interface 3 | % - Compile the project 4 | % - Run an experiment 5 | % - Analyse an experiment 6 | %************************************************************************** 7 | clc; clear all; close all; 8 | 9 | % Get Environement: 10 | name = getenv('COMPUTERNAME'); 11 | if (strcmp(name,'DESKTOP-31TT348')) 12 | path = 'C:\Users\'; 13 | disp(['Welcome DESKTOP-31TT348: ']); disp(['*****************']);disp([' ']); 14 | else path = ''; 15 | end 16 | 17 | loop=1; 18 | 19 | while (loop==1) 20 | % Choices 21 | disp(['Would you like to:']); 22 | disp([' 1) Compile the project; ']); 23 | disp([' 2) Run an experiment; ']); 24 | disp([' 3) Plot the Playground of an experiment; ']); 25 | disp([' 4) Analyse an experiment; ']); 26 | disp([' 5) Edit a new experiment; ']); 27 | disp([' 6) Exit; ', ' ']); 28 | choice = input('Enter your choice number: ' ); disp(' '); 29 | 30 | switch(choice) 31 | case 1 % Compile: 32 | cd ..; cd build/; 33 | if(ispc) system('mingw32-make') 34 | elseif(isunix) system('make') 35 | else disp(['You are not allowed to compile... ']); 36 | end 37 | cd ..; cd Matlab/; 38 | 39 | case 2 % Run: 40 | %if(strcmp(name,'DESKTOP-31TT348')) 41 | disp(['Choose among the list of Playgrounds: ']); 42 | cd ../Playgrounds/ 43 | 44 | disp(['Clic on Parameter file: ']); 45 | [p, pathname] = uigetfile({'*.kzr'},'/Playgrounds/'); 46 | 47 | disp(['Clic on Geometry file: ']); 48 | [g, pathname] = uigetfile({'*.kzr'},'/Playgrounds/'); 49 | 50 | p = strcat('../Playgrounds/',p) 51 | g = strcat('../Playgrounds/',g) 52 | 53 | cd ../build/Results 54 | nameExperiment = input('Enter the name of the experiment: ','s'); 55 | mkdir(nameExperiment); 56 | nameExperiment = strcat(nameExperiment,'/', nameExperiment); 57 | cd .. 58 | system(char(strcat({'"./sph"'},{' '},p,{' '},g,{' '}, {nameExperiment}))) 59 | cd ../Matlab/; 60 | %else disp(['You are not allowed to launch an experiment... ']); 61 | %end 62 | 63 | case 3 % Playground: 64 | disp(['Choose an experiment : ']); 65 | nameExperiment = uigetdir('../build/Results/'); 66 | Playground(nameExperiment, 1, path); 67 | 68 | case 4 % Analyse: 69 | disp(['Experiments Types: ']); % Display Possibilities 70 | disp(['1) Free Falling Cube']); 71 | disp(['2) Swimming Pool']); 72 | disp(['3) Piston']); 73 | disp(['4) Crash Cube']); 74 | disp(['5) Dam break']);disp([' ']); 75 | n = input('Enter the TYPE of the experiment: ');disp([' ']); 76 | disp(['Clic on directory: ']); 77 | nameExperiment = uigetdir('../build/Results/'); 78 | exit = TestCases(nameExperiment, n, path); 79 | loop=0; 80 | 81 | case 5 % Edit File 82 | cd ..; cd Playgrounds/; 83 | p = input('NEW Parameter file name: ','s'); p = strcat(p, '.kzr '); 84 | if (exist(p, 'file')==0) 85 | fid = fopen( p, 'wt' ); 86 | edit(p); 87 | end 88 | g = input('NEW Geometry file name: ','s'); g = strcat(g, '.kzr '); 89 | if (exist(g, 'file')==0) 90 | fid = fopen( g, 'wt' ); 91 | edit(g); 92 | end 93 | input('Enter: '); fclose(p); fclose(g); 94 | cd ..; cd Matlab/; 95 | 96 | case 6 % Exit 97 | loop=0; 98 | otherwise disp(['Not valid choice']); disp(' '); 99 | end 100 | 101 | end 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /Matlab/LouisGoffin.m: -------------------------------------------------------------------------------- 1 | boxL = 2. 2 | Lfloor = 0.7 3 | Lwater = 0.5 4 | sep = 0.05/4/2 % Rboman = 0.05/4/2 5 | 6 | kernel = 'cubic' 7 | 8 | h_0 = 0.2%rboman=0.06/4/2 % initial smoothing length [m] 9 | c_0 = 35.0 % initial speed of sound [m/s] 10 | rho_0 = 1000.0 % initial density [kg/m^3] 11 | dom_dim = boxL % domain size (cube) 12 | alpha = 0.5 % artificial viscosity factor 1 13 | beta = 0.0 % artificial viscosity factor 2 14 | T = 3.0 % simulation time 15 | saveInt = 0.01/2 % save interval 16 | 17 | % mobile particles 18 | disp(['Fluid']) 19 | s=sep 20 | o=[(boxL-Lwater)/2 (boxL-Lwater)/2 (boxL)/2+0.5] 21 | L=[Lwater Lwater Lwater] 22 | 23 | 24 | % fixed particles 25 | 26 | % obstacle 27 | disp(['obstacle']) 28 | s=sep 29 | o=[(boxL-Lfloor)/2 (boxL-Lfloor)/2 boxL/2] 30 | L=[Lfloor Lfloor sep] 31 | 32 | % floor 33 | disp(['obstacle']) 34 | s=sep 35 | o=[0 0 0] 36 | L=[boxL boxL sep] 37 | 38 | % x=0 39 | disp(['x=0']) 40 | s=sep 41 | o=[0 0 2*sep] 42 | L=[sep boxL boxL-2*sep] 43 | 44 | % y=0 45 | disp(['y=0']) 46 | s=sep 47 | o=[2*sep 0 2*sep] 48 | L=[boxL-4*sep sep boxL-2*sep] 49 | 50 | 51 | % x=L 52 | disp(['x=L']) 53 | s=sep 54 | o=[boxL-sep 0 2*sep] 55 | L=[sep boxL boxL-2*sep] 56 | 57 | 58 | % y=L 59 | disp(['y=L']) 60 | s=sep 61 | o=[2*sep boxL-sep 2*sep] 62 | L=[boxL-4*sep sep boxL-2*sep] 63 | -------------------------------------------------------------------------------- /Matlab/Playground.m: -------------------------------------------------------------------------------- 1 | %************************************************************************** 2 | % Plot Playground: 3 | %************************************************************************** 4 | function sucess = Playground(nameExperiment, n, path) 5 | 6 | 7 | close all; 8 | set(groot,'defaultLineLineWidth',2) 9 | 10 | % Check path (optional arument) 11 | if nargin < 2 12 | path = ''; 13 | end 14 | 15 | % Import data at t=0 16 | % Number of files to read 17 | dirName = dir([nameExperiment, '/*.txt']) %list all directory with.txt 18 | nstep = length(dir([nameExperiment, '/*.txt']))-1 %[-] 19 | 20 | % Import data at t=0 21 | filename=strcat(nameExperiment,'/',dirName(1).name) 22 | InitExperiment = importdata(filename); 23 | 24 | Str1 = char(InitExperiment.textdata(12)); 25 | Key1 = 'Domain (lower l) : '; 26 | Str2 = char(InitExperiment.textdata(13)); 27 | Key2 = 'Domain (upper u) : '; 28 | Str3 = char(InitExperiment.textdata(14)); 29 | Key3 = 'Number of Particules (nFree/nMoving/nFixed) : '; 30 | Index1 = strfind(Str1, Key1); Index2 = strfind(Str2, Key2); Index3 = strfind(Str3, Key3); 31 | l = sscanf(Str1(Index1(1) + length(Key1):end), '%g %g %g', 3); 32 | u = sscanf(Str2(Index2(1) + length(Key2):end), '%g %g %g', 3); 33 | limit = sscanf(Str3(Index3(1) + length(Key3):end), '%g %g %g', 3); 34 | 35 | %% SEE GEOMETRY 36 | 37 | disp(['What would you like to plot: ']); % Display Possibilities 38 | disp(['1) All particules (Free, Moving and Fixed)']); 39 | disp(['2) Free particules']); 40 | disp(['3) Fixed particules and Moving particules']);disp([' ']); 41 | n = input('Choice: '); 42 | 43 | switch n 44 | 45 | case 1 46 | scatter3(InitExperiment.data(:,1),InitExperiment.data(:,2),InitExperiment.data(:,3),10,InitExperiment.data(:,3)) 47 | case 2 48 | scatter3(InitExperiment.data(1:limit(1),1),InitExperiment.data(1:limit(1),2),InitExperiment.data(1:limit(1),3),10,InitExperiment.data(1:limit(1),3)) 49 | case 3 50 | InitExperiment.data(limit(1):limit(2)+limit(3),1) 51 | scatter3(InitExperiment.data(limit(1):limit(1)+limit(2)+limit(3),1),... 52 | InitExperiment.data(limit(1):limit(1)+limit(2)+limit(3),2),... 53 | InitExperiment.data(limit(1):limit(1)+limit(2)+limit(3),3),10,... 54 | InitExperiment.data(limit(1):limit(1)+limit(2)+limit(3),3)) 55 | end 56 | 57 | axis([l(1) u(1) l(2) u(2) l(3) u(3)]) 58 | colormap(jet); 59 | colorbar; 60 | 61 | 62 | 63 | sucess = 0; 64 | end 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Matlab/performance.m: -------------------------------------------------------------------------------- 1 | clc; 2 | close all; 3 | clear all; 4 | set(0,'defaulttextinterpreter','latex'); 5 | sz = 50; 6 | %% Load datas 7 | load('khPerformancePert.dat'); 8 | load('NperformancePert.dat'); 9 | load('Nperformance.dat'); 10 | load('khPerformance.dat'); 11 | 12 | %% Compute proportionality constant 13 | k1 = log(Nperformance(:,2)) - log(Nperformance(:,1).^2); 14 | k1 = exp(mean(k1)); 15 | k2 = log(NperformancePert(:,3)) - log(NperformancePert(:,1).*log(Nperformance(:,1))); 16 | k2 = exp(mean(k2)); 17 | 18 | %% N influence 19 | fig1 = figure(1); 20 | hold on; 21 | grid on; 22 | box('on') 23 | set(gca, 'xscale','log') 24 | set(gca, 'yscale','log') 25 | xlabel('Number of particules $N$ [-]','Fontsize', 12) 26 | ylabel('Time [s]','Fontsize', 12) 27 | set(gca,'xlim',[50 1e4],'Fontsize', 12) 28 | 29 | scatter(Nperformance(:,1),Nperformance(:,2),sz,'o','r') 30 | scatter(Nperformance(:,1),Nperformance(:,3),sz,'o','b') 31 | 32 | scatter(NperformancePert(:,1),NperformancePert(:,2),sz,'x','r') 33 | scatter(NperformancePert(:,1),NperformancePert(:,3),sz,'x','b') 34 | 35 | plot(Nperformance(:,1),k1*Nperformance(:,1).^2,'g') 36 | plot(Nperformance(:,1),k2*Nperformance(:,1).*log(Nperformance(:,1)),'k') 37 | 38 | l1 = legend('All-Pair search','Linked-list search','All-Pair search; variable spacing',... 39 | 'Linked-list search; variable spacing','$k_1 N^2$', '$k_2 N$ log$(N)$'); 40 | set(l1, 'Interpreter', 'Latex','Fontsize', 12) 41 | set(fig1, 'Position', [100, 100, 650, 350]); 42 | %% kh influence 43 | fig2 = figure(2); 44 | hold on; 45 | grid on; 46 | box('on') 47 | set(gca, 'yscale','log') 48 | xlabel('Smoothing length $\kappa h$ [-]') 49 | ylabel('Time [s]','Fontsize', 12) 50 | set(gca,'xlim',[1.2 3.1],'Fontsize', 12) 51 | 52 | scatter(khPerformance(:,1),khPerformance(:,2),sz,'o','r') 53 | scatter(khPerformance(:,1),khPerformance(:,3),sz,'o','b') 54 | 55 | scatter(khPerformancePert(:,1),khPerformancePert(:,2),sz,'x','r') 56 | scatter(khPerformancePert(:,1),khPerformancePert(:,3),sz,'x','b') 57 | 58 | l2 = legend('All-Pair search','Linked-list search','All-Pair search; variable spacing',... 59 | 'Linked-list search; variable spacing','Fontsize', 12); 60 | 61 | set(l2, 'Interpreter', 'Latex','Fontsize', 12) 62 | 63 | set(fig2, 'Position', [100, 100, 650, 350]); -------------------------------------------------------------------------------- /Matlab/performance_nic4.m: -------------------------------------------------------------------------------- 1 | close all; 2 | clear all; 3 | set(0,'defaulttextinterpreter','latex'); 4 | sz = 50; 5 | %% Load datas 6 | load('NperformanceNIC4.dat'); 7 | Nperformance = NperformanceNIC4; 8 | %% Compute proportionality constant 9 | k1 = log(Nperformance(:,2)) - log(Nperformance(:,1).^2); 10 | k1 = exp(mean(k1)); 11 | %k2 = log(NperformancePert(:,3)) - log(NperformancePert(:,1).*log(Nperformance(:,1))); 12 | %k2 = exp(mean(k2)); 13 | 14 | %% N influence 15 | fig1 = figure(1); 16 | hold on; 17 | grid on; 18 | box('on') 19 | set(gca, 'xscale','log') 20 | set(gca, 'yscale','log') 21 | xlabel('Number of particules $N$ [-]','Fontsize', 12) 22 | ylabel('Time [s]','Fontsize', 12) 23 | set(gca,'xlim',[50 1e4],'Fontsize', 12) 24 | 25 | scatter(Nperformance(:,1),Nperformance(:,2),sz,'o','r') 26 | scatter(Nperformance(:,1),Nperformance(:,3),sz,'o','b') 27 | 28 | %scatter(NperformancePert(:,1),NperformancePert(:,2),sz,'x','r') 29 | %scatter(NperformancePert(:,1),NperformancePert(:,3),sz,'x','b') 30 | 31 | plot(Nperformance(:,1),k1*Nperformance(:,1).^2,'g') 32 | plot(Nperformance(:,1),k2*Nperformance(:,1).*log(Nperformance(:,1)),'k') 33 | 34 | l1 = legend('All-Pair search','Linked-list search','All-Pair search; variable spacing',... 35 | 'Linked-list search; variable spacing','$k_1 N^2$', '$k_2 N$ log$(N)$'); 36 | set(l1, 'Interpreter', 'Latex','Fontsize', 12) 37 | set(fig1, 'Position', [100, 100, 650, 350]); -------------------------------------------------------------------------------- /Matlab/scaling.m: -------------------------------------------------------------------------------- 1 | %% Strong scaling analysis 2 | % Case - Dam break - Dam3 3 | % Free particles: 32175 4 | % BC particles: 24546 5 | 6 | processors = [1 2 3 4 5 6 8 10 12 15 17 20 25 30]; 7 | contProc = linspace(1, 30, 4); 8 | 9 | time = [48.98 28.93 18.71 13.15 10.82 8.82 6.62 5.33 4.7 4.01 3.45 2.82 2.82 2.08]; 10 | 11 | 12 | figure; 13 | set(gcf, 'Units', 'centimeters'); 14 | set(gcf, 'Position', [0 0 45 20]); 15 | set(gca, 'fontsize',28); 16 | set(gca, 'fontname','timesnewroman'); 17 | box('on') 18 | grid on 19 | hold on 20 | plot(processors, time(1)./time, '-o', 'linewidth', 2.5); 21 | plot(contProc, contProc, 'k', 'linewidth', 1); 22 | 23 | 24 | leg = legend('Code speedup','Ideal speedup $S=p$',... 25 | 'Location','southeast'); 26 | set(leg,'Interpreter','latex') 27 | 28 | xlabel('Number of processors $p$ [-]','Interpreter','latex','FontSize',28); 29 | ylabel('Speedup $S=T_1/T_p$ [-]','Interpreter','latex','FontSize',28); 30 | %xlim([-0.1,0.6]); 31 | %ylim([-1,1.5]); 32 | 33 | -------------------------------------------------------------------------------- /Matlab/scalingNew.m: -------------------------------------------------------------------------------- 1 | %% Strong scaling analysis 2 | 3 | % GOOD (MPI and OpenMP) 4 | % Case - Dam break - Dam3 5 | % Free particles: 32175 6 | % BC particles: 24546 7 | 8 | % BAD (MPI only) 9 | % Case - Dam on wet bed - Dam4 10 | % Free particles: 37800 11 | % BC particles: 24546 12 | 13 | %% MPI 14 | processors = [1 2 3 4 5 8 10 12 15 17]; 15 | contProc = linspace(1, 17, 4); 16 | 17 | timeGood = [89.5; 18 | 46.94; 19 | 34.25; 20 | 25.6; 21 | 22.3; 22 | 12.5; 23 | 10; 24 | 9.9; 25 | 7.75; 26 | 8.33]; 27 | 28 | timeBad = [79.2; 29 | 59.3; 30 | 60; 31 | 49.7; 32 | 52.8; 33 | 28.5; 34 | 23.5; 35 | 21.5; 36 | 20.1; 37 | 19.8]; 38 | 39 | 40 | figure; 41 | set(gcf, 'Units', 'centimeters'); 42 | set(gcf, 'Position', [0 0 45 20]); 43 | set(gca, 'fontsize',28); 44 | set(gca, 'fontname','timesnewroman'); 45 | box('on') 46 | grid on 47 | hold on 48 | plot(processors, timeGood(1)./timeGood, '-o', 'linewidth', 2.5); 49 | plot(processors, timeBad(1)./timeBad, '-o','color', 'm', 'linewidth', 2.5); 50 | plot(contProc, contProc, 'k', 'linewidth', 1); 51 | 52 | 53 | leg = legend('Speedup for the ideal case', 'Speedup for the non-ideal case', '$S=p$',... 54 | 'Location','north'); 55 | set(leg,'Interpreter','latex') 56 | 57 | xlabel('Number of processors $p$ [-]','Interpreter','latex','FontSize',28); 58 | ylabel('Speedup $S=T_1/T_p$ [-]','Interpreter','latex','FontSize',28); 59 | xlim([0,17]); 60 | %ylim([-1,1.5]); 61 | 62 | 63 | %% OpenMP 64 | processorsOMP = [1 2 3 4 5 6 8 10 13 16]; 65 | contProcOMP = linspace(1, 16, 4); 66 | % With 2 nodes 67 | time2 = [47.5; 68 | 25.35; 69 | 17.1; 70 | 12.5; 71 | 10.8; 72 | 9.25; 73 | 7.3; 74 | 7.3; 75 | 5.5; 76 | 5]; 77 | % With 5 nodes 78 | time5 = [20.12; 79 | 12.5; 80 | 7.25; 81 | 6; 82 | 5.8; 83 | 4.3; 84 | 4; 85 | 4; 86 | 3.4; 87 | 3.1]; 88 | 89 | 90 | figure; 91 | set(gcf, 'Units', 'centimeters'); 92 | set(gcf, 'Position', [0 0 45 20]); 93 | set(gca, 'fontsize',28); 94 | set(gca, 'fontname','timesnewroman'); 95 | box('on') 96 | grid on 97 | hold on 98 | plot(processorsOMP, time2(1)./time2, '-o', 'linewidth', 2.5); 99 | plot(processorsOMP, time5(1)./time5, '-o','color', 'm', 'linewidth', 2.5); 100 | plot(contProc, contProc, 'k', 'linewidth', 1); 101 | 102 | 103 | leg = legend('Speedup with 2 nodes', 'Speedup with 5 nodes', '$S=CPU_n$',... 104 | 'Location','north'); 105 | set(leg,'Interpreter','latex') 106 | 107 | xlabel('Number of CPU per node $CPU_n$ [-]','Interpreter','latex','FontSize',28); 108 | ylabel('Speedup $S=T_1/T_{CPU_n}$ [-]','Interpreter','latex','FontSize',28); 109 | xlim([0,16]); 110 | %ylim([-1,1.5]); 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /Matlab/timeMemScaling.m: -------------------------------------------------------------------------------- 1 | N=10.^(1:1:7); 2 | timeNaive=[0,0,0,0,0,0,0]; 3 | timeList=[0,0,0,0,0,0,0]; 4 | memNaive=[0,0,0,0,0,0,0]; 5 | memList=[0,0,0,0,0,0,0]; 6 | 7 | %% Time plot 8 | figure; 9 | set(gcf,'Units','centimeters'); 10 | set(gcf,'Position',[0.0 0.0 60 60*3/4]); 11 | set(gcf,'PaperPosition',[0.0 0.0 60 60*3/4]); 12 | grid on; 13 | box on; 14 | set(gca,'FontSize',22); 15 | xlabel('$N$ (log)','FontSize',22,'Interpreter','latex'); 16 | ylabel('Time [s]','FontSize',22,'Interpreter','latex'); 17 | hold on; 18 | %plot(N,timeNaive,'b.-'); 19 | %plot(N,timeList,'r.-'); 20 | semilogx(N,timeNaive,'b.-'); 21 | semilogx(N,timeList,'r.-'); 22 | hold off; 23 | %axis([0 4 -1 1]); 24 | NumTicks=5; 25 | L = get(gca,'XLim'); 26 | set(gca,'XTick',linspace(L(1),L(2),NumTicks)) 27 | L = get(gca,'YLim'); 28 | set(gca,'YTick',linspace(L(1),L(2),NumTicks)) 29 | legendInfo={'All-pair';'Linked List'}; 30 | legend(legendInfo,'Interpreter','latex','Location','Best'); 31 | 32 | %% Mem plot 33 | figure; 34 | set(gcf,'Units','centimeters'); 35 | set(gcf,'Position',[0.0 0.0 60 60*3/4]); 36 | set(gcf,'PaperPosition',[0.0 0.0 60 60*3/4]); 37 | grid on; 38 | box on; 39 | set(gca,'FontSize',22); 40 | xlabel('$N$ (log)','FontSize',22,'Interpreter','latex'); 41 | ylabel('Memory []','FontSize',22,'Interpreter','latex'); 42 | hold on; 43 | plot(N,memNaive,'b.-'); 44 | plot(N,memList,'r.-'); 45 | hold off; 46 | %axis([0 4 -1 1]); 47 | NumTicks=5; 48 | L = get(gca,'XLim'); 49 | set(gca,'XTick',linspace(L(1),L(2),NumTicks)) 50 | L = get(gca,'YLim'); 51 | set(gca,'YTick',linspace(L(1),L(2),NumTicks)) 52 | legendInfo={'All-pair';'Linked List'}; 53 | legend(legendInfo,'Interpreter','latex','Location','Best'); -------------------------------------------------------------------------------- /Playgrounds/BWGeom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 5 37 | uz = 15 38 | lx = -11 39 | ly = -5 40 | lz = -5 41 | 42 | #bathy 43 | batFile=../Playgrounds/smoothSlope.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=9 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=0 61 | z=7 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=15 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-4.25 90 | z=7 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=15 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=4.25 119 | z=7 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=15 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=7.5 149 | %dimen 150 | L=1 151 | W=8 152 | H=14.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=2.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=5 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/BWPara.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=1 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=30 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.3 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Bathymetry_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 150 36 | uy = 150 37 | uz = 50 38 | lx = -10 39 | ly = -10 40 | lz = -10 41 | 42 | #bathy 43 | batFile=Playgrounds/obliqueWave.dat 44 | s=3 45 | r=0 46 | numberGroundParticles=2 47 | height0=0 48 | hFreeSurface=20 49 | 50 | #brick 51 | %param 52 | c=1 53 | s=3 54 | r=0 55 | %coord 56 | x=-3 57 | y=50 58 | z=20 59 | %dimen 60 | L=6 61 | W=112 62 | H=40 63 | %inclin 64 | tetax=0.0 65 | tetay=0.0 66 | tetaz=0.0 67 | %movpara 68 | speedLaw=0 69 | angleLaw=0 70 | charactTime=0 71 | movingDirectionX=0 72 | movingDirectionY=0 73 | movingDirectionZ=0 74 | rotationCenterX=0 75 | rotationCenterY=0 76 | rotationCenterZ=0 77 | amplitude=0 78 | #brick 79 | %param 80 | c=1 81 | s=3 82 | r=0 83 | %coord 84 | x=103 85 | y=50 86 | z=20 87 | %dimen 88 | L=6 89 | W=112 90 | H=40 91 | %inclin 92 | tetax=0.0 93 | tetay=0.0 94 | tetaz=0.0 95 | %movpara 96 | speedLaw=0 97 | angleLaw=0 98 | charactTime=0 99 | movingDirectionX=0 100 | movingDirectionY=0 101 | movingDirectionZ=0 102 | rotationCenterX=0 103 | rotationCenterY=0 104 | rotationCenterZ=0 105 | amplitude=0 106 | #brick 107 | %param 108 | c=1 109 | s=3 110 | r=0 111 | %coord 112 | x=50 113 | y=-3 114 | z=20 115 | %dimen 116 | L=100 117 | W=6 118 | H=40 119 | %inclin 120 | tetax=0.0 121 | tetay=0.0 122 | tetaz=0.0 123 | %movpara 124 | speedLaw=0 125 | angleLaw=0 126 | charactTime=0 127 | movingDirectionX=0 128 | movingDirectionY=0 129 | movingDirectionZ=0 130 | rotationCenterX=0 131 | rotationCenterY=0 132 | rotationCenterZ=0 133 | amplitude=0 134 | #brick 135 | %param 136 | c=1 137 | s=3 138 | r=0 139 | %coord 140 | x=50 141 | y=103 142 | z=20 143 | %dimen 144 | L=100 145 | W=6 146 | H=40 147 | %inclin 148 | tetax=0.0 149 | tetay=0.0 150 | tetaz=0.0 151 | %movpara 152 | speedLaw=0 153 | angleLaw=0 154 | charactTime=0 155 | movingDirectionX=0 156 | movingDirectionY=0 157 | movingDirectionZ=0 158 | rotationCenterX=0 159 | rotationCenterY=0 160 | rotationCenterZ=0 161 | amplitude=0 162 | #END_G 163 | -------------------------------------------------------------------------------- /Playgrounds/Bathymetry_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %******************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % 27 | % writeInteval = time interval between two outputs file are generated 28 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 29 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 30 | % nMovingFixedParaview, nFree_nMovingFixedParaview 31 | %********************************************************************************************** 32 | 33 | #param 34 | 35 | % Numerical parameters 36 | kernel=2 37 | kh=120 38 | 39 | integrationMethod=1 40 | theta=1 41 | 42 | adaptativeTimeStep=0 43 | k=0.01 44 | 45 | T=0.01 46 | 47 | % Physical Parameters 48 | densityRef=1000.0 49 | densityInitMethod=0 50 | 51 | B=1280000 52 | gamma=7.0 53 | g=9.81 54 | c=100 55 | 56 | viscosityModel=0 57 | alpha=0.1 58 | beta=0 59 | epsilon=0.1 60 | 61 | stateEquationMethod=0 62 | molarMass=10.0 63 | temperature=300 64 | 65 | massInitMethod=0 66 | 67 | % Output Parameters 68 | writeInterval=0.01 69 | matlab=0 70 | paraview=4 71 | 72 | #END_F 73 | -------------------------------------------------------------------------------- /Playgrounds/BeachReal_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 11 37 | uz = 15 38 | lx = -20 39 | ly = -11 40 | lz = -1 41 | 42 | #bathy 43 | batFile=Playgrounds/beachReal.dat 44 | file=0 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=9 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=4.25 61 | z=7 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=15 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-0.25 90 | z=7 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=15 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=8.25 119 | z=7 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=15 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=4.25 148 | z=7.5 149 | %dimen 150 | L=1 151 | W=8 152 | H=14.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=2.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=5 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=4.25 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/BeachReal_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=1 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=30 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.3 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Beach_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.48 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=20 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.125 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/CrashCubeGoffin_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Goffin CrashCube param 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=2 39 | kh=0.024 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.00004 46 | 47 | T=3 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=1280000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.1 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.005 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/CrashCube_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=fixed, 2=moving 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | 35 | #domsz 36 | ux = 0.6 37 | uy = 0.6 38 | uz = 1 39 | lx = -0.6 40 | ly = -0.6 41 | lz = -0.5 42 | 43 | % Fluid 44 | #brick 45 | %param 46 | c=0 47 | s=0.05 48 | r=0 49 | %coord 50 | x=0 51 | y=0 52 | z=0.3 53 | %dimen 54 | L=0.5 55 | W=0.5 56 | H=0.5 57 | %inclin 58 | tetax=0.0 59 | tetay=0.0 60 | tetaz=0.0 61 | %movpara 62 | speedLaw=0 63 | angleLaw=0 64 | charactTime=0 65 | movingDirectionX=0 66 | movingDirectionY=0 67 | movingDirectionZ=0 68 | rotationCenterX=0 69 | rotationCenterY=0 70 | rotationCenterZ=0 71 | amplitude=0 72 | 73 | % Wall 74 | #brick 75 | %param 76 | c=1 77 | s=0.05 78 | r=0 79 | %coord 80 | x=0 81 | y=0 82 | z=0 83 | %dimen 84 | L=1.2 85 | W=1.2 86 | H=0.05 87 | %inclin 88 | tetax=0.0 89 | tetay=0.0 90 | tetaz=0.0 91 | %movpara 92 | speedLaw=0 93 | angleLaw=0 94 | charactTime=0 95 | movingDirectionX=0 96 | movingDirectionY=0 97 | movingDirectionZ=0 98 | rotationCenterX=0 99 | rotationCenterY=0 100 | rotationCenterZ=0 101 | amplitude=0 102 | 103 | #END_G 104 | -------------------------------------------------------------------------------- /Playgrounds/CrashCube_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.12 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.000005 46 | 47 | T=1 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=1280000 54 | gamma=7.0 55 | g=9.81 56 | c=100 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0.0 61 | epsilon=0.1 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=1 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/CrespoWaveParam.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=2 39 | kh=0.012 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.00001 46 | 47 | T=0.1 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=42042.85 54 | gamma=7.0 55 | g=9.81 56 | c=17.16 57 | 58 | viscosityModel=0 59 | alpha=0.01 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.0001 71 | matlab=0 72 | paraview=4 73 | #END_F 74 | -------------------------------------------------------------------------------- /Playgrounds/Dam2_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.8 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.001 46 | 47 | T=6 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=357000 54 | gamma=7.0 55 | g=9.81 56 | c=50 57 | 58 | viscosityModel=0 59 | alpha=0.03 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Dam3_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.5 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=6 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Dam4_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.5 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=2 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.5 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/DamWet_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.5 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=30 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.3 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.2 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Dam_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.92 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.001 46 | 47 | T=2 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=1280000 54 | gamma=7.0 55 | g=9.81 56 | c=100 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.1 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.01 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/FFC_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry Free Falling Cube 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=fixed, 2=moving 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundariess 32 | %******************************************** 33 | 34 | 35 | #domsz 36 | ux = 20 37 | uy = 20 38 | uz = 20 39 | lx = -20 40 | ly = -20 41 | lz = -20 42 | 43 | % Fluid cube 44 | #brick 45 | %param 46 | c=0 47 | s=0.5 48 | r=0 49 | %coord 50 | x=0 51 | y=-3 52 | z=8 53 | %dimen 54 | L=2 55 | W=1 56 | H=2 57 | %inclin 58 | tetax=0.0 59 | tetay=0.0 60 | tetaz=0.0 61 | %movpara 62 | speedLaw=3 63 | angleLaw=0 64 | charactTime=10.0 65 | movingDirectionX=0 66 | movingDirectionY=0 67 | movingDirectionZ=1 68 | rotationCenterX=0 69 | rotationCenterY=1.0 70 | rotationCenterZ=4.0 71 | amplitude=1.57 72 | 73 | #END_G 74 | -------------------------------------------------------------------------------- /Playgrounds/FFC_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Free Falling Cube 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | % Numerical parameters 37 | kernel=2 38 | kh=0.6 39 | 40 | integrationMethod=1 41 | theta=1 42 | 43 | adaptativeTimeStep=0 44 | k=0.1 45 | 46 | T=10 47 | 48 | % Physical Parameters 49 | densityRef=1000.0 50 | densityInitMethod=1 51 | 52 | B=1280000 53 | gamma=7.0 54 | g=9.81 55 | c=300.0 56 | 57 | viscosityModel=0 58 | alpha=0.1 59 | beta=0 60 | epsilon=0.1 61 | 62 | stateEquationMethod=0 63 | molarMass=1 64 | temperature=293.15 65 | 66 | massInitMethod=0 67 | 68 | % Output Parameters 69 | writeInterval=0.1 70 | matlab=0 71 | paraview=1 72 | 73 | #END_F 74 | -------------------------------------------------------------------------------- /Playgrounds/FreeFallingCube_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry Free Falling Cube 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=fixed, 2=moving 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundariess 32 | %******************************************** 33 | 34 | 35 | #domsz 36 | ux = 1 37 | uy = 1 38 | uz = 11 39 | lx = -1 40 | ly = -1 41 | lz = 0 42 | 43 | % Fluid cube 44 | #brick 45 | %param 46 | c=0 47 | s=0.1 48 | r=0 49 | %coord 50 | x=0 51 | y=0 52 | z=10 53 | %dimen 54 | L=1 55 | W=1 56 | H=1 57 | %inclin 58 | tetax=0.0 59 | tetay=0.0 60 | tetaz=0.0 61 | %movpara 62 | posLaw=0 63 | angleLaw=0 64 | charactTime=0 65 | movingDirectionX=0 66 | movingDirectionY=0 67 | movingDirectionZ=0 68 | rotationCenterX=0 69 | rotationCenterY=0 70 | rotationCenterZ=0 71 | amplitude=0 72 | 73 | #END_G 74 | -------------------------------------------------------------------------------- /Playgrounds/FreeFallingCube_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Free Falling Cube 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | % Numerical parameters 37 | kernel=2 38 | kh=0.6 39 | 40 | integrationMethod=0 41 | theta=1 42 | 43 | adaptativeTimeStep=0 44 | 45 | k=0.001 46 | 47 | T=1 48 | 49 | 50 | % Physical Parameters 51 | densityRef=1000.0 52 | densityInitMethod=1 53 | 54 | B=1280000 55 | gamma=7.0 56 | g=9.81 57 | c=300.0 58 | 59 | viscosityModel=0 60 | alpha=0.1 61 | beta=0 62 | epsilon=0.1 63 | 64 | stateEquationMethod=0 65 | molarMass=1 66 | temperature=293.15 67 | 68 | massInitMethod=0 69 | 70 | % Output Parameters 71 | writeInterval=0.1 72 | matlab=1 73 | paraview=4 74 | 75 | #END_F 76 | -------------------------------------------------------------------------------- /Playgrounds/HugeWave_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.48 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=50 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.125 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Jump_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.24 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=6 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.05 71 | matlab=1 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/MaunaLona.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/MaunaLona.dat -------------------------------------------------------------------------------- /Playgrounds/MaunaLona_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 800 36 | uy = 800 37 | uz = 100 38 | lx = -10 39 | ly = -10 40 | lz = -10 41 | 42 | % Volcano bathymetry 43 | #bathy 44 | % --------------------------------------% 45 | % Exexution depuis le build : 46 | % batFile=../Playgrounds/MaunaLona.dat 47 | % Exexution depuis la racine : 48 | batFile=Playgrounds/MaunaLona.dat 49 | % --------------------------------------% 50 | s=5 51 | r=0 52 | numberGroundParticles=2 53 | height0=0 54 | hFreeSurface=0 55 | #END_G 56 | -------------------------------------------------------------------------------- /Playgrounds/MaunaLona_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %******************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % 27 | % writeInteval = time interval between two outputs file are generated 28 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 29 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 30 | % nMovingFixedParaview, nFree_nMovingFixedParaview 31 | %********************************************************************************************** 32 | 33 | #param 34 | 35 | % Numerical parameters 36 | kernel=2 37 | kh=120 38 | 39 | integrationMethod=1 40 | theta=1 41 | 42 | adaptativeTimeStep=0 43 | k=0.01 44 | 45 | T=0.01 46 | 47 | % Physical Parameters 48 | densityRef=1000.0 49 | densityInitMethod=0 50 | 51 | B=1280000 52 | gamma=7.0 53 | g=9.81 54 | c=100 55 | 56 | viscosityModel=0 57 | alpha=0.1 58 | beta=0 59 | epsilon=0.1 60 | 61 | stateEquationMethod=0 62 | molarMass=10.0 63 | temperature=300 64 | 65 | massInitMethod=0 66 | 67 | % Output Parameters 68 | writeInterval=0.01 69 | matlab=0 70 | paraview=4 71 | 72 | #END_F 73 | -------------------------------------------------------------------------------- /Playgrounds/PPMs/MaunaLona.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/MaunaLona.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/beachReal.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/beachReal.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/beachRough.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/beachRough.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/beachRough2.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/beachRough2.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/beachSmooth.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/beachSmooth.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/beachWall.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/PPMs/beachWall.ppm -------------------------------------------------------------------------------- /Playgrounds/PPMs/ppmToBath.cpp: -------------------------------------------------------------------------------- 1 | // Use: ./ppmToBath bathymetry.ppm bathymetry.dat 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | struct Ppm { 8 | int w; 9 | int h; 10 | int maxval; 11 | int* grid; 12 | }; 13 | typedef struct Ppm Ppm; 14 | int ppmReader(char* ppmName, Ppm* ppm, char* filename){ 15 | // ---DEFINE ---// 16 | double xa=0.0; 17 | double xb=200.0; //beach: 200.0 //volcano: 700.0 18 | double ya=0.0; 19 | double yb=60.0; //beach: 60.0 //volcano: 700.0 20 | double max=30.0; //Maximum h value (white colour) 21 | //--------------// 22 | int i; 23 | double val; 24 | int gotWH=0; 25 | int gotMaxval=0; 26 | char buf[1000]; 27 | char first[1], second[1]; 28 | FILE *fp; 29 | FILE* fpnew=fopen(filename,"wb"); 30 | fp = fopen(ppmName, "r"); 31 | fgets(buf, sizeof(buf), fp); 32 | sscanf(buf, "%c%c", first, second); 33 | if(first[0]=='P' && (second [0]=='3'||second [0]=='5'||second [0]=='6')){ // Verifying file format 34 | while(gotWH==0 || gotMaxval==0){ // Reading w, h, maxval and skipping comments 35 | if(gotWH==0){ 36 | fgets(buf, sizeof(buf), fp); 37 | if(buf[0]!='#'){ // w and h value 38 | sscanf(buf, "%d %d", &(ppm->w), &(ppm->h)); 39 | gotWH=1; 40 | } 41 | } 42 | if(gotWH==1){ 43 | fgets(buf, sizeof(buf), fp); 44 | if(buf[0]!='#'){ //maxval 45 | sscanf(buf, "%d", &(ppm->maxval)); 46 | gotMaxval=1; 47 | } 48 | } 49 | } 50 | int w=ppm->w-1; 51 | int h=ppm->h-1; 52 | printf("\n %d %d \n", w,h); 53 | fwrite(&xa,sizeof(double),1, fpnew); 54 | fwrite(&xb,sizeof(double),1, fpnew); 55 | fwrite(&ya,sizeof(double),1, fpnew); 56 | fwrite(&yb,sizeof(double),1, fpnew); 57 | fwrite(&h,sizeof(int),1, fpnew); 58 | fwrite(&w,sizeof(int),1, fpnew); 59 | // Verifications 60 | assert((ppm->maxval)<=255 && "Wrong Maxval value."); 61 | // Allocating memory and reading the grid 62 | ppm->grid = (int*)malloc(3*(ppm->w)*(ppm->h)*sizeof(int)); 63 | for (i=0; i<(3*(ppm->w)*(ppm->h)); ++i){ 64 | (ppm->grid)[i] = fgetc(fp); 65 | if((i+1)%3==0){ 66 | val=((double)(255-(ppm->grid)[i]))/255.0*max; 67 | fwrite(&val,sizeof(double),1, fpnew); 68 | } 69 | } 70 | fclose(fp); 71 | fclose(fpnew); 72 | return 0; 73 | } 74 | else{ 75 | printf("File is not in the .ppm format.\n"); 76 | fclose(fp); 77 | return 1; 78 | } 79 | } 80 | void clear(Ppm* ppm){ 81 | // Freeing the allocated grids 82 | free(ppm->grid); 83 | } 84 | int main(int argc, char **argv){ 85 | if(argc==3){ // Single PPM 86 | Ppm ppm; 87 | printf("Processing %s ...\n", argv[1]); 88 | if(ppmReader(argv[1], &ppm, argv[2])==0){ 89 | clear(&ppm); 90 | } 91 | } 92 | return 0; 93 | } 94 | -------------------------------------------------------------------------------- /Playgrounds/Piston_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Pool 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % 27 | % writeInteval = time interval between two outputs file are generated 28 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 29 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 30 | % nMovingFixedParaview, nFree_nMovingFixedParaview 31 | %********************************************************************************************** 32 | 33 | #param 34 | 35 | % Numerical parameters 36 | kernel=2 37 | kh=0.048 38 | 39 | integrationMethod=1 40 | theta=0.5 41 | 42 | adaptativeTimeStep=0 43 | k=0.0001 44 | 45 | T=2 46 | 47 | % Physical Parameters 48 | densityRef=1000 49 | densityInitMethod=0 50 | 51 | B=1280000 52 | gamma=7.0 53 | g=9.81 54 | c=100 55 | 56 | viscosityModel=0 57 | alpha=0.1 58 | beta=0 59 | epsilon=0.1 60 | 61 | stateEquationMethod=0 62 | molarMass=1 63 | temperature=293.15 64 | 65 | massInitMethod=0 66 | 67 | % Output Parameters 68 | writeInterval=0.02 69 | matlab=1 70 | paraview=4 71 | #END_F 72 | -------------------------------------------------------------------------------- /Playgrounds/Pool_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Pool 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.048 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.00005 46 | 47 | T=1 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=1280000 54 | gamma=7.0 55 | g=9.81 56 | c=100 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.1 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.004 71 | matlab=1 72 | paraview=4 73 | 74 | 75 | #END_F 76 | -------------------------------------------------------------------------------- /Playgrounds/StationaryWave_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=2 39 | kh=0.48 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=50 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.125 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Tsunami_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.48 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=20 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.5 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.125 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Turbine_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.7 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=5 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.2 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/WaveBeach_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 300 36 | uy = 100 37 | uz = 100 38 | lx = -10 39 | ly = -10 40 | lz = -10 41 | 42 | % Beach bathymetry. Use : 43 | % batFile=Playgrounds/beachReal.dat 44 | % batFile=Playgrounds/beachRough.dat 45 | % batFile=Playgrounds/beachRough2.dat 46 | % batFile=Playgrounds/beachWall.dat 47 | % batFile=Playgrounds/beachSmooth.dat 48 | 49 | #bathy 50 | batFile=Playgrounds/beachRough2.dat 51 | s=3 52 | r=0 53 | numberGroundParticles=2 54 | height0=0 55 | hFreeSurface=30 56 | 57 | % End wall 58 | #brick 59 | %param 60 | c=1 61 | s=3 62 | r=0 63 | %coord 64 | x=-1 65 | y=30 66 | z=45 67 | %dimen 68 | L=5 69 | W=60 70 | H=30 71 | %inclin 72 | tetax=0.0 73 | tetay=0.0 74 | tetaz=0.0 75 | %movpara 76 | speedLaw=0 77 | angleLaw=0 78 | charactTime=0 79 | movingDirectionX=0 80 | movingDirectionY=0 81 | movingDirectionZ=0 82 | rotationCenterX=0 83 | rotationCenterY=0 84 | rotationCenterZ=0 85 | amplitude=0 86 | % Side wall 87 | #brick 88 | %param 89 | c=1 90 | s=3 91 | r=0 92 | %coord 93 | x=100 94 | y=61 95 | z=30 96 | %dimen 97 | L=200 98 | W=5 99 | H=60 100 | %inclin 101 | tetax=0.0 102 | tetay=0.0 103 | tetaz=0.0 104 | %movpara 105 | speedLaw=0 106 | angleLaw=0 107 | charactTime=0 108 | movingDirectionX=0 109 | movingDirectionY=0 110 | movingDirectionZ=0 111 | rotationCenterX=0 112 | rotationCenterY=0 113 | rotationCenterZ=0 114 | amplitude=0 115 | % Side wall 116 | #brick 117 | %param 118 | c=1 119 | s=3 120 | r=0 121 | %coord 122 | x=100 123 | y=-1 124 | z=30 125 | %dimen 126 | L=200 127 | W=5 128 | H=60 129 | %inclin 130 | tetax=0.0 131 | tetay=0.0 132 | tetaz=0.0 133 | %movpara 134 | speedLaw=0 135 | angleLaw=0 136 | charactTime=0 137 | movingDirectionX=0 138 | movingDirectionY=0 139 | movingDirectionZ=0 140 | rotationCenterX=0 141 | rotationCenterY=0 142 | rotationCenterZ=0 143 | amplitude=0 144 | % Moving plate 145 | #brick 146 | %param 147 | c=1 148 | s=2 149 | r=0 150 | %coord 151 | x=201 152 | y=30 153 | z=30 154 | %dimen 155 | L=5 156 | W=60 157 | H=60 158 | %inclin 159 | tetax=0.0 160 | tetay=0.0 161 | tetaz=0.0 162 | %movpara 163 | speedLaw=3 164 | angleLaw=0 165 | charactTime=1.0 166 | movingDirectionX=0 167 | movingDirectionY=0 168 | movingDirectionZ=0 169 | rotationCenterX=0 170 | rotationCenterY=0 171 | rotationCenterZ=0 172 | amplitude=5 173 | #END_G 174 | -------------------------------------------------------------------------------- /Playgrounds/WaveBeach_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %******************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % 27 | % writeInteval = time interval between two outputs file are generated 28 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 29 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 30 | % nMovingFixedParaview, nFree_nMovingFixedParaview 31 | %********************************************************************************************** 32 | 33 | #param 34 | 35 | % Numerical parameters 36 | kernel=2 37 | kh=120 38 | 39 | integrationMethod=1 40 | theta=1 41 | 42 | adaptativeTimeStep=0 43 | k=0.01 44 | 45 | T=0.01 46 | 47 | % Physical Parameters 48 | densityRef=1000.0 49 | densityInitMethod=0 50 | 51 | B=1280000 52 | gamma=7.0 53 | g=9.81 54 | c=100 55 | 56 | viscosityModel=0 57 | alpha=0.1 58 | beta=0 59 | epsilon=0.1 60 | 61 | stateEquationMethod=0 62 | molarMass=10.0 63 | temperature=300 64 | 65 | massInitMethod=0 66 | 67 | % Output Parameters 68 | writeInterval=0.01 69 | matlab=0 70 | paraview=4 71 | 72 | #END_F 73 | -------------------------------------------------------------------------------- /Playgrounds/WaveD_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=3 39 | kh=1.2 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=30 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.01 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Wave_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=fixed, 2=moving 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | 35 | #domsz 36 | ux = 17 37 | uy = 11 38 | uz = 11 39 | lx = -1.5 40 | ly = -1.5 41 | lz = -1.5 42 | %wall 43 | #brick 44 | %param 45 | c=1 46 | s=0.8 47 | r=0 48 | %coord 49 | x=8 50 | y=5 51 | z=1.6 52 | %dimen 53 | L=16 54 | W=10 55 | H=1.6 56 | %inclin 57 | tetax=0.0 58 | tetay=0.0 59 | tetaz=0.0 60 | %movpara 61 | speedLaw=3 62 | charactTime = 15 63 | movingDirectionX=-1 64 | movingDirectionY=-1 65 | movingDirectionZ=-1 66 | ampliRota=30.0 67 | #brick 68 | %param 69 | c=1 70 | s=0.8 71 | r=0 72 | %coord 73 | x=8 74 | y=10 75 | z=6.1 76 | %dimen 77 | L=16 78 | W=1.6 79 | H=9 80 | %inclin 81 | tetax=0.0 82 | tetay=0.0 83 | tetaz=0.0 84 | %movpara 85 | speedLaw=3 86 | charactTime = 15 87 | movingDirectionX=-1 88 | movingDirectionY=-1 89 | movingDirectionZ=-1 90 | ampliRota=30.0 91 | #brick 92 | %param 93 | c=1 94 | s=0.8 95 | r=0 96 | %coord 97 | x=8 98 | y=0 99 | z=6.1 100 | %dimen 101 | L=16 102 | W=1.6 103 | H=9 104 | %inclin 105 | tetax=0.0 106 | tetay=0.0 107 | tetaz=0.0 108 | %movpara 109 | speedLaw=3 110 | charactTime = 15 111 | movingDirectionX=-1 112 | movingDirectionY=-1 113 | movingDirectionZ=-1 114 | ampliRota=30.0 115 | #brick 116 | %param 117 | c=1 118 | s=0.8 119 | r=0 120 | %coord 121 | x=0 122 | y=5 123 | z=6.1 124 | %dimen 125 | L=1.6 126 | W=9.2 127 | H=9 128 | %inclin 129 | tetax=0.0 130 | tetay=0.0 131 | tetaz=0.0 132 | %movpara 133 | speedLaw=3 134 | charactTime = 15 135 | movingDirectionX=-1 136 | movingDirectionY=-1 137 | movingDirectionZ=-1 138 | ampliRota=30.0 139 | #brick 140 | %param 141 | c=2 142 | s=0.8 143 | r=0 144 | %coord 145 | x=15 146 | y=5 147 | z=6.3 148 | %dimen 149 | L=1.6 150 | W=9.2 151 | H=9 152 | %inclin 153 | tetax=0.0 154 | tetay=15.0 155 | tetaz=0.0 156 | %movpara 157 | speedLaw=3 158 | charactTime = 20 159 | movingDirectionX=-1 160 | movingDirectionY=-1 161 | movingDirectionZ=-1 162 | ampliRota=45.0 163 | #brick 164 | %param 165 | c=0 166 | s=0.4 167 | r=0 168 | %coord 169 | x=7 170 | y=5 171 | z=5.75 172 | %dimen 173 | L=12 174 | W=8 175 | H=5.5 176 | %inclin 177 | tetax=0.0 178 | tetay=0.0 179 | tetaz=0.0 180 | %movpara 181 | speedLaw=3 182 | charactTime = 20 183 | movingDirectionX=-1 184 | movingDirectionY=-1 185 | movingDirectionZ=-1 186 | ampliRota=45.0 187 | 188 | #END_G 189 | -------------------------------------------------------------------------------- /Playgrounds/Wave_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.6 40 | 41 | integrationMethod=1 42 | theta=1 43 | 44 | adaptativeTimeStep=0 45 | k=0.0001 46 | 47 | T=50 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=0 52 | 53 | B=1280000 54 | gamma=7.0 55 | g=9.81 56 | c=100 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.1 62 | 63 | stateEquationMethod=0 64 | molarMass=10.0 65 | temperature=300 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.005 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/Wavelisse_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.5 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=45 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.2 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/beachReal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/beachReal.dat -------------------------------------------------------------------------------- /Playgrounds/beachRough.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/beachRough.dat -------------------------------------------------------------------------------- /Playgrounds/beachRough2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/beachRough2.dat -------------------------------------------------------------------------------- /Playgrounds/beachSmooth.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/beachSmooth.dat -------------------------------------------------------------------------------- /Playgrounds/beachWall.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/beachWall.dat -------------------------------------------------------------------------------- /Playgrounds/obliqueProfile.txt: -------------------------------------------------------------------------------- 1 | 0 125 -50 50 5 4 2 | 0 0 0 0 0 3 | 0 0 0 0 0 4 | 2.5000 1.8750 1.2500 0.6250 0 5 | 5.0000 3.7500 2.5000 1.2500 0 6 | 7.5000 5.6250 3.7500 1.8750 0 7 | 10.0000 7.5000 5.0000 2.5000 0 8 | -------------------------------------------------------------------------------- /Playgrounds/obliqueWave.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/Playgrounds/obliqueWave.dat -------------------------------------------------------------------------------- /Playgrounds/smoothSlope.txt: -------------------------------------------------------------------------------- 1 | 0 170 -4 4 17 1 2 | 0 0 3 | 0 0 4 | 0.6667 0.6667 5 | 1.3333 1.3333 6 | 2.0000 2.0 7 | 2.6667 2.6667 8 | 3.3333 3.3333 9 | 4.0000 4.0000 10 | 4.6667 4.6667 11 | 5.3333 5.3333 12 | 6.0000 6.0000 13 | 6.6667 6.6667 14 | 7.3333 7.3333 15 | 8.0000 8.0000 16 | 8.6667 8.6667 17 | 9.3333 9.3333 18 | 10.0000 10.0000 19 | 10.0000 10.0000 20 | -------------------------------------------------------------------------------- /Playgrounds/soup.para: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.012 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0001 46 | 47 | T=5 48 | % Physical Parameters 49 | densityRef=1000.0 50 | densityInitMethod=1 51 | 52 | B=60000 53 | gamma=7.0 54 | g=9.81 55 | c=20 56 | 57 | viscosityModel=0 58 | alpha=0.06 59 | beta=0 60 | epsilon=0.25 61 | 62 | stateEquationMethod=0 63 | molarMass=0 64 | temperature=0 65 | 66 | massInitMethod=0 67 | 68 | % Output Parameters 69 | writeInterval=0.03 70 | matlab=0 71 | paraview=4 72 | 73 | #END_F 74 | -------------------------------------------------------------------------------- /Playgrounds/soup.txt: -------------------------------------------------------------------------------- 1 | -0.1 0.1 -0.1 0.1 5 5 2 | 0.04 0.04 0.04 0.04 0.04 0.04 3 | 0.04 0 0 0 0 0.04 4 | 0.04 0 0 0 0 0.04 5 | 0.04 0 0 0 0 0.04 6 | 0.04 0 0 0 0 0.04 7 | 0.04 0.04 0.04 0.04 0.04 0.04 8 | -------------------------------------------------------------------------------- /Playgrounds/soup2.txt: -------------------------------------------------------------------------------- 1 | -0.15 0.15 -0.15 0.15 9 9 2 | 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 3 | 0.02 0 0 0 0 0 0 0 0 0.02 4 | 0.02 0 0 0 0 0 0 0 0 0.02 5 | 0.02 0 0 0 0 0 0 0 0 0.02 6 | 0.02 0 0 0 0 0 0 0 0 0.02 7 | 0.02 0 0 0 0 0 0 0 0 0.02 8 | 0.02 0 0 0 0 0 0 0 0 0.02 9 | 0.02 0 0 0 0 0 0 0 0 0.02 10 | 0.02 0 0 0 0 0 0 0 0 0.02 11 | 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 12 | -------------------------------------------------------------------------------- /Playgrounds/soupPara.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=0.012 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0001 46 | 47 | T=5 48 | % Physical Parameters 49 | densityRef=1000.0 50 | densityInitMethod=1 51 | 52 | B=60000 53 | gamma=7.0 54 | g=9.81 55 | c=20 56 | 57 | viscosityModel=0 58 | alpha=0.06 59 | beta=0 60 | epsilon=0.25 61 | 62 | stateEquationMethod=0 63 | molarMass=0 64 | temperature=0 65 | 66 | massInitMethod=0 67 | 68 | % Output Parameters 69 | writeInterval=0.03 70 | matlab=0 71 | paraview=4 72 | 73 | #END_F 74 | -------------------------------------------------------------------------------- /Playgrounds/vortex/vortex_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.7 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=50 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.2 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex10_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=1 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex1_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.6 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex2_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.7 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex3_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.8 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex4_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.9 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex5_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=1 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.2 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex6_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.6 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex7_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.7 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex8_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.8 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/vortex_test/vortex9_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter example 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtx for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=1 39 | kh=0.9 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.0005 46 | 47 | T=40 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=175000 54 | gamma=7.0 55 | g=9.81 56 | c=35 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.01 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.25 71 | matlab=0 72 | paraview=4 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeed1_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 5 37 | uz = 15 38 | lx = -11 39 | ly = -5 40 | lz = -5 41 | 42 | #bathy 43 | batFile=../Playgrounds/zeroSlope.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=8 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=0 61 | z=7 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=15 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-4.25 90 | z=7 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=15 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=4.25 119 | z=7 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=15 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=7.5 149 | %dimen 150 | L=1 151 | W=8 152 | H=14.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=5.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=2 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeed1_Para.kzr: -------------------------------------------------------------------------------- 1 | #PARA1 2 | %********************************************************************************************** 3 | % PLAYGROUND : Parameter Dam 4 | % #param 5 | % 6 | % kernel = type of kernel : Gaussian, Bell_shaped, Cubic_spline, Quadratic, Quintic, Quintic_spline 7 | % kh = smothing length 8 | % integrationMethod = euler or RK2 9 | % theta = RK2 parameter : 1 for mid point method, 0.5 for Heun's method, 1.5 for Ralston's method 10 | % adaptativeTimeStep= no or yes 11 | % k = time step 12 | % T = simulation time 13 | % 14 | % densityRef = density of the fluid at atmospheric pressure 15 | % densityInitMethod = hydrosatic, etc. 16 | % B & gamma = fluid constants 17 | % g = gravity 18 | % c = speed of sound 19 | % viscosityModel = violeauArtificial 20 | % alpha, beta & epsilon = viscosity parameters 21 | % stateEquationMethod = quasiIncompressible, perfectGas, etc. 22 | % molarMass = 23 | % temperature = 24 | % massInitMethod = violeau2012 (all particles have same volumes), etc. 25 | % 26 | % movingDirection X, Y & Z = 27 | % speedLaw = dictate the behaviour of moving boundaries 28 | % 29 | % writeInteval = time interval between two outputs file are generated 30 | % matlab = write .txt for matlab analysis: noMatlab or fullMatlab 31 | % paraview = write .vtk for paraview analysis: noParaview, fullParaview, nFreeParaview, 32 | % nMovingFixedParaview, nFree_nMovingFixedParaview 33 | %********************************************************************************************** 34 | 35 | #param 36 | 37 | % Numerical parameters 38 | kernel=4 39 | kh=1 40 | 41 | integrationMethod=1 42 | theta=0.5 43 | 44 | adaptativeTimeStep=0 45 | k=0.001 46 | 47 | T=50 48 | 49 | % Physical Parameters 50 | densityRef=1000.0 51 | densityInitMethod=1 52 | 53 | B=1142857 54 | gamma=7.0 55 | g=9.81 56 | c=90 57 | 58 | viscosityModel=0 59 | alpha=0.1 60 | beta=0 61 | epsilon=0.0 62 | 63 | stateEquationMethod=0 64 | molarMass=1 65 | temperature=293.15 66 | 67 | massInitMethod=0 68 | 69 | % Output Parameters 70 | writeInterval=0.2 71 | matlab=0 72 | paraview=2 73 | 74 | #END_F 75 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeed2_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 5 37 | uz = 15 38 | lx = -11 39 | ly = -5 40 | lz = -5 41 | 42 | #bathy 43 | batFile=../Playgrounds/zeroSlope.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=4 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=0 61 | z=7 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=15 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-4.25 90 | z=7 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=15 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=4.25 119 | z=7 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=15 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=7.5 149 | %dimen 150 | L=1 151 | W=8 152 | H=14.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=5.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=2 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeed3_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 5 37 | uz = 20 38 | lx = -11 39 | ly = -5 40 | lz = -5 41 | 42 | #bathy 43 | batFile=../Playgrounds/zeroSlope.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=12 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=0 61 | z=9.5 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=20 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-4.25 90 | z=9.5 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=20 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=4.25 119 | z=9.5 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=20 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=10 149 | %dimen 150 | L=1 151 | W=8 152 | H=19.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=5.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=2 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeed4_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 171 36 | uy = 5 37 | uz = 24 38 | lx = -11 39 | ly = -5 40 | lz = -5 41 | 42 | #bathy 43 | batFile=../Playgrounds/zeroSlope.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=16 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=170.25 60 | y=0 61 | z=11.5 62 | %dimen 63 | L=0.5 64 | W=8 65 | H=24 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=80 89 | y=-4.25 90 | z=11.5 91 | %dimen 92 | L=181 93 | W=0.5 94 | H=24 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=80 118 | y=4.25 119 | z=11.5 120 | %dimen 121 | L=181 122 | W=0.5 123 | H=24 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=12 149 | %dimen 150 | L=1 151 | W=8 152 | H=23.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=5.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=2 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=8 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/waveSpeedOblique_Geom.kzr: -------------------------------------------------------------------------------- 1 | #GEOM1 2 | %******************************************** 3 | % PLAYGROUND : Geometry example 4 | % 5 | % #GEOM 6 | % #domain 7 | % lx, ly, lz ==> Lower coordinate of the domain 8 | % ux, uy, uz ==> Upper coordinate of the domain 9 | % 10 | % geometry : #brick, #cylin or #spher 11 | % %param 12 | % c ==> 0=free, 1=moving, 2=fixed 13 | % s ==> spacing between particles 14 | % r ==> % randomness in particle's position 15 | % %coord 16 | % x ==> x coordinate of the center of mass 17 | % y ==> y coordinate of the center of mass 18 | % z ==> z coordinate of the center of mass 19 | % %dimen 20 | % L ==> Length of the geometry 21 | % W ==> Width of the geometry 22 | % H ==> Height of the geometry 23 | % d ==> Small diameter of the geometry 24 | % D ==> Large diameter of the geometry 25 | % %inclin 26 | % tetax ==> Angle of rotation around the x axis (in degre) 27 | % tetay ==> Angle of rotation around the y axis (in degre) 28 | % tetaz ==> Angle of rotation around the z axis (in degre) 29 | % %movpara 30 | % movingDirection X, Y & Z = 31 | % speedLaw = dictate the behaviour of moving boundaries 32 | %******************************************** 33 | 34 | #domsz 35 | ux = 128 36 | uy = 52 37 | uz = 15 38 | lx = -11 39 | ly = -52 40 | lz = -3 41 | 42 | #bathy 43 | batFile=../Playgrounds/obliqueProfile.txt 44 | file=1 45 | s=0.5 46 | r=0 47 | numberGroundParticles=2 48 | height0=0 49 | hFreeSurface=9 50 | 51 | 52 | % End wall 53 | #brick 54 | %param 55 | c=1 56 | s=0.5 57 | r=0 58 | %coord 59 | x=125.25 60 | y=0 61 | z=7 62 | %dimen 63 | L=0.5 64 | W=100 65 | H=15 66 | %inclin 67 | tetax=0.0 68 | tetay=0.0 69 | tetaz=0.0 70 | %movpara 71 | speedLaw=0 72 | angleLaw=0 73 | charactTime=0 74 | movingDirectionX=0 75 | movingDirectionY=0 76 | movingDirectionZ=0 77 | rotationCenterX=0 78 | rotationCenterY=0 79 | rotationCenterZ=0 80 | amplitude=0 81 | % Side wall 82 | #brick 83 | %param 84 | c=1 85 | s=0.5 86 | r=0 87 | %coord 88 | x=57.5 89 | y=-50.25 90 | z=7 91 | %dimen 92 | L=136 93 | W=0.5 94 | H=15 95 | %inclin 96 | tetax=0.0 97 | tetay=0.0 98 | tetaz=0.0 99 | %movpara 100 | speedLaw=0 101 | angleLaw=0 102 | charactTime=0 103 | movingDirectionX=0 104 | movingDirectionY=0 105 | movingDirectionZ=0 106 | rotationCenterX=0 107 | rotationCenterY=0 108 | rotationCenterZ=0 109 | amplitude=0 110 | % Side wall 111 | #brick 112 | %param 113 | c=1 114 | s=0.5 115 | r=0 116 | %coord 117 | x=57.5 118 | y=50.25 119 | z=7 120 | %dimen 121 | L=136 122 | W=0.5 123 | H=15 124 | %inclin 125 | tetax=0.0 126 | tetay=0.0 127 | tetaz=0.0 128 | %movpara 129 | speedLaw=0 130 | angleLaw=0 131 | charactTime=0 132 | movingDirectionX=0 133 | movingDirectionY=0 134 | movingDirectionZ=0 135 | rotationCenterX=0 136 | rotationCenterY=0 137 | rotationCenterZ=0 138 | amplitude=0 139 | % Moving plate 140 | #brick 141 | %param 142 | c=2 143 | s=0.5 144 | r=0 145 | %coord 146 | x=-0.5 147 | y=0 148 | z=7.5 149 | %dimen 150 | L=1 151 | W=100 152 | H=14.5 153 | %inclin 154 | tetax=0.0 155 | tetay=0.0 156 | tetaz=0.0 157 | %movpara 158 | speedLaw=1 159 | angleLaw=0 160 | charactTime=5.0 161 | movingDirectionX=1 162 | movingDirectionY=0 163 | movingDirectionZ=0 164 | rotationCenterX=0 165 | rotationCenterY=0 166 | rotationCenterZ=0 167 | amplitude=2 168 | 169 | % Below moving plate 170 | #brick 171 | %param 172 | c=1 173 | s=0.5 174 | r=0 175 | %coord 176 | x=-5 177 | y=0 178 | z=-0.25 179 | %dimen 180 | L=10 181 | W=100 182 | H=1 183 | %inclin 184 | tetax=0.0 185 | tetay=0.0 186 | tetaz=0.0 187 | %movpara 188 | speedLaw=0 189 | angleLaw=0 190 | charactTime=0 191 | movingDirectionX=0 192 | movingDirectionY=0 193 | movingDirectionZ=0 194 | rotationCenterX=0 195 | rotationCenterY=0 196 | rotationCenterZ=0 197 | amplitude=0 198 | #END_G 199 | -------------------------------------------------------------------------------- /Playgrounds/zeroSlope.txt: -------------------------------------------------------------------------------- 1 | 0 170 -4 4 1 1 2 | 0 0 3 | 0 0 4 | -------------------------------------------------------------------------------- /Results/README.doc: -------------------------------------------------------------------------------- 1 | This folder needs to exist in order to collect results. 2 | -------------------------------------------------------------------------------- /SPH_PROJECT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/SPH_PROJECT.pdf -------------------------------------------------------------------------------- /SPH_Presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/SPH_Presentation.pdf -------------------------------------------------------------------------------- /SPH_Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/SPH_Report.pdf -------------------------------------------------------------------------------- /cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/xavier/Desktop/Git/IntegratedProject/SPH_method 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Release") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/xavier/Desktop/Git/IntegratedProject/SPH_method/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /compilation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Compilation script, to be launched from the source folder 3 | # Render the file executable if needed : chmod +x compilation.sh 4 | cmakeFile="CMakeLists.txt" 5 | makefile="Makefile" 6 | execFile="sph" 7 | if [ -f "$cmakeFile" ] 8 | then 9 | if [ -f $execFile ] 10 | then 11 | rm $execFile 12 | fi 13 | echo "Building Cmake." 14 | cd build 15 | cmake .. 16 | if [ -f "$makefile" ] 17 | then 18 | echo "Compiling." 19 | make 20 | if [ -f "$execFile" ] 21 | then 22 | echo "Compilation succeeded." 23 | mv $execFile ../ 24 | else 25 | echo "Compilation failed" 26 | fi 27 | else 28 | echo "Cmake Makefile generation failed." 29 | fi 30 | 31 | else 32 | echo "$cmakeFile not found." 33 | fi 34 | 35 | 36 | -------------------------------------------------------------------------------- /nic4Results: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/nic4Results -------------------------------------------------------------------------------- /rboman/.gitignore: -------------------------------------------------------------------------------- 1 | # list of ignored files/folders 2 | 3 | build/ 4 | *~ 5 | *.o 6 | *.obj 7 | *.bak 8 | -------------------------------------------------------------------------------- /rboman/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(SPH CXX) 2 | cmake_minimum_required(VERSION 2.7) 3 | 4 | FILE(GLOB SRCS *.h *.cpp) 5 | ADD_EXECUTABLE(sph ${SRCS}) 6 | 7 | # - OpenMP -- 8 | 9 | find_package(OpenMP REQUIRED) 10 | 11 | if(OPENMP_FOUND) 12 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 13 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 14 | endif() 15 | 16 | 17 | -------------------------------------------------------------------------------- /rboman/README.md: -------------------------------------------------------------------------------- 1 | # sph 2 | Dummy SPH program 3 | * creates a particle set (cube) 4 | * simulates a time-integration loop: 5 | * generates some scalar/vector results for each particle 6 | * saves them to disk in paraview format 7 | 8 | ## build and run 9 | ```bash 10 | mkdir build 11 | cd build 12 | cmake .. 13 | make 14 | ./sph 15 | ``` 16 | see also [CMake](https://cmake.org/) 17 | 18 | ## results 19 | The program generates 20 [VTK](http://www.vtk.org/) files which can be loaded into [Paraview](http://www.paraview.org/) 20 | 21 | ![Screenshot](screenshot.png) 22 | 23 | 24 | -------------------------------------------------------------------------------- /rboman/cube.cpp: -------------------------------------------------------------------------------- 1 | #include "sph.h" 2 | 3 | // build a cube of particles aligned with x,y,z axes. 4 | // - o[3]: corner of the cube with the lowest (x,y,z) values 5 | // - L[3]: edge lengths along x,y and z 6 | // - s: particle spacing 7 | 8 | void meshcube(double o[3], double L[3], double s, std::vector &pos) 9 | { 10 | // calculate nb of particles along each direction from target size "s" 11 | int ni = int(ceil(L[0]/s)); 12 | double dx = L[0]/ni; ++ni; 13 | int nj = int(ceil(L[1]/s)); 14 | double dy = L[1]/nj; ++nj; 15 | int nk = int(ceil(L[2]/s)); 16 | double dz = L[2]/nk; ++nk; 17 | 18 | // output 19 | std::cout << "meshing cube at o=(" < "< 3 | #include 4 | #include 5 | 6 | // export results to paraview (VTK polydata - legacy file fomat) 7 | // filename: file name without vtk extension 8 | // pos: positions (vector of size 3*number of particles) 9 | // step: time step number 10 | // scalars: scalar fields defined on particles (map linking [field name] <=> [vector of results v1, v2, v3, v4, ...] 11 | // vectors: vector fields defined on particles (map linking [field name] <=> [vector of results v1x, v1y, v1z, v2x, v2y, ...] 12 | 13 | void paraview(std::string const &filename, 14 | int step, 15 | std::vector const &pos, 16 | std::map *> const &scalars, 17 | std::map *> const &vectors) 18 | { 19 | int nbp = pos.size()/3; 20 | assert(pos.size()==nbp*3); // should be multiple of 3 21 | 22 | // build file name + stepno + vtk extension 23 | std::stringstream s; s << filename << std::setw(8) << std::setfill('0') << step << ".vtk"; 24 | 25 | // open file 26 | std::cout << "writing results to " << s.str() << '\n'; 27 | std::ofstream f(s.str().c_str()); 28 | f << std::scientific; 29 | // header 30 | f << "# vtk DataFile Version 3.0\n"; 31 | f << "file written by sph.exe\n"; 32 | f << "ASCII\n"; 33 | f << "DATASET POLYDATA\n"; 34 | 35 | // points 36 | f << "POINTS " << nbp << " float\n"; 37 | for(int i=0; i *>::const_iterator it=scalars.begin(); 52 | for(; it!=scalars.end(); ++it) 53 | { 54 | assert(it->second->size()==nbp); 55 | f << it->first << " 1 " << nbp << " float\n"; 56 | for(int i=0; isecond)[i] << '\n'; 58 | } 59 | 60 | // vector fields 61 | it = vectors.begin(); 62 | for(; it!=vectors.end(); ++it) 63 | { 64 | assert(it->second->size()==3*nbp); 65 | f << it->first << " 3 " << nbp << " float\n"; 66 | for(int i=0; isecond)[3*i+0] << " " << (*it->second)[3*i+1] << " " << (*it->second)[3*i+2] << '\n'; 68 | } 69 | f.close(); 70 | } 71 | -------------------------------------------------------------------------------- /rboman/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabrielDigregorio/SPH_method/017326c95a5c438dfae30e0832aad4acaa9b69d5/rboman/screenshot.png -------------------------------------------------------------------------------- /rboman/sph.cpp: -------------------------------------------------------------------------------- 1 | #include "sph.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | // creation of a cube of particles 6 | std::vector pos; 7 | double o[3] = { 10.0, 10.0, 10.0 }; 8 | double L[3] = { 1.0, 2.0, 3.0 }; 9 | double s = 0.2; 10 | 11 | meshcube(o, L, s, pos); 12 | 13 | // creation of dummy pressure/density/velocity fields & 14 | int nbp = pos.size()/3; 15 | std::vector pressure(nbp); 16 | std::vector density(nbp); 17 | std::vector velocity(nbp*3); 18 | 19 | std::map *> scalars; 20 | std::map *> vectors; 21 | scalars["pressure"] = &pressure; 22 | scalars["density"] = &density; 23 | vectors["velocity"] = &velocity; 24 | 25 | // time step loop 26 | for(int nstep=0; nstep<20; ++nstep) 27 | { 28 | double a = nstep/20.0*8*atan(1.0); 29 | 30 | // generate dummy results 31 | for(int i=0; i 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | void meshcube(double o[3], double L[3], double s, std::vector &pos); 12 | void paraview(std::string const &filename, 13 | int step, 14 | std::vector const &pos, 15 | std::map *> const &scalars, 16 | std::map *> const &vectors); 17 | 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /scriptTest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #SBATCH --job-name=Test_dam 4 | #SBATCH --mail-user=sbrialmont@student.ulg.ac.be 5 | #SBATCH --mail-type=ALL 6 | #SBATCH --output=TEST.txt 7 | # 8 | #SBATCH --ntasks=1 9 | #SBATCH --cpus-per-task=1 10 | #SBATCH --time=100:00 11 | #SBATCH --mem-per-cpu=400 12 | 13 | Para="../Playgrounds/Dam_Para.kzr" 14 | Geom="../Playgrounds/Dam_Geom.kzr" 15 | TestName="dam" 16 | 17 | 18 | module load openmpi/1.6.4/gcc-4.9.2 19 | module load cmake/3.5.2 20 | export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 21 | mpirun sph $Para $Geom $TestName 22 | 23 | 24 | -------------------------------------------------------------------------------- /soup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #SBATCH --job-name=soup 4 | #SBATCH --mail-user=xavier.adriaens@student.ulg.ac.be 5 | #SBATCH --mail-type=ALL 6 | #SBATCH --output=soup.txt 7 | # 8 | #SBATCH --ntasks=8 9 | #SBATCH --cpus-per-task=16 10 | #SBATCH --time=360:00 11 | #SBATCH --mem-per-cpu=500 12 | 13 | Para="../Playgrounds/soupPara.kzr" 14 | Geom="../Playgrounds/soupGeom.kzr" 15 | TestName="soup" 16 | 17 | module load openmpi/1.6.4/gcc-4.9.2 18 | module load cmake/3.5.2 19 | 20 | export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 21 | mpirun sph $Para $Geom $TestName 22 | --------------------------------------------------------------------------------