CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

3D Panel Method Code

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2019, 18:28
Default
  #21
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
I'd like to add this, that the normal vectors of the wing panels are toward external flow and I calculate the inverse tangent functions of influence coefficients in range of (-pi/2,+pi/2). Are these assumptions correct?
amin95 is offline   Reply With Quote

Old   July 18, 2019, 18:34
Default
  #22
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
Now that I know your panel method is time stepping, attached is the solution history of lift coefficient for your wing. In each solution, the wing moves one chord length. The lift coefficient is asymptotic to the steady-state value in 10 chord lengths.

The second figure shows the wake at step 20, colored by circulation.

Instead of calculating the wake strength, you could specify the steady-state values (from Kutta-Joukowsky). If the wing does not mirror the specified circulation, the influence coefficients are wrong. If the wing does have the correct circulation, the calculation of the wake circulation is in error.
Attached Images
File Type: jpg ar64cl.jpg (36.4 KB, 40 views)
File Type: jpg ar64wcirc.jpg (65.7 KB, 44 views)
amin95 likes this.
blackjack is offline   Reply With Quote

Old   July 20, 2019, 13:17
Default
  #23
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
Quote:
Originally Posted by amin95 View Post
I'd like to add this, that the normal vectors of the wing panels are toward external flow and I calculate the inverse tangent functions of influence coefficients in range of (-pi/2,+pi/2). Are these assumptions correct?
The off-diagonal influence of the body panels for any shape will vary from -.5 to 0.5. For your convex geometry they will be between 0 and 0.5. Yours are.
amin95 likes this.
blackjack is offline   Reply With Quote

Old   July 20, 2019, 20:23
Default
  #24
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Quote:
Originally Posted by blackjack View Post
The off-diagonal influence of the body panels for any shape will vary from -.5 to 0.5. For your convex geometry they will be between 0 and 0.5. Yours are.
Thanks to your help I think I made a progress and could find a mistake i had made regarding to the sum of the trailing edge wake panels coefficients to the trailing edge upper and lower panels coefficients. After correcting I run the code at 5 degree of AoA and got these figures:

The CP distribution figure looks correct except at the trailing edge panels where the results are still divergent. I omitted the trailing edge panels contribution to total lift and I got this figure of CL vs timesteps which looks similar to your posted figure.

I also posted doublet strength of the wing panels. there is a big gap between upper and lower trailing edge panels values.Could you please upload the correct doublet strength of wing and wake panels?

Thanks,

Last edited by amin95; May 4, 2020 at 12:41.
amin95 is offline   Reply With Quote

Old   July 20, 2019, 22:54
Default
  #25
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
Airfoil potential (doublet) distribution looks good.

How are you calculating t.e. panel pressures? Backwards difference of t.e. panel and panel upstream? There must be an error here because the potential distribution you have does not have large gradient (velocity).
amin95 likes this.
blackjack is offline   Reply With Quote

Old   July 21, 2019, 01:06
Default
  #26
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
I should have been more precise: how is gradient of potential calculated for t.e. panel to get velocity?
amin95 likes this.
blackjack is offline   Reply With Quote

Old   July 21, 2019, 08:32
Default
  #27
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Quote:
Originally Posted by blackjack View Post
I should have been more precise: how is gradient of potential calculated for t.e. panel to get velocity?
I use the same central difference method for calculation of perturbation velocities at t.e. panels:

ql = ( 1/(2*L) ) * ( Mu(i+1) - Mu(i-1) )

L : panel (i) length in l direction
Mu : doublet strength of panel (i)
ql : perturbation velocity of panel (i) in l direction


But after considering the discontinuity between doublet strengths of t.e. panels I used following method for t.e. panels to avoid that issue :

ql = (1/L) * ( M(i) - Mu(i-1) )

And now it seems by using this method for t.e my code could calculate the results correctly. is this difference method okay for t.e. panels?
I uploaded my new results. Could I assume now that my 3d panel code is correct and would work for any other arbitrary 3d shapes too (like modelling an aircraft in low speed)?

Best regards,

Last edited by amin95; May 4, 2020 at 12:41.
amin95 is offline   Reply With Quote

Old   July 21, 2019, 16:06
Default
  #28
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
Excellent. You have wisely chosen a case with 90 panels (5 spanwise, 18 chordwise).
Try increasing the panel density and look at drag, look at execution time.

An arbitrary aircraft (e.g. twin-engine transport with flaps, fuselage, engines, pylons, vertical tail, horizontal tail) is typically modeled with 9000 panels.

Add a fuselage to your wing. Add horizontal and vertical tails. Add pylons and engines.

Can your code model inlets/exhausts? Wing/body intersections? Wake/body intersection?

For "arbitrary" you have much work ahead of you.


The quickest way to find the limitations of your code is to let someone else use it.


Good Luck.
amin95 likes this.
blackjack is offline   Reply With Quote

Old   July 21, 2019, 20:49
Default
  #29
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Dear Mr. Nathman,

I truly appreciate your assistance. You helped me to solve my problem and I'm deeply grateful. Please also accept my apology for taking your precious time.

I'm a master's student and my thesis is about modelling of a Tiltrotor aircraft. I have my profile at "www.Researchgate.net".

Regarding to your questions, I'm aware that difficulties exist in modelling of an aircraft with 3d panel method and I think there are different approaches for these issues but for now all I know is that I could divide a whole aircraft surfaces into lifting(rotors, wings,VS,HS) and non-lifting (fuselage,nacelles,hubs) without losing much accuracy.
Finally, I'd be glad if I could use your advice and works regarding to my project.

Best Regards
amin95 is offline   Reply With Quote

Old   July 24, 2019, 17:24
Default
  #30
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
If you need my permission to quote anything I have said here, you have it.

I would like to you to note that an advantage of a potential-based panel method is that the user does not divide things into "lifting" and "non-lifting". The surfaces are all treated alike. If a wake is attached to a fuselage, it will lift.

A piece of aluminum does not behave differently depending upon whether it is the skin of a wing or of a fuselage. Likewise, the numerics of a fuselage panel are the same as a wing panel. The simplicity and generality of Morino's approach is underappreciated.

Cheers,
amin95 likes this.
blackjack is offline   Reply With Quote

Old   September 8, 2019, 14:17
Default
  #31
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11
ZakBristol is on a distinguished road
Hi. I think you should use atan2, rather than atan. I wonder how did you Calcute induced velocity for the wake roll up. I followed Katz formula but didn't get the right shape
ZakBristol is offline   Reply With Quote

Old   September 8, 2019, 14:24
Default
  #32
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11
ZakBristol is on a distinguished road
Hi Amin. Would you be able to share the code if it is not a lot to ask.

Thanks
ZakBristol is offline   Reply With Quote

Old   September 8, 2019, 15:40
Default
  #33
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Quote:
Originally Posted by ZakBristol View Post
Hi Amin. Would you be able to share the code if it is not a lot to ask.

Thanks
Hi Zack

Yes at first i used atan then I used atan2 in range of (0,2pi) and it worked.

In wake roll up section, I used only Katz's formula for source panles induced velocties. For doublet panels I used Bio-Savart law since a constant strength doublet panel is equal to vortx ring (fig1). It is more simple than Katz's formula because you dont need to convert coordinates from global to local and vice versa again.

But you should know that Bio-Savart formula has singularity which makes induced velocity near vortex ring go infinite. So you should modify the formula with a viscous core model to get reasonable result. there are some paper addressing this issue I used this one " Enhancement of Free Vortex Filament Method for Aerodynamic Loads on Rotor Blades".

My wake roll up code has a minor problem and now I'm working on it. It works well for 15 time steps but beyond that the wake tends to destabilize.(fig2 and fig3).

I have no problem of sharing my code, In fact I would be glad if I could help you. Are you a university student like me too?

Last edited by amin95; May 4, 2020 at 12:41.
amin95 is offline   Reply With Quote

Old   September 8, 2019, 15:42
Default
  #34
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11
ZakBristol is on a distinguished road
Yes I am at uni. I tried to use vortex wrings for induced velocity. But was not successful. Perhaps I have problem with my indices. Did you equal mu to gamma.?

If you can send me the code at darwichab@gmail.com I will appreciate it a lot.

Thanks
ZakBristol is offline   Reply With Quote

Old   September 8, 2019, 16:19
Default
  #35
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
I sent the code with some description to your email address
amin95 is offline   Reply With Quote

Old   September 8, 2019, 17:20
Default
  #36
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11
ZakBristol is on a distinguished road
Thanks mate
ZakBristol is offline   Reply With Quote

Old   September 16, 2019, 21:51
Default
  #37
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Quote:
Originally Posted by blackjack View Post
If you need my permission to quote anything I have said here, you have it.

I would like to you to note that an advantage of a potential-based panel method is that the user does not divide things into "lifting" and "non-lifting". The surfaces are all treated alike. If a wake is attached to a fuselage, it will lift.

A piece of aluminum does not behave differently depending upon whether it is the skin of a wing or of a fuselage. Likewise, the numerics of a fuselage panel are the same as a wing panel. The simplicity and generality of Morino's approach is underappreciated.

Cheers,
Dear Mr. Nathman,

I have a question about wake roll up. Why my wake panel after some time step tends to destabilize?(figure 1&2)
s this about wrong asymmetric calculation of Local vectors and influence coefficients?
Is rolling of tip wake panels related to stability of wake panels?

Last edited by amin95; May 4, 2020 at 12:41.
amin95 is offline   Reply With Quote

Old   September 16, 2019, 22:06
Default
  #38
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11
ZakBristol is on a distinguished road
Quote:
Originally Posted by amin95 View Post
Dear Mr. Nathman,

I have a question about wake roll up. Why my wake panel after some time step tends to destabilize?(figure 1&2)
s this about wrong asymmetric calculation of Local vectors and influence coefficients?
Is rolling of tip wake panels related to stability of wake panels?
I think you have a bug in calculating induced velocity. Try an even number if panels in the span direction and you can visualize the system note. That induced velocity in the y axis would have an opposite sign of the opposite side.
ZakBristol is offline   Reply With Quote

Old   September 17, 2019, 17:42
Default
  #39
New Member
 
amin95
Join Date: Jul 2019
Posts: 20
Rep Power: 7
amin95 is on a distinguished road
Quote:
Originally Posted by ZakBristol View Post
I think you have a bug in calculating induced velocity. Try an even number if panels in the span direction and you can visualize the system note. That induced velocity in the y axis would have an opposite sign of the opposite side.
Hi, i had some bug and I fixed them. But the problem still exists this time in a symmetric form.(fig1)

I guess it has some thing to do with MATLAB's own calculation. for example for first time step without any shed wake still t.e wake panel has asymmetric doublet strengths.(10E-16 error). even with rounding the values, the problem appears again after some time steps. I'm still working to find cause of the problem.

Could you simulate Wake roll up successfully?

Last edited by amin95; May 4, 2020 at 12:41.
amin95 is offline   Reply With Quote

Old   September 23, 2019, 18:27
Default
  #40
Member
 
james nathman
Join Date: May 2011
Posts: 62
Rep Power: 15
blackjack is on a distinguished road
This doesn't look like instability. The figures indicate a numerical error. Top guesses:

1. Circulation of wake panel is overwritten because of out-of-bounds subscript.
Try (1) displaying circulation of wake panels (as in zipped mpeg movie with wake panels colored by circulation).
(2) Changing time-step size: does problem occur after same number of panels generated?
(3) Changing number of wake columns but same step size.

2. If circulation is bad when panel generated, then influence coefficient is bad, either convection velocity or AIC element.
Attached Files
File Type: zip ar653.zip (128.8 KB, 16 views)
amin95 likes this.
blackjack is offline   Reply With Quote

Reply

Tags
boundary element method, panel method


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear-Strength Vortex Unsteady Panel Method (2D) Sonik_87 Main CFD Forum 18 February 23, 2020 10:16
The difference between Blade Element Method and Panel Method? mrswordf1sh Main CFD Forum 2 November 22, 2014 11:55
2D Field Panel Method Source Code Shukla Main CFD Forum 3 January 20, 2011 13:51
Please: Looking for a Panel method or vortice lattice for windmill be_inspired Main CFD Forum 10 April 1, 2009 17:53
Problem building 3D Panel Method Daniel Main CFD Forum 0 September 15, 2006 08:51


All times are GMT -4. The time now is 21:59.