CFD Online Discussion Forums

CFD Online Discussion Forums (
-   STAR-CCM+ (
-   -   Extracting velocity data (

cbisw March 7, 2011 08:31

Extracting velocity data

I have a simulation with a rectangular flow channel and a body inside. I would now like to measure fluid velocity at distinct points at every iteration and somehow output it to a table for further analysis (outside of star-ccm+).

The points of interest lie in 3 planes perpendicular to the flow channel, each plane having 3 probe lines, each with 20 measurement points, giving (20 * 3 * 3 ) = 180 distinct measurement points in total.

After consulting the manual my idea was to create 9 derived parts (probe lines) with a resolution of 20 each to emulate my measurement points. I fail however to set up proper reports on those probe lines since all I can do is have the maximum or minimum or average values and the like for each probe line reported instead of the values for all the 20 measurement points.

What I could do of course would be to set up 180 probe points, along with 180 reports, 180 monitors and 180 plots. But clearly there must be a much more convenient way to measure data the way I want to do it, but I can't quite see how. Any pointers would be welcome! If it is of any help, I know my way around in Java and could use the API if that would be the only way to do it conveniently.

f-w March 7, 2011 18:44

Tools > Tables > XYZ Internal Table

You won't be able to monitor these values on a plot in Star-CCM+, but you can view and export a table on demand for each iteration and view them there.

cbisw March 9, 2011 07:24

The XYZ Internal Table is a step in the right direction, however I need to extract the values automatically for every iteration/time step in a large simulation involving 100.000 iterations. Is there any possibility to have this accomplished automatically?

f-w March 9, 2011 13:10

Yes, automating exports is possible, but with XYZ tables it looks like it needs to be done with macros. I'm not fluent enough in Java to help you with that, so try contacting support or maybe someone else in this forum can chime in. Here's a starting point:

Please share your final macro if you ever get it done.

EDIT: try cd-adapco's forum too:

cbisw March 9, 2011 17:04

1 Attachment(s)
I wrote a macro today and it actually works, I'll attach it to this post. Just for educational purposes though, I would strongly advise against using it like it is now, since it's just a quick 'n dirty piece of code without any error checks. Especially since f-w posted a link to a much more matured macro for this purpose. I will however refine it and post it when it's done either here or rather at the JAVA Hut website. Not easy by the way since StarCCMs JAVA API is very badly documented.

I'm still wondering if there is a built-in way to accomplish this though and so I also wrote to CD-adapco support. Anyhow thanks for your help and I'll post again once I know more.

All times are GMT -4. The time now is 05:32.