|
[Sponsors] |
August 8, 2011, 09:41 |
Importing FLUENT .srp files into MATLAB
|
#1 |
New Member
Join Date: Jun 2011
Posts: 1
Rep Power: 0 |
I am trying to import multiple .srp files (an example of the file is shown below) into FLUENT using a script. I need the numerical values from the .srp files to be imported into a table (similar to an EXCEL spreadsheet) that I can then use to create plots in MATLAB. I would also like to include the files names in the first row of the table if possible.
I have started the code to try to do this, but I am not sure how to take the information from the cell arrays and combine them all into one table. Please help "Surface Integral Report" Area-Weighted Average Total Pressure (pascal) -------------------------------- -------------------- entree 3.7032218 sortie-dl -0.38038716 sortie-dr -1.0349007 transform-par 2.030206 transform-dl 0.8842029 transform-dr 1.3729798 ---------------- -------------------- Net 1.6737195 Sample code: %MATLAB CODE TO ANALYZE DATA OBTAINED FROM FLUENT fnames=dir('folder/*.srp') numfids=length(fnames) %TO PUT FILENAMES IN THE FIRST ROW q=cell(1,numfids) for k=1:numfids q{k}=fnames{k}.name end %TO ENTER FLUENT DATA g=cell(1,numfids) for p=1:numfids g{p}=importdata(q{1,p},' ',5) end %TO PUT DATA INTO COLUMNS h=cell(1,numfids) for c=1:numfids h{c}=g{1,c}.data end %TO COMBINE THE TWO CELL ARRAYS a=cell(1,numfids) for d=1:numfids a{d}={[q{d}];[h{d}]} end |
|
Tags |
fluent, matlab, srp |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
linking matlab and fluent | Nair | FLUENT | 23 | January 12, 2020 19:55 |
Reading Fluent 6.3.26 files into Fluent 6.2.16 | John Young | FLUENT | 1 | February 18, 2008 00:39 |
Reading .srp/.vrp files into Matlab | Will Humber | FLUENT | 0 | February 13, 2008 14:20 |
Importing DXF files into PHOENICS 3.5.1 | Alejandro Valenzuela | Phoenics | 5 | October 17, 2007 01:31 |
Evaluating multiple fluent files | Ralf Schmidt | FLUENT | 0 | October 25, 2004 06:15 |