|
[Sponsors] |
April 2, 2020, 13:48 |
Accesing multiple booundaries on a UDF
|
#1 |
New Member
Francisco Rojas
Join Date: Apr 2020
Posts: 2
Rep Power: 0 |
Hello everyone. I´ve a question regarding implementation of BC on a transient heat flow model. In my problem I´ve got a cubic shaped object in which their top and bottom faces are exposed to a heat flow by convection with heat transfer coefficients of 5[W/m2K] and 10[W/m2K], respectively. Now if the temperature of the bottom face drops below 275[K], then its new heat coefficient needs to do change to 10[W/m2K] and the coefficient of the bottom face to 5[W/m2K]. My problem is that when I implement this BC on the top face using a UDF, then I need to program it so that it can access the temperature field on the bottom face and monitor when it drops below 275[K], but I dont know how to program the UDF so it can have access to the temperature field in multiple boundaries.
If any of you have know how to help me i´d very much appreciate it. |
|
April 6, 2020, 06:39 |
Accessing other boundary
|
#2 |
Senior Member
|
There are at least two ways to do this. You can use (pick...) command in Fluent to access average temperature of a boundary and store it in a scheme variable. This scheme variable can be access in a C based UDF and then used to define boundary condition on the other boundary. For (pick...), type (pick-docu) in Fluent's user interface. It will give you an example of determining the value. To access the value in C based UDF, use RP_Get_Real(name of rp variable that stores the output of pick... command).
Other option is to provide the ID of other boundary within DEFINE_PROFILE. So, you will need to two face loops within DEFINE_PROFILE. First one to calculate average temperature of the other boundary. Second one to apply boundary condition on current boundary. For first loop, you have to use following commands Thread *ts = Lookup_Thread(Get_Domain(1), 4); You need to replace 4 with the ID of the other boundary from boundary conditions panel. Then, within first loop, use ts instead of the second argument of DEFINE_PROFILE.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
Tags |
boundary condition, heat transfer boundary, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error code: 126 when loading parallel UDF | Coop | Fluent UDF and Scheme Programming | 0 | July 13, 2018 09:33 |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
problem in UDF for Accesing previous Time | Amir | FLUENT | 0 | April 16, 2008 03:00 |
How to set multiple zones profile in UDF? | jis3 | FLUENT | 2 | April 25, 2004 16:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |