CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   time averaged data (http://www.cfd-online.com/Forums/fluent/99096-time-averaged-data.html)

Musa March 26, 2012 07:42

time averaged data
 
I urgently need help to process simulation data and obtain time-averaged values. I am modeling a 2D gas-solid fluidized bed reactor. I have just come to learn about the data sampling for time statistics option in fluent but it is too late since the simulation has already been done. I will appreciate your comments and valuable suggestions.

Amir March 26, 2012 09:39

Quote:

Originally Posted by Musa (Post 351483)
I urgently need help to process simulation data and obtain time-averaged values. I am modeling a 2D gas-solid fluidized bed reactor. I have just come to learn about the data sampling for time statistics option in fluent but it is too late since the simulation has already been done. I will appreciate your comments and valuable suggestions.

Dear Musango,

For this purpose, you can export FLUENT data in ASCII format then import them in MATLAB and finally write them in Tecplot format or interpolation format of FLUENT. Do not hesitate to ask if the procedure is not clear.

P.S. In order to automize the exporting data from FLUENT, you will need a simple journal file; additionally, a code for importing and averaging data in MATLAB.

Bests,

Musa March 27, 2012 00:52

Thanx alot, Amir! I have sent you the case and data files to help me understand more clearly. Actually my programming skills are quite basic. I am a beginner.

Musa March 27, 2012 01:24

I have exported the data in ASCII format, imported it into matlab and saved it in interpolation format. How do I now proceed to get the average data?

Amir March 27, 2012 04:28

Quote:

Originally Posted by Musa (Post 351636)
I have exported the data in ASCII format, imported it into matlab and saved it in interpolation format. How do I now proceed to get the average data?

Hi,

You have to do such procedure for all of your time-dependent data; so you will need a tool to automize this procedure (exporting and importing) so you can use a journal file in FLUENT and a code for MATLAB. When you import all the data to MATLAB, you can simply compute the average flow field.

Bests,

Musa March 27, 2012 05:44

Okay, as i said earlier my programming skills are quite basic and i would appreciate your assistance with the codes. I can modify them to suit my case. I have already sent the case and data files to you to have a look at. Thank you so much once again.

Amir March 27, 2012 09:07

1 Attachment(s)
Quote:

Originally Posted by Musa (Post 351696)
Okay, as i said earlier my programming skills are quite basic and i would appreciate your assistance with the codes. I can modify them to suit my case. I have already sent the case and data files to you to have a look at. Thank you so much once again.

I attached 2 codes that you need for your purpose which I wrote in Fortran 90.
code1.f90 is a journal generator and code2.f90 is a MATLAB code generator. ;)

Bests,

Musa March 27, 2012 09:15

Thanx a million Amir, you are a life saver!!!

passive November 21, 2012 12:56

Quote:

Originally Posted by Amir (Post 351732)
I attached 2 codes that you need for your purpose which I wrote in Fortran 90.
code1.f90 is a journal generator and code2.f90 is a MATLAB code generator. ;)

Bests,

Hi Amir;

I downloaded your codes but I don't know how to use them? How can I use journal file in fluent and how to import them in matlab?
can you explain more?

Thank you
pari

Amir November 21, 2012 13:39

Quote:

Originally Posted by passive (Post 393490)
Hi Amir;

I downloaded your codes but I don't know how to use them? How can I use journal file in fluent and how to import them in matlab?
can you explain more?

Thank you
pari

Dear Pari,

Before using these codes, you have to check whether they are necessary fro your case or not. These are designed just for post-run purposes, while you can do the same during the run with FLUENT primary options. However, you can refer to the manual to know how to use journal files.

Bests,

passive November 21, 2012 14:11

Quote:

Originally Posted by Amir (Post 393494)
Dear Pari,

Before using these codes, you have to check whether they are necessary fro your case or not. These are designed just for post-run purposes, while you can do the same during the run with FLUENT primary options. However, you can refer to the manual to know how to use journal files.

Bests,

my case is to time average from all time steps for velocity and pressure .
I run journal creator code(fortran code) and then I read journal output file in fluent but I just obtain position cordinates and no velocity and pressure.what is my mistake?

Amir November 21, 2012 16:53

Quote:

Originally Posted by passive (Post 393503)
my case is to time average from all time steps for velocity and pressure .
I run journal creator code(fortran code) and then I read journal output file in fluent but I just obtain position cordinates and no velocity and pressure.what is my mistake?

Did you save the required data or now you want to start the run? If you haven't performed any run or it's not time consuming, it's much easier to use unsteady statistic data processing of FLUENT instead of this method; otherwise, you have to import the data to MATLAB for further processing.

Bests,

passive November 22, 2012 02:46

Quote:

Originally Posted by Amir (Post 393529)
Did you save the required data or now you want to start the run? If you haven't performed any run or it's not time consuming, it's much easier to use unsteady statistic data processing of FLUENT instead of this method; otherwise, you have to import the data to MATLAB for further processing.

Bests,

all my runs were completed and i saved all case and data for every time step using autosave. it'll take too much time for me to run again.
if I know your solution you mean i can use unsteady data sampling icon which have been located in iteration panel,but this method only give me a few data,and I doubt this method.
I want to know more about journal file operation.I read journal file but just the position of nodes were resulted...

Amir November 22, 2012 06:06

Quote:

Originally Posted by passive (Post 393589)
all my runs were completed and i saved all case and data for every time step using autosave. it'll take too much time for me to run again.
if I know your solution you mean i can use unsteady data sampling icon which have been located in iteration panel,but this method only give me a few data,and I doubt this method.
I want to know more about journal file operation.I read journal file but just the position of nodes were resulted...

Yes, unsteady statistics method can provide few parameters.
Before using that journal file, you have to change it for your purpose; I mean number of files, names and .... I propose to check one step in TUI to find the issues, so notice to probable errors in FLUENT console, but as you see it's prepared to export 4 variables:
Code:

x-vel y-vel z-vel pressure
So check it just for one case by typing the commands in TUI and follow the instruction to eliminate the drawbacks.
Do not hesitate to ask if you face any problem.

Bests,

passive November 23, 2012 05:10

Quote:

Originally Posted by Amir (Post 393622)
Yes, unsteady statistics method can provide few parameters.
Before using that journal file, you have to change it for your purpose; I mean number of files, names and .... I propose to check one step in TUI to find the issues, so notice to probable errors in FLUENT console, but as you see it's prepared to export 4 variables:
Code:

x-vel y-vel z-vel pressure
So check it just for one case by typing the commands in TUI and follow the instruction to eliminate the drawbacks.
Do not hesitate to ask if you face any problem.

Bests,

Hi amir
I did what you said.when i copy journal text in TUI. after being shown somethings in TUI ,it appeare ASCII scalar(1)> what should i write in this step? my journal file that i copy In TUI is
rcd cav-0001.cas
/file/ex/ascii cav-0001 () x-vel y-vel z-vel pressure ()
rcd cav-0002.cas
yes
/file/ex/ascii cav-0002 () x-vel y-vel z-vel pressure ()
rcd cav-0003.cas
yes
/file/ex/ascii cav-0003 () x-vel y-vel z-vel pressure ()
rcd cav-0004.cas
yes
/file/ex/ascii cav-0004 () x-vel y-vel z-vel pressure ()
rcd cav-0005.cas
yes
/file/ex/ascii cav-0005 () x-vel y-vel z-vel pressure ()


*** cav is the name of sample project

Amir November 23, 2012 05:50

Quote:

Originally Posted by passive (Post 393767)
Hi amir
I did what you said.when i copy journal text in TUI. after being shown somethings in TUI ,it appeare ASCII scalar(1)> what should i write in this step? my journal file that i copy In TUI is
rcd cav-0001.cas
/file/ex/ascii cav-0001 () x-vel y-vel z-vel pressure ()
rcd cav-0002.cas
yes
/file/ex/ascii cav-0002 () x-vel y-vel z-vel pressure ()
rcd cav-0003.cas
yes
/file/ex/ascii cav-0003 () x-vel y-vel z-vel pressure ()
rcd cav-0004.cas
yes
/file/ex/ascii cav-0004 () x-vel y-vel z-vel pressure ()
rcd cav-0005.cas
yes
/file/ex/ascii cav-0005 () x-vel y-vel z-vel pressure ()


*** cav is the name of sample project

Hi,

That's the first scalar you want to report! Press enter in this step to see the available options.

Bests,

passive November 23, 2012 11:55

Quote:

Originally Posted by Amir (Post 393774)
Hi,

That's the first scalar you want to report! Press enter in this step to see the available options.

Bests,

I did what you say.I wrote for example x-velocity after ASCII scalar(1) then y-velocity after ASCII scalar(2) and... how can I break this ASCII' sss? and where are these data stored?

Amir November 23, 2012 14:42

Quote:

Originally Posted by passive (Post 393862)
I did what you say.I wrote for example x-velocity after ASCII scalar(1) then y-velocity after ASCII scalar(2) and... how can I break this ASCII' sss? and where are these data stored?

You can get your answer by referring to he provided code! By using ().

passive November 24, 2012 13:19

2 Attachment(s)
Quote:

Originally Posted by Amir (Post 393885)
You can get your answer by referring to he provided code! By using ().

Hi Amir
I wrote 2 udf for my purpose to get time average data.I attach these two udf.if it's possible help me to correct them,please.
I check them with data sampling time statics of fluent, the results are close but not exactly the same.I used udm and just for x-velocity.


All times are GMT -4. The time now is 13:38.