We use a bitmap (BMP) file to define the geometry to input into the flow solver discussed in the previous section. This lets you use image editing software like Photoshop or Gimp to easily draw whatever shapes you want. Here we give some brief info on how to do this.

The example here shows Gimp.

When creating the bitmap, keep in mind that the flow will be from left to right.

Create Blank Bitmap

Create a new image (File -> New...) and set the pixel size to match the matrix size, for example 64 x 32. Set the Image mode to indexed (Image -> Mode -> Indexed) and set the maximum number of palette colors to 2. Then turn on grids (View -> Show Grid) and zoom in. You should have a nice blank canvas to start drawing your geometry.

Draw Geometry

Use the Toolbox palette to select the Pencil tool. In the Pencil options, set the Brush to Pixel and the Size to 1.

You are now ready to draw your geometry one pixel at a time.

You can make more than one blob if you want. Here we just show a happy little fish.

The geometry should be solid with no internal open areas.

Export Geometry

When you are done and ready to save your geometry, export it as a BMP file. It's a good idea to also save it in the native Gimp (or Photoshop) format also, to make future edits easier. To export to a BMP file use File -> Export As... and save it.

You can then use the BMP as an input to flow solver runner script discussed in the previous section.


Here are a few ready to go BMP files you can use to get started.

But get creative and have fun with this. Enjoy :)

This guide was first published on Nov 17, 2020. It was last updated on Apr 21, 2024.

This page (Creating Bitmaps) was last updated on Mar 08, 2024.

Text editor powered by tinymce.