CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2012, 12:14
Default UDF to update C_T(c,t) with Unsteady Flamelet Values
  #1
New Member
 
Brendan
Join Date: Oct 2012
Posts: 10
Rep Power: 14
clarkie_49 is on a distinguished road
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.

Thanks


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

DEFINE_ON_DEMAND(on_demand_temp_update)
{
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 */
thread_loop_c(t,d)
{
/* Update static temperature values with those from unsteady solution */
/* Loop over all cells */
begin_c_loop(c,t)
{
temp = C_UFLA_TEMP_NUM(c,t);
C_T(c,t) = temp;
}
end_c_loop(c,t)
}
}
clarkie_49 is offline   Reply With Quote

Old   October 9, 2012, 01:29
Default
  #2
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
Is the function C_UFLA_TEMP_NUM(c,t) function available?
I believe not.
mvee is offline   Reply With Quote

Old   October 9, 2012, 01:49
Default
  #3
New Member
 
Brendan
Join Date: Oct 2012
Posts: 10
Rep Power: 14
clarkie_49 is on a distinguished road
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.
clarkie_49 is offline   Reply With Quote

Old   October 9, 2012, 02:35
Default
  #4
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
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.
mvee is offline   Reply With Quote

Old   October 9, 2012, 03:19
Default
  #5
New Member
 
Brendan
Join Date: Oct 2012
Posts: 10
Rep Power: 14
clarkie_49 is on a distinguished road
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...

Last edited by clarkie_49; October 9, 2012 at 04:31.
clarkie_49 is offline   Reply With Quote

Old   September 19, 2013, 18:27
Default
  #6
New Member
 
Phil
Join Date: Jun 2013
Posts: 11
Rep Power: 13
randomPhil is on a distinguished road
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,

thanks
randomPhil is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unsteady case, how to update the porosity? ylw2010 Fluent UDF and Scheme Programming 0 May 4, 2012 00:36
using UDF in Fluent for unsteady cavitation Pejman Main CFD Forum 6 November 6, 2008 11:18
unsteady flamelet models dean Main CFD Forum 2 October 5, 2005 20:22
Unsteady Flamelet modelling Les Denpre Main CFD Forum 0 August 8, 2005 10:46
printing values from udf!!! Shekhar FLUENT 2 January 13, 2004 12:49


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