Skip to content

Commit 321354f

Browse files
authored
Merge pull request #322 from CFD-GO/develop
Version 6.5
2 parents cac2755 + 03135c8 commit 321354f

File tree

126 files changed

+7530
-2927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+7530
-2927
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Testing the test
2+
3+
on: [ push ]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-latest]
11+
steps:
12+
- uses: CFD-GO/action_TCLB_test@master
13+
with:
14+
repository: ${{ github.repository }}
15+
ref: ${{ github.ref }}
16+
install: true

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
env:
7373
secure: "gDINAbE+apFUrReGDClqtSd4ir1ivFww/EjslD2XA8igmwELA0Kkom3z+X6HiMjlPaNLK5oRoyD7BkFSJ9Sf1i6z2+iLVmqJoOLaexZXM09C557Xmh38DisHTvQf6IVg0TRvQ8DEGDfFMrNr5jjDpXdPYs2sVJPW1Mi0Hwehtvt1Siuxr8bkoa/p6qZLbmhYl6ETGqFXDMmRWKFMaJpJ38BScwWIPgVqwSOcejhEdaPUuGtOYSirUhUDWoSQmOUPfbHfadIAT9+OPDY4p91eQmDQGNj9ZgWMvU8dECrrzE2Z6UfbO+swXmfMWe0BYwEpcGtYMG19y6dEKh4TmrEPR8Y/9SaVFiY/PPm906agKeJdGwHdokYqcjB/STSR83ni+b3qAfIgwYW2pcSMSEpbn+kUp70k9emV3KVJVIg3G/s4fEC1bip5wkBAYInPGa+FmNJTM8Y3iSHeQmuv2zia5od5RJDZg98kf0nXv9iEWEYrQl2KkEGNPK+bsWinA0KES1cZ21aMnPENf7mhyOsUUEYX4oCCxzzR16PCWWx4b7E4SBDweU5DfsEuwByjAImTOArSuofv1QnXynmDDD5W3TVDqx+067pMCE4FLV1yWqqrnaoPpWeWGlhTQStbO3xYSNgUNMma8pYEQStTpdkgXt4gx6RHaCjZwZ/FZx1rZRk="
7474
script:
75-
- tools/install.sh rpackage jsonlite
76-
- tools/install.sh rpackage yaml
77-
- tools/install.sh rpackage XML
75+
- tools/install.sh --rpackage jsonlite
76+
- tools/install.sh --rpackage yaml
77+
- tools/install.sh --rpackage XML
7878
- make configure
7979
- ./configure --disable-cuda
8080
- mkdir -p wiki/xml wiki/images wiki/schema

README.md

Lines changed: 81 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,107 @@
1-
CudneLB - the templated version
2-
===
3-
- [![Build Status](https://travis-ci.org/CFD-GO/TCLB.svg?branch=develop)](https://travis-ci.org/CFD-GO/TCLB) [![codecov](https://codecov.io/gh/CFD-GO/TCLB/branch/master/graph/badge.svg)](https://codecov.io/gh/CFD-GO/TCLB) [![documentation](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/documentation.svg?sanitize=true)](https://docs.tclb.io/) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3672102.svg)](https://doi.org/10.5281/zenodo.3672102) - Stable release [(`master` branch)](https://github.com/CFD-GO/TCLB/tree/master)
4-
- [![Build Status](https://travis-ci.org/CFD-GO/TCLB.svg?branch=develop)](https://travis-ci.org/CFD-GO/TCLB) [![codecov](https://codecov.io/gh/CFD-GO/TCLB/branch/develop/graph/badge.svg)](https://codecov.io/gh/CFD-GO/TCLB) [![documentation](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/documentation.svg?sanitize=true)](https://develop.docs.tclb.io/) - Current release [(`develop` branch)](https://github.com/CFD-GO/TCLB/tree/develop)
5-
6-
CudneLB is a MPI+CUDA or MPI+CPU high-performance CFD simulation code, based on Lattice Boltzmann Method.
1+
![TCLB Solver Header](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/header.png)
72

3+
TCLB Solver
4+
===
5+
TCLB is a MPI+CUDA or MPI+CPU high-performance Computational Fluid Dynamics simulation code, based on the Lattice Boltzmann Method.
86
It provides a clear interface for calculation of complex physics, and the implementation of new models.
97

10-
## Installation
8+
- Stable release [(`master` branch)](https://github.com/CFD-GO/TCLB/tree/master):<br/>[![Build Status](https://travis-ci.org/CFD-GO/TCLB.svg?branch=master)](https://travis-ci.org/CFD-GO/TCLB) [![codecov](https://codecov.io/gh/CFD-GO/TCLB/branch/master/graph/badge.svg)](https://codecov.io/gh/CFD-GO/TCLB) [![documentation](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/documentation.svg?sanitize=true)](https://docs.tclb.io/) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3672102.svg)](https://doi.org/10.5281/zenodo.3973739)
9+
- Current release [(`develop` branch)](https://github.com/CFD-GO/TCLB/tree/develop):<br/>[![Build Status](https://travis-ci.org/CFD-GO/TCLB.svg?branch=develop)](https://travis-ci.org/CFD-GO/TCLB) [![codecov](https://codecov.io/gh/CFD-GO/TCLB/branch/develop/graph/badge.svg)](https://codecov.io/gh/CFD-GO/TCLB) [![documentation](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/documentation.svg?sanitize=true)](https://develop.docs.tclb.io/)
1110

12-
Just clone the repo (or download the [zip file](https://github.com/CFD-GO/TCLB/archive/master.zip)):
11+
## How to use it
12+
13+
**Install**
1314
```bash
1415
git clone https://github.com/CFD-GO/TCLB.git
1516
cd TCLB
1617
```
17-
18-
If you want a more recent (but less stable) version, you could try the development branch:
19-
18+
**Configure**
2019
```bash
21-
git clone -b develop https://github.com/CFD-GO/TCLB.git
22-
cd TCLB
20+
make configure
21+
./configure --enable-graphics --with-cuda-arch=sm_30
22+
```
23+
**Compile**
24+
```bash
25+
make d2q9
26+
```
27+
**Run**
28+
```bash
29+
CLB/d2q9/main example/flow/2d/karman.xml
2330
```
2431

25-
### Dependencies
32+
## More information
2633

27-
You'll need:
28-
- [R](https://www.r-project.org/)
29-
- packages for R: [optparse](https://cran.r-project.org/package=optparse), [numbers](https://cran.r-project.org/package=numbers), [rtemplate](https://github.com/llaniewski/rtemplate), [gvector](https://github.com/llaniewski/gvector), [polyAlgebra](https://github.com/llaniewski/polyAlgebra)
30-
- [nVidia CUDA](https://developer.nvidia.com/cuda-zone) (if you want to use GPU)
31-
- [python](https://www.python.org/), [numpy](http://www.numpy.org/) (if you want to use the integrated python interpreter)
32-
- [python](https://www.python.org/), [sympy](http://www.sympy.org/) and R package: [rPython](https://cran.r-project.org/package=rPython) (if you want to develop a model using python instead of R)
33-
- [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface) (e.g. [OpenMPI](http://www.open-mpi.org/))
34+
### Documentation
3435

35-
You can install many of these with the tools/install.sh script (note it requires sudo):
36+
The documentation (including tutorials) is published at
37+
[docs.tclb.io](https://docs.tclb.io/).
3638

37-
```bash
38-
sudo tools/install.sh cuda 6.5-14 # only if your GPU supports cuda
39-
sudo tools/install.sh r
40-
sudo tools/install.sh openmpi
41-
tools/install.sh rdep
42-
sudo tools/install.sh python-dev
43-
tools/install.sh rpython
44-
sudo tools/install.sh module # only on CentOS
45-
```
39+
For the `develop` version, the most recent documentation can be found at
40+
[develop.docs.tclb.io](https://develop.docs.tclb.io/).
41+
42+
You can contribute to the documentation at
43+
[CFD-GO/TCLB_docs](https://github.com/CFD-GO/TCLB_docs).
4644

47-
The `install.sh` script is designed to work on Ubuntu (e.g. on the [Travis-CI](https://travis-ci.org/CFD-GO/TCLB) VMs).
48-
The `install.sh` script should work on CentOS.
49-
You can install the **`sudo`** parts by yourself, and use script to install R packages: rdep and rpython.
45+
### Supported architectures
46+
This code is designed to run on **Linux**. We strongly recommend using Linux for compilation, computation and postprocessing.
5047

48+
Nevertheless, TCLB can be compiled on Windows (CPU only), using the [Windows Subsystem for Linux](https://pl.wikipedia.org/wiki/Windows_Subsystem_for_Linux). It also can be compiled on MacOS (also CPU only). Both Debian and Red Hat based Linux distributions are supported by the `install.sh` script described below, as is MacOS (with `brew` package manager).
49+
50+
### Dependencies
5151

52-
### Compilation
53-
This should work:
52+
For the code to compile and work you'll need a few things:
53+
- [R](https://www.r-project.org/) and some R packages ([optparse](https://cran.r-project.org/package=optparse), [numbers](https://cran.r-project.org/package=numbers), [rtemplate](https://github.com/llaniewski/rtemplate), [gvector](https://github.com/llaniewski/gvector), [polyAlgebra](https://github.com/llaniewski/polyAlgebra))
54+
- [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface). We recommend [OpenMPI](http://www.open-mpi.org/)
55+
- To use your GPU, you'll need [nVidia CUDA](https://developer.nvidia.com/cuda-zone)
56+
- To integrate TCLB with R, you'll need R package [rinside](https://github.com/eddelbuettel/rinside)
57+
- To integrate TCLB with Python, you'll need [python](https://www.python.org/), [numpy](http://www.numpy.org/) with libraries and headers
58+
- To develop a model using Python, you'll need [python](https://www.python.org/), [sympy](http://www.sympy.org/) and R package: [rPython](https://cran.r-project.org/package=rPython)
59+
60+
You can install many of these with the provided `tools/install.sh` script (note that this requires sudo):
5461
```bash
55-
module load mpi/openmpi-x86_64 # only on CentOS
56-
make configure
57-
./configure --enable-double --enable-graphics --with-cuda-arch=sm_20
58-
# only CPU ./configure --enable-double --disable-cuda
59-
make d2q9
62+
sudo tools/install.sh essentials # Installs essential system packages needed by TCLB
63+
sudo tools/install.sh r # Installs R
64+
sudo tools/install.sh openmpi # Installs OpenMPI
65+
tools/install.sh rdep # Installs needed R packages
66+
sudo tools/install.sh cuda # Installs CUDA (we recommend to do it on your own)
67+
sudo tools/install.sh python-dev # Installs Python libraries with headers
6068
```
6169

62-
## Usage
70+
You can run the `tools/install.sh` script with the `--dry` option, which will print the commands to run, so you can run them on your own.
71+
*We do not recommend running anything with sudo without checking*
72+
73+
### `develop` Branch:
74+
If you want a more recent version, you could try the development branch with `git checkout develop`
6375

64-
This should also work:
76+
### CPU
77+
To compile the code for CPU, you can use the `--disable-cuda` option for `./configure`:
78+
```
79+
./configure --disable-cuda
80+
```
81+
### Parallel run
82+
To run TCLB in parallel (both on multiple CPU and multiple GPU), you can use the standard syntax of MPI parallel run:
6583
```bash
66-
CLB/d2q9/main example/flow/2d/karman.xml
84+
mpirun -np 8 CLB/d2q9/main example/flow/2d/karman.xml
6785
```
6886

69-
## Documentation
87+
### Running on clusters
88+
To assist with using TCLB on HPC clusters (SLURM/PBS), there are scripts provided in the [TCLB_cluster](https://github.com/CFD-GO/TCLB_cluster) repository.
7089

71-
The documentation (including tutorials) is published at
72-
[docs.tclb.io](https://docs.tclb.io/). You can contribute at
73-
[CFD-GO/TCLB_docs](https://github.com/CFD-GO/TCLB_docs).
90+
### LBM-DEM computation
91+
TCLB code can be coupled with Discrete Element Method (DEM) codes, to enable computation of flow with particles.
7492

75-
For the `develop` version, most recent documentation can be found at
76-
[develop.docs.tclb.io](https://develop.docs.tclb.io/).
93+
The DEM codes that TCLB can be integrated with are:
94+
- [LIGGGHTS](https://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code)
95+
- [LAMMPS](https://lammps.sandia.gov/)
96+
- [ESYS-Particle](https://launchpad.net/esys-particle)
97+
98+
Refer to the documentation for instructions on compilation and coupling.
99+
100+
## About
101+
102+
### Authors
77103

78-
## Authors
104+
TCLB began development in 2012 with the aim at providing a framework for efficient CFD computations with LBM, mainly for research.
79105

80106
Author: [Łukasz Łaniewski-Wołłk](https://github.com/llaniewski)
81107

@@ -91,9 +117,11 @@ Contributors:
91117
* [Paweł Obrępalski](https://github.com/PabloOb)
92118
* [Grzegorz Gruszczyński](https://github.com/ggruszczynski)
93119

94-
Developed at: [C-CFD Group](https://c-cfd.meil.pw.edu.pl/) at [Warsaw University of Technology](http://pw.edu.pl/) from 2012
120+
Developed at:
121+
- [Zakład Aerodynamiki](https://meil.pw.edu.pl/ZA/) at [Politechnika Warszawska (Warsaw University of Technology)](http://pw.edu.pl/)
122+
- [School of Mechanical & Mining Engineering](https://www.mechmining.uq.edu.au/) at [University of Queensland](http://uq.edu.au/)
95123

96-
## License
124+
### License
97125

98126
This software is distributed under the [GPL v3 License](LICENSE).
99127

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
2+
#--------------------------------------------------------------
3+
4+
# Global timestep output options
5+
timeStepToStartOutputAt=0
6+
forceOutputAtFirstCall=False
7+
8+
# Global screenshot output options
9+
imageFileNamePadding=0
10+
rescale_lookuptable=False
11+
12+
# Whether or not to request specific arrays from the adaptor.
13+
requestSpecificArrays=False
14+
15+
# a root directory under which all Catalyst output goes
16+
rootDirectory=''
17+
18+
# makes a cinema D index table
19+
make_cinema_table=False
20+
21+
#--------------------------------------------------------------
22+
# Code generated from cpstate.py to create the CoProcessor.
23+
# paraview version 5.8.0
24+
#--------------------------------------------------------------
25+
26+
from paraview.simple import *
27+
from paraview import coprocessing
28+
29+
# ----------------------- CoProcessor definition -----------------------
30+
31+
def CreateCoProcessor():
32+
def _CreatePipeline(coprocessor, datadescription):
33+
class Pipeline:
34+
# state file generated using paraview version 5.8.0
35+
36+
# ----------------------------------------------------------------
37+
# setup the data processing pipelines
38+
# ----------------------------------------------------------------
39+
40+
# trace generated using paraview version 5.8.0
41+
#
42+
# To ensure correct image size when batch processing, please search
43+
# for and uncomment the line `# renderView*.ViewSize = [*,*]`
44+
45+
#### disable automatic camera reset on 'Show'
46+
paraview.simple._DisableFirstRenderCameraReset()
47+
48+
# create a new 'XML Partitioned Image Data Reader'
49+
# create a producer from a simulation input
50+
recalcitrantBubble_interaction_smooth_main_VTK_P00_00000530pvti = coprocessor.CreateProducer(datadescription, 'input')
51+
52+
# create a new 'Cell Data to Point Data'
53+
cellDatatoPointData1 = CellDatatoPointData(Input=recalcitrantBubble_interaction_smooth_main_VTK_P00_00000530pvti)
54+
cellDatatoPointData1.CellDataArraytoprocess = ['PhaseField', 'T', 'U']
55+
56+
# create a new 'Iso Volume'
57+
isoVolume1 = IsoVolume(Input=cellDatatoPointData1)
58+
isoVolume1.InputScalars = ['POINTS', 'PhaseField']
59+
isoVolume1.ThresholdRange = [0.0, 0.5]
60+
61+
# create a new 'Connectivity'
62+
connectivity1 = Connectivity(Input=isoVolume1)
63+
64+
# ----------------------------------------------------------------
65+
# finally, restore active source
66+
SetActiveSource(connectivity1)
67+
# ----------------------------------------------------------------
68+
69+
# Now any catalyst writers
70+
cSVWriter1 = servermanager.writers.CSVWriter(Input=connectivity1)
71+
coprocessor.RegisterWriter(cSVWriter1, filename='Connectivity1_%t.csv', freq=1, paddingamount=0, DataMode='None', HeaderType='None', EncodeAppendedData=None, CompressorType='None', CompressionLevel='None')
72+
73+
return Pipeline()
74+
75+
class CoProcessor(coprocessing.CoProcessor):
76+
def CreatePipeline(self, datadescription):
77+
self.Pipeline = _CreatePipeline(self, datadescription)
78+
79+
coprocessor = CoProcessor()
80+
# these are the frequencies at which the coprocessor updates.
81+
freqs = {'input': [1]}
82+
coprocessor.SetUpdateFrequencies(freqs)
83+
if requestSpecificArrays:
84+
arrays = [['PhaseField', 1], ['T', 1], ['U', 1]]
85+
coprocessor.SetRequestedArrays('input', arrays)
86+
coprocessor.SetInitialOutputOptions(timeStepToStartOutputAt,forceOutputAtFirstCall)
87+
88+
if rootDirectory:
89+
coprocessor.SetRootDirectory(rootDirectory)
90+
91+
if make_cinema_table:
92+
coprocessor.EnableCinemaDTable()
93+
94+
return coprocessor
95+
96+
97+
#--------------------------------------------------------------
98+
# Global variable that will hold the pipeline for each timestep
99+
# Creating the CoProcessor object, doesn't actually create the ParaView pipeline.
100+
# It will be automatically setup when coprocessor.UpdateProducers() is called the
101+
# first time.
102+
coprocessor = CreateCoProcessor()
103+
104+
#--------------------------------------------------------------
105+
# Enable Live-Visualizaton with ParaView and the update frequency
106+
coprocessor.EnableLiveVisualization(False, 1)
107+
108+
# ---------------------- Data Selection method ----------------------
109+
110+
def RequestDataDescription(datadescription):
111+
"Callback to populate the request for current timestep"
112+
global coprocessor
113+
114+
# setup requests for all inputs based on the requirements of the
115+
# pipeline.
116+
coprocessor.LoadRequestedData(datadescription)
117+
118+
# ------------------------ Processing method ------------------------
119+
120+
def DoCoProcessing(datadescription):
121+
"Callback to do co-processing for current timestep"
122+
global coprocessor
123+
124+
# Update the coprocessor by providing it the newly generated simulation data.
125+
# If the pipeline hasn't been setup yet, this will setup the pipeline.
126+
coprocessor.UpdateProducers(datadescription)
127+
128+
# Write output data, if appropriate.
129+
coprocessor.WriteData(datadescription);
130+
131+
# Write image capture (Last arg: rescale lookup table), if appropriate.
132+
coprocessor.WriteImages(datadescription, rescale_lookuptable=rescale_lookuptable,
133+
image_quality=0, padding_amount=imageFileNamePadding)
134+
135+
# Live Visualization, if enabled.
136+
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)

example/multiphase/d3q27_pf_velocity/BubbleMa001.xml renamed to example/article/ThermocapillaryFlow/BubbleMa001.xml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<?xml version="1.0"?>
2-
<CLBConfig version="2.0" output="/scratch/eait/uqtmitc3/thermocapillary/" permissive="true">
3-
<!-- MODEL: d3q27_pf_thermocapillary
4-
First test of temp field
2+
<CLBConfig version="2.0" output="output/" permissive="true">
3+
<!--
4+
MODEL: d3q27_pf_velocity_thermo
5+
6+
Purpose: test bubble migration for paper,
7+
8+
T. Mitchell et al. Computational modelling of
9+
three-dimensional thermocapillary flow of
10+
recalcitrant bubbles using a coupled lattice
11+
Boltzmann-finite difference method, PRE
12+
513
Created: 17/04/2020
614
Responsible: @TravisMitchell
715
-->
@@ -23,22 +31,22 @@
2331
<Param name="CenterZ" value="80"/>
2432
<Param name="BubbleType" value="-1"/>
2533
<Param name="Density_h" value="1"/>
26-
<Param name="Density_l" value="1"/>
34+
<Param name="Density_l" value="1"/>
2735
<Param name="Viscosity_h" value="0.1"/>
2836
<Param name="Viscosity_l" value="0.1"/>
2937
<Param name="sigma" value="5e-3"/>
3038
<Param name="M" value="0.05"/>
3139
<Param name="IntWidth" value="4"/>
32-
<Param name="T_init" value="16"/>
33-
<Param name="T_ref" value="16"/>
34-
<Param name="dT" value="0.1"/>
35-
<Param name="sigma_T" value="-2.5e-4"/>
36-
<Param name="T_init" value="0" zone="BottomWall"/>
37-
<Param name="T_init" value="32" zone="TopWall"/>
38-
<Param name="cp_h" value="1"/>
39-
<Param name="cp_l" value="1"/>
40-
<Param name="k_h" value="0.1"/>
41-
<Param name="k_l" value="0.1"/>
40+
<Param name="T_init" value="16"/>
41+
<Param name="T_ref" value="16"/>
42+
<Param name="dT" value="0.1"/>
43+
<Param name="sigma_T" value="-2.5e-4"/>
44+
<Param name="T_init" value="0" zone="BottomWall"/>
45+
<Param name="T_init" value="32" zone="TopWall"/>
46+
<Param name="cp_h" value="1"/>
47+
<Param name="cp_l" value="1"/>
48+
<Param name="k_h" value="0.1"/>
49+
<Param name="k_l" value="0.1"/>
4250
</Model>
4351
<Init/>
4452
<Container>

0 commit comments

Comments
 (0)