Help for Vortex Lattice Method

5 ビュー (過去 30 日間)
Mert
Mert 2024 年 12 月 3 日
コメント済み: Mert 2024 年 12 月 5 日
Hello, I am working on the vortex lattice method code. I have now solved it up to DeltaV speed. But when I run it from the test function, I find DeltaV (0,0,0.1125) and this is the correct answer. But when I run it in the main file, I get a different value. After finding DeltaV, I need to find downwash, CL and CD. I need help from here.
  2 件のコメント
Mert
Mert 2024 年 12 月 3 日
編集済み: Walter Roberson 2024 年 12 月 4 日
function Vor3D
global PC P1 P2 Gamma NJ NI
global DeltaV
r1 = PC - P1;
r2 = PC - P2;
r0 = P2 - P1;
Cross_r1r2 = cross(r1, r2);
r1r2 = Cross_r1r2 / (norm(Cross_r1r2))^2;
Term2 = (r1 / norm(r1)) - (r2 / norm(r2));
r0Term2 = dot(r0, Term2);
DeltaV = Gamma / (4*pi) * r1r2 * r0Term2;
end
Mert
Mert 2024 年 12 月 3 日
編集済み: Walter Roberson 2024 年 12 月 4 日
clc; clear all; close all
global PC P1 P2 Gamma DeltaV
% Test Verileri
PC = [1, 1, 0];
P1 = [0, 0, 0];
P2 = [2, 0, 0];
Gamma = 1.0;
Vor3D();
% Beklenen Değer
expected_DeltaV = [0, 0, 0.1125];
% Beklenen ve Hesaplanan Değerleri Ekranda Göster
fprintf('Hesaplanan Değer DeltaV: [%f, %f, %f]\n', DeltaV(1,1,1), DeltaV(1,1,2), DeltaV(1,1,3));
fprintf('Beklenen Değer DeltaV: [%f, %f, %f]\n', expected_DeltaV(1), expected_DeltaV(2), expected_DeltaV(3));
% Tolerans
tolerance = 1e-4;
if all(abs(squeeze(DeltaV(i,j,:)) - expected_DeltaV') < tolerance)
disp('Test Başarılı!');
else
disp('Test Başarısız!');
end

サインインしてコメントする。

採用された回答

Altaïr
Altaïr 2024 年 12 月 5 日
編集済み: Altaïr 2024 年 12 月 5 日
Hi @Mert,
The issue appears to be in the calculation of the 'G' and 'C' matrices within the 'Panel' function. The values of 'PC', 'P1', and 'P2' in the test script result in the following vectors:
  • r0 = [2; 0; 0]
  • r1 = [1; 1; 0]
  • r2 = [-1; 1; 0]
However, when the 'Main.m' file is called, the vectors are:
  • r0 = [0; 1; 0]
  • r1 = [0.5; 0.5; 0]
  • r2 = [0.5; -0.5; 0]
Looking at the plot of the 'P', 'G', and 'C' matrices, the control points seem to be positioned at midpoints between the chords along the span.
Please verify if this is the intended location for the control points. The method for calculating the points in the 'G' matrix, i.e. the vortex endpoints, is unclear.
Debugging the calculation of the 'G' matrix should help resolve the issue.
I believe this will assist you!
  1 件のコメント
Mert
Mert 2024 年 12 月 5 日
Hello @Ashok,
thank you for your help. My problem was caused by manually calculating the panel points incorrectly. When I correctly determined and solved the P1, P2 and PC points on my panel, I found the value to be 0.2251. When I implemented it in my code, the minus answer appeared. The reason for the negative result is the cross_r1r2 vector product. When I did r2xr1, I reached the positive value. Now I will try to move on to aerodynamic coefficients. If you would like to guide me, I am open to your suggestions.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by