CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Get a variable at each time-step (https://www.cfd-online.com/Forums/fluent/117013-get-variable-each-time-step.html)

Parisa_Khiabani April 30, 2013 10:44

Get a variable at each time-step
 
Hello everyone,
I would like to get the mass fraction of a component in the mixture at each time-step and use that in the journal file that I have written.
In fact, I want to get mass fraction of component X, inside the journal file like physical time, time-step size etc.
The problem is that since mass fraction is a post-processing variable, I cannot use getvar in journal file.
So, I don't know how to get this variable at each time-step.
Would you please guide me if you are familiar with that?
Thanks,
Parisa

villager April 1, 2014 15:47

Assuming you have boundary zone "outflow1" and you want to know mass fraction of X, the following commands should be added to your jou file:
Code:

/report/surface-integrals/area-weighted-avg/
outflow1
()
X
y
X_mass_fractions.srp
y

the last y to append data, not to overwrite. The previous y - write to file - yes. Exchange y for your substance, e.g. H2O.

Probably, you can use
Code:

plot/solution
plot/solution-set/plot-to-file

(try to make it work manually, start FLUENT in terminal mode and train yourself)


All times are GMT -4. The time now is 12:53.