CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   How to pick up the value of a monitor at a specified iteration? (https://www.cfd-online.com/Forums/star-ccm/79227-how-pick-up-value-monitor-specified-iteration.html)

archeo August 17, 2010 10:31

How to pick up the value of a monitor at a specified iteration?
 
Hi. I would like during a calculation go back to a monitor value at a specified iteration through a field function. Is it possible?

Something like

$troubleMonitor[iteration_number]

karthickeyan August 19, 2010 01:16

i couldnt get u
 
hi friend


what are the values u want temp ,velocity ,pressure


tell me clear

archeo August 19, 2010 03:17

It is a user-defined function monitored over the iterations

svenne August 20, 2010 04:02

You can access the values through a Java Macro. I added some sample code accessing a monitor named "monitor"
Code:

Simulation sim = getActiveSimulation();
ReportMonitor reportMonitor = ((ReportMonitor) sim.getMonitorManager().getMonitor("Monitor"));
MonitorData monDat = reportMonitor.getAllSamples();
sim.println("X-Values");
 
//monDat.getXValues() returns double[]
for(double d :monDat.getXValues()){
    //print Iterations
    sim.println(d);
}
sim.println("Y-Values");
for(double d :monDat.getYValues()){
      //print monitored values
      sim.println(d);
}

How to access the value of a specified Iteration is plain Java

babyteen9x August 20, 2010 07:53

Quote:

Originally Posted by svenne (Post 272114)
You can access the values through a Java Macro. I added some sample code accessing a monitor named "monitor"
Code:

Simulation sim = getActiveSimulation();
ReportMonitor reportMonitor = ((ReportMonitor) sim.getMonitorManager().getMonitor("Monitor"));
MonitorData monDat = reportMonitor.getAllSamples();
sim.println("X-Values");
 
//monDat.getXValues() returns double[]
for(double d :monDat.getXValues()){
    //print Iterations
    sim.println(d);
}
sim.println("Y-Values");
for(double d :monDat.getYValues()){
      //print monitored values
      sim.println(d);
}

How to access the value of a specified Iteration is plain Java

thank you very much






----------------------------------
tin tuc
Tin tuc trong ngay
Tin nhanh
Tin hot
Tin hay
Tin bong da


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