Setting Views and Lighting in ANSYS CFD Post

This post shows how to set exact view orientation, zoom, pan, and lighting in CFD post. This is especially useful for making consistent figures for reports or presentations.

This picture below is a stream-ribbon visualization of a swirling flow, viewed using the built in “Isometric View (Z up).” The view is centered too low and the lighting angle is not favorable.

ribbon-iso

To improve the view using the GUI, we can pan using Ctrl-(center mouse) and move the lighting using Ctrl-(right mouse). If we record the CCL commands while making the changes, we can save a block of code that can later be used whenever we want to get that view back precisely.

VIEW:View 1
  Camera Mode = User Specified
  CAMERA:
    Option = Pivot Point and Quaternion
    Pivot Point = 0.0300042, 0.00577157, 0
    Scale = 33.4975
    Pan = 0.000255154, 0.00272164
    Rotation Quaternion = 0.279848, -0.364705, -0.115917, 0.880476
  END  
END
VIEW:View 1
  Light Angle = 59.7436, 124.616
END

The result is easier to read and better centered, as shown in the picture below.

ribbon-iso-betterlighting

This is also very useful for setting other not-built-in views based on the rotation quaternion. For example, to view from +y with +x to the right, we can enter following block of code.

VIEW:View 1
  Camera Mode = User Specified
  CAMERA:
    Option = Pivot Point and Quaternion
    Pivot Point = 0, 0, 0
    Scale = 50
    Pan = -0.025, 0.0
    Rotation Quaternion = 0.7, 0, 0, 0.7
  END
END