diff --git a/CMake/cmake_config_files/TESLA03.config.cmake b/CMake/cmake_config_files/TESLA03.config.cmake index 110c78ebcecb7c3d8393da4494d9a677c679b611..55ef7a2427b8f99554eeb474c52a7ea4372912ad 100644 --- a/CMake/cmake_config_files/TESLA03.config.cmake +++ b/CMake/cmake_config_files/TESLA03.config.cmake @@ -12,7 +12,7 @@ SET(FFTW_ROOT ${CMAKE_SOURCE_DIR}/3rdParty/fftw/fftw-3.3.7 CACHE PATH "JSONCPP R #SET TO CORRECT PATH: -SET(BOOST_ROOT "C:\\Program Files\\boost\\boost_1_63_0" CACHE PATH "BOOST_ROOT") -SET(BOOST_LIBRARYDIR "C:\\Program Files\\boost\\boost_1_63_0\\stage\\x64\\lib" CACHE PATH "BOOST_LIBRARYDIR") +SET(BOOST_ROOT "F:\\boost\\boost_1_74_0" CACHE PATH "BOOST_ROOT") +SET(BOOST_LIBRARYDIR "F:\\boost\\boost_1_74_0\\stageMSVC64VS2019\\lib" CACHE PATH "BOOST_LIBRARYDIR") SET(VTK_DIR "F:/Libraries/vtk/VTK-8.2.0/build" CACHE PATH "VTK directory override" FORCE) diff --git a/apps/gpu/tests/NumericalTests/config.txt b/apps/gpu/tests/NumericalTests/config.txt index cc66e3df54e42ff20d5515c07426983356e34e06..fa67758050d267a2a5a833b0145d84aaf9543980 100644 --- a/apps/gpu/tests/NumericalTests/config.txt +++ b/apps/gpu/tests/NumericalTests/config.txt @@ -6,7 +6,7 @@ Devices="0" ################################################## # Basic Simulation Parameter # ################################################## -KernelsToTest="BGKCompSP27" +KernelsToTest="BGKPlusCompSP27" #BGKCompSP27 BGKPlusCompSP27 CumulantAA2016CompSP27 CumulantOneCompSP27 CumulantF3CompSP27 CumulantF32018CompSP27 CumulantAll4CompSP27 NumberOfTimeSteps=20 Viscosity="0.001" @@ -53,7 +53,7 @@ EndTimeStepCalculation_Phi=20 ################################################## # Ny Test Parameter # ################################################## -NyTest=false +NyTest=true MinOrderOfAccuracy_Ny=1.95 StartTimeStepCalculation_Ny=11 @@ -84,9 +84,9 @@ NormalizeWith=amplitude ################################################## TaylorGreenVortexUx32=true TaylorGreenVortexUx64=true -TaylorGreenVortexUx128=false -TaylorGreenVortexUx256=false -TaylorGreenVortexUx512=false +TaylorGreenVortexUx128=true +TaylorGreenVortexUx256=true +TaylorGreenVortexUx512=true TaylorGreenVortexUz32=false TaylorGreenVortexUz64=false @@ -94,38 +94,30 @@ TaylorGreenVortexUz128=false TaylorGreenVortexUz256=false TaylorGreenVortexUz512=false -ShearWave32=false -ShearWave64=false -ShearWave128=false -ShearWave256=false -ShearWave512=false +ShearWave32=true +ShearWave64=true +ShearWave128=true +ShearWave256=true +ShearWave512=true ################################################## # Grid Information # ################################################## NumberOfGridLevels=1 -#GridPath32="C:\Users\Timon\Documents\studienarbeitIRMB\Grids\gridUni32x4x48" -#GridPath64="C:\Users\Timon\Documents\studienarbeitIRMB\grids\gridUni64x4x96" -#GridPath128="C:\Users\Timon\Documents\studienarbeitIRMB\grids\gridUni128x4x192" -#GridPath256="C:\Users\Timon\Documents\studienarbeitIRMB\grids\gridUni256x4x384" -#GridPath512="C:\Users\Timon\Documents\studienarbeitIRMB\grids\gridUni512x4x768" - -GridPath32="C:\Users\Soeren\Documents\testdata\Grids\gridUni32x4x48" -GridPath64="C:\Users\Soeren\Documents\testdata\Grids\gridUni64x4x96" -GridPath128="C:\Users\Soeren\Documents\testdata\Grids\gridUni128x4x192" -GridPath256="C:\Users\Soeren\Documents\testdata\Grids\gridUni256x4x384" -GridPath512="C:\Users\Soeren\Documents\testdata\Grids\gridUni512x4x768" +GridPath32="E:\temp\numericalTests\grids\gridUni32x4x48" +GridPath64="E:\temp\numericalTests\grids\gridUni64x4x96" +GridPath128="E:\temp\numericalTests\grids\gridUni128x4x192" +GridPath256="E:\temp\numericalTests\grids\gridUni256x4x384" +GridPath512="E:\temp\numericalTests\grids\gridUni512x4x768" ################################################## # File Writing Information # ################################################## WriteVTKFiles=false -#PathForVTKFileWriting="C:\Users\Timon\Documents\studienarbeitIRMB\Output" -PathLogFile="C:\Users\Soeren\Documents\testdata\Output" +PathForVTKFileWriting="E:\temp\numericalTests\Output" StartStepFileWriter=0 WriteAnalyResultsToVTK=true -#PathLogFile="C:\Users\Timon\Documents\studienarbeitIRMB\logFiles" -PathLogFile="C:\Users\Soeren\Documents\testdata\logFiles" \ No newline at end of file +PathLogFile="E:\temp\numericalTests\logFiles" \ No newline at end of file diff --git a/src/basics/Core/DataTypes.h b/src/basics/Core/DataTypes.h index 1ea72d2a8ace038b5ef8de84f33aef4cff239b50..49d269097b76cdf3ad350ed0cd65d72e6310d849 100644 --- a/src/basics/Core/DataTypes.h +++ b/src/basics/Core/DataTypes.h @@ -4,7 +4,7 @@ #include <string> #ifdef VF_DOUBLE_ACCURACY -typedef double real; +using real = double; #else using real = float; #endif diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp index f3a02fe351e8ea051126137194b6047f47123ccc..42614467ca3bfc4f7e5016c1c6ef29a025f76585 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp @@ -66,12 +66,12 @@ void GridReader::allocArrays_CoordNeighborGeo() neighZ = std::shared_ptr<CoordNeighborGeoV>(new CoordNeighborGeoV(para->getneighborZ(), binaer, false)); CoordNeighborGeoV geoV(para->getgeoVec(), binaer, false); - int maxLevel = coordX.getLevel(); + uint maxLevel = coordX.getLevel(); std::cout << "Number of Level: " << maxLevel + 1 << std::endl; - int numberOfNodesGlobal = 0; + uint numberOfNodesGlobal = 0; std::cout << "Number of Nodes: " << std::endl; - for (int level = 0; level <= maxLevel; level++) + for (uint level = 0; level <= maxLevel; level++) { int numberOfNodesPerLevel = coordX.getSize(level) + 1; numberOfNodesGlobal += numberOfNodesPerLevel; @@ -81,15 +81,9 @@ void GridReader::allocArrays_CoordNeighborGeo() cudaMemoryManager->cudaAllocCoord(level); cudaMemoryManager->cudaAllocSP(level); + cudaMemoryManager->cudaAllocF3SP(level); + cudaMemoryManager->cudaAllocNeighborWSB(level); - /////////////////////////// - //F3 - cudaMemoryManager->cudaAllocF3SP(level); - /////////////////////////// - if (para->getCalcMedian()) - cudaMemoryManager->cudaAllocMedianSP(level); - if (para->getCalcParticle() || para->getUseWale()) - cudaMemoryManager->cudaAllocNeighborWSB(level); if (para->getUseWale()) cudaMemoryManager->cudaAllocTurbulentViscosity(level); @@ -103,6 +97,7 @@ void GridReader::allocArrays_CoordNeighborGeo() rearrangeGeometry(para.get(), level); setInitalNodeValues(numberOfNodesPerLevel, level); + cudaMemoryManager->cudaCopyNeighborWSB(level); cudaMemoryManager->cudaCopySP(level); cudaMemoryManager->cudaCopyCoord(level); } @@ -118,7 +113,7 @@ void GridReader::allocArrays_BoundaryValues() this->setChannelBoundaryCondition(); int level = BC_Values[0]->getLevel(); - for (int i = 0; i < channelBoundaryConditions.size(); i++) + for (uint i = 0; i < channelBoundaryConditions.size(); i++) { setVelocityValues(i); setPressureValues(i); @@ -259,12 +254,12 @@ void GridReader::setVelocity(int level, int sizePerLevel, int channelSide) const for (int index = 0; index < sizePerLevel; index++) { - //para->getParH(i)->Qinflow.Vx[m] = para->getParH(i)->Qinflow.Vx[m] / para->getVelocityRatio(); - //para->getParH(i)->Qinflow.Vy[m] = para->getParH(i)->Qinflow.Vy[m] / para->getVelocityRatio(); - //para->getParH(i)->Qinflow.Vz[m] = para->getParH(i)->Qinflow.Vz[m] / para->getVelocityRatio(); - para->getParH(level)->Qinflow.Vx[index] = para->getVelocity();//0.035; - para->getParH(level)->Qinflow.Vy[index] = 0.0;//para->getVelocity();//0.0; - para->getParH(level)->Qinflow.Vz[index] = 0.0; + para->getParH(level)->Qinflow.Vx[index] = para->getParH(level)->Qinflow.Vx[index] / para->getVelocityRatio(); + para->getParH(level)->Qinflow.Vy[index] = para->getParH(level)->Qinflow.Vy[index] / para->getVelocityRatio(); + para->getParH(level)->Qinflow.Vz[index] = para->getParH(level)->Qinflow.Vz[index] / para->getVelocityRatio(); + //para->getParH(level)->Qinflow.Vx[index] = para->getVelocity();//0.035; + //para->getParH(level)->Qinflow.Vy[index] = 0.0;//para->getVelocity();//0.0; + //para->getParH(level)->Qinflow.Vz[index] = 0.0; } } diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h index 22f5db4f16e3b23a8d35be9587bff4ba5d4bf03b..1a6eed430539e222302ef3921a2ebcc40ff3cb60 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h @@ -1,8 +1,6 @@ #ifndef GridReaderFiles_H #define GridReaderFiles_H - - #include "../GridProvider.h" #include <vector> @@ -11,7 +9,7 @@ #include "LBM/LB.h" -#include "VirtualFluids_GPU_export.h" +//#include "VirtualFluids_GPU_export.h" class Parameter; class BoundaryValues; diff --git a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp index b40291aab27144256f039786fce2456b4d77a7bb..1de408a5d5991fd8ceee59e863d5e32e6384fe67 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp +++ b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp @@ -403,7 +403,7 @@ void Simulation::run() //turning Ship real Pi = (real)3.14159265358979323846; real delta_x_F = (real)0.1; - real delta_t_F = (real)(para->getVelocity() * delta_x_F / 3.75); + real delta_t_F = (real)((double)para->getVelocity() * (double)delta_x_F / (double)3.75); real delta_t_C = (real)(delta_t_F * pow(2.,para->getMaxLevel())); real timesteps_C = (real)(12.5 / delta_t_C); real AngularVelocity = (real)(12.5 / timesteps_C * Pi / 180.);