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

Star-cd Macro Loop Results

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2011, 21:33
Post Star-cd Macro Loop Results
  #1
SMM
New Member
 
Syed Murtuza Mehdi
Join Date: Apr 2011
Posts: 19
Rep Power: 14
SMM is on a distinguished road
Hi every one,

I am a new user of star-cd (v-3.14) and need some help regarding the loop defined in Macro file. The loop itterate for 1000 times and calculate two user defined parameters for each cell set through *GET command. This loop is working well but the problem is that I need to copy the values of parameters into excel for further calculations and I cannot find a way to achieve this. There are 1000 values in total and copy/paste option is not feasible for this kind of an issue, I believe there must be some way to list all the values of the parameters in a column (like a text file) so that they can be easily pasted in excel. If some one has any clue over this issue kindly reply soon.

Thanks a lot
SMM is offline   Reply With Quote

Old   April 26, 2011, 11:36
Default
  #2
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17
Pauli is on a distinguished road
The command sdata will write your graph register information to a text file. You can then import that file into Excel.

At the command line enter "help sdata" to see command options & required inputs..
Pauli is offline   Reply With Quote

Old   April 27, 2011, 00:11
Default Reply to Pauli by SMM
  #3
SMM
New Member
 
Syed Murtuza Mehdi
Join Date: Apr 2011
Posts: 19
Rep Power: 14
SMM is on a distinguished road
Hi Pauli,

Thanks for replying. Actually the problem is that I have already tried to use a command in my loop that saves the post registers (all) in a .usr file but I cannot get the data for every itteration i.e. it only stores the information regarding to the last itteration of the loop and thus only creates one such file (logically If a command is used within a loop it should function every time it is executed and must therefore create many files with .usr extension, but I think it is not possible in STAR-CD to generate as many files as one wants with the same extension but each time with a different name. Secondly the data of the loop cannot be saved in a graph register so I need to print all the values of my parameter on the screen in form of a column vector or a row vector I have found out that *list command can do this but it cannot print it in a column vector or a row vector form. If you have any idea about this issue kindly share it with me.

Thanks a Lot.
SMM is offline   Reply With Quote

Old   April 27, 2011, 11:23
Default
  #4
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17
Pauli is on a distinguished road
Sorry, but I do not understand exactly what you are trying to achieve.

It sounds like you are computing some parameter. You can use the gparam command to push those values into graph registers (row & column).

After the loop finishes, use sdata to write the entire graph registers to disk.
Pauli is offline   Reply With Quote

Old   April 28, 2011, 06:28
Default
  #5
SMM
New Member
 
Syed Murtuza Mehdi
Join Date: Apr 2011
Posts: 19
Rep Power: 14
SMM is on a distinguished road
Hi Pauli,

Yes u r absolutely right I have been trying to calculate a user defined parameter for every cell set in my domain (A pipe that consist of 1000 cell sets in axial direction). The loop updates the cell set each time it is called and than the parameter is calculated again. So now your suggestion is to save 1000 values of this parameter into a graph register using a gparam command o.k I will definitely try this and share with you the result. Another problem is that the loop calculates the parameter acurately but if I use the *set command to define a new numeric parameter that is a ratio of the old parameter defined by the *get command (the one that is being calculated by the loop) and a constant (*set,TB,PARAMETER/CONSTANT) the loop is not calculating the parameter TB at all?. I have seen that *set command is used for these kinds of issues in the post manuals but surprisingly it is not working in the loop.
SMM is offline   Reply With Quote

Old   April 28, 2011, 11:41
Default
  #6
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17
Pauli is on a distinguished road
You need to put a space between the variables/constants & the operators:
*set,TB,PARAMETER / CONSTANT
And all terms are evaluated strictly from left to right!

Documentation for this can be found by entering the command "help program"
Pauli is offline   Reply With Quote

Old   May 2, 2011, 21:27
Default
  #7
SMM
New Member
 
Syed Murtuza Mehdi
Join Date: Apr 2011
Posts: 19
Rep Power: 14
SMM is on a distinguished road
Hi Pauli,

Thanks a lot for your valuable guidance and suggestions that came at the right time. I implemented the GPARAM command within the loop and also corrected the *SET command format. Finally now the parameter (bulk temperature TB) can be easily saved into a graph register (which can be thought as an array to store vector data in STAR-CD) and I can easily convert it in a text file to calculate the local Nusselt number variation at the wall in Excel.
SMM is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 19:28
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29
Problem with loop in CFX-Post macro chris_101 CFX 3 March 26, 2009 14:18
Results compare Star cd V4.06 and 3.26 Andrea Siemens 2 November 11, 2008 04:03
Macro problem cfddummy Siemens 1 April 9, 2007 13:37


All times are GMT -4. The time now is 07:45.