Turn velocity fields into streamlines with confidence now. Get u and v from ψ expressions. Download neat reports, compare examples, and learn faster here.
Example using ψ(x,y) = x·y. Then u = ∂ψ/∂y = x and v = −∂ψ/∂x = −y.
| Point (x,y) | ψ | u | v | |V| |
|---|---|---|---|---|
| (0, 0) | 0 | 0 | 0 | 0 |
| (1, 0.5) | 0.5 | 1 | -0.5 | 1.1180 |
| (2, 1) | 2 | 2 | -1 | 2.2361 |
| (2, 2) | 4 | 2 | -2 | 2.8284 |
| (3, 1) | 3 | 3 | -1 | 3.1623 |
It is a scalar function ψ(x,y) whose contours represent streamlines in 2D incompressible flow. Velocity components come from partial derivatives of ψ, guaranteeing zero divergence in ideal conditions.
For 2D incompressible flow, the difference in ψ between two points equals the volume flow rate per unit depth crossing any curve connecting those points. It is a compact way to measure transport without integrating velocity across a line.
Divergence near zero suggests the field behaves like an incompressible flow and a stream function can exist. If the value is large, ψ built from u and v may become path dependent and your mismatch |ψA−ψB| will grow.
In velocity mode, ψ is computed along two simple paths. If the field is compatible, both paths agree. The mismatch is a practical numeric indicator of inconsistency, coarse step settings, or a field that is not truly divergence-free.
Start with 1e−4 to 1e−6 for smooth functions. Too large blurs gradients; too small amplifies rounding noise. If results are unstable, try increasing h slightly and compare the divergence and vorticity values.
Simpson is often more accurate for smooth functions at the same step count. Trapezoid is simpler and can be robust when functions are less smooth. If you see oscillations, increase steps or switch methods to compare stability.
Not directly. The classic stream function formulation assumes incompressibility in 2D. For compressible cases you may need a mass stream function or alternative potentials. Use the divergence output to judge whether incompressibility is a reasonable approximation.
This tool uses numerical differentiation and integration. Finite step sizes introduce approximation error. Reduce the grid step or increase integration steps, and tune h for derivatives. Also ensure expressions are continuous and correctly typed with parentheses.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.