CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   How to save the export information to Variables (http://www.cfd-online.com/Forums/cd-adapco/55666-how-save-export-information-variables.html)

cauffman October 30, 2006 03:37

How to save the export information to Variables
 
Hi everybody! My question is how to save the export information to variable automatically.For example, when run AREA RRANGE 1 1 1 the output is as followed: FOR REGIONS 1 TO 1 BY 1 AREA = 3285.37 CUMULATIVE AREA = 3465.37

I want to save AREA:3285.37 to a Variable automatically, Not do as *SET xxx 3285.37.

Thanks in advance

DB October 30, 2006 20:47

Re: How to save the export information to Variable
 
What exactly are you trying to do with saving the output to a variable??

cauffman October 31, 2006 00:02

Re: How to save the export information to Variable
 
I'm trying to make a common command set to calculate the discharge coefficient. When calculate this value,It needs the FLUX ,AREA of a shell(such as inlet,outlet) , Pressure loss between inlet and outlet.


vladimir November 1, 2006 08:54

Re: How to save the export information to Variable
 
hi cauffman
i would recommend you to try
<code>help *get</code>
in the prostar output window and read the section 'miscelaneous'
hope it helps


cauffman November 2, 2006 04:17

Re: How to save the export information to Variable
 
Thank you, vladimir I'll try

cauffman November 2, 2006 04:27

Re: How to save the export information to Variable
 
Hi vladimir I read the command userguide as you said, but I can't find it; Could you show me in detail? Thank in advance.

vladimir November 5, 2006 05:32

Re: How to save the export information to Variable
 
You got somehow mistaken. I was not refering you to the user guide but a prostar command line (prostar output window). If you are looking for a help to a command you don't know, you can do it in three ways: firstly, by issuing
<code>help *get</code>
in the prostar output window, which is the only way while running prostar in batch mode
secondly, by pressing F1 key while in prostar. In this way a help window will pop up so you can type the command in question there and get all information;this is what I do.
The last possibility is to open a file star_command.pdf which is located somewhere in the StarCD instalation directory. Unfortunately, there is a discrepancy within what is in prostar help and the mentioned pdf file. The feature is not listed in the pdf file for whoknows reasons.
Thus if you want to know something about the *get command try the two other approaches.
Otherwise
<code> area,init
area,rrange,1,1,1
*get,myarea,atot
</code>


cauffman November 6, 2006 03:21

Re: How to save the export information to Variable
 
Thank you for your reply! I read the help command of *GET one by one ,but I still can't find relative infomation. It seems that STARCD can't identify "*get,myarea,atot"

vladimir November 6, 2006 18:35

Re: How to save the export information to Variable
 
I looked it up and it seems to be a problem of star version as the 3.24 does not support the <code>*get,par1,atot</code> command but 3.26 does. If you have to deal with star version below 3.26 , I have no idea how to help you. You can try the following:
set your simulation output to contain any wall data (yplus is enough),
run the simulation (or just rerun it for 1 iteration so the wall data are saved),
load the pst file,
get the yplus value by <code>getw,yplu</code>,
use command <code>oper,getb,area,4</code> (help operate might be useful) to get area of any boundary into post register no.4,
select the cells in question with the <code>cset</code> command (bset,news,region,1$vset,news,bset$cset,news,vset, face$cset,dele,fluid) to get the shell cells of the boundary region no.1
issue <code>summ,cset</code> command,
and use <code>*get,myarea,rtot,4</code>.
The rest is up to you. This works quite fine for me and I hope it'll do the same for you.

cauffman November 6, 2006 18:52

Re: How to save the export information to Variable
 
My STARCD version is 3.24,I'll try as you said. Thank you.


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