CFD Online Logo CFD Online URL
Home > Forums > STAR-CCM+

Star-CCM+ Macro headache

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

LinkBack Thread Tools Display Modes
Old   March 24, 2009, 05:53
Default Star-CCM+ Macro headache
New Member
Join Date: Mar 2009
Posts: 3
Rep Power: 10
PLUH is on a distinguished road
Good day.

I want to write/edit an macro that extracts the velocity components (i,j,k) at predeterminde coordinates in my fluid region with the use of a point probe and have these values written to a .csv file. I have a .csv file containing all the coordinates at which i want to extract the data (nearly 400) and am able to read these coordinates into the macro and ajust the point probe acordingly, but I am having trouble extracting the velocity components at these positions. Any help in setting up the code to set a variable (xvel) equal to the i velocity component using the point probe will be greatly appreciated.

I am new user of star-ccm and have no previous experience with java so any help will be greatly appreciated.

An alternative is to insert all the point probes into the simulation and plot the different components using an XY plot, but with this method i'll have to have 3 plots (one for each velocity component and coordinate) that needs to be exported and it will leave me with more postprocessing.

Sorry for the long post and thatks in advance.


PLUH is offline   Reply With Quote

Old   April 16, 2009, 05:21
Senior Member
Join Date: Mar 2009
Posts: 290
Rep Power: 12
ping is on a distinguished road
You are close:
1. create a Max Report, with Vel(i) component as the field, and the probe as the part - call it say Vi .
2. Create similar reports for Vj and Vk - so you now have each component of vel as a report
3. In your macro add something like

//Define some variables
double Vi, Vj, Vk ;

// Start loop over all your required probe locations using SetCoordinate etc

MaxReport maxReport_0 = ((MaxReport) simulation_0.getReportManager().getReport("Vi"));
Vi = maxReport_0.getValue();

MaxReport maxReport_1 = ((MaxReport) simulation_0.getReportManager().getReport("Vj"));
Vj = maxReport_1.getValue();

MaxReport maxReport_2 = ((MaxReport) simulation_0.getReportManager().getReport("Vk"));
Vk = maxReport_2.getValue();

// now you have the components of vel in these three variables - write to file

// repeat loop

A much easier non-java way to do it is to use an Internal XYZ Table which you then export to csv - fine if your probe points are say on a regular grid which a Presentation Grid can create. Or import the probe locations as an STL file - can't see a way to use an imported csv table as an Arbitrary probe location - that would be ideal for you!
ping is offline   Reply With Quote

Old   September 1, 2009, 08:22
New Member
Join Date: Aug 2009
Posts: 12
Rep Power: 10
Lukas is on a distinguished road
Hi all,

how can I import probe locations from a stl-file?
How can I create a stl-file with my probe locations?

with best regards
Lukas is offline   Reply With Quote


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
mesh algo for volume mesh in star ccm rohit Siemens 1 August 8, 2008 20:44
star ccm 3.04 jecil Siemens 11 July 27, 2008 23:41
error in star ccm maurizio Siemens 3 October 16, 2007 05:17
Star CCM - Problem with image hardcopy quality James Siemens 2 March 14, 2007 03:36
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15

All times are GMT -4. The time now is 15:45.