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

macro editing in STAR-CCM+

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2008, 05:02
Default macro editing in STAR-CCM+
  #1
JJ
Guest
 
Posts: n/a
Hi Folks,

I'd like to export a few lines of data from my star-ccm+ model every time step.Could anyone give me tips on how to edit a macro for so that the process is repeated each time-step without overwriting?

Thanks for your help
  Reply With Quote

Old   November 13, 2008, 09:23
Default Re: macro editing in STAR-CCM+
  #2
ping
Guest
 
Posts: n/a
solve from within a Java macro

then in the macro have an infinite loop within loop

step one time step

print as below end loop

Here is a bit of code for openning and writing to a file:

String str1;

FileOutputStream fos;

DataOutputStream dos;

try {

File outFile= new File("MyFile.txt");

FileWriter out = new FileWriter(outFile);

// put your loop in here

str1 = "build your vars here" + " " + Area + " " ;

out.write( str1 );

out.close();

} catch (IOException e) {

e.printStackTrace();

}

  Reply With Quote

Old   November 13, 2008, 17:53
Default Re: macro editing in STAR-CCM+
  #3
JJ
Guest
 
Posts: n/a
Thanks for your help ping, much appreciated
  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
udf file editing srihari Main CFD Forum 8 February 28, 2009 02:45
load sheme macro (Solv Execute Command macro) manu FLUENT 2 March 13, 2008 01:00
Editing the meshs a how-to? Wooster CFX 2 October 17, 2007 10:11
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 04:18
Editing code Joseph Main CFD Forum 0 May 28, 2007 16:18


All times are GMT -4. The time now is 19:27.