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

Save Reportvalue for Each Boundary in Java

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2018, 12:35
Default Save Reportvalue for Each Boundary in Java
  #1
Member
 
Join Date: Apr 2016
Posts: 90
Rep Power: 10
CellZone is on a distinguished road
Hi,

I am trying to write a macro, where I can save for each boundary of my region the value of a heat flux report in a new variable (so that I can calculate with this value).

I already made it to create a report for each boundary. But I do not know how I can save the value of each report in an array?

Here my try:

Quote:
// Written by STAR-CCM+ 12.04.010
package macro;

import java.util.*;

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

public class Test2 extends StarMacro {

public void execute() {
execute0();
}

private void execute0() {


int i=0;

double[] HeatFlux = new double[1000];


Simulation simulation_0 =
getActiveSimulation();

Region region_1 =
simulation_0.getRegionManager().getRegion("Test");


Collection<Boundary> col = region_1.getBoundaryManager().getBoundaries();

// loop through all elements of the above collection:
for(Boundary bi : col) {



AreaAverageReport areaAverageReport =
simulation_0.getReportManager().createReport(AreaA verageReport.class);

PrimitiveFieldFunction primitiveFieldFunction_0 =
((PrimitiveFieldFunction) simulation_0.getFieldFunctionManager().getFunction ("BoundaryRadiationHeatFlux"));

areaAverageReport.setFieldFunction(primitiveFieldF unction_0);

areaAverageReport.getParts().setObjects(bi);

HeatFlux[i] = areaAverageReport.getReportMonitorValue();

i=i+1;

simulation_0.println("Tester" +HeatFlux[i]);





}



}
}



Anyone has some hints?

Thank you!!
CellZone 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
Centrifugal fan j0hnny CFX 13 October 1, 2019 13:55
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 18:02
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 10:20
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 11:19


All times are GMT -4. The time now is 12:28.