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

how to extract velocity values from cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2012, 19:10
Default how to extract velocity values from cells
  #1
New Member
 
Romain
Join Date: Sep 2012
Posts: 1
Rep Power: 0
fromain is on a distinguished road
Hi,

I'd like to run transient simulations but keep the history of the solution with StarCCM+ v6.
Right now I'm updating a table and exporting it as csv every n-time steps since someone described how to do that from a macro.
However I'd like to use a binary file format like HDF5 which is more compact and which I know how to post-process (not to mention that tables are exported with only 11 digits).

I am able to write HDF5 files from java macros, but I don't know how to iterate through the cells to collect the values of velocity (or whatever quantity). I also thought about updating a table like before but then iterating through the fields and export the values myself, but the java API documentation is rather thick and hard to understand.

Would someone have knowledge about that or point me towards similar macros that might already exist (i couldn't find any)?

Thanks,
Romain
fromain is offline   Reply With Quote

Old   September 20, 2012, 18:50
Default
  #2
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Maybe you can export a table and access the exported file to write the HDF5 file. Accessing an exported csv file does not depend on the CCM+ API, so you don't need to bother about the "hard to understand" API. I'm sorry for being a bit harsh, but the CCM+ API is as good as the Oracle Java API or any other - that's the f... Java API style most people don't understand. But when you'll spend the time to work with it, you'll understand why it's still pretty useful.

Anyway, it is NOT possible to directly access values on a cell basis- CCM+ does not allow this. You can access a field via field functions (which doesn't help you) or you can access the centroid position via tables. But you can't access cell #374675879 or any other cell. Either you can work with csv files or one of the export formats, or you can't do it.

By the way, forget about "only" 11 digits when exporting tables. CCM+ is a single precision code, the values you get are only precise for the first 6 or seven digits. All other digits are just bullshit, no matter which format you use since the internal precision is not good enough. There should be double precision versions available for Linux with v7.04, but to use them is unnecessary for most cases except some special cases.
Think about model errors, boundary conditions and discretization errors before you think about exporting 11 digits.
__________________
We do three types of jobs here:
GOOD, FAST AND CHEAP
You may choose any two!
abdul099 is offline   Reply With Quote

Old   May 27, 2015, 15:12
Default user code
  #3
New Member
 
Join Date: May 2011
Posts: 18
Rep Power: 15
ximik is on a distinguished road
you may want to check out Running > Working with User Code sections of the User Guide. User code should give you a deeper access to the Star-CCM+ solver.
ximik 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
Problem with divergence TDK FLUENT 13 December 14, 2018 07:00
limit high velocity values riesotto OpenFOAM 7 July 25, 2016 15:28
Extract cells from multiple cell zones ggoggodak85 OpenFOAM Programming & Development 3 May 4, 2012 07:39
Extract velocity of nodes on outlet, CCL/CEL ? lee CFX 0 January 31, 2008 23:14
how to check absolute velocity values gaurav FLUENT 7 May 17, 2004 18:07


All times are GMT -4. The time now is 00:53.