Help for Vortex Lattice Method

조회 수: 6 (최근 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 CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by