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

Show solution data at certain time steps..

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 24, 2009, 10:05
Question Show solution data at certain time steps..
  #1
New Member
 
Peres
Join Date: Jul 2009
Posts: 22
Rep Power: 7
peresah is on a distinguished road
Help :-)

Hope someone can help with this basic task...

I would like to access the raw solution data at certain time steps during my transient simulation, not just a "hard copy" of a plot/scene...

I have successfully used the Auto Export to make a CCM-file with the Append option enabled, but once the file has been created and the simulation is finished, how do I actually get to view the data from each time step?

If this is not possible with the CCM-format, is it possible with some of the other available formats... Or do you have to write a macro for this?

I would appreciate any response - thanks!
peresah is offline   Reply With Quote

Old   July 27, 2009, 05:05
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 203
Rep Power: 8
Maddin is on a distinguished road
Don't know if this works in 4.04 but in 4.02 you have to write all data's via export or hardcopy to look after the simulation is fine.
Other way could be the auto save but I think this isn't a good solution.
Maddin is offline   Reply With Quote

Old   July 27, 2009, 06:05
Default
  #3
New Member
 
Peres
Join Date: Jul 2009
Posts: 22
Rep Power: 7
peresah is on a distinguished road
Hi Maddin

Thanks for your reply. I'm not sure you understood, so I'll try to clarify. I know how to auto export the data. But how do I "import"/show the data, e.g. show the velocity profile along a vertical line for each time step. I don't want just an image ("hard copy"), but the actual raw data.

After crawling through the forum, I think I've come up with a solution: Record a macro with a loop that runs a single time-step, export the raw data as a csv-file and repeats...

Kindly
Peres
peresah is offline   Reply With Quote

Old   July 27, 2009, 06:32
Default
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 203
Rep Power: 8
Maddin is on a distinguished road
Hmm maybe you should write a scene file for proVis? But I didn't worked much with this.
Maddin is offline   Reply With Quote

Old   July 28, 2009, 07:10
Default Provis?
  #5
New Member
 
Peres
Join Date: Jul 2009
Posts: 22
Rep Power: 7
peresah is on a distinguished road
Thanks Maddin. I've tried googling Provis, but get ambigious results. Do you know where I can possibly obtain this software?
peresah is offline   Reply With Quote

Old   July 28, 2009, 07:52
Default
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 203
Rep Power: 8
Maddin is on a distinguished road
It's a part of stardesign. Maybe StarView+ can also help you.
Under Windows with STARCAT5 the post-processing is with provis (but there I have an older version of starccm).
Maddin is offline   Reply With Quote

Old   July 28, 2009, 10:16
Default
  #7
New Member
 
Peres
Join Date: Jul 2009
Posts: 22
Rep Power: 7
peresah is on a distinguished road
Ahh, I found provis, hidden in the stardesign directory... I'll try to play around with it , thanks.

By the way, I did make a macro (see below), named exporttransient.java, which does the job. The only thing I haven't figured out yet is if there's a way to automatically determine (1) if the stopping criteria have been met or (2) solution has become instable, so the loop knows when to end. The present approach attempts to resolve (1) but I'm not sure if it's working, so it requires an attentive user :-)

Quote:
package macro;

//Default imported packages
import java.util.*;
import star.common.*;
import star.base.neo.*;
import star.vis.*;

//Special imported packages for this class
import java.io.File;

//Class definition
public class exporttransient extends StarMacro {

public void execute() {

//Initialize variables
String Fname;
double Time;

//Set base path and extension of export file, and name of plot
String BasePath = "/home/username/dir/";
String Ext = ".csv";
String PlotName = "Velocity profile";

//Get references to current simulation, solution and plot
Simulation MySim = getActiveSimulation();
Solution MySol = MySim.getSolution();
XYPlot MyPlot = ((XYPlot) MySim.getPlotManager().getObject(PlotName));

//Extract file name and title (without extension) from simulation
File MyFile = new File(MySim.getSessionPath());
String SimName = MyFile.getName();
String SimTitle = SimName.substring(0,SimName.lastIndexOf("."));

//Initiaize solotion - else plot will be empty
MySol.initializeSolution();

//Step through iteration
while (IsCriteriaSatisfied(MySim) == false) {

//Run a single step and wait until the iteration has been completed
MySim.getSimulationIterator().step(1, true);

//Old: Make tabular data from plot
//InternalDataSet MyData = ((InternalDataSet) MyPlot.getDataSetGroup().getDataSet("line y=0.25 x=0"));

//Generate filename
Time = MySol.getPhysicalTime();
Fname = BasePath + SimTitle + "_time_is_" + Double.toString(Time) + "sec" + Ext;

//Export file
//Old: MySim.getDataSetManager().writeCSVDataSet(MyData,r esolvePath(Fname));
MyPlot.export(resolvePath(Fname));

//Output message
MySim.println("Exported plot " + PlotName + " as " + Fname);

} //Exit loop
} // Exit method

private boolean IsCriteriaSatisfied(Simulation MySim) {

PhysicalTimeStoppingCriterion MyCrit1 = ((PhysicalTimeStoppingCriterion) MySim.getSolverStoppingCriterionManager().getSolve rStoppingCriterion("Maximum Physical Time"));

StepStoppingCriterion MyCrit2 = ((StepStoppingCriterion) MySim.getSolverStoppingCriterionManager().getSolve rStoppingCriterion("Maximum Steps"));

//Return the IsSatisfied value for enabled criteria
if (MyCrit1.getIsUsed() && MyCrit2.getIsUsed())
return MyCrit1.getIsSatisfied() || MyCrit2.getIsSatisfied();

else if (MyCrit1.getIsUsed())
return MyCrit1.getIsSatisfied();

else if (MyCrit1.getIsUsed())
return MyCrit2.getIsSatisfied();

else return false;
} //Exit method
} //Exit class
peresah is offline   Reply With Quote

Old   August 31, 2009, 18:33
Default Updated
  #8
New Member
 
Peres
Join Date: Jul 2009
Posts: 22
Rep Power: 7
peresah is on a distinguished road
For those interested, a newer version and documentation for the macro can be found on Edinburgh University's Wiki for Star-users.

Cheers
Peres
peresah is offline   Reply With Quote

Old   May 12, 2010, 04:03
Default
  #9
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 6
IvanCFD is on a distinguished road
Hi all,

I am about to run a unsteady simulation on Fluent and I would need to export a number of variables on a certain plane of the grid (x-,y- and z- velocities, and x-vorticity) every time step to be post-processed with another software (Matlab).

So far I've exported data from steady simulations, at the end of them, once converged. However I've never done this before for unsteady simulations.

I would much appreciate any light you could give me on this.

Cheers,

Ivan.
IvanCFD is offline   Reply With Quote

Old   October 23, 2010, 18:56
Default Reading in CCM/SBD files for post processing
  #10
New Member
 
PK
Join Date: Oct 2010
Posts: 3
Rep Power: 5
pavko718 is on a distinguished road
Hi Peresah,

In the current version of STAR-CCM+ (5.04) it's possible to read .ccm files back into a blank simulation WITH the field function saved in them. These should appear in the Filed Function list under Tools in the simulation tree.

This feature may even be available in earlier versions, but nothing older than 5.02.

If you are only interested in surface data, such as temperature or other quantity only on the surface, the .sbd binary file format may be another option. This format is preferable for saving surface data (geometry and functions) and can be easily and quickly read back into a blank simulation.

Regards,
Pavel
pavko718 is offline   Reply With Quote

Reply

Tags
data, raw, solution, time, transient

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time step size and max iterations per time step pUl| FLUENT 24 January 16, 2014 06:35
CHT. Cooled blade. Different time steps. Georg CFX 4 December 26, 2008 08:26
Collect data at every 10 time steps, npt each. Anindya FLUENT 3 July 31, 2005 07:09
Time dependent solution Thomas FLUENT 1 January 13, 2004 09:12
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 11:32


All times are GMT -4. The time now is 11:50.