Air flow past a flagpole (slowed down by a factor of 5) For the original graphics size, see here.

A flagpole moving past air at standstill (slowed down by a factor of 5) For the original graphics size, see here.

Try this at home (3D animations)

A previous article of mine describes the benefits of knowing a postprocessor which is free to use for everyone. Concerning such a postprocessor, my previous article states that "The day is yet to come when a student can take a 3D-animated von Kármán vortex street home to his parents and show it to them on his laptop or tablet from any angle they wish. However, the ax is already at the root of the trees."

It appears that the day has come for people with big enough computers. From the computers that I have investigated until now, I conclude the following:

  • I can present interesting stuff on a computer with good graphics performance. The same computer can install and open ParaView version 5 without any error messages.
  • Computers with lower graphics performance will install version 5. Opening version 5, however, generates error messages.
  • Computers with lower graphics performance will install ParaView version 4.4 and open it without error messages. If you then follow my instructions below, error messages are shown when you load a state file (steps 6 and 7). These messages seem non-fatal. It appears that the computer displays the animation to the best of its ability.

If you want to try, what use can you make of this? My advice is:

  • Perform step 1 below to check if ParaView version 5 will install and open. If it does, feel lucky and continue.
  • If you see error messages while opening ParaView version 5, either
    • give up.
    • install and open ParaView version 4.4 instead. If that gives rise to error messages, give up.
  • Acknowledge that even if you have ParaView up and running, you may still experience performance issues when trying to follow my footsteps.

Right now, I don't know exactly what I am subjecting you to. If you cannot muster a certain amount of audacity and patience, don't blame me. Do something else instead.

The objective (what you may achieve by trying)

3D animations are much more powerful than the 2D animations usually encountered. The ability to rotate and zoom literally adds a dimension to the viewer's perception of what is going on. Understanding the general features of a von Kármán vortex street is both entertaining and educational. It will help you see why a flag on a flagpole undulates the way it does. You may also learn something about the mechanism of hurricanes.

This exercise may also increase your knowledge about Computational Fluid Dynamics (CFD). CFD enables you to predict the behavior of gases and liquids on a computer. Concerning such number-crunching, the latest decades have witnessed these development stages:

  1. At first, expensive software on powerful computers was almost the only method available. Twenty years ago, however, another option entered the stage:
  2. Free-to-use, open source software on powerful computers. Five years ago, however, another option entered the stage:
  3. Free-to-use, open source software on free-to-use computers in the cloud.

Concerning option number 3, the most prolific vendor, SimScale, only offers free computing if you agree to make your calculation public. But many cases of CFD usage fit into this category. For instance, analyzing a von Kármán vortex street.

So, I used SimScale to reach for the objective of enabling any computer to display a 3D animation of a von Kármán vortex street. You do not need to use SimScale to reach for that objective yourself. The recipe below contains shortcuts to get there within perhaps 15 minutes. You can later modify the procedure if you feel for it.

All this is only possible with open source software. Each step forward, including mine, started off from a platform made by hundreds of generous contributors. These contributors have also enabled hundreds of other achievements which anybody can use for free.

Acknowledgments

 Dr.-Ing. Jörn Beilke created input for the open source software package OpenFOAM and announced this fact on the "CFD Online" website (I used his "coarse" mesh). The people behind OpenFOAM may focus on number-crunching because ParaView takes care of the graphics for OpenFOAM. ParaView also handles the graphics for many other software products. As already mentioned, SimScale bundles it all in a very powerful way.

How to try 3D animations at home

Step 1: Download, install and open ParaView

The official software download site is here. You should go for OpenGL versions and ".exe" for Microsoft Windows. Download and install the latest version first. If it starts up with error messages, try installing version 4.4 instead.

As indicated above, you are in unknown territory if ParaView starts up with error messages or if you had to downgrade to version 4.4.

Step 2a: Obtain the vortex street CFD solution the interesting way

Everybody has access to verify that I have reimplemented Jörn Beilke's solution in SimScale. If you register at SimScale (which is free), you get direct access to my solution here. You then only have to switch to the "Simulation Designer" tab and select "Run 1" at the bottom of the "Navigator" column to the left. Then, the "Simulation Run" column to the right of the "Navigator" displays a "Results" button at the top. If you press it and select "Download results", you will end up having a file called "von Kármán vortex street in 2D-Incompressible-Run 1.zip" somewhere on the harddisk of your own computer.

Step 2b: Obtain the vortex street CFD solution the easy way

Download the file "von_Karman_vortex_street_in_2D-Incompressible-Run_1.zip" (1.09 GB) here. It is the same file as the one you would get from following step 2a above.

Step 3: Unzip the file obtained from either step 2a or step 2b

If possible, unzip the solution file to a directory named "C:\Simxon". If you do so, you may not need to edit the "state files" encountered in step 4. Otherwise, make a note of where you saved the output from unzipping the solution file.

Step 4: Download two "state files" for ParaView

Right-click on this link to download the file "uanimation.pvsm". If your computer adds a ".txt" file name extension, remove that. Save the file where you can later find it with the file explorer of your computer. "uanimation.pvsm" is used to create an animation for the case where the velocity field has the stationary flagpole as its reference.

Right-click on this link to download the file "ucoanimation.pvsm". If your computer adds a ".txt" file name extension, remove that. Save the file in the same directory as "uanimation.pvsm". "ucoanimation.pvsm" is used to create an animation for the case where the velocity field has the undisturbed velocity as its reference (corresponding to a moving flagpole). The vortices display themselves more clearly this way.

 If you did not unzip to "C:\Simxon" in step 3, edit both "uanimation.pvsm" and "ucoanimation.pvsm". All occurrences of "C:\Simxon" (two in each file) must be replaced with the name of the directory that you unzipped to. The classic Windows editors "Notepad" and "WordPad" can do the editing job if nothing else is available on your computer.

Step 5: Get acquainted with ParaView

The layout of ParaView's user interface is fairly straightforward. To get started as a ParaView user, you only need to focus on the usual "File" menu button up left and on the green "Play" triangle near the middle of the uppermost icon row (just below the menu row).

Step 6: Run the "uanimation" animation (pressure contours and the velocity field seen from a stationary observer)

From the "File" menu, select "Load State...". Then select the "uanimation.pvsm" file which you downloaded in step 4. Acknowledge "Use File Names From State" if asked to do so. If you remembered or did not need the editing part of step 4, press the green, triangular "Play" button (see step 5) and enjoy (I hope). You may subsequently experiment with, for instance, dragging with your mouse and using its scrolling wheel.

Step 7: Run the "ucoanimation" animation (pressure contours and the velocity field seen from a moving observer)

If you come directly from step 6, restart ParaView by selecting "Reset Session" from the "Edit" menu (up left, next to the "File" menu).

From the "File" menu, select "Load State...". Then select the "ucoanimation.pvsm" file which you downloaded in step 4. Acknowledge "Use File Names From State" if asked to do so. If you remembered or did not need the editing part of step 4, press the green, triangular "Play" button (see step 5) and enjoy (I hope). You may subsequently experiment with, for instance, dragging with your mouse and using its scrolling wheel.

That's all folks!

Creative Commons License
Website for the defunct company Simxon by Kim Ravn-Jensen is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Permissions beyond the scope of this license may be available at kim@ravn-jensen.dk.