CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

MATLAB postProcessing woes

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2018, 06:48
Default MATLAB postProcessing woes
  #1
New Member
 
Thomas Lashbrooke
Join Date: Nov 2017
Posts: 4
Rep Power: 5
tLashbrooke is on a distinguished road
Hello all,

I'm doing a project with OpenFOAM and wanting to use MATLAB for post processing but have hit a slight barrier when it comes to extracting data from the forceCoeffs/forces/bins DAT files.

Can somebody help me understand how to get readable data from this file programmatically? MATLAB just doesn't want to know!

force.dat

force_bins.dat
tLashbrooke is offline   Reply With Quote

Old   January 7, 2018, 08:38
Default
  #2
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 5
AliE is on a distinguished road
Hi,

Matlab does not like '(' , ')' or text strings as maybe you already know. So if you want to avoid to delete it manually with the find and replace method in your favourite text editor, then I suggest you to write a little script in bash which will do the job for you.

AliE
AliE is offline   Reply With Quote

Old   January 8, 2018, 09:13
Default
  #3
New Member
 
Thomas Lashbrooke
Join Date: Nov 2017
Posts: 4
Rep Power: 5
tLashbrooke is on a distinguished road
Quote:
Originally Posted by AliE View Post
Hi,

Matlab does not like '(' , ')' or text strings as maybe you already know. So if you want to avoid to delete it manually with the find and replace method in your favourite text editor, then I suggest you to write a little script in bash which will do the job for you.

AliE
Yeah, changing the output to raw sorted out the majority of the data, the rest I used pyFoam to convert into .txt files for Matlab. The Allrun is coming along nicely now!
tLashbrooke 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
Very small Matlab job: post-processing OpenFOAM (.CSV) results RbBb CFD Freelancers 1 July 11, 2016 09:00
Postprocessing in MATLAB dhaya400 FLUENT 2 March 25, 2015 00:18
Postprocessing with matlab giack OpenFOAM Post-Processing 2 July 26, 2013 03:45
Linking with Matlab?? LostinSpace Phoenics 0 March 25, 2013 05:39
Live connection Matlab VS OF levka OpenFOAM Running, Solving & CFD 0 July 10, 2012 04:15


All times are GMT -4. The time now is 03:44.