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

2-D phase change heat transfer UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2020, 01:14
Default 2-D phase change heat transfer UDF
  #1
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16
arunraj is on a distinguished road
Hello everyone, I am performing 2-D phase change heat transfer simulation. I would like to compute the inlet velocity as a function of mass flux and density. The mass flux needs to be computed over each cell in the inlet edge and integrated to get the overall mass flux. Also, the density of the fluid must be corresponding to the fluid in the zone. For example, if it is liquid inlet, it needs to be liquid density. And if it is vapor inlet, it needs to be vapor density. I have prepared this UDF and it works fine. Could anyone confirm if my UDF is right or wrong? It could be help for others too.

#include "udf.h"

DEFINE_PROFILE(velocity_inlet, t, i)
{
real A[ND_ND];
face_t f;
Thread *tf;
begin_f_loop(f, t)
{
F_PROFILE(f, t, i) = F_FLUX(f,tf) / (F_AREA(A,f,t)*F_R(f,tf));
}
end_f_loop(f, t);
}
arunraj is offline   Reply With Quote

Old   May 25, 2020, 13:21
Default Udf
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
If it works then it's good. But I doubt it. You are trying to apply a profile UDF to an inlet where no values are assigned. If you do not specify either velocity or mass flow rate, how do you expect Fluent to determine the velocity. So, the UDF will compile alright but will not lead to any results.
__________________
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.
vinerm 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
How to deal latent heat during phase change through source term udf dkb_bg Fluent UDF and Scheme Programming 4 April 12, 2018 21:26
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
Radiation interface hinca CFX 15 January 26, 2014 18:11
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
help needed about phase change Yanhu Guo Main CFD Forum 4 January 24, 2001 00:16


All times are GMT -4. The time now is 01:20.