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
|
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. |
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 |
Re: How to get the temperature!
Thanks Andrew Garrard and prasanth's help!Thank you ,you are a good person!
|
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!
|
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. |
Re: How to get the temperature!
Thanks again for your help!
|
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. |