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

Importing FLUENT .srp files into MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2011, 08:41
Default Importing FLUENT .srp files into MATLAB
  #1
New Member
 
Join Date: Jun 2011
Posts: 1
Rep Power: 0
CAD-AL is on a distinguished road
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
CAD-AL is offline   Reply With Quote

Reply

Tags
fluent, matlab, srp


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
linking matlab and fluent Nair FLUENT 23 January 12, 2020 18:55
Reading Fluent 6.3.26 files into Fluent 6.2.16 John Young FLUENT 1 February 17, 2008 23:39
Reading .srp/.vrp files into Matlab Will Humber FLUENT 0 February 13, 2008 13:20
Importing DXF files into PHOENICS 3.5.1 Alejandro Valenzuela Phoenics 5 October 17, 2007 00:31
Evaluating multiple fluent files Ralf Schmidt FLUENT 0 October 25, 2004 05:15


All times are GMT -4. The time now is 08:00.