Switch between canonical 2D fields — uniform flow, point source, free vortex, dipole and saddle — and adjust strength and arrow density. Click on the canvas to drop streamline seeds; double-click to clear.
Field
Layers
Flow particles (animated)
Arrows
Streamlines
Magnitude colormap
While paused, move the sliders to update the result instantly.
Move the cursor over the canvas to reposition the probe and read |F|, divergence and curl live.
Live probe readouts
—
|F| at probe
—
divergence ∇·F
—
curl ∇×F
—
mean particle speed
Vector Field & Streamlines
Theory & Key Formulas
Tracer particles are advected by \(\dot x=P,\ \dot y=Q\) (RK4) on the field \(\vec F=(P,Q)\).
Divergence \(\nabla\cdot\vec F=\partial_x P+\partial_y Q\) and curl \(\nabla\times\vec F=\partial_x Q-\partial_y P\) are measured live at the probe by central differences.
Why are some fields drawn as outward arrows and others as swirls?
🎓
A point source has positive divergence and zero curl — flow leaves every neighbourhood. A free vortex has zero divergence and a delta-function curl at the origin — flow rotates without expanding. Switch between "Point source" and "Free vortex" and watch the streamlines rearrange.
🤩
What is the saddle case?
🎓
A linear hyperbolic field that pulls in along one axis and pushes out along the other. It models the flow near stagnation points and is the bread-and-butter example for stability analysis in dynamical systems.
🤩
Where is this useful in CAE?
🎓
Potential-flow superposition (uniform + source + dipole = Rankine oval, for example) gives quick analytic insight before launching a CFD case. The same arrow plot machinery is what your CFD post-processor uses for velocity vectors and electric field plots.
Physical model
A 2D vector field assigns a vector $\vec F(x,y)$ to every point. The simulator visualises it three ways: discrete arrows on a grid, integrated streamlines, and an optional magnitude colormap. The streamlines are obtained by integrating $\dot{\vec r}=\vec F/|\vec F|$ with a fixed step.
Two scalar quantities classify the field. Divergence $\nabla\cdot\vec F = \partial_x u + \partial_y v$ measures local outflow; curl $\nabla\times\vec F = \partial_x v - \partial_y u$ measures local rotation. The cursor probe estimates these numerically by central differences.
Real-world applications
Aerodynamics: potential-flow combinations of uniform, source, dipole and vortex elements model lift and bluff-body flow before viscous CFD is run.
Electromagnetism: the same equations describe 2D electrostatic and magnetostatic fields. Source = positive charge, dipole = electric dipole, vortex = magnetic field of a long wire.
Dynamical systems: phase-plane analysis of ODE systems uses exactly this kind of arrow plot to diagnose fixed-point stability.
FAQ
What is divergence?
The local outflow per unit area: $\nabla\cdot\vec F=\partial_x u+\partial_y v$. Positive at sources, negative at sinks.
What is curl?
The infinitesimal rotation rate: $\nabla\times\vec F=\partial_x v-\partial_y u$. Positive curl rotates a small paddlewheel counter-clockwise.
Why does the source field blow up at the origin?
Because $|\vec F|\sim 1/r$ for a 2D point source, the magnitude diverges at $r\to 0$. Real engineering analogues are always smeared over a finite size, but the singular form is a useful mathematical building block.
Select a field type (uniform flow, source, sink, vortex, dipole, or saddle). Tracer particles are advected with RK4 and the arrows/streamlines update in real time
Adjust the strength slider Q (0.2–3) to scale the field; for the source div = 2Q and for the vortex curl = 2Q
Set arrow density (6–26) to control arrow and streamline spacing—higher density reveals finer flow structure but increases rendering load
Toggle "Flow particles", "Arrows" and "Streamlines" to layer the views; enable the magnitude colormap to shade fast vs. slow regions
Move the cursor over the domain to reposition the probe and read |F|, divergence ∇·F and curl ∇×F live in the readout cards
Worked Example
Pick the vortex preset F=(−Qy, Qx) with Q=1 and move the cursor anywhere: the curl readout shows the analytic value 2Q = 2 and the divergence shows 0. Switch to the source preset F=(Qx, Qy) with Q=1 and the divergence becomes 2Q = 2 while the curl drops to 0. These match the central-difference estimates exactly, confirming the numerical scheme. The saddle preset F=(Qx, −Qy) yields zero divergence and zero curl, with streamlines forming the characteristic hyperbolic "X" pattern around the stagnation point.
Practical Notes
The dipole preset is a source (+x) and sink (−x) pair; taking the separation to zero recovers the doublet used to build flow around a cylinder
For the saddle field, streamlines form hyperbolic patterns useful for understanding stagnation zones in channel flows or around airfoil trailing edges
High arrow density with streamlines reveals separatrix curves critical for particle-transport prediction in CFD validation