CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   How to output variables every time step? (http://www.cfd-online.com/Forums/fluent/28149-how-output-variables-every-time-step.html)

Dazhi Guo January 15, 2001 20:08

How to output variables every time step?
 
Hi,all, I want to output the coordinats and fluid velocity of all nodes "every time step". It seems the UDF DEFINE_ADJUST and DEFINE_RW_FILE can do that job. Could you give me some advice on how to do that with these two UDFs or any other method? Thanks a lot. Guo

Trac January 15, 2001 20:22

Re: How to output variables every time step?
 
Hi Guo,

You may also be able to do this using macros (solve --> monitors --> command). You should be able to set something up to write all the values you need to a particular file type at each time step, probably using "export".

Trac.

Dazhi Guo January 15, 2001 21:47

Re: How to output variables every time step?
 
Thank you tracie, I tried your method. It's working pretty well. But the problem now is I got so many big files which are going to kill my harddrive. What I need is to handle one set of data and delete it to make room for next one every time step. I still need to write a User Defined Function to work with the Fluent solver at the same time. Any info. is appreciated. Guo

Trac January 15, 2001 22:07

Re: How to output variables every time step?
 
Hi Guo,

Can you explain what you are doing a bit more - are you getting Fluent to read the file back in? Is it possible to just give the file the same name, so it overwrites the old one each time?

Trac.

Dazhi Guo January 16, 2001 12:17

Re: How to output variables every time step?
 
Yes,tracie,I want fluent to read that file in. Actually I need a subroutine or UDF to read that back. We can not change the Discrete Phase Model(DPM) with the FLUENT. So I have to write a UDF to calculate the particle phase. Now no coupling is considered and I don't need to put any effect of the particle back to the fluid phase. I am sure FLUENT has supplied the IO head files such as "stdio.h" in C language. The manual for that part is also confusing. Only one function DEFINE_RW_FILE(FILE *fp) is available. I tried that but it didn't work.


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