# Panel methods for rectangular steps

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 9, 2023, 01:58 Panel methods for rectangular steps #1 New Member   Venkata Hegde Join Date: May 2023 Location: Karnataka, India Posts: 15 Rep Power: 3 NaN as solution for source panel method for flow over rectangular backward facing step in matlab..Any reason?

 May 9, 2023, 04:23 #2 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,153 Blog Entries: 29 Rep Power: 39 Does the same method work for a sphere or cylinder? Does the same method work for a channel or pipe without steps?

 May 9, 2023, 04:30 #3 New Member   Venkata Hegde Join Date: May 2023 Location: Karnataka, India Posts: 15 Rep Power: 3 Yes, and also do you know any method for rectangular stepped flow

May 9, 2023, 04:44
#4
Senior Member

Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,153
Blog Entries: 29
Rep Power: 39
Quote:
 Originally Posted by Justaway Yes, and also do you know any method for rectangular stepped flow
I only ever used panel methods for external flows, but I know that internal flows have special requirements. Still, if your code works for those examples I mentioned, I don't think it needs any other special need for the step.

Obviously, we are talking here about solving the potential equations in your domain. Only sources are good for this but, of course, the resulting flow field is nothing close to the actual one. And even if you add a wake with doublet panels detaching from the edge, which is the next logical step, I don't think it is going to give any reasonable result either, because the actual viscous flow is rotational here.

In these cases the way out is to start debugging to understand where and how it exactly fails. If a simple channel works you can do two things:

1) Test the same case with very few panels and check the resulting equations.

2) Using the step angle as parameter (pi/2 in your case), start from a very low angle and reduce it a little for each case, until you find an angle that makes it fail.

Because, gives NaN means nothing. You first need to understand what goes wrong exactly. This is not magic, it's math.

Is it a 2D or 3D code? Have you coded it or someone else did? What language? Do you have other codes as reference?

 May 9, 2023, 04:50 #5 New Member   Venkata Hegde Join Date: May 2023 Location: Karnataka, India Posts: 15 Rep Power: 3 Yes I have coded in matlab, my aim is to find flow between two parallel walls which I'm goin to approximate for internal flow, I'm thinking of Schwarz christoffel transformation also but solving it for complicated passages is a big headache. That's the reason I'm using two parallel walls with panel method implementation. For the vortex formed at separation point, I'm adding a a singularity. It's 2D

May 9, 2023, 05:22
#6
Senior Member

Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,153
Blog Entries: 29
Rep Power: 39
Quote:
 Originally Posted by Justaway Yes I have coded in matlab, my aim is to find flow between two parallel walls which I'm goin to approximate for internal flow, I'm thinking of Schwarz christoffel transformation also but solving it for complicated passages is a big headache. That's the reason I'm using two parallel walls with panel method implementation. For the vortex formed at separation point, I'm adding a a singularity. It's 2D
So, if your code works for straight channels where, I guess, you didn't use any "singularity" at the step, we already have a possible candidate for problems. Have you tested the step without this "singularity"?

Let me also tell you that I have never seen a source only, dirichlet bc, panel method. The reason, I think, is because a source panel defines a jump in the panel normal velocity, not the potential (which instead requires a doublet). Are you sure that your method actually works for other cases?

EDIT: apparently, the dirichlet bc part was totally a personal impression, as you never cite that. So, please specify exactly your method too

 May 9, 2023, 06:21 #7 New Member   Venkata Hegde Join Date: May 2023 Location: Karnataka, India Posts: 15 Rep Power: 3 Singularity is something that is yet to be added. And the code works fine for gradually increasing channel size, only the sudden changes are troubling. I don't even know if panel methods are implemented for such geometries. Yes, at the wall no penetration bc is considered, so there is a Dirichlet bc. My problem is similar to using lumped vortex method for thin airfoil, but the only thing is I'm using a source. I want to place a singularity in between the two boundaries constructed like thin airfoil to finally understand the effect of singularity on flow. I will also be grateful if you could suggest to me some books I could refer to. I'll definitely look into your suggestions. Thank you Last edited by Justaway; May 9, 2023 at 06:25. Reason: Also, I am just trying to create ideal flow that traces my boundaries (like in very low reynolds no. flow)

May 9, 2023, 06:46
#8
Senior Member

Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,153
Blog Entries: 29
Rep Power: 39
Quote:
 Originally Posted by Justaway Singularity is something that is yet to be added. And the code works fine for gradually increasing channel size, only the sudden changes are troubling. I don't even know if panel methods are implemented for such geometries. Yes, at the wall no penetration bc is considered, so there is a Dirichlet bc. My problem is similar to using lumped vortex method for thin airfoil, but the only thing is I'm using a source. I want to place a singularity in between the two boundaries constructed like thin airfoil to finally understand the effect of singularity on flow. I will also be grateful if you could suggest to me some books I could refer to. I'll definitely look into your suggestions. Thank you
The reference book for panel methods in external aerodynamics is "Low Speed Aerodynamics" by Katz and Plotkin. From Chapter 9 onward you will find most material on several possible approaches with panel methods.

The method you refer to, only sources with normal velocity set to 0 in panel centers, is actually using a Neumann boundary condition, because the bc type refers to the velocity potential for which you are actually solving the equations. In Katz and Plotkin you will find examples of your code, altough used for external aerodynamics in non lifting cases.

As your code works for more smooth section changes, this should not be the issue, but consider that internal flows have, in general, issues. The general issue can be stated as follows: you need to ensure that your singularity and bc selection allows for the unique determination of the potential in each part of the domain. For external flows, the behaviour at infinity is usually sufficient for this. For internal ones, instead, this usually leads to a singularity. Still, I don't remember this issue to come out with source only Neumann conditions, but you should investigate this for internal flows (altough, again, the fact that your code works for smoother angles means that this is not your problem).

To the best of my experience, the workhorse of panel methods is the constant source-doublet with Dirichlet boundary conditions, which also has an example in Katz and Plotkin. This is also used by one of the latest NASA panel codes, PMARC, which also describes the use for internal flows. Look, for example, these:

https://ntrs.nasa.gov/api/citations/...9890003183.pdf

https://ntrs.nasa.gov/api/citations/...0000032961.pdf

I don't think all of this answer your original question, which is related to the differences in the angle of the step only. To the best of my understanding, if a panel method works for a given boundary and boundary conditions, no change of the boundary geometry that doesn't alter the domain topology should affect it (even assuming some well posedness issue for cusp angles, your panels will always only describe that approximately). Obviously, "works" must be understood here as "gives a unique solution to the underlying potential equation".

May 9, 2023, 07:20
#9
New Member

Venkata Hegde
Join Date: May 2023
Location: Karnataka, India
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by sbaffini The reference book for panel methods in external aerodynamics is "Low Speed Aerodynamics" by Katz and Plotkin. From Chapter 9 onward you will find most material on several possible approaches with panel methods. The method you refer to, only sources with normal velocity set to 0 in panel centers, is actually using a Neumann boundary condition, because the bc type refers to the velocity potential for which you are actually solving the equations. In Katz and Plotkin you will find examples of your code, altough used for external aerodynamics in non lifting cases. As your code works for more smooth section changes, this should not be the issue, but consider that internal flows have, in general, issues. The general issue can be stated as follows: you need to ensure that your singularity and bc selection allows for the unique determination of the potential in each part of the domain. For external flows, the behaviour at infinity is usually sufficient for this. For internal ones, instead, this usually leads to a singularity. Still, I don't remember this issue to come out with source only Neumann conditions, but you should investigate this for internal flows (altough, again, the fact that your code works for smoother angles means that this is not your problem). To the best of my experience, the workhorse of panel methods is the constant source-doublet with Dirichlet boundary conditions, which also has an example in Katz and Plotkin. This is also used by one of the latest NASA panel codes, PMARC, which also describes the use for internal flows. Look, for example, these: https://ntrs.nasa.gov/api/citations/...9890003183.pdf https://ntrs.nasa.gov/api/citations/...0000032961.pdf I don't think all of this answer your original question, which is related to the differences in the angle of the step only. To the best of my understanding, if a panel method works for a given boundary and boundary conditions, no change of the boundary geometry that doesn't alter the domain topology should affect it (even assuming some well posedness issue for cusp angles, your panels will always only describe that approximately). Obviously, "works" must be understood here as "gives a unique solution to the underlying potential equation".

Thank you, it was great help. I will definitely use your suggestions.

May 11, 2023, 13:20
This is great !!!
#10
New Member

Venkata Hegde
Join Date: May 2023
Location: Karnataka, India
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by sbaffini The reference book for panel methods in external aerodynamics is "Low Speed Aerodynamics" by Katz and Plotkin. From Chapter 9 onward you will find most material on several possible approaches with panel methods. The method you refer to, only sources with normal velocity set to 0 in panel centers, is actually using a Neumann boundary condition, because the bc type refers to the velocity potential for which you are actually solving the equations. In Katz and Plotkin you will find examples of your code, altough used for external aerodynamics in non lifting cases. As your code works for more smooth section changes, this should not be the issue, but consider that internal flows have, in general, issues. The general issue can be stated as follows: you need to ensure that your singularity and bc selection allows for the unique determination of the potential in each part of the domain. For external flows, the behaviour at infinity is usually sufficient for this. For internal ones, instead, this usually leads to a singularity. Still, I don't remember this issue to come out with source only Neumann conditions, but you should investigate this for internal flows (altough, again, the fact that your code works for smoother angles means that this is not your problem). To the best of my experience, the workhorse of panel methods is the constant source-doublet with Dirichlet boundary conditions, which also has an example in Katz and Plotkin. This is also used by one of the latest NASA panel codes, PMARC, which also describes the use for internal flows. Look, for example, these: https://ntrs.nasa.gov/api/citations/...9890003183.pdf https://ntrs.nasa.gov/api/citations/...0000032961.pdf I don't think all of this answer your original question, which is related to the differences in the angle of the step only. To the best of my understanding, if a panel method works for a given boundary and boundary conditions, no change of the boundary geometry that doesn't alter the domain topology should affect it (even assuming some well posedness issue for cusp angles, your panels will always only describe that approximately). Obviously, "works" must be understood here as "gives a unique solution to the underlying potential equation".

Sir, the book suggestion you gave me was wonderful, My problem is solved.

May 11, 2023, 16:01
#11
Senior Member

Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,153
Blog Entries: 29
Rep Power: 39
Quote:
 Originally Posted by Justaway Sir, the book suggestion you gave me was wonderful, My problem is solved.
Good.

If you feel like sharing what the probelm was, even if it was a stupid reason or a simple mistake, they are nothing to be ashamed of and I think it would be valuable for whoever will come here in the future

 May 11, 2023, 17:05 #12 Senior Member   Matt Join Date: Aug 2014 Posts: 947 Rep Power: 17 In my experience, panel methods are very sensitive to discontinuities. It probably doesn't like the orthogonality of your elements. I ran into something similar using the panel method for lift distribution on a cranked wing. Not sure if this helps you, but I was able to mitigate it by using a hyperbolic blending function in the region of the discontinuity. Justaway likes this.

 May 12, 2023, 07:54 #13 New Member   Venkata Hegde Join Date: May 2023 Location: Karnataka, India Posts: 15 Rep Power: 3 I understand, but I was able to simulate it for a rectangular profile, but I had to be very careful with the geometry description. It seems that at corners I cannot have very smooth discretization. It makes the panel length small and finally makes the solution full of NaN (because we have value/(panel length) at lot of locations in code).

 May 12, 2023, 22:48 Internal duct with step #14 Member   james nathman Join Date: May 2011 Posts: 62 Rep Power: 15 I created a convergent duct with backward facing step and analyzed it with (Luigi Morino's method, 1972). cubic_stepw.jpg With attached flow modeled, the pressure is singular at the outside corner of the step and stagnant at the inside corner. cubic_step.jpg When separation is modeled at the outside corner, the pressure peaks disappear. cubic_stepw2d.jpg In both cases, the solution appears well behaved indicating that Morino's method is suitable. Program No. 8 of Appendix D of the first edition of Katz & Plotkin is based on Morino's method for external problems. I modified an external code to analyze internal flow in 1982. The numerical issues involved can be found in discussions of the internal (interior) Neumann problem. If the step is less than the boundary layer in thickness, the analysis should be done by modification of a boundary layer method. For very large step size, the analysis is similar to that of an open test section windtunnel (e.g. Langley research ctr). sbaffini likes this.

 Tags matlab, panel methods