diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000000000000000000000000000000000000..aca25898d44f5d2f72ea8f018f54546197c301e1 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,24 @@ +AUTHORS +============ + +VF has been developed essentially over the last fifteen years by various researchers at IRMB including (in alphabetical order): + + +Dr. Benjamin Ahrenholz +M. Sc. Hussein Alihussein +Dr. Sebastian Bindick +J.Prof. Dr. Martin Geier +Dr. Sebastian Geller +Dr. Ehsan Goraki Fard +Dr. Jan Hegewald +Dr. Christian Janßen +M. Sc. Konstantin Kutscher +M. Sc. Stephan Lenz +Dr. Jan Linxweiler +M. Sc. Sören Peters +Dr. Hesameddin Safari +Dr. Martin Schönherr +Dipl.-Ing. Maik Stiebler +Dr. Sören Textor (aka Freudiger) +PD Dr. Jonas Tölke +Dr. Sonja Uphoff diff --git a/CMakeLists.txt b/CMakeLists.txt index c7fd885a3ad615e81b3d446b28bbd9311cd70204..d6f7bd4d43a7743e0f5169ed7670efbc929775fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,7 @@ # required cmake versions # CMAKE 3.9: CUDA support ################################################################################# -cmake_minimum_required(VERSION 3.9..3.17 FATAL_ERROR) - -if(${CMAKE_VERSION} VERSION_LESS 3.12) - cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) -endif() - +cmake_minimum_required(VERSION 3.13..3.17 FATAL_ERROR) project(VirtualFluids CXX) @@ -32,7 +27,7 @@ set(thirdFolder "3rd") ################################################################################# option(BUILD_VF_CPU "Build VirtualFluids cpu variant" OFF) option(BUILD_VF_GPU "Build VirtualFluids gpu variant" OFF) -option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" ON) +option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF) option(BUILD_SHARED_LIBS "" ON) ################################################################################# @@ -48,10 +43,6 @@ include("${CMAKE_PATH}/VirtualFluidsMacros.cmake") ################################################################################# # COMMON LIBRARIES ################################################################################# -if(MSVC) - ADD_DEFINITIONS ( "-DNOMINMAX" ) # Disable Min/Max-Macros -endif() - add_subdirectory(src/basics) ################################################################################# diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..54a3e307b64c14de7f540ca1e04209e7624465b8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +Contributing +============ +If you want to contribute to VirtualFluids, your help is very welcome. +To contribute use a pull request as follows: + +### How to make a clean pull request + +- Create a personal fork of VirtualFluids. +- Clone the fork on your local machine. Your remote repo on gitea is called `origin`. +- Add the original repository as a remote called `upstream`. +- If you created your fork a while ago be sure to pull upstream changes into your local repository. +- Create a new branch to work on! Branch from `develop` or `open_source`. +- Implement/fix your feature, comment your code. +- Follow the code style of the project, including indentation. +- Run the tests. +- Write or adapt tests as needed. +- Add or change the documentation as needed. +- Push your branch to your fork on gitea, the remote `origin`. +- From your fork open a pull request in the correct branch. Target the project's `develop` or `open_source` branch +- … +- If we requests further changes just push them to your branch. The PR will be updated automatically. +- Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo and delete +your extra branch(es). + +And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..615e4d758e95b4b556efee9f9487beaf08d90d21 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ + + +VirtualFluids (VF) is a research code developed at the Institute for Computational Modeling in Civil Engineering (iRMB). The code is a Computational Fluid Dynamics (CFD) solver based on the Lattice Boltzmann Method (LBM) for turbulent, thermal, multiphase and multicomponent flow problems as well as for multi-field problems such as Fluid-Structure-interaction including distributed pre- and postprocessing capabilities for simulations with more than 100 billion degrees of freedom. + +## Getting Start +### Suported Platforms +VirtualFluids has been used on a variety of platforms: + - Linux + - Mac OS X + - Windows + - Cygwin +### Software Requirements + + - [CMake](https://cmake.org/) (minimum version 3.13) + - C++ compiler with C++11 support, for example gcc 6.3 or Visual C++ 14.0 + - [Paraview](https://www.paraview.org/) (most recent version) + +with usage of the GPU: + - CUDA [developer.nvidia.com/cuda-zone](https://developer.nvidia.com/cuda-zone): + * Minimum CUDA Version 9.0 + * Minimum Compute Capability 3.0, because of maximal number of Blocks in x direction + * Recommended Compute Capability 6.0, because of atomics for double precision floating point data (GKS only) + + +### Contributing +To contribute to VirtualFluids please follow these [instructions](CONTRIBUTING.md). + +### Build VirtualFluids +```shell +$ mkdir build +$ cd build +``` +Pass the relevant [options](#options) to cmake. +E.g. for the CPU part: +```shell +$ cmake .. -DBUILD_VF_CPU=ON +$ make +``` +Alternatively enable the options via the cmake-gui. + +### <a id="options"></a> Options +- BUILD_VF_CPU + - Build VirtualFluids CPU variant +- BUILD_VF_GPU + - Build VirtualFluids GPU variant +- BUILD_VF_UNIT_TESTS + - Build VirtualFluids unit tests +- VF_DOUBLE_ACCURACY + - GPU change between Double and Single Precision + +### Result Files +The output files can be found in `<build directory>/bin/output`. As there is an usually high amount of data, you might want to change the output path in the main function. + +The CPU part generates a set of multiple output directories in the prescribed output path. The flow fields can be found in the _mq_ directory. To view the flow fields, it is most conveniant to open the _mq_collection.pvd_ file in Paraview. The _bc_ directory contains the boundary condition information, the _geo_ directory contains information on the geometry of the flow domain and the _blocks_ directory contains the block grid. + +A GPU computation generates a the time series of output files directly in the output path. In Paraview these time series can be read directly. + + + +## Documentation +The doxygen generated documentation can be found [here](https://git.irmb.bau.tu-bs.de/doku/CPU). + + +## Known Issues +If CMake does not find CUDA_CUT_INCLUDE_DIR use and set the correct CUDA Pathes in gpu.cmake in the base directory in lines 35, 36. + +If you notice any problems on your platform, please report an gitea issue. + + +## Authors +A list of the developers of VirtualFluids is available [here](AUTHORS.md). diff --git a/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp b/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp index 544bac2997b52363317b123efb5a4fd24a1830f4..842c34389bc6ba79d55443b369876ceed232d2bd 100644 --- a/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp +++ b/apps/gpu/LidDrivenCavity/LidDrivenCavity.cpp @@ -95,7 +95,7 @@ int main( int argc, char* argv[]) ////////////////////////////////////////////////////////////////////////// // Simulation parameters ////////////////////////////////////////////////////////////////////////// - std::string path("/set/your/outputPath/here"); + std::string path("./output"); std::string simulationName("LidDrivenCavity"); const real L = 1.0; diff --git a/docs/img/VF_logo.png b/docs/img/VF_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d43e183e5988d7c5c521114fdf3204e07413f91a Binary files /dev/null and b/docs/img/VF_logo.png differ diff --git a/readme.md b/readme.md deleted file mode 100644 index 1531494820a83fb71da2f9a8e05c0c852c30a48d..0000000000000000000000000000000000000000 --- a/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -Software Requirements: -====================== - -CMake [cmake.org](https://cmake.org/): -* minimum version 3.13 - -Paraview [www.paraview.org](https://www.paraview.org/): -* any version, for example the most recent - -C++ Compiler: -* with C++11 support, for example gcc6.3 or Visual C++ 14.0 - -How to get VirtualFluidsCPU: -========================== - -Option 1: use git -1. checkout out https://git.irmb.bau.tu-bs.de/VirtualFluids/VirtualFluidsCPU.git with your credentials - -Option 2: without git -1. go to git.irmb.tu-bs.de -2. Log in with your credentials -3. click on VirtualFluids/VirtualFluidsCPU -4. click on the download symbol on the top right and download zip/tar.gz file - -How to build VirtualFluidsCPU: -============================ - -1. CMake the project -2. set the output path in Applications/LidDrivenCavity/LidDrivenCavity.cpp -3. build the project ("compile") -4. run the generated executable (usually in <build directory>/Applications/LidDrivenCavity) - -VirtualFluidsCPU results files: -=============================== - -VirtualFluidsCPU generates a set of multiple output directories in the prescribed output path. The flow fields can be found in the _mq_ directory. To view the flow fields, it is most conveniant to open the _mq_collection.pvd_ file in Paraview. The _bc_ directory contains the boundary condition information, the _geo_ directory contains information on the geometry of the flow domain and the _blocks_ directory contains the block grid. - -Documentation: -============== - -The doxygen generated documentation can be found [here](https://git.irmb.bau.tu-bs.de/doku/CPU). diff --git a/src/basics/basics/utilities/UbSystem.h b/src/basics/basics/utilities/UbSystem.h index 3f215f5b913269713cd9c27356911d405f999b0a..dcfa4fc6d4aca45bd1370f2d843259888f7ed11f 100644 --- a/src/basics/basics/utilities/UbSystem.h +++ b/src/basics/basics/utilities/UbSystem.h @@ -71,8 +71,8 @@ #if defined(__unix__) && defined(__CYGWIN__) #define UBSYSTEM_CYGWIN #include <windows.h> -#else - //#include <sys/syscall.h> // TODO: Did not work on windows! +#elif defined(__unix__) + #include <sys/syscall.h> #endif #if defined(min) || defined(max) //daruch kann man sich spaeter #undef min; #undef max erparen