CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Automatically exporting .CSV file from Plot

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2016, 08:48
Default Automatically exporting .CSV file from Plot
  #1
LIP
New Member
 
Join Date: Sep 2016
Posts: 2
Rep Power: 0
LIP is on a distinguished road
Hello to everyone,
this is my first post so please don't be harsh on me

I'm a final year mechanical engineering student and I've been tasked with using STAR CCM + to perform a sensitivity analysis on various parameters in the discharge of DEM particles through a hopper.

My simulations are running like clock work using the following code I found on the forums in combination with a .bat file.

I would however like to automatically export the plot data generated in each run to a .csv file in the format: *file name plot name*.csv for example:
my simulation M45SF00NR05TR05RR0001.sim should output
M45SF00NR05TR05RR0001 PC.csv and
M45SF00NR05TR05RR0001 MH.csv

which would be marbles, 45 degrees, static friction 0.0, Normal restitution 0,5... PC = particle hight, MH = Maximum Height etc

Code:
// STAR-CCM+ macro: run.java
package macro;

import java.util.*;
import java.io.*;
import javax.swing.*;

import star.common.*;
import star.base.neo.*;
import star.vis.*;
import star.base.report.*;
import star.flow.*;

public class run extends StarMacro {

public void execute() {
execute0();
}

private void execute0() {

try {
Simulation simulation_0 = 
getActiveSimulation();

simulation_0.getSimulationIterator().run();

simulation_0.saveState(simulation_0.getSessionPath ());

} catch (Exception e) {
JOptionPane.showMessageDialog(
null, e.toString()
);
}
}
I'm not familiar with JAVA code or creating macro files yet so any assistance will be greatly appreciated, thanks
LIP is offline   Reply With Quote

Old   September 19, 2016, 08:26
Default
  #2
LIP
New Member
 
Join Date: Sep 2016
Posts: 2
Rep Power: 0
LIP is on a distinguished road
bump - plz help
LIP is offline   Reply With Quote

Reply


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
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


All times are GMT -4. The time now is 19:18.