logo资料库

Palabos手册.pdf

第1页 / 共107页
第2页 / 共107页
第3页 / 共107页
第4页 / 共107页
第5页 / 共107页
第6页 / 共107页
第7页 / 共107页
第8页 / 共107页
资料共107页,剩余部分请下载后查看
Introduction
What is Palabos?
Functionality covered by Palabos
Authors
Getting help
Getting started with Palabos
Supported Compilers
Installing and compiling the code under Linux and other Unix-like systems
Compilation under alternative operating systems
Open-source libraries which are bundled with Palabos
Recommended open-source software
The examples directory
The Palabos-Python interface
Compiling the Python interface
Example: Compiling the Python interface under Ubuntu Linux
Programming with Palabos
Quick overview: programming guidelines
Non-intrusive program development with Palabos
Fundamental data types
The BlockXD data structures
Lattice descriptors
The dynamics classes
Data processors
Implemented fluid models
Non-thermal Navier-Stokes equations
Thermal flows with Boussinesq approximation
Multi-component and multi-phase fluids
Large eddy simulations
Non-Newtonian fluids
Setting up a problem
Attributing dynamics objects
Initial values of density and velocity
Defining boundary conditions
Overview
Grid-aligned boundaries
Periodic boundaries
Bounce-back
Domain creation from an STL file
Running a simulation
Time cycles of an Palabos program
At which point do you evaluate data?
Other important things to do
Input/Output
Output streams: writing to the terminal and into files
Input streams: reading large data sets from files
Accessing command-line parameters
Reading user input from an XML file
Producing images in 2D and 3D simulations
VTK output for post-processing
Checkpointing: saving and loading the state of a simulation
Data evaluation
Overview
Pipelining data evaluation operators
Particles
Overview
Grid refinement
Overview
Multi-layer grid refinement
Parallelism
Parallel programming approach
Controlling the efficiency
Data processors for non-local operations and couplings between blocks
Using helper functions to avoid explicitly writing data processors
Convenience wrappers for local operations
Writing data processors (or actually, data-processing functionals)
Utilities
Timer
Value tracer
Appendix: list of example programs
Directory examples/showCases
Directory examples/codesByTopic
Appendix: partial function/class reference
Mutable (in-place) operations for simulation setup and other purposes
Non-mutable operations for data analysis and other purposes
Appendix: Copyright and license agreements
Copyright of the Palabos user guide
Copyright and open-source license for Palabos
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
Bibliography
Palabos User Guide Release 1.0 r1 Copyright (c) 2011 FlowKit Ltd October 28, 2011
CONTENTS 1 Introduction . 1.1 What is Palabos? . 1.2 1.3 Authors . . 1.4 Getting help . . Functionality covered by Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Getting started with Palabos Supported Compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Installing and compiling the code under Linux and other Unix-like systems . . . . . . . . . . . . . . 2.2 2.3 Compilation under alternative operating systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Open-source libraries which are bundled with Palabos . . . . . . . . . . . . . . . . . . . . . . . . . Recommended open-source software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 2.6 The examples directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The Palabos-Python interface 3.1 3.2 Compiling the Python interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Compiling the Python interface under Ubuntu Linux . . . . . . . . . . . . . . . . . . . . . 4 Programming with Palabos 4.1 Quick overview: programming guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Non-intrusive program development with Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Fundamental data types 5.1 5.2 5.3 5.4 Data processors . The BlockXD data structures . . Lattice descriptors . . The dynamics classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Implemented fluid models Thermal flows with Boussinesq approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Non-thermal Navier-Stokes equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 . 6.3 Multi-component and multi-phase fluids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Large eddy simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Non-Newtonian fluids . . . . . . . . . . . 7 Setting up a problem 7.1 Attributing dynamics objects . 7.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initial values of density and velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Defining boundary conditions 3 3 4 5 5 7 7 7 8 9 9 9 11 11 12 13 13 16 19 19 20 21 23 25 25 26 27 28 29 31 31 32 33 i
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Grid-aligned boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Domain creation from an STL file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Periodic boundaries Bounce-back . . . . . . . . . . . . . . . . . . . . 9 Running a simulation 9.1 Time cycles of an Palabos program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 At which point do you evaluate data? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 Other important things to do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Input/Output . 10.1 Output streams: writing to the terminal and into files . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Input streams: reading large data sets from files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Accessing command-line parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Reading user input from an XML file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5 Producing images in 2D and 3D simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 VTK output for post-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.7 Checkpointing: saving and loading the state of a simulation . . . . . . . . . . . . . . . . . . . . . 11 Data evaluation 11.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Pipelining data evaluation operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Particles 12.1 Overview . . . . . . . . . 13 Grid refinement 13.1 Overview . . 13.2 Multi-layer grid refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Parallelism 14.1 Parallel programming approach . 14.2 Controlling the efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Data processors for non-local operations and couplings between blocks 15.1 Using helper functions to avoid explicitly writing data processors 15.2 Convenience wrappers for local operations 15.3 Writing data processors (or actually, data-processing functionals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Utilities 16.1 Timer . . 16.2 Value tracer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Appendix: list of example programs 17.1 Directory examples/showCases . . . . . 17.2 Directory examples/codesByTopic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Appendix: partial function/class reference 18.1 Mutable (in-place) operations for simulation setup and other purposes . . . . . . . . . . . . . . . . . 18.2 Non-mutable operations for data analysis and other purposes . . . . . . . . . . . . . . . . . . . . . . 19 Appendix: Copyright and license agreements 19.1 Copyright of the Palabos user guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2 Copyright and open-source license for Palabos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.3 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 . . . . . . . . . . . . ii 33 33 37 37 39 45 45 46 46 47 47 47 48 49 51 52 53 55 55 56 57 57 59 59 59 61 61 61 65 66 66 66 75 75 75 77 77 80 83 83 86 91 91 91 91
Bibliography 101 iii
iv
Contents: Palabos User Guide, Release 1.0 r1 CONTENTS 1
Palabos User Guide, Release 1.0 r1 2 CONTENTS
分享到:
收藏