Blood Flow Aneurysm Tutorial Calculating Flux

Description of Simulation Data

This tutorial uses the aneurysm dataset -- available at:

Calculating the flux of a Velocity Field through a surface

To calculate a flux, we will need the original velocity vector, the normal vector of the surface, and VisIt's Flux Operator. We will calculate the flux through a cross-slice located at Y=3, at the beginning of the artery. We are assuming that you have open the datafile series, and that you start with a blank page.

Creating the slice and showing velocity glyphs

First we will directly plot the velocity vectors that exist on the slice through the 3D mesh.

  • Add a Vector plot of velocity
  • Open the Vector plot attributes
  • On the 1st tab (Vectors), set the Fixed number to 40
  • On the 3rd tab (Glyphs)
    • Set Arrow body to Cylinder
    • Set Geometry Quality to High

Vector plot atts.png

  • Click Apply and Dismiss
  • Add a Slice operator
  • Open the Slice operator attributes
    • Set Normal to Arbitrary and to 0 1 0
    • Set Origin to Intercept and to 3
    • Set Up Axis: Project to 2D to OFF
  • Click Make default, Apply and Dismiss
  • Click Draw

Slice op atts.png

  • Zoom in to explore the plot results.


The vector plot uses glyphs to draw portions of the instantaneous vector field. The arrows are colored according to the speed at each point (the magnitude of the velocity vector). Next we create an expression to evaluate the vectors normal to the Slice. These normals should all point in the Y direction.

Creating a vector expression and using the Defer Expression operator

We will use VisIt's pre-defined expression to evaluate the normals on a cell-by-cell basis.

  • Select the Controls and Expressions menu
  • click New
  • Change the name to normals and the Type to Vector Mesh Variable
  • Edit the definition by selecting Insert Function, going to the Miscellaneous category and selecting cell_surface_normal. You then need to add the name of the mesh Mesh inside the parentheses.


  • Click Apply and Dismiss

Return to the Vector plot and change its variable to normals

  • you will most probably be greeted with an error message saying: The 'normals' expression failed because The Surface normal expression can only be calculated on surfaces. Use the ExternalSurface operator to generate the external surface of this object. You must also use the DeferExpression operator to defer the evaluation of this expression until after the external surface operator.
  • in fact, VisIt cannot use the name Mesh which refers to the original 3D mesh. It needs to defer the evaluation, until after the Slice operator is applied. Thus, we add the Defer Expression operator (from the Analysis group).
  • Open the DeferExpression operator attributes
  • Add the name normals to the Variables list


  • Click Apply and Dismiss
  • Click Draw


  • Verify that all your normals point in the up (Y) direction.

Calculating the flux on the slice

We are now ready for the final draw.

  • Add a Pseudocolor plot of variable operator->Flux->Mesh
  • Add a Slice operator and verify that the default values previously saved are used.
  • Move the Slice operator up, above the Flux operator
  • Add a Defer Expression operator as before
  • Move the Defer Expression operator up, above the Flux operator, and below the Slice
  • Open the Flux operator attributes
  • Change the Flow field name from default to velocity

Flux op atts.png

  • Click Apply and Dismiss
  • Click Draw
  • Verify that you have a display that is cell-centered, and that will vary with the Time slider
  • Get the numerical value of the flux by query-ing for the Weighted Variable Sum

Query weightedVarSum.png VelocityVectors.0003.png

Aneurysm Tutorial Index