Skip to content

About

Wind around Warsaw Spire: an altered FluidX3D (lattice Boltzmann, GPU) with its wind-tunnel validation (AIJ case A)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Wind around Warsaw Spire

The altered FluidX3D solver behind a wind study of the Warsaw Spire tower in Warsaw, with its wind-tunnel validation.

Streamlines of a west wind around Warsaw Spire, from the simulation, rendered in Rhino

This is an altered copy of FluidX3D, the lattice Boltzmann GPU solver by Dr. Moritz Lehmann. The architect Mateusz Bochyński used it for a non-commercial experiment published on a personal blog: Wind around Warsaw Spire, a look at the wind around the Warsaw Spire tower and along Łucka street, computed from a model of the city centre. The code is published because the FluidX3D licence requires it (see Licence).

What this is and what it is not

  • It is the source that computed the published results of the study. One wind setup replaces the upstream examples; a turbulent inflow, a wall-stress condition for the ground and more outputs were added.
  • It was checked against a wind-tunnel benchmark, AIJ case A. The single block passes from 24 cells across it; at 16 cells four of five rows are met. A second case, a tower among city blocks, did not pass. Details: docs/VALIDATION.md.
  • It is not the original FluidX3D. It is marked as altered in this file, in CHANGES.md and in the first line of every altered file.
  • The images of the study are illustrations of an experiment, not a wind engineering study. The check supports nothing about gusts, and nothing about wind near the ground in streets and gaps of fewer than about ten to fifteen cells across.

Results made with this source

Animation of the mean west wind 4.5 m above the ground around the Warsaw Spire complex

What the tower changes near the ground in a west wind The wind-tunnel check, before and after the fixes (at 24 cells across the block)
Map of the wind with the tower minus the wind without it, 4.5 m above the ground Hits and misses at 60 of the 181 measured places around the AIJ case A block

Buildings: GUGiK LOD1 2024 and NMPT; streets: © OpenStreetMap contributors; wind-tunnel measurement: Architectural Institute of Japan. The images come from the blog post and are not covered by the licence of the code.

The study was computed twice; the earlier version of the setup is described under History. Every published result of this version was computed with the wall-model build of this source, on rented NVIDIA GPUs:

  • the west-wind runs of five variants of the Warsaw Spire complex on a 2 m grid;
  • the year of wind: twelve wind directions on the 2 m grid, with and without the tower, and a repeat of one direction with a 3D box for streamline images;
  • the facade close-up on a 1 m grid;
  • the wind-tunnel check on AIJ case A at 16, 24 and 32 cells across the building, and the second check on AIJ case D;
  • the films of the post, made afterwards from the planes the west-wind run had written.

How that binary was built, and how src/ differs from the source that was built (in comments only): CHANGES.md.

What is altered

Five files differ from upstream commit b85d64e and one file is new. CHANGES.md describes every change; changes.patch is the diff.

File Change
src/setup.cpp One wind setup replaces the upstream examples: a city height map (and an optional STL) becomes the solid, the wind enters from the west (+x), the mean profile is held on every outer face, a turbulent inflow can be played back at the inlet, and the run writes averaged planes and rendered views. All inputs come from environment variables.
src/kernel.cpp A wall-stress condition for the ground, two small kernels (inflow playback, plane recording), the Smagorinsky constant as a define, a single-hue colour scale.
src/lbm.cpp, src/lbm.hpp Buffers and calls for the new kernels; colour range, Q threshold and Smagorinsky constant read at run time.
src/defines.hpp Benchmark off; equilibrium boundaries, LES and off-screen graphics on; frame size and background; two build flags.
build.sh (new) Builds without starting the solver.

Everything else under src/, including src/OpenCL/ and src/X11/, is unchanged.

Build

The code needs a C++17 compiler and OpenCL. build.sh compiles src/*.cpp into temp/<variant>/ and links bin/FluidX3D-wind[-<variant>]. It never starts the solver.

./build.sh                                                     # bin/FluidX3D-wind                   ground as upstream (bounce-back)
./build.sh wall-model -DGROUND_WALL_MODEL                      # bin/FluidX3D-wind-wall-model        wall-stress ground: the build of the published results
./build.sh wall-model-fp32 -DGROUND_WALL_MODEL -DFP32_STORAGE  # bin/FluidX3D-wind-wall-model-fp32   the same with 32-bit storage of the distributions (control runs)

The variant only names the binary; the flags decide what is built.

  • macOS: the Xcode command line tools (g++ is clang). The script links -framework OpenCL. No X11 is needed.
  • Linux: g++. The script links -lOpenCL and adds the bundled src/OpenCL/lib to the linker path, so linking needs nothing else. To run, the machine needs the vendor's OpenCL driver (ICD). If the linker does not accept the bundled library, install ocl-icd-opencl-dev.
  • Windows: not tried. The upstream repository has the Visual Studio project.

Do not rebuild a variant while a run uses its binary, and do not run two builds of one variant at once: they share temp/<variant>/.

A minimal run

The solver reads everything from environment variables. This example makes the block of the wind-tunnel check at 16 cells across its width (a domain of 496 x 352 x 185 cells of 2 m) and runs 60 s of wind with a power-law inflow. The second 30 s are averaged. It needs Python 3 with numpy (here through uv) and a GPU with OpenCL.

cd validation
uv run --with numpy python -I scripts/make_block_geometry.py 16 inputs/block-16-cells
(cd .. && ./build.sh wall-model -DGROUND_WALL_MODEL)
HM=inputs/block-16-cells/height.u16 HX=496 HY=352 NZ=185 DX_M=2 PX=168 PY=176 \
ZREF_M=64 ALPHA=0.173 Z0_M=2.947e-4 T_SI=60 FRAMES=2 RENDER=0 OUT=runs/first-test/ \
../bin/FluidX3D-wind-wall-model

make_block_geometry.py prints these grid values on its line starting with ENV:. The results are raw arrays in runs/first-test/planes/. Every variable, the input formats and the outputs: docs/USAGE.md. The full settings of the wind-tunnel check are in validation/run-settings/.

Validation and limits

  • docs/VALIDATION.md: the wind-tunnel check, how to repeat it, its results, the second case and the full list of its limits.
  • docs/USAGE.md: the limits of the setup itself (boundaries, solids, inflow table, rendered images).

Repository layout

Path Content
src/ the complete altered FluidX3D source
build.sh the build script
changes.patch the diff against upstream commit b85d64e
CHANGES.md every change against upstream, the record of the build and the history
docs/USAGE.md environment variables, input formats, outputs, limits of the setup
docs/VALIDATION.md the wind-tunnel check
docs/images/ three images and an animation from the blog post
validation/scripts/ our scripts of the wind-tunnel check
validation/run-settings/ the five run settings of the check
validation/inflow-calibration.json the calibration of the turbulent inflow
LICENSE.md the upstream licence

Licence

This is an altered version of FluidX3D by Dr. Moritz Lehmann, https://github.com/ProjectPhysX/FluidX3D, based on commit b85d64ee39a72687d163d42806c9a0ccdaed6d3c (v3.8 plus 10 commits). It is not the original software and is marked as altered here, in CHANGES.md and in the header line of every altered file (clause 1 of the licence). This repository exists to satisfy clause 5: results generated with an altered version were published, so the altered source is published too.

The use is non-commercial (clause 2): a personal blog, no product, no service, no fee.

LICENSE.md is the upstream licence file, unchanged, and applies to this repository (clause 7). The scripts in validation/ are our own and may be used under the same terms as the rest of the repository.

References

Clause 6 of the FluidX3D licence asks scientific publications that arise from the software to cite these articles. The blog post is not a scientific publication; the list is copied from the upstream README.

The wind-tunnel benchmark and its data are cited in docs/VALIDATION.md.

Not included

  • The AIJ workbooks (download them from the AIJ page named in docs/VALIDATION.md).
  • The city model: height maps and the tower STL, built from Polish GUGiK elevation data and building footprints, and the inflow tables made for it.
  • The scripts that turned the city runs into the published images, and the results (raw arrays, frames, films). The images and the animation in docs/images/ are taken from the blog post.

About

Wind around Warsaw Spire: an altered FluidX3D (lattice Boltzmann, GPU) with its wind-tunnel validation (AIJ case A)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages