Compute streamfunction from numerical velocity field

AI Thread Summary
To compute the streamfunction ψ from a discrete two-dimensional velocity field (u, v), integration of the equations u dy = dψ and v dx = -dψ is necessary. The velocity field is defined on a rectangular grid with equally spaced points and satisfies the incompressible continuity equation. A suggested approach is to integrate each equation numerically, vertically for u and horizontally for v, then average the results at each grid point. The boundary of the rectangular region is a streamline, with the streamfunction value set to zero there. If integration does not yield zero at the boundaries, adjustments should be made uniformly across the grid points.
Niles
Messages
1,834
Reaction score
0

Homework Statement


I have a discrete two-dimensional velocity field (u,v). I want to plot the streamlines by finding the streamfunction ψ and from that plot the streamlines by finding the curves where ψ=constant.

Homework Equations


In order to find ψ I then have to solve the equations (see link)

$$
udy = d\Psi \\
vdx = -d\Psi
$$

The Attempt at a Solution


My main issue is that I'm not sure how to integrate these two equations. Say I start with the component u at point (i=1, j=1). If I have to integrate (=sum) this along y, then I basically get a number for the row i=1. But is this the way to do it?
 
Physics news on Phys.org
Is it on a rectangular grid? Are the velocities known to satisfy the incompressible continuity equation? Do you know any of the bounding streamlines?
 
  • Like
Likes Niles
Chestermiller said:
Is it on a rectangular grid? Are the velocities known to satisfy the incompressible continuity equation? Do you know any of the bounding streamlines?

It is on a rectangular 2D grid, grid points equally spaced. It is a simulated velocity field, so it obeys continuity. I don't know any of the streamlines by default
 
Niles said:
It is on a rectangular 2D grid, grid points equally spaced. It is a simulated velocity field, so it obeys continuity. I don't know any of the streamlines by default
Well, the outside surface of the rectangular region has to be a streamline, since there is no flow across this boundary. Call the value of the stream function on this boundary zero. I don't know the best way to get the stream function values at the interior grid points, but a crude method would be to integrate each of the two equations numerically, one of them vertically and the other horizontally, and then take the average at each grid point. If integration along a vertical line does not give a value of zero of the stream function at the far boundary, I would distribute the excess uniformly among all the grid points in that column. The same goes for the horizontal direction.
 
Back
Top