Skip to content

Commit

Permalink
Freshen up
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenz Hufnagel authored and Lorenz Hufnagel committed Dec 16, 2016
1 parent 3561494 commit bd4021e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
9 changes: 0 additions & 9 deletions README

This file was deleted.

29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Lattice-Boltzmann lid driven cavity

![Karman vortex street](example.png)

A Lattice-Boltzmann method code to simulate the two-dimensional flow in a lid driven cavity.
Submitted with [Metadelee](https://github.com/Metadelee), [brendelmeister](https://github.com/brendelmeister) and [HugoMichi](https://github.com/HugoMichi)
for the summer '14 SiWiR2 class at FAU.

### Requirements:
* [NetPBM library](http://netpbm.sourceforge.net/)
* OpenMP for improved performance

### Usage
Compile the code with the provided Makefile.

The parameter file works as follows
```sizex <horizontal domain size, overridden by pgm-geometry>
sizey <vertical domain size, overridden by pgm-geometry>
timesteps <number timesteps to simulate>
omega <omega parameters for SRT LBM>
vtk_file <name of output files, *.vtk is appended>
vtk_step <timestep spacing between output files>
geometry <file name of a black/white pgm-graphic to generate flow obstacles (black). Uncomment with '#' if not needed>```
Then run
```./lbm params.dat```
to simulate the defined flow and generate VTK output. Upon completion of the simulation, the code outputs the Mega-Lattice-Updates/second (a performance measure).
The output files can be visualized e.g. with
[ParaView](http://www.paraview.org/) or [VisIt](ftp://ftp.llnl.gov/pub/visit)
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed test.pgm → input.pgm
Binary file not shown.
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ int main(int argc, char* argv[])

geomVals = pgm_allocarray( cols, rows );

//PGMs horizontal gespiegelt einlesen,
//damit wir unseren koordinatenursprung unten links (statt oben rehchts) haben
//Read PGMs horizontally mirrored
//-> coordinate origin in the bottom left
for (int y=rows-1;y>=0;y--){
pgm_readpgmrow( geomFile, geomVals[y], cols, maxVal, format );
}
Expand Down
4 changes: 2 additions & 2 deletions params.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ sizex 50
sizey 50
timesteps 10000
omega 1.9
vtk_file ldc
vtk_file output
vtk_step 100
#geometry test.pgm
geometry input.pgm

0 comments on commit bd4021e

Please sign in to comment.