OpenFOAM and Rotating Machinery: Relative Velocity

In turbomachinery theory relative velocity is defined as

w = cu

where u is circumferential velocity and c is absolute velocity at specified point. The relative velocity w is very important for evaulation of flow in or around rotating bodies.

When using SRFSimpleFoam, Urel is automatically added to to resulting fields. With others (SimpleFoam with MRF or pimpleFoam with dynamic mesh) it’s not there. Luckily, there’s a quick way to calculate it with ParaView.

The Recipe

For example, let’s take a simulation case with a stationary zone and a rotating zone named impeller. The impeller rotates around x-axis with 3000 RPM.

  1. When loading the case in ParaView, check the Read Zones option.
  2. Use the Extract Block filter and select your rotating cellzone. Filters > Extract Block: impeller
  3. Convert cell data to point data: Filters > Cell data to point data
  4. Create a scalar field for rotation. Use radians per second and store the resulting field as omegaRot: Filters > Calculator: 3000*2*3.14159/60. Replace the 3000 with whatever rotating speed you set in dynamicMeshDict.
  5. Create a field for circumferential velocity (this Wikipedia article might be of some assistance: https://en.wikipedia.org/wiki/Curl_(mathematics)#A_simple_vector_field). In my case for rotation around x-axis the field would look like this: Filters > Calculator: omegaRot*(coordsY*kHat – coordsZ*jHat) . Save the result as Utan.
  6. Subtract circumferential velocity from absolute velocity: Filters > Calculator: U – Utan. Save the result as Urel. This is now the w, relative velocity. You can run a stream tracer or do something with the new field.

In case you have trouble with reading zones, you might want to check controlDict for write* settings. Some versions of readers don’t like binary or compressed result files and others don’t like decomposed cases. If your results are in the wrong format, change your controlDict and run foamFormatConvert on your case.

And you’re done! You might also want to check some of the shortcuts I wrote for postProcessing.

2 Comments

  1. Lilian Chabannes

    Thanks, it helped a lot!
    I didn’t manage to do this with Paraview, I had to use paraFoam since step 3 “Filters > Cell data to point data” did not work. Basically my block was empty of data. Did I forget to click something?

  2. ParaView and paraFoam use different OpenFOAM readers. With the latest ParaView
    (version 5.6) you can choose “Read zones” and then “Copy data to cell zones”, then extract block and all.

Leave a Reply