CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How to get the temperature! (https://www.cfd-online.com/Forums/fluent/34309-how-get-temperature.html)

Neng_R August 2, 2004 05:42

How to get the temperature!
 
Hi, every one! i need your help, thanks first! I need get the temperature of the boundary or somewhere, such as the wall temperature. If i know the wall's id is 1, how could i get its temperature, for i need it to calculate! I know we can use C_T( ),F_T(),etc to get temperature of the face / cell, but how could i get the particular id's temperature. Thanks

Andrew Garrard August 2, 2004 07:44

Re: How to get the temperature!
 
I don't really understand what your question is asking for, maybe you would like to describe your problem. I will try to answer what I think you are asking. If you want to know the temperature on, say, a wall of ID 5, then you need to define the tread that has that ID, then get the temperature from it, something like.

Thread *thread5=Lookup_Thread(domain, ID);

/*where 5 is the ID you are looking for in this case */ /* thread5 is a name defined by you and can be what you want */

real Temp = F_T(f, t);

You may also need some sort of looping macro to access all the faces on a boundary thread.

prasanth August 2, 2004 08:01

Re: How to get the temperature!
 
Dear Andrew

You almost did that he had expected. Its what he wants to know Andrew. In multiphase problems, situation will be in another way for accessing the macros

I hope Neng has got the answer! prasanth

Neng_R August 2, 2004 11:56

Re: How to get the temperature!
 
Thanks Andrew Garrard and prasanth's help!Thank you ,you are a good person!

Neng_R August 2, 2004 11:59

Re: How to get the temperature!
 
i want to get the temperature to calculate such as , Tk-T,where T is the wall's temperature and Tk is a given temperature, how could I achieve!

Andrew Garrard August 2, 2004 13:29

Re: How to get the temperature!
 
Ok, again, you really have to be a little more descriptive with your problem and what you are trying to achieve. Is the wall temperature, T, varying along the length of the wall? If you simply want to create a function along the wall that is Tk - T where Tk is a constant, you can do this with a custom field function - No UDF required. If you want to take the value of temperature from one of the faces of the wall and then have it subtracted from a constant in a UDF, for whatever reason, you can code that like so.

real Tk=300; /* or whatever it happens to be*/

real final_temp = F_T(face, thread) - Tk; /* where f is the face number and thread is the thread pointer */

But this is pretty basic stuff and all in the UDF manual for fluent 6.

Neng_R August 3, 2004 00:08

Re: How to get the temperature!
 
Thanks again for your help!

Doris August 27, 2004 00:11

Re: How to get the temperature!
 
well, in multiphase problems, the situation is in another way, i met this situation, so what should i do?

because i have met the situation like below: i have changed the domain id(i know the mixture_domian id is 1, the pirmary-phase domain id is 2),and i use udf to get F_CENTROID on the specitied thread, but the result is the same. should the grid variables's data will be the same in different domian?


All times are GMT -4. The time now is 08:35.