Prandtl-Meyer Function Iteration

  • Thread starter Thread starter nanvinnie
  • Start date Start date
  • Tags Tags
    Function
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 6K views
nanvinnie
Messages
2
Reaction score
0
hi.. I'm trying to write a MATLAB code that will iterate the mach value given a certain value for nu.

nu = sqrt((gamma +1)/(gamma -1))*atan(sqrt((gamma - 1)/(gamma +1)*(M^2-1)))-atan(sqrt(M^2-1))

this is the equation for the prandtl-meyer function, but how do i write it in MATLAB so that i can extract the value of nu for a given M value? sort of like the goal seak function in excel...

i would appreciate anyone's help!
 
Physics news on Phys.org
I don't know of any built-in MATLAB function that does this for you (without any additional toolboxes, that is), but that doesn't mean there isn't one...

I would look into something like the Newton-Raphson's method (but there are many others). The wikipedia article on Newton's Method is pretty good, and at the bottom is a list of similar algorithms. It's not difficult to write some algorithm like this for MATLAB.

-Kerry