CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF: temperature dependent BC (http://www.cfd-online.com/Forums/fluent/83777-udf-temperature-dependent-bc.html)

ehooi January 11, 2011 05:49

UDF: temperature dependent BC
 
Hi,
I am attempting to write a UDF such that the boundary condition of a wall has non-zero heat flux (eg: heater being switched on) when the temperature of a specific point in my model falls below a certain value and a zero heat flux otherwise.

I guess using DEFINE_ADJUST to read the temperature of that point and DEFINE PROFILE to specify the BC.

Am i going in the right direction? Also, how do I obtain the temperature of that specific point? I know the coordinates of the point.

Many thanks.


Cheers,
EH

Sangeeta January 11, 2011 11:25

Quote:

Originally Posted by ehooi (Post 289972)
Hi,
I am attempting to write a UDF such that the boundary condition of a wall has non-zero heat flux (eg: heater being switched on) when the temperature of a specific point in my model falls below a certain value and a zero heat flux otherwise.

I guess using DEFINE_ADJUST to read the temperature of that point and DEFINE PROFILE to specify the BC.

Am i going in the right direction? Also, how do I obtain the temperature of that specific point? I know the coordinates of the point.

Many thanks.


Cheers,
EH

Yes, You are right about the UDF.
To view the temperature u can use monitor< temperature at that specific point.
THis will be display temperature at that point at every iteration

Hope this will help you

ehooi January 11, 2011 11:29

Quote:

Originally Posted by Sangeeta (Post 290014)
Yes, You are right about the UDF.
To view the temperature u can use monitor< temperature at that specific point.
THis will be display temperature at that point at every iteration

Hope this will help you

Thank you Sangeeta. While I am able to monitor the temperature at that specific point, I will not be able to incorporate it into my UDF. I am trying to specify the BC such that when the temperature of that point drops below a certain level, the heat flux is non zero and if it above, then the heat flux is zero.

I guess the main issue is how to obtain the temperature of a point using UDF or at least link the temperature from the monitored point to my UDF.

Thanks.

amirreza_m January 11, 2011 12:09

hi,
to do this , you can separate the element in which your specific point is.
after that, the separated element get different thread ID and you can use it easily.

ehooi January 11, 2011 12:12

Quote:

Originally Posted by amirreza_m (Post 290024)
hi,
to do this , you can separate the element in which your specific point is.
after that, the separated element get different thread ID and you can use it easily.

Thanks Amir Reza.

When you say separate the element, do you mean doing it in the model development stage?


Or is this done by writing a UDF for it? If yes, could you guide or point me to some sources that can help me in this?

amirreza_m January 11, 2011 15:40

hi EH,
you can do that in FLUENT GUI:
1)adapt->region : specify a volume (as small as possible.try to capture one cell) with sphere or hex or ... . and mark this volume that contain your point. (do not adapt it ,just mark)
2)grid->separate->cells : here you can separate your marked volumes.
3)define->boundary conditions : here you can see your separated volume's ID (you need that in your UDF)

Nikolopoulos January 22, 2011 13:26

amirreza_m thanks a lot about this tip!!!!

For years i was just making loops in my UDFs over all cells!!!!


Thank a lot!


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