Compute streamfunction from numerical velocity field

In summary, the student is trying to plot streamlines for a two-dimensional velocity field by finding the streamfunction ψ and solving the equations udy = dψ and vdx = -dψ. The field is on a rectangular grid and the velocities satisfy the incompressible continuity equation. The student is unsure of how to integrate the equations and does not know any of the bounding streamlines. It is suggested to use a crude method of numerically integrating the equations and distributing the excess uniformly among grid points.
  • #1
Niles
1,866
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
  • #2
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
  • #3
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
 
  • #4
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.
 

Related to Compute streamfunction from numerical velocity field

What is streamfunction?

Streamfunction is a mathematical concept used to describe the flow of a fluid in a two-dimensional space. It is a scalar function that represents the velocity potential of a fluid, and is useful in analyzing and visualizing the flow patterns of a fluid.

Why is it important to compute streamfunction from a numerical velocity field?

Computing streamfunction from a numerical velocity field can provide valuable insights into the flow behavior of a fluid, such as identifying areas of high or low velocities, detecting vortices, and determining flow direction. It can also help in validating numerical simulations and understanding the underlying physical processes.

How is streamfunction calculated from a numerical velocity field?

The streamfunction can be calculated using the continuity equation in two-dimensional flow, which states that the partial derivatives of the streamfunction with respect to the two coordinate directions are equal to the components of the velocity vector. This equation can be solved numerically using various methods, such as finite difference or finite element methods.

What are the limitations of computing streamfunction from a numerical velocity field?

One of the main limitations is that it can only be applied to two-dimensional flows. Additionally, the accuracy of the results depends on the resolution of the numerical velocity field and the assumptions made in solving the continuity equation. It may also be challenging to interpret the results in complex flow situations.

How can streamfunction be used in practical applications?

Streamfunction can be used in various practical applications, such as in weather forecasting, oceanography, and aerodynamics. It can help in predicting and visualizing the movement of fluids, identifying regions of high or low velocities, and analyzing flow patterns. It is also useful in the design and optimization of structures and systems that involve fluid flow, such as aircraft wings and water distribution systems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
969
Replies
2
Views
511
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Differential Equations
Replies
4
Views
2K
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
875
Back
Top