Prandtl-Meyer Function Iteration

  • Thread starter nanvinnie
  • Start date
  • Tags
    Function
In summary, The conversation is about writing a MATLAB code to iterate the Mach value for a given nu value, using the equation for the Prandtl-Meyer function. The speaker is seeking help on how to write this code, and the other person suggests looking into algorithms such as Newton's Method to achieve this.
  • #1
nanvinnie
2
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
  • #2
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
 
  • #3


The Prandtl-Meyer function is an important tool in the field of fluid mechanics, specifically in the study of compressible flows. It relates the Mach number (M) and the deflection angle (nu) of a flow over a solid surface. The equation you have provided is the inverse of the Prandtl-Meyer function, which calculates the value of nu for a given Mach number.

To write this equation in MATLAB, you can use the "fzero" function to find the root of the equation. This function takes in an initial guess for the root and an anonymous function representing the equation. For example, you can write the following code to find the value of nu for a given Mach number (M=2 in this case):

nu = fzero(@(nu) sqrt((gamma +1)/(gamma -1))*atan(sqrt((gamma - 1)/(gamma +1)*(2^2-1)))-atan(sqrt(2^2-1)), 1);

This will give you the value of nu for M=2. You can change the value of M as per your requirement.

I would also recommend looking into the "fsolve" function, which is similar to "fzero" but can handle more complex equations with multiple variables. You can use it to solve for nu in terms of M.

I hope this helps in writing your MATLAB code. Good luck!
 

FAQ: Prandtl-Meyer Function Iteration

1. What is the Prandtl-Meyer Function Iteration?

The Prandtl-Meyer Function Iteration is a mathematical method used to determine the flow properties of a compressible fluid, such as air or gas, when it undergoes a sudden expansion or compression.

2. How does the Prandtl-Meyer Function Iteration work?

The iteration is based on the Prandtl-Meyer equation, which relates the Mach number, temperature, and pressure of a fluid. By repeatedly calculating the function at different points, the iteration converges to the desired solution.

3. What is the significance of the Prandtl-Meyer Function Iteration in fluid dynamics?

The iteration is commonly used in aerodynamics and gas dynamics to analyze the flow of supersonic or hypersonic fluids. It allows for the determination of important parameters such as Mach number and flow angle.

4. How accurate is the Prandtl-Meyer Function Iteration?

The accuracy of the iteration depends on the number of iterations and the initial guess. With a sufficient number of iterations and a good initial guess, the results can be very accurate. However, in some cases, the iteration may not converge or may give inaccurate results.

5. Are there any limitations to the Prandtl-Meyer Function Iteration?

Yes, the Prandtl-Meyer Function Iteration is limited to compressible fluids and cannot be used for incompressible fluids. It also assumes that the flow is steady and isentropic, meaning there is no heat transfer or friction. Additionally, it may not give accurate results for highly complex flow fields or for flows with strong shock waves.

Similar threads

Replies
8
Views
2K
Replies
2
Views
1K
Replies
2
Views
3K
Replies
4
Views
2K
Replies
2
Views
1K
Replies
1
Views
1K
Back
Top