CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   To store droplet data into a readable file (http://www.cfd-online.com/Forums/cd-adapco/53449-store-droplet-data-into-readable-file.html)

selen August 20, 2003 12:30

To store droplet data into a readable file
 
How can I store droplet data (.trk) file into a file readable by wordpad or excel (.grf)?

thanx, selen

Pauli August 20, 2003 12:40

Re: To store droplet data into a readable file
 
Check out the Convert-->Star function at the bottom of the Tools pull-down menu. It allows you to save a binary particle track/droplet file in coded form.

selen August 20, 2003 12:51

Re: To store droplet data into a readable file
 
Thanks for the answer but I tried that. In that way, I could not get the data exactly the same which I saw in the .TRK file. That is the problem. And the girl who worked before me could manage to store it in a file called .grf that is what I am searching for it. do you have an idea about it ?

selen

Pauli August 20, 2003 15:33

Re: To store droplet data into a readable file
 
A .grf file is the default file type used by the SDATA command (output graph registers to disk).

From you comment, it appears that the track file data was manipulated into the graph registers and then written to disk.

The GPTL command will load track file information into the graph register. Although I can only get it to load the fist time point. So I'm not sure how useful it will be. A more elaborate method is to create vertices along a particle track (PTVERTS) and then put sensors at those vertices (SENS, ADD). The sensors data can be loaded into the graph registers (GVALUE). This approach will take a little work transfer each sensor into a graph register location (i.e. a loop in a MACRO).

Did your predecessor leave behind any MACRO (.MAC) files? Alternatively, you could search through the .echo file for some of these commands. you might get lucky & find the section containing the commands she used.

Alternatively, you could just take the converted file into a spreadsheet or text editor & parse it into the format you require.


selen August 21, 2003 10:09

Re: To store droplet data into a readable file
 
Hi again,

First of all thanx a lot.

I could not find any macro file, unfortunately. But I worked more on this converting the file and I could manage to open it in a good way with excel except one problem. The only problem is that when it converts it puts one line data as 3 lines to the excel. So, it looks like that

* First line of data
*Second line of data
*Third line of data


O.K. maybe it a question of excel, but do you know how I can put it in a format like;

* First line of data + Second line of data + third line of data

Of course in a quick way. Then I do not need to search in STAR-CD anymore :)))

selen


Joern Beilke August 21, 2003 10:36

Re: To store droplet data into a readable file
 
There is a file called "pinfo.f" in the gifts directory of the star installation. If you modify the ouptput part you get exactly what you want.


selen August 21, 2003 10:58

Re: To store droplet data into a readable file
 
I could not find this file. And there is no gifts directory in my star-cd installation. I also search the whole drive for those files but I could not find.

Pauli August 21, 2003 16:59

Re: To store droplet data into a readable file
 
The Prostar file converter outputs 3 separate lines. Excel is reading the file correctly. An Excel macro would be the simplest way to manipulate the data. Another possible option would be a Unix function like S

Pauli August 21, 2003 17:01

Re: To store droplet data into a readable file
 
The Prostar file converter output 3 separate lines. So Excel is reading the file correctly. An Excel macro would be the simplest way to manipulate the data. Another possible option would be a Unix function like SED or AWK to step through the file while reading three lines & outputing one. Unfortunately, my skills with using these functions are rather limited :(


selen August 22, 2003 11:12

I fould the simplest solution !!!
 
Hello,

"getd post" command will store all your .trk data into .grf format and moreover seperate files will be generated for each droplet that you have been modeled. Like,

1.grf 2.grf 3.grf

Those automatically generated files includes those droplet data; x,y,z coordinates and velocities in those directions.

My question now is, which command generates files as follows;

1p.grf 2p.grf 3p.grf

Which also includes time data of the droplet.

thanx, selen



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