Stream Function and Velocity Potential Calculator

Find the stream function, velocity potential, and velocity components for a uniform stream combined with a point source, the classic Rankine half-body flow.

🌀 Stream Function and Velocity Potential Calculator
m/s
m²/s
m
deg
Stream function ψ
Velocity potential φ
Radial velocity uᵣ
Tangential velocity uθ
Resultant speed V
Stagnation distance b
Step-by-step working

🌀 What is the Stream Function and Velocity Potential Calculator?

This stream function and velocity potential calculator models a classic problem in 2D potential flow theory: a uniform stream of speed U combined with a point source of strength Λ placed at the origin. Enter U, Λ, and a point in polar coordinates (r, θ), and it returns the stream function ψ, velocity potential φ, radial velocity u_r, tangential velocity u_θ, resultant speed V, and the stagnation point distance b.

This combination is used throughout fluid dynamics and aerodynamics courses to introduce the Rankine half-body, the rounded nose shape formed by the dividing streamline of this flow. Engineers use the same superposition method to build simplified models of flow around bridge piers, submarine bows, and airship hulls, and it is the standard first example students see for combining elementary potential flows.

A common point of confusion is the difference between ψ and φ: ψ describes the streamlines (the actual paths of fluid particles, always tangent to the velocity), while φ describes the equipotential lines (always perpendicular to the streamlines). Both scalar functions fully determine the same velocity field, just from two different, complementary viewpoints, and both only exist together for irrotational, incompressible flow.

This calculator is useful for fluid dynamics, aerospace, and mechanical engineering students who need to check hand calculations of potential flow superposition problems, or who want to explore how the velocity field and stagnation point change as U and Λ vary.

📐 Formula

ψ(r,θ) = U·r·sinθ + (Λ/2π)·θ     φ(r,θ) = U·r·cosθ + (Λ/2π)·ln(r)
U = uniform stream speed, Λ = source strength (volume flow rate per unit depth)
r = radial distance from the source, θ = angle from the uniform flow direction
uᵣ = U·cosθ + Λ/(2πr),   = −U·sinθ,   V = √(uᵣ² + uθ²)
Stagnation distance: b = Λ/(2πU), the point upstream (θ=180°) where uᵣ=uθ=0
Example: If U=2 m/s, Λ=10 m²/s, r=3 m, θ=60°, then ψ ≈ 6.8628 m²/s.

📖 How to Use This Calculator

Steps

1
Enter the uniform stream speed and source strength, U and Λ.
2
Enter the point where you want the flow evaluated, r and θ.
3
Read the stream function, velocity potential, and velocities at that point, plus the stagnation distance.

💡 Example Calculations

Example 1 - Point on the half-body nose region

1
U=2 m/s, Λ=10 m²/s, r=3 m, θ=60° (θ=1.047198 rad)
2
ψ = 2×3×sin(60°) + (10/2π)×1.047198 = 5.1962 + 1.6667 = 6.8628 m²/s
3
uᵣ = 2×cos(60°) + 10/(2π×3) = 1.5305 m/s, uθ = −2×sin(60°) = −1.7321 m/s, so V = 2.3114 m/s
ψ = 6.8628 m²/s, φ = 4.7485 m²/s, V = 2.3114 m/s
Try this example →

Example 2 - Stronger source, closer point

1
U=5 m/s, Λ=20 m²/s, r=4 m, θ=30° (θ=0.523599 rad)
2
φ = 5×4×cos(30°) + (20/2π)×ln(4) = 17.3205 + 4.4127 = 21.7332 m²/s
3
uᵣ = 5×cos(30°) + 20/(2π×4) = 5.1259 m/s, uθ = −5×sin(30°) = −2.5000 m/s, so V = 5.7031 m/s
ψ = 11.6667 m²/s, φ = 21.7332 m²/s, V = 5.7031 m/s
Try this example →

Example 3 - At the stagnation distance (b = 1 m)

1
U=1 m/s, Λ=6.283185 m²/s (so b = Λ/(2πU) = 1 m exactly), r=2 m, θ=90°
2
uᵣ = 1×cos(90°) + 6.283185/(2π×2) = 0 + 0.5 = 0.5000 m/s, uθ = −1×sin(90°) = −1.0000 m/s
3
Checking the nose itself: at r=b=1 m and θ=180°, both uᵣ and uθ evaluate to 0, confirming the stagnation point
V = 1.1180 m/s at (r=2, θ=90°); stagnation distance b = 1.0000 m
Try this example →

❓ Frequently Asked Questions

What is a stream function?+
The stream function ψ(r,θ) is a scalar function whose contour lines (lines of constant ψ) are the streamlines of a 2D incompressible flow, the paths fluid particles actually follow. It automatically satisfies conservation of mass, so any valid stream function describes a physically possible incompressible flow field.
What is a velocity potential?+
The velocity potential φ(r,θ) is a scalar function whose gradient gives the velocity vector at every point. It only exists for irrotational (potential) flow, flow with no local spin, and its contour lines (equipotential lines) are always perpendicular to the streamlines.
What is the formula for stream function and velocity potential of a uniform flow plus a source?+
ψ(r,θ) = U·r·sinθ + (Λ/2π)·θ and φ(r,θ) = U·r·cosθ + (Λ/2π)·ln(r), where U is the uniform stream speed, Λ is the source strength, r is radial distance from the source, and θ is the angle measured from the direction of the uniform flow.
What is a Rankine half-body?+
A Rankine half-body is the shape traced out by the dividing streamline when a uniform stream is combined with a point source. It is an open, rounded nose shape that extends downstream indefinitely, and it is the classic textbook model for flow around a blunt object such as a bridge pier, a submarine bow, or a wind tunnel probe.
What is the stagnation point distance b?+
b = Λ/(2πU) is the distance upstream of the source, along θ=180°, where the outward radial velocity from the source exactly cancels the oncoming uniform stream, so the total velocity drops to zero. This stagnation point marks the nose of the Rankine half-body.
How do I get the radial and tangential velocity from these formulas?+
u_r = U·cosθ + Λ/(2πr) and u_θ = −U·sinθ. These come from differentiating either the stream function or the velocity potential in polar coordinates, and the resultant speed is V = √(u_r² + u_θ²).
Why does the source term in ψ use θ but the term in φ uses ln(r)?+
This reflects the 90° phase relationship between a source's streamlines and equipotentials. A point source has purely radial flow, so its equipotential lines are circles (depending only on r, giving ln r in φ) and its streamlines are rays from the origin (depending only on θ, giving θ in ψ).
What units does the source strength Λ have?+
Λ has units of area per time (m²/s in SI), representing the volume flow rate emitted by the source per unit depth into the page. It is sometimes written as m or q in other textbooks.
Can this calculator be used for a sink instead of a source?+
This calculator assumes Λ > 0 (a source, emitting flow outward). A sink (flow converging inward) uses the same formulas with a negative strength, which would instead produce a Rankine half-body opening upstream rather than downstream; enter the magnitude here and flip the sign manually if you need a sink.
Is this flow physically realistic near the source?+
The point source is a mathematical idealization: velocity grows without bound as r approaches zero. Away from the immediate vicinity of the source, and outside the half-body dividing streamline, the model matches real irrotational, incompressible flow around a blunt nose shape very well.
Why are ψ and φ both needed if they describe the same flow?+
Each has a different practical use: ψ is convenient for tracing flow visualization (dye lines, particle paths) because fluid never crosses a streamline, while φ is convenient for computing pressure and velocity magnitude directly from its gradient. Together they form a pair of orthogonal curvilinear coordinates for the flow.

What is a stream function?

The stream function ψ(r,θ) is a scalar function whose contour lines (lines of constant ψ) are the streamlines of a 2D incompressible flow, the paths fluid particles actually follow. It automatically satisfies conservation of mass, so any valid stream function describes a physically possible incompressible flow field.

What is a velocity potential?

The velocity potential φ(r,θ) is a scalar function whose gradient gives the velocity vector at every point. It only exists for irrotational (potential) flow, flow with no local spin, and its contour lines (equipotential lines) are always perpendicular to the streamlines.

What is the formula for stream function and velocity potential of a uniform flow plus a source?

ψ(r,θ) = U·r·sinθ + (Λ/2π)·θ and φ(r,θ) = U·r·cosθ + (Λ/2π)·ln(r), where U is the uniform stream speed, Λ is the source strength, r is radial distance from the source, and θ is the angle measured from the direction of the uniform flow.

What is a Rankine half-body?

A Rankine half-body is the shape traced out by the dividing streamline when a uniform stream is combined with a point source. It is an open, rounded nose shape that extends downstream indefinitely, and it is the classic textbook model for flow around a blunt object such as a bridge pier, a submarine bow, or a wind tunnel probe.

What is the stagnation point distance b?

b = Λ/(2πU) is the distance upstream of the source, along θ=180°, where the outward radial velocity from the source exactly cancels the oncoming uniform stream, so the total velocity drops to zero. This stagnation point marks the nose of the Rankine half-body.

How do I get the radial and tangential velocity from these formulas?

u_r = U·cosθ + Λ/(2πr) and u_θ = −U·sinθ. These come from differentiating either the stream function or the velocity potential in polar coordinates, and the resultant speed is V = √(u_r² + u_θ²).

Why does the source term in ψ use θ but the term in φ uses ln(r)?

This reflects the 90° phase relationship between a source's streamlines and equipotentials. A point source has purely radial flow, so its equipotential lines are circles (depending only on r, giving ln r in φ) and its streamlines are rays from the origin (depending only on θ, giving θ in ψ).

What units does the source strength Λ have?

Λ has units of area per time (m²/s in SI), representing the volume flow rate emitted by the source per unit depth into the page. It is sometimes written as m or q in other textbooks.

Can this calculator be used for a sink instead of a source?

This calculator assumes Λ > 0 (a source, emitting flow outward). A sink (flow converging inward) uses the same formulas with a negative strength, which would instead produce a Rankine half-body opening upstream rather than downstream; enter the magnitude here and flip the sign manually if you need a sink.

Is this flow physically realistic near the source?

The point source is a mathematical idealization: velocity grows without bound as r approaches zero. Away from the immediate vicinity of the source, and outside the half-body dividing streamline, the model matches real irrotational, incompressible flow around a blunt nose shape very well.