Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • irmb/VirtualFluids
1 result
Show changes
Commits on Source (8)
Showing
with 100 additions and 121 deletions
{
"name": "virtual-fluids-environment",
"extensions": [
"mhutchie.git-graph",
"donjayamanne.githistory",
"twxs.cmake",
"ms-vscode.cpptools",
"visualstudioexptteam.vscodeintellicode",
"xaver.clang-format",
"notskm.clang-tidy"
],
"runArgs": ["--gpus","all"],
"image": "git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.2"
}
......@@ -13,6 +13,7 @@ __pycache__/
# IDE
.vscode/
.devcontainer/
.sync/
.idea/
......
###############################################################################
## VirtualFluids CI Pipeline ##
###############################################################################
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04_python:1.0
image: git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.2
stages:
- build
......@@ -20,8 +20,6 @@ stages:
.gnu_build_template:
stage: build
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04:1.0
tags:
- gpu
- linux
......@@ -169,8 +167,6 @@ build_singularity_image:
gcc_9_unit_tests:
stage: test
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04
needs: ["gcc_9"]
before_script:
......@@ -279,8 +275,6 @@ nvidia_test:
gpu_numerical_tests:
stage: benchmark
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04
when: manual
needs: []
......@@ -326,8 +320,6 @@ gpu_numerical_tests:
clang_build_analyzer_clang_10:
stage: analyze
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04
only: ["schedules"]
needs: []
......@@ -360,8 +352,6 @@ clang_build_analyzer_clang_10:
include_what_you_use_clang_10:
stage: analyze
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04
only: ["schedules"]
needs: []
......@@ -392,8 +382,6 @@ include_what_you_use_clang_10:
cppcheck:
stage: analyze
image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04
only:
- develop@irmb/VirtualFluids_dev
......@@ -458,7 +446,7 @@ gcov_gcc_9:
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- pip3 install gcovr
- pip3 install 'jinja2<3.1' gcovr==5.0
- gcovr --version
script:
......@@ -508,7 +496,6 @@ clang-tidy:
- mkdir -p $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DBUILD_VF_CPU=ON
-DBUILD_VF_GPU=OFF
- python3 ../utilities/filterCompileCommands.py compile_commands.json
......
# AUTHORS
VF has been developed essentially over the last fifteen years by various researchers at IRMB including (in alphabetical order):
Damilola Adekanye, M.Sc.
Dr. Benjamin Ahrenholz
M. Sc. Hussein Alihussein
Dr. Hussein Alihussein
Dr. Sebastian Bindick
B. Sc. Aileen Brendel
Aileen Brendel, B.Sc.
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
Prof. Dr.-Ing. habil. Manfred Krafczyk
Dr. Konstantin Kutscher
Dr. Stephan Lenz
Dr. Jan Linxweiler
B. Sc. Lennard Lux
B. Sc. Sven Marcus
M. Sc. Sören Peters
Lennard Lux, B.Sc.
Sören Peters, M.Sc.
Sven Marcus, M.Sc.
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
B. Sc. Anna Wellmann
\ No newline at end of file
Anna Wellmann, M.Sc.
......@@ -97,6 +97,7 @@ IF( BUILD_VF_DOUBLE_ACCURACY )
list(APPEND VF_COMPILER_DEFINITION VF_DOUBLE_ACCURACY)
ENDIF()
# set gpu features
if(BUILD_VF_GPU OR BUILD_VF_GKS)
include(CheckLanguage)
check_language(CUDA)
......
# VirtualFluids BuildDependencies:
# Ubuntu 20.04
# general tools: wget, unzip, git
# CMake 3.20.5
# CMake 3.22.3
# ccache
# gcc 9.3 (default)
# gdb
# openmpi 4.0.3
# openmp
# cuda 11.3.1 as base image
# freeGLUT
# clang 10.0 (default)
# python pip3 with modules: setuptools, wheels, scikit-build, pyvista, numpy, ansible
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update &&\
apt-get install -y\
wget unzip git \
build-essential gdb\
ccache \
ninja-build \
RUN apt-get update && \
apt-get install -y \
wget unzip git \
build-essential gdb \
ccache \
ninja-build \
openmpi-bin=4.0.3-0ubuntu1 \
libomp-dev \
clang clang-format clang-tidy clang-tools llvm-dev libclang-dev &&\
mkdir -p /usr/local/cmake/ && cd /usr/local/cmake/ &&\
version=3.20 && build=5 &&\
wget https://cmake.org/files/v$version/cmake-$version.$build-linux-x86_64.tar.gz &&\
tar -xzvf cmake-$version.$build-linux-x86_64.tar.gz &&\
ln -s /usr/local/cmake/cmake-$version.$build-linux-x86_64/bin/* /usr/local/bin/
\ No newline at end of file
libomp-dev \
clang \
clang-format \
clang-tidy \
clang-tools \
llvm-dev \
libclang-dev \
python3-pip \
freeglut3-dev \
&& mkdir -p /usr/local/cmake/ && cd /usr/local/cmake/ \
&& version=3.22 && build=3 \
&& wget https://cmake.org/files/v$version/cmake-$version.$build-linux-x86_64.tar.gz \
&& tar -xzvf cmake-$version.$build-linux-x86_64.tar.gz \
&& ln -s /usr/local/cmake/cmake-$version.$build-linux-x86_64/bin/* /usr/local/bin/ \
&& pip3 install \
setuptools \
wheel \
scikit-build \
pyvista \
numpy \
ansible \
\ No newline at end of file
FROM irmb/virtualfluids-deps-ubuntu20.04:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
python3 \
python3-venv \
python3-pip \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
pkg-config \
cryptsetup-bin \
golang \
libgl1 \
&& pip3 install \
setuptools \
wheel \
scikit-build \
pyvista \
numpy \
ansible \
&& export VERSION=3.8.0 \
&& wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz \
&& tar -xzf singularity-ce-${VERSION}.tar.gz
WORKDIR /singularity-ce-3.8.0
RUN ./mconfig && \
make -C ./builddir && \
make -C ./builddir install
WORKDIR /
\ No newline at end of file
......@@ -2,33 +2,33 @@
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 Started
### Suported Platforms
VirtualFluids has been used on a variety of platforms:
## Getting Start
VirtualFluids is mainly supported on these two platforms:
- Linux
- Mac OS X
- Windows
- Cygwin
VirtualFluids can also be build and used in a Docker image. An ubuntu development environment is located in the [container registry](https://git.rz.tu-bs.de/irmb/virtualfluids/container_registry).
An extensive guide about the usage and development in VirtualFluids with docker can be found [here](https://git.rz.tu-bs.de/irmb/virtualfluids/-/wikis/Getting-Start-with-the-development-of-VirtualFluids).
The following is a brief explanation of how to use it without Docker:
### Software Requirements
- [CMake](https://cmake.org/) (minimum version 3.15)
- C++ compiler with C++14 support
- [Paraview](https://www.paraview.org/) (most recent version)
- [Paraview](https://www.paraview.org/) for visualizations (most recent version)
with usage of the GPU:
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
$ mkdir build && cd build
```
Pass the relevant [options](#options) to cmake.
E.g. for the CPU part:
......@@ -41,11 +41,11 @@ Alternatively enable the options via the cmake-gui.
### <a id="options"></a> Options
- BUILD_VF_CPU
- Build VirtualFluids CPU variant
- BUILD_VF_GPU
- BUILD_VF_GPU
- Build VirtualFluids GPU variant
- BUILD_VF_UNIT_TESTS
- Build VirtualFluids unit tests
- VF_DOUBLE_ACCURACY
- VF_DOUBLE_ACCURACY
- GPU change between Double and Single Precision
### Result Files
......@@ -55,14 +55,15 @@ The CPU part generates a set of multiple output directories in the prescribed ou
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.
## Contributing
To contribute to VirtualFluids please follow these [instructions](CONTRIBUTING.md).
## Documentation
The doxygen generated documentation can be found [here](https://irmb.gitlab-pages.rz.tu-bs.de/VirtualFluids_dev).
## Known Issues
If you notice any problems on your platform, please report an [issue](https://git.rz.tu-bs.de/irmb/virtualfluids/-/issues/new).
If you notice any problems on your platform, please report an [issue](https://git.rz.tu-bs.de/irmb/virtualfluids/-/issues/new).
## Authors
......
......@@ -68,7 +68,7 @@
LbmOrGks lbmOrGks = LBM;
const real L = 1.0;
// const real L = 1.0;
const real velocity = 1.0;
......@@ -89,7 +89,7 @@ int setupDomain = 4;
std::string path("D:/out/WTG_RUB"); //Mollok
std::string inputPath("D:/out/WTG_RUB/input/");
const uint timeStepStartOut = 0;
// const uint timeStepStartOut = 0;
const uint timeStepOut = 10000;
const uint timeStepEnd = 100000;
......@@ -127,7 +127,7 @@ void multipleLevel(const std::string& configPath)
maxLevel = 5;
viscosityLB = (real)3.75e-06; // LB units
} else if (setupDomain == 2) {
dx = (real)1;
dx = (real)1;
maxLevel = 3;
viscosityLB = (real)1.5e-05; // LB units
} else if (setupDomain == 3) {
......@@ -139,7 +139,7 @@ void multipleLevel(const std::string& configPath)
maxLevel = 2;
viscosityLB = (real)3.75e-06; // LB units
}
real x_min = 0.0;
real x_max = 1250.0;
real y_min = 0.0;
......@@ -165,14 +165,14 @@ void multipleLevel(const std::string& configPath)
bool measureVeloProfilesOnly = false;
// Two Components: true->DiffOn, false->DiffOff
bool diffOnOff = false;
// bool diffOnOff = false;
// Resetting diff or flow field, e.g. after restart, do not reset diff/flow at start of measureRun ;-)
bool reset_diff = false;
// bool reset_diff = false;
bool reset_flow = false;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
gridBuilder->addCoarseGrid(x_min, y_min, z_min,
gridBuilder->addCoarseGrid(x_min, y_min, z_min,
x_max, y_max, z_max, dx);
gridBuilder->setNumberOfLayers(0, 0);
......@@ -477,7 +477,7 @@ void addFineGrids(SPtr<MultipleGridBuilder> gridBuilder, uint &maxLevel, real &r
}
}
}
}
}
else if (setupDomain == 3) {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
// creates Cuboids (FG1 to FG2, lvl 1 to lvl 2) and add STLs (FG3 to FG4, lvl 3 to lvl 4) depending on maxLevel
......@@ -767,11 +767,11 @@ int main( int argc, char* argv[])
std::cout << "Log initialization failed: " << ex.what() << std::endl;
}
catch (const std::bad_alloc& e)
{
{
VF_LOG_CRITICAL("Bad Alloc: {}", e.what());
}
catch (const std::exception& e)
{
{
VF_LOG_CRITICAL("exception: {}", e.what());
}
catch (...)
......
if(BUILD_NUMERIC_TESTS)
set(CMAKE_CXX_STANDARD 17)
endif()
#############################################################
IF( BUILD_VF_GKS )
# only use this with device of CC larger than 6.0
set(CMAKE_CUDA_FLAGS "-Xptxas=\"-v\"" CACHE STRING "" FORCE)
......
......@@ -140,8 +140,8 @@
#include <BoundaryConditions/SimpleSlipBCAlgorithm.h>
#include <BoundaryConditions/RheologyPowellEyringModelNoSlipBCAlgorithm.h>
#include <BoundaryConditions/RheologyBinghamModelVelocityBCAlgorithm.h>
#include <BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h>
#include <BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h>
#include <BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h>
#include <BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h>
#include <BoundaryConditions/MultiphaseVelocityBCAdapter.h>
#include <BoundaryConditions/MultiphaseVelocityBCAlgorithm.h>
......
......@@ -22,12 +22,11 @@ IF(${USE_DEM_COUPLING})
ENDIF()
if(BUILD_USE_OPENMP)
list(APPEND VF_LIBRARIES OpenMP::OpenMP_CXX)
list(APPEND VF_LIBRARIES OpenMP::OpenMP_CXX)
endif()
vf_add_library(BUILDTYPE static PUBLIC_LINK basics muparser ${VF_LIBRARIES} PRIVATE_LINK lbm mpi logger)
vf_get_library_name(library_name)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/BoundaryConditions)
......
......@@ -324,7 +324,7 @@ void BasicCalculator::interpolation(int startLevel, int maxInitLevel)
//////////////////////////////////////////////////////////////////////////
void BasicCalculator::applyPreCollisionBC(int startLevel, int maxInitLevel)
{
// startLevel bis maxInitLevel
// from startLevel to maxInitLevel
for (int level = startLevel; level <= maxInitLevel; level++) {
int size = (int)blocks[level].size();
#ifdef _OPENMP
......@@ -349,7 +349,7 @@ void BasicCalculator::applyPreCollisionBC(int startLevel, int maxInitLevel)
//////////////////////////////////////////////////////////////////////////
void BasicCalculator::applyPostCollisionBC(int startLevel, int maxInitLevel)
{
// startLevel bis maxInitLevel
// from startLevel to maxInitLevel
for (int level = startLevel; level <= maxInitLevel; level++) {
int size = (int)blocks[level].size();
#ifdef _OPENMP
......
......@@ -39,7 +39,6 @@
#include "Block3D.h"
#include "BCArray3D.h"
#define PROOF_CORRECTNESS
using namespace UbMath;
......
......@@ -79,7 +79,7 @@ protected:
};
////////////////////////////////////////////////////////////////////////////////
//! \brief forward chimera transformation \ref forwardInverseChimeraWithK
//! \brief forward chimera transformation \ref forwardInverseChimeraWithK
//! Transformation from distributions to central moments according to Eq. (6)-(14) in
//! <a href="https://doi.org/10.1016/j.jcp.2017.05.040"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.05.040 ]</b></a>
//! Modified for lower round-off errors.
......@@ -112,7 +112,7 @@ inline void CumulantK17LBMKernel::backwardInverseChimeraWithK(LBMReal& mfa, LBMR
mfb = m1;
}
////////////////////////////////////////////////////////////////////////////////
//! \brief forward chimera transformation \ref forwardChimera
//! \brief forward chimera transformation \ref forwardChimera
//! Transformation from distributions to central moments according to Eq. (6)-(14) in
//! <a href="https://doi.org/10.1016/j.jcp.2017.05.040"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.05.040 ]</b></a>
//! for \f$ K_{abc}=0 \f$. This is to avoid unnessary floating point operations.
......@@ -128,7 +128,7 @@ inline void CumulantK17LBMKernel::forwardChimera(LBMReal& mfa, LBMReal& mfb, LBM
mfa = m1;
}
////////////////////////////////////////////////////////////////////////////////
//! \brief backward chimera transformation \ref backwardChimera
//! \brief backward chimera transformation \ref backwardChimera
//! Transformation from central moments to distributions according to Eq. (57)-(65) in
//! <a href="https://doi.org/10.1016/j.jcp.2017.05.040"><b>[ M. Geier et al. (2017), DOI:10.1016/j.jcp.2017.05.040 ]</b></a>
//! for \f$ K_{abc}=0 \f$. This is to avoid unnessary floating point operations.
......
......@@ -35,14 +35,13 @@
#define D3Q27SYSTEM_H
#include <cmath>
#include <iostream>
#include <string>
#include <iostream>
#include "LBMSystem.h"
#include "UbException.h"
#include "UbMath.h"
//! \brief namespace for global system-functions
namespace D3Q27System
{
......@@ -148,7 +147,6 @@ static const int ET_BNW = 11;
static const int ET_TSW = 12;
static const int ET_BNE = 12;
//////////////////////////////////////////////////////////////////////////
// MACROSCOPIC VALUES
/*=====================================================================*/
......
......@@ -53,7 +53,6 @@ public:
public:
LBMKernel();
virtual ~LBMKernel() = default;
virtual SPtr<LBMKernel> clone() = 0;
......
project(cuda LANGUAGES CUDA CXX)
vf_add_library(NAME cuda PUBLIC_LINK logger)
vf_add_library(NAME vf_cuda PUBLIC_LINK logger)
......@@ -5,8 +5,7 @@ if(MSVC)
set(additional_libraries ws2_32 Traffic) # ws_32 throws an error on Phoenix
endif()
vf_add_library(PUBLIC_LINK basics lbmCuda PRIVATE_LINK ${additional_libraries} GridGenerator MPI::MPI_CXX cuda)
vf_add_library(PUBLIC_LINK basics lbmCuda PRIVATE_LINK ${additional_libraries} GridGenerator MPI::MPI_CXX vf_cuda)
#SET(TPN_WIN32 "/EHsc")
#https://stackoverflow.com/questions/6832666/lnk2019-when-including-asio-headers-solution-generated-with-cmake
......
......@@ -41,7 +41,7 @@ __global__ void runKernel(KernelFunctor kernel, GPUKernelParameter kernelParamet
DistributionWrapper distributionWrapper {
kernelParameter.distributions,
kernelParameter.size_Mat,
(unsigned int)kernelParameter.size_Mat,
kernelParameter.isEvenTimestep,
k,
kernelParameter.neighborX,
......