|
[Sponsors] |
June 2, 2017, 16:12 |
extracting data from simh history file?
|
#1 |
New Member
Jasbir Singh Dhanoa
Join Date: Nov 2016
Posts: 14
Rep Power: 10 |
Hi Guys
I have ran a simulation with history saving at every time-step, now I have all the data, but now I want to extract the data for processing it in Matlab (for example, temperature ). I can manually go to every time-step and extract the data, but how can I extract the data (i.e. xyz coordinate and temp.) at all time-steps at once say in a .csv file? |
|
June 2, 2017, 19:47 |
|
#2 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
Unsure if there's another way, but you can certainly write a java macro to produce this.
|
|
June 3, 2017, 04:08 |
|
#3 |
New Member
Jasbir Singh Dhanoa
Join Date: Nov 2016
Posts: 14
Rep Power: 10 |
I am new to starccm+,can you tell how to write the javascript?
|
|
June 3, 2017, 14:20 |
|
#4 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
Java and Javascript are not the same thing, you would be writing the former.
You can easily generate a Java macro using STAR-CCM+'s built-in record function. It will write most of the code for you. I'd imagine your procedure would look something like: 1. Go to the first solution time 2. Make an internal table of the data you want 3. Extract said table 4. Go to the next solution 5. Repeat 2-4 for all solution times STAR will not write step 5 for you, nor will it write the final table out as a file which you could import to MATLAB, but using loops and writing CSV files is pretty easy to learn if you google around. Check out the Steve portal, there are articles on how to use the Java API with an IDE like netbeans to make the programming much, much simpler. They also offer a Java macro class if you can go to that. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 09:46 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |