|
[Sponsors] |
September 16, 2016, 09:48 |
Automatically exporting .CSV file from Plot
|
#1 |
New Member
Join Date: Sep 2016
Posts: 2
Rep Power: 0 |
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() ); } } |
|
September 19, 2016, 09:26 |
|
#2 |
New Member
Join Date: Sep 2016
Posts: 2
Rep Power: 0 |
bump - plz help
|
|
|
|
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 18:25 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error | FerdiFuchs | OpenFOAM Community Contributions | 27 | April 16, 2014 16:14 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |