CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Defining two different heat transfer coefficients for porous media model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2019, 14:36
Default Defining two different heat transfer coefficients for porous media model
  #1
New Member
 
Justin
Join Date: Feb 2017
Posts: 4
Rep Power: 9
student_1994 is on a distinguished road
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)
}
student_1994 is offline   Reply With Quote

Old   May 2, 2019, 00:25
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which radiation model for heat transfer through solid? flo777 FLUENT 0 January 30, 2015 22:49
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 17:30
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
heat transfer coefficients with "bad" yplus Andrew Main CFD Forum 4 April 8, 1999 04:43


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