|
[Sponsors] |
March 24, 2009, 04:53 |
Star-CCM+ Macro headache
|
#1 |
New Member
Henco
Join Date: Mar 2009
Posts: 3
Rep Power: 17 |
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 |
|
April 16, 2009, 05:21 |
|
#2 |
Senior Member
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20 |
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! |
|
September 1, 2009, 08:22 |
|
#3 |
New Member
Join Date: Aug 2009
Posts: 12
Rep Power: 16 |
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 |
|
August 24, 2020, 19:21 |
|
#4 |
New Member
Chris Walton
Join Date: Oct 2011
Posts: 1
Rep Power: 0 |
Even though this post is 11 years old, it was just what I needed today - thanks for posting!
|
|
|
|
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 |