nnmrec / naca456

revival of the naca456 program, an accurate method to compute NACA 4, 5, and 6 series airfoil coordinates
0 stars 1 forks source link

Please help! #1

Open Muramnewby opened 1 year ago

Muramnewby commented 1 year ago

Hi thank you for providing this code! I would like to run the naca456 program on matlab, can you please provide some brief points on how to do so? Or is this program specifically for the fortran language? Sorry I am new to coding but would be very grateful if you can help me!

Muramnewby commented 1 year ago

I downloaded the zip file then opened it from the directory on matlab and copied the matlab main.m code into the script section and ran the code, but on the command window I had errors with the following lines:

Error in test (line 77) x_cUp = cosspace(0, 1, ntable/2 + 1, 'both');

Error in test (line 80) fprintf(fid, 'ntable = %g, \n',ntable);

Error in test (line 84) interp_type = asdf;

dcsale commented 1 year ago

it looks like I stopped working on this code after line 95. So all the "asdf" stuff is just placeholder code and not expected to work right now. If you are lucky, the Matlab script already wrote the input file for the naca456 program and all you need to do now is run naca456 from the command line as normal.Or from within Matlab you can call the command line like:

% run naca456 from the command line system(['naca456 ' name '.nml']) system(['naca456 ' name '.nml ' x_456])

hope that helps

On Fri, Nov 4, 2022 at 6:57 AM Muramnewby @.***> wrote:

I downloaded the zip file then opened it from the directory on matlab and copied the matlab main.m code into the script section and ran the code, but on the command window I had errors with the following lines:

Error in test (line 77) x_cUp = cosspace(0, 1, ntable/2 + 1, 'both');

Error in test (line 80) fprintf(fid, 'ntable = %g, \n',ntable);

Error in test (line 84) interp_type = asdf;

— Reply to this email directly, view it on GitHub https://github.com/nnmrec/naca456/issues/1#issuecomment-1303491894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5AZINUS7QJLK6UGRJ6J73WGUB2ZANCNFSM6AAAAAARXD4VOE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dcsale commented 1 year ago

actually, your error message indicates that Matlab could not find the cosspace.m file. Change your working folder to where the naca456 program is located, 1-level up from cosspace.m, and addpath() that folder

On Fri, Nov 4, 2022 at 8:49 AM Danny Sale @.***> wrote:

it looks like I stopped working on this code after line 95. So all the "asdf" stuff is just placeholder code and not expected to work right now. If you are lucky, the Matlab script already wrote the input file for the naca456 program and all you need to do now is run naca456 from the command line as normal.Or from within Matlab you can call the command line like:

% run naca456 from the command line system(['naca456 ' name '.nml']) system(['naca456 ' name '.nml ' x_456])

hope that helps

On Fri, Nov 4, 2022 at 6:57 AM Muramnewby @.***> wrote:

I downloaded the zip file then opened it from the directory on matlab and copied the matlab main.m code into the script section and ran the code, but on the command window I had errors with the following lines:

Error in test (line 77) x_cUp = cosspace(0, 1, ntable/2 + 1, 'both');

Error in test (line 80) fprintf(fid, 'ntable = %g, \n',ntable);

Error in test (line 84) interp_type = asdf;

— Reply to this email directly, view it on GitHub https://github.com/nnmrec/naca456/issues/1#issuecomment-1303491894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5AZINUS7QJLK6UGRJ6J73WGUB2ZANCNFSM6AAAAAARXD4VOE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Muramnewby commented 1 year ago

Firstly thank you so much for your help and fast response! So I tried what you suggested :

  1. I added the cosspace.m file to the path
  2. I copied in the main.m script until line 95 in the script section
  3. Then I tried using the command line you sent me, and the errir was that the function or variable 'name' is unrecognised, so I changed it to the actual name 'NACA_4415_danny' but that name is also unrecognised- am I doing this correctly?
  4. Also if I try to run from the actual run button instead, I get the same errors on the unrecognised 'ntable' function or variable, and also the error of the cospace as well. Please see attached image