CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF to update C_T(c,t) with Unsteady Flamelet Values (

clarkie_49 October 6, 2012 11:14

UDF to update C_T(c,t) with Unsteady Flamelet Values
Hi all,

First, before realising that i required a UDF, i originally posted something similar to this post in the Fluent section. So i'm sorry for the double(ish) post, but i now believe that my issue is more relevant to this section of the forum.

What i would like to do is update all cell values C_T(c,t) from a steady flamelet solution, with the "mean temperature" values after running the unsteady flamelet solution (Note: this is a post processing step on top of a steady RANS solution). The "Mean Temperature" data can be found listed under the "unsteady flamelet" drop down box when creating contours; and when you export or write this data it has the heading of "ufla-t" with no "SV" prefix.

I have had a play around with creating a UDF (only my 2nd UDF) and i believe that the code below is something like what i want. However, the values from "C_UFLA_TEMP_NUM(c,t)" are not what i require. I'm hoping that somebody on here can steer me in the right direction in to find where this "ufla-t" / "Mean Temperature" data is stored within fluent and how i can access it.


#include "udf.h"
#include "sg_mem.h"

Domain *d; /*declare domain pointer since it is not passed as an argument to the DEFINE macro */
real temp;
Thread *t;
cell_t c;
d = Get_Domain(1); /*Get the domain using Fluent utility */

/* Loop over all cell threads in the domain */
/* Update static temperature values with those from unsteady solution */
/* Loop over all cells */
temp = C_UFLA_TEMP_NUM(c,t);
C_T(c,t) = temp;

mvee October 9, 2012 00:29

Is the function C_UFLA_TEMP_NUM(c,t) function available?
I believe not.

clarkie_49 October 9, 2012 00:49

It definitely is available (check sg_mem.h under "unsteady flamelet") and i have used it to update the temperature field C_T(c,t). However these values do not represent the mean temperature field produced by the unsteady flamelet solution as they are too low (they range from 1e-8 to 1400). I am not sure what they represent as the FLUENT user manual makes no mention of it, although my first guess was that this could be the temperature above the extinguished flamelet temperature ie. x + 600K.

This is why i am asking on here; hoping that somebody knows what this function represents and/or how to update the C_T(c,t) with the correct values of "Mean Temperature" from the unsteady flamelet solution.

mvee October 9, 2012 01:35

The algorithm seems to be alright. I do not have knowledge of C_ULFA function. If you can send me some link or material, i will have look.

clarkie_49 October 9, 2012 02:19

Thanks Mvee, however i cannot find any documentation which makes reference to ufla functions. I can only accurately tell you three things:

1. the mean temperature and species mass fraction data is stored somewhere in Fluent as post-processed data
2. writing a case and data file stores "C_UFLA_Y_M#" data where # seems to represent the number of species, and it also stores C_UFLA_TEMP_NUM data which is some form of temperature, but not the mean field temperature (as figures are too low)
3. sg_mem.h makes reference to these functions under "unsteady flamelet"

Is there another way of going about this? By using the export "other" data feature, I can export/write the "Mean Temperature" values from the domain (2D axisymetric) to a data file or profile, where fluent places the data under the heading "ufla-t". (This is the data i want = correct temp values)

Is there a way of reading (UDF or otherwise) in the "ufla-t" values within the data/profile file and replacing C_T(c,t) with these values? This seems like a long way around though.

Afterall, if Fluent can export this "Mean Temperature" data as "ufla-t", then it must have this data stored somewhere which is accessible to use in my code above...

randomPhil September 19, 2013 17:27

hi clarkie_49 I was wondering if you ever managed to solve your problem?

I also need to access the time-averaged flamelet temperature from unsteady statistics.

Any help would be greatly appreciated,


All times are GMT -4. The time now is 00:09.