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

Star-CCM+ Macro headache

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ping

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2009, 04:53
Default Star-CCM+ Macro headache
  #1
New Member
 
Henco
Join Date: Mar 2009
Posts: 3
Rep Power: 17
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.

Regards

Henco
PLUH is offline   Reply With Quote

Old   April 16, 2009, 05:21
Default
  #2
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
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!
ccwalton likes this.
ping is offline   Reply With Quote

Old   September 1, 2009, 08:22
Default
  #3
New Member
 
Join Date: Aug 2009
Posts: 12
Rep Power: 16
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
Lukas is offline   Reply With Quote

Old   August 24, 2020, 19:21
Default
  #4
New Member
 
Chris Walton
Join Date: Oct 2011
Posts: 1
Rep Power: 0
ccwalton is on a distinguished road
Even though this post is 11 years old, it was just what I needed today - thanks for posting!
ccwalton 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
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 02:36
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 21:09.