Fluid Dynamics Streamline Calculator
Fluid Dynamics Streamline Calculator computes streamlines for a 2D velocity field \\( \mathbf{v}(x, y) = (u, v) = (ax + by, cx + dy) \\). Enter coefficients \\( a, b, c, d \\) and an initial point \\( (x_0, y_0) \\).
Streamline Calculation
Streamlines represent paths followed by fluid particles in a velocity field \\( \mathbf{v}(x, y) = (u, v) \\). For \\( u = ax + by \\), \\( v = cx + dy \\), streamlines are solutions to:
\\[
\frac{dx}{u(x, y)} = \frac{dy}{v(x, y)}
\\]
Or equivalently:
\\[ \frac{dy}{dx} = \frac{v(x, y)}{u(x, y)} = \frac{cx + dy}{ax + by} \\]Numerical Integration (Euler’s Method): Starting from \\( (x_0, y_0) \\), compute points:
\\[ x_{n+1} = x_n + h \cdot u(x_n, y_n), \quad y_{n+1} = y_n + h \cdot v(x_n, y_n) \\]Where \\( h \\) is the step size (e.g., 0.01).