Interpolation Madness

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

Posts: 11
Joined: Thu Dec 10, 2009 12:05 am UTC

Interpolation Madness

Postby ezzieyguywuf » Fri Oct 29, 2010 4:33 am UTC

So, I am trying to recreate a contour plot similar to this one here: . That image I got from a journal paper that describes a method for predicting the performance of a VAWT using a multiple streamtubes method. The paper can be found here Anywho, the image shows the results after he runs it through his code. I have re-written his code (since the code listing provided is written in ancient fortran) and am trying to verify my results with his.

I have (x,y,z) data where x = Y/R, y=Z/H, and z = U/Uinf. I've got the data organized in [nxd] matrices where n = number of x vals and d = number of y vals. As you can see, however, this does not form a uniform grid due to the shape of the test piece. Although I have the same number of x samples at every y location, these x values range in, er, ranges. I am trying to use matplotlib.pyplot.contour (a python function) to plot these contours, but it requires the data do be given to it on a uniform mesh. ok then, that means I have to interpolate values... ... olate.html This is what is available for me as far as interpolation goes. I do not have access to the griddata function. My question is: which of these interpolation methods makes the most sense to use and why? I have tried Rbf and got weird results, same with interp2d (which upon further reading also expects uniform sample points so I shouldn't be using it anyways). I've tried using the BivariatSpline function, but to no avail. I can't seem to grasp its proper syntax and the descriptions provided don't give me enough to go on. I'm hoping that someone with a little more knowledge about these interpolation methods can help shed some light on which direction I should take.

Thank you,

Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 5 guests