CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   One question about reading data files (

Spurny February 13, 2011 02:07

One question about reading data files
Hi guys,

I am working on an unsteady case with particles. I am trying to use the data of flow field in the past as the initial condition/boundary condition for the particle tracking in the current time step, since the flow field is periodical.

I tried both scheme macros and UDF. Here are my questions:
1, For scheme macros, how to read a data file with a variable inside the name of the data file. I need to add a variable of current_time to locate the data file in the past.
2, For UDF, which one should I use, DEFINE_RW_FILE or fopen?


Amir February 13, 2011 08:57

Hi Spurny,
I did something similar with journal of FLUENT. you can develop a journal file with e.g. any compiler like FORTRAN,... .you can easily sort your commands there.

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