Vector Fields, Divergence and Curl

UniversityMathematicsExact linear three-dimensional velocity field with analytic trajectories, divergence, curl, sphere flux and planar circulation

Unlock this lab with a pass

A pass opens every simulation on the site, including Present mode for class. The teaching notes below stay free for everyone.

One-time payment, no subscription.

About this experiment

Release tracers in a field that combines rotation, planar dilation and axial stretching. Compare local vector arrows with material trajectories, then connect divergence to flux and curl to circulation.

Learning goals

  • Distinguish an Eulerian velocity sample from a moving material tracer.
  • Compute divergence and curl of a linear field.
  • Relate divergence to material volume change and curl to loop circulation.

How to use it

  1. 1Run an incompressible swirl and observe trajectories without volume growth.
  2. 2Reverse rotation and compare the sign of curl and circulation.
  3. 3Add planar dilation or axial stretch and measure outward sphere flux.
  4. 4Change the flux sphere radius and test cubic flux scaling against quadratic circulation scaling.

The model

The parameters have inverse-time units, apart from the angular-rate convention.
Rotation contributes curl but no divergence.
Flux is outward through the sphere; circulation is counterclockwise in the x-y plane viewed from positive z.
The infinitesimal material volume ratio follows from the exact linear flow.

Assumptions

  • This is a prescribed smooth velocity field, not a pressure or fluid-force solver. Trajectories are the exact matrix-exponential solution.
  • Particles are cropped by the finite observation window without reflection or artificial wall forces. The highlighted path ends at its first exit.
  • The sphere is a measurement surface, not a container. The circulation loop is an x-y circle with the same selected radius.
  • Arrow lengths are capped for readability. Divergence, curl, flux and circulation use the original field values.

Try this in class

  1. Q1Can a field have nonzero curl and zero divergence?
  2. Q2Why does doubling measurement radius multiply sphere flux by eight but circulation by four?

Frequently asked questions

Does a tracer leaving the box hit an invisible wall?

No. The analytic trajectory continues outside the observation window; only its display is cropped.

Is the material-volume ratio the volume inside the fixed sphere?

No. It follows a small moving material element. The fixed sphere is an independent surface used for the flux integral.