Palabos User Guide
Palabos User Guide
Release 1.0 r1 Copyright (c) 2019 University of Geneva
Jul 05, 2019
CONTENTS
1 Introduction
3
1.1 What is Palabos? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Functionality covered by Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Getting started with Palabos
7
2.1 Supported Compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Installing and compiling the code under Linux and other Unix-like systems . . . . . . . . . . . . . . 7
2.3 Compilation under Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Compilation under Windows (and under many other OSes) with the integrated development environ-
ment Code::Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 Compilation on a BlueGene/P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 Open-source libraries which are bundled with Palabos . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7 Recommended open-source software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.8 The examples directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 The Palabos-Python interface
11
3.1 Compiling the Python interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Example: Compiling the Python interface under Ubuntu Linux . . . . . . . . . . . . . . . . . . . . . 12
4 The Palabos-Java interface
13
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5 Programming with Palabos
17
5.1 Quick overview: programming guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Non-intrusive program development with Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6 Fundamental data types
23
6.1 The BlockXD data structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Lattice descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3 The dynamics classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Data processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7 Implemented fluid models
29
7.1 Non-thermal Navier-Stokes equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2 Thermal flows with Boussinesq approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3 Multi-component and multi-phase fluids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4 Free-Surface Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
i
7.5 Large eddy simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 7.6 Non-Newtonian fluids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8 Setting up a problem
35
8.1 Attributing dynamics objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.2 Initial values of density and velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9 Defining boundary conditions
37
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.2 Grid-aligned boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.3 Periodic boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9.4 Bounce-back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9.5 Bounce-back domain from an STL file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.6 Off-lattice boundaries from an STL file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
10 Running a simulation
45
10.1 Time cycles of a Palabos program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10.2 At which point do you evaluate data? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.3 Other important things to do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
11 Input/Output
47
11.1 Output streams: writing to the terminal and into files . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.2 Input streams: reading large data sets from files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.3 Accessing command-line parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
11.4 Reading user input from an XML file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
11.5 Producing images in 2D and 3D simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
11.6 VTK output for post-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.7 Checkpointing: saving and loading the state of a simulation . . . . . . . . . . . . . . . . . . . . . . 52
12 Data evaluation
55
12.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
12.2 Pipelining data evaluation operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
13 Particles
57
13.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
14 Grid refinement
59
14.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
14.2 Multi-layer grid refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
15 Parallelism
61
15.1 Parallel programming approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
15.2 Controlling the efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
16 Data processors for non-local operations and couplings between blocks
65
16.1 Using helper functions to avoid explicitly writing data processors . . . . . . . . . . . . . . . . . . . 65
16.2 Convenience wrappers for local operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
16.3 Writing data processors (or actually, data-processing functionals) . . . . . . . . . . . . . . . . . . . 66
17 Utilities
73
17.1 Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
17.2 Value tracer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
18 Appendix: list of example programs
75
18.1 Directory examples/showCases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
18.2 Directory examples/codesByTopic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
ii
19 Appendix: partial function/class reference
81
19.1 Mutable (in-place) operations for simulation setup and other purposes . . . . . . . . . . . . . . . . . 81
19.2 Non-mutable operations for data analysis and other purposes . . . . . . . . . . . . . . . . . . . . . . 84
20 Appendix: Copyright and license agreements
89
20.1 Copyright of the Palabos user guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
20.2 Copyright and open-source license for Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
20.3 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 . . . . . . . . . . . . 89
Bibliography
99
iii
iv
Contents:
Palabos User Guide, Release 1.0 r1
CONTENTS
1
Palabos User Guide, Release 1.0 r1
2
CONTENTS
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.