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

XFOIL in MATLAB

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2008, 11:00
Default XFOIL in MATLAB
  #1
asd
Guest
 
Posts: n/a
Does anyone know how to process XFOIL commands through MALTAB? I am able to open the program through the !shell command, but how does one enter the commands in MATLAB for execution in XFOIL.

  Reply With Quote

Old   January 18, 2011, 05:38
Default
  #2
New Member
 
Chris Day
Join Date: Sep 2010
Posts: 8
Rep Power: 15
ChrisDanger is on a distinguished road
I know this is an old question, but in case anyone needs to do this...

You have to write a text file of inputs, which have on each line what you would enter into the command prompt. Then run that file with the shell command into XFoil.

I ran this first:
Code:
fid = fopen('XFoil_inputs.dat', 'wt');
fprintf(fid,['naca ' airfoil '\r']); % load this profile
fprintf(fid,'ppar\r'); % enter panelling parameters menu
fprintf(fid,['n 280\r']); % change the number of panels from 140 (default) to 280 (maximum)
fprintf(fid,'\r'); % carriage return
fprintf(fid,'\r'); % carriage return
fprintf(fid,'gdes\r'); % enter the geometry design menu
fprintf(fid,'flap\r'); % create a flap
...
...to generate a file with these contents:
Code:
naca 23012
ppar
n 280


gdes
flap
...
Then from Matlab execute !XFoil.exe<XFoil_inputs.dat, or whatever your filenames may be.
ChrisDanger is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to start Fluent with Matlab?? Jay Hu FLUENT 8 November 9, 2022 07:30
Quick OpenFoam to MatLab lesson plz :) Rickard.Solsjo OpenFOAM 6 October 26, 2020 12:58
Frozen Xfoil toto13000 Main CFD Forum 0 July 28, 2011 11:46
xfoil with matlab nikolaous Main CFD Forum 3 September 2, 2010 15:15
MATLAB FORTRAN Ally Main CFD Forum 4 July 12, 2007 04:51


All times are GMT -4. The time now is 04:57.