|
[Sponsors] |
May 24, 2020, 01:14 |
2-D phase change heat transfer UDF
|
#1 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16 |
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); } |
|
May 25, 2020, 13:21 |
Udf
|
#2 |
Senior Member
|
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. |
|
|
|
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 |