Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I am struggling to work out a matlab program for the numerical calculation of the streamfunction directly from the potentialfunction. I have the latter as a solution of a 2D Laplace equation from the pdetool() and would like to generate contour plots of both the potentialfunction as well as the streamfunction to form finally a net of coordinates that are rectangular in every point.

So far I tested flowfun.m from Kirill K. Pankratov, but this has problems when the function is not continuous. The 2D region where my PDE is defined has however several holes and an integration of the Cauchy-Riemann equations is numerically difficult at these holes.

Streamlines (that are easily provided by matlab) are not helpful because I have to specify starting points. What I need however is the scalar value of the streamfunction at every point of the 2D region.

Possibly the streamfunction (as the harmonic dual of the potentialfunction) can be derived directly during the FEM calculation of the solution of the PDE.

My question is whether there is a possibility to output the streamfunction from the pdetool or to calculate it in another way from the potentialfunction.

Any suggestion is very welcome!

Uwe

**Physics Forums - The Fusion of Science and Community**

# How to calculate the stream function from the potential function?

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: How to calculate the stream function from the potential function?

Loading...

**Physics Forums - The Fusion of Science and Community**