matlab计算流函数,hanyeah

上面的网址不知道什么时候就打不开了,赶紧保存一份,要不想看都看不到了。

什么是流函数,什么是位函数(势函数),可以自己搜索。

说说我这里的应用场景。

空间放一些电荷,我们能够算出任意一点的电场强度——一个矢量,现在,我们能不能通过这些矢量来求出电场的等值线,即我可以通过给不同的值设置不同的颜色,最终得到电场线。这样得到的电场线不会有偏差,而用矢量一步一步画出来的电场线必然会有偏差。

Q: How to compute a streamfunction?

© Kirill Pankratov, Ph. D. (kirill@plume.mit.edu)

Department of Earth, Atmospheric & Planetary Sciences,

Massachusetts Institute of Technology, Cambridge, MA, 02139

(posted on comp.soft-sys.matlab, 1994-03-07)

Hi,

Although this question appears for the first time to my knowledge I believe it can be of rather general interest.

The streamfunction (and also the velocity potential) are rather fun-damental concepts for anybody who is dealing with fluid dynamics or geosciences, like power spectrum for signal processing.

The Mathwolks (I mean the folks from The Mathworks) could be surprised how many of the MATLAB users are oceanographers, meteorologists, geophysisists and not only electrical engineers or signal processors (no offence for the latter). So probably The Mathwork should learn at least some fundamentals about it and include the most general operations from these fields in its library.

Does anybody agree with this? ...

Anyway, here I present the program "flowfun" which calculates the streamfunction psi and the velocity potential phi (that is the velocity field is a scalar and vector product of the gradient operator and the potential and the streamfunction correspondingly):u = d(phi)/dx,   v = d(phi)/dy  for potential flows,

u = -d(psi)/dy,  v = d(psi)/dx  for solenoidal flows.These potentials are computed by integrating the velocities given by matrices u, v using Simpson rule summation. To do this the routine "cumsimp" is added. This routine is actually of much more general application, than the "flowfun" - is is general cumulative integrator - a little bit similar to "cumsum" but much more accurate (for continuous functions) and starting from zero. I think MATLAB should have had something like this long ago it would be useful for a

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值