# Defining two different heat transfer coefficients for porous media model

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 30, 2019, 15:36 Defining two different heat transfer coefficients for porous media model #1 New Member   Justin Join Date: Feb 2017 Posts: 4 Rep Power: 9 I am trying to have two different zones with the built-in porous media model. Each zone will have a different heat transfer coefficient. Currently, I am interpreting the UDF, where I have two h_sf values (h_sf_5PPI and h_sf_30PPI). Then I take the two porous zones and select one for each. But I think the code is overwriting it so that all of the porous zones are getting the second heat transfer coefficient function. Does anyone have advice on how to change this UDF so that the first heat transfer coefficient function isn't overwritten? I am sure that the UDF is not working since the two temperatures are almost exactly the same. #include "udf.h" DEFINE_PROFILE(h_sf_5PPI, t, i) { cell_t c; real vel; begin_c_loop(c, t) { vel = ND_MAG(C_U(c, t), C_V(c, t), C_W(c, t)); F_PROFILE(c, t, i) = 40000 * pow(vel, .6352); /*43893 * pow(vel, .6352);*/ } end_c_loop(c, t) } DEFINE_PROFILE(h_sf_30PPI, t, i) { cell_t c; real vel; begin_c_loop(c, t) { vel = ND_MAG(C_U(c, t), C_V(c, t), C_W(c, t)); F_PROFILE(c, t, i) = 150000 * pow(vel, .6352); /*70319 * pow(vel, .6588);*/ } end_c_loop(c, t) }

 May 2, 2019, 01:25 #2 Senior Member   Alexander Join Date: Apr 2013 Posts: 2,363 Rep Power: 33 After interpreting the UDF you will have 2 functions hook first one to zone 1 and second to another zone. The function should not overwrite another one. best regards