
[Sponsors] 
November 19, 2015, 09:03 
Phase change UDF

#1 
Member
Ram Kumar Pal
Join Date: Apr 2015
Posts: 38
Rep Power: 11 
Hi friends,
I'm doing 2D simulation of "pulsating heat pipe" in fluent. For phase change I'm using UDF which is written below. When Interpreting this UDF, mass source term is not coming in "CEll zone condition" dialogue box. Can anyone help me? Please see this UDF and notify if there is any error. My UDf is: #include "udf.h" #include "sg_mphase.h" #define T_SAT 308 #define LAT_HT 2418.5394e3 DEFINE_SOURCE(vap_src,cell,pri_th,dS,eqn) { Thread *mix_th, *sec_th; real m_dot_v; mix_th = THREAD_SUPER_THREAD(pri_th); sec_th = THREAD_SUB_THREAD(mix_th,1); /*m_dot_v=0.0;*/ if(C_T(cell, mix_th) >= T_SAT) { m_dot_v = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th)  T_SAT)/T_SAT; dS[eqn] = 0.0; } if(C_T(cell, mix_th) <= T_SAT) { m_dot_v = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT  C_T(cell,pri_th))/T_SAT; dS[eqn] = 0.1*C_R(cell, pri_th)*fabs(C_T(cell, pri_th)  T_SAT)/T_SAT; } return m_dot_v; } DEFINE_SOURCE(liq_src, cell, sec_th, dS, eqn) { Thread * mix_th, *pri_th; real m_dot_l; mix_th = THREAD_SUPER_THREAD(sec_th); pri_th = THREAD_SUB_THREAD(mix_th, 0); /*m_dot_l=0.0;*/ if(C_T(cell, mix_th) >= T_SAT) { m_dot_l = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th)  T_SAT)/T_SAT; dS[eqn] = 0.1*C_R(cell, sec_th)*fabs(C_T(cell, sec_th)  T_SAT)/T_SAT; } if(C_T(cell, mix_th) <= T_SAT) { m_dot_l = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT  C_T(cell,pri_th))/T_SAT; dS[eqn] =0.0; } return m_dot_l; } DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn) { Thread *pri_th, *sec_th; real m_dot; pri_th = THREAD_SUB_THREAD(mix_th, 0); sec_th = THREAD_SUB_THREAD(mix_th, 1); if(C_T(cell, mix_th) >= T_SAT) { m_dot = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*fabs(C_T(cell, sec_th)  T_SAT)/T_SAT; dS[eqn] = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)*LAT_HT/T_SAT; } if(C_T(cell, mix_th) <= T_SAT) { m_dot = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*fabs(T_SAT  C_T(cell,pri_th))/T_SAT; dS[eqn] = 0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)*LAT_HT/T_SAT; } return LAT_HT*m_dot; } I'm so confuse that what I should do. I'll be very very thankful for your valuable help. 

December 15, 2015, 04:33 
3D Case

#2  
Member
Nazim
Join Date: Oct 2013
Posts: 93
Rep Power: 12 
Did you got the results bro. And how can i change this to 3D case. Thank you
Quote:


December 15, 2015, 23:19 

#3 
Member
Ram Kumar Pal
Join Date: Apr 2015
Posts: 38
Rep Power: 11 
I have not got any results till now, but I think there will be no change in udf for 3D case.


December 15, 2015, 23:33 

#4 
Member
Nazim
Join Date: Oct 2013
Posts: 93
Rep Power: 12 

December 16, 2015, 02:02 

#5 
Member
Ram Kumar Pal
Join Date: Apr 2015
Posts: 38
Rep Power: 11 
Thanks Brother,
I'm also doing this problem. I have read UDF manual carefully. Now I'm trying to update UDf. I'll also inform you, if there is any upgradations in results. Thanks 

June 17, 2016, 08:56 

#6  
New Member
SHUJAN
Join Date: Jun 2016
Posts: 17
Rep Power: 10 
Quote:
Hi. Did you make your udf work, and did you get condensation? Can you share your final udf wih me ? 

January 22, 2017, 02:10 

#7 
New Member
mehrdad
Join Date: Oct 2015
Posts: 3
Rep Power: 10 
Hi
I'm trying to simulate thermosyphon. But when the UDF read, and I want to run, the following error was printed! please help FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. my email: zakizadeh.ac@gmail.com 

January 27, 2017, 23:00 

#8 
Member
Ram Kumar Pal
Join Date: Apr 2015
Posts: 38
Rep Power: 11 
Dear friends, currently I'm not working on this project. Perhaps my udf was working, but not coming realistic results. I want to complete this project, but unfortunately currently I'm not in research institution. This project requires commercial ANSYS software.


Tags 
mass transfer, phase change udf, pulsating heat pipe. 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF  acasas  CFD Freelancers  1  January 23, 2015 07:26 
I want to Change Values in Existing UDF to Match my Model  mamkol  Fluent UDF and Scheme Programming  1  April 26, 2013 02:57 
phase change modeling  Danial Q  Main CFD Forum  0  April 5, 2012 01:14 
Two phase flow with phase change  Ahmad AlZoubi  CFX  1  November 26, 2008 03:59 
How to model the solidfluid phase change in CFX  ohrmond  CFX  2  May 26, 2006 06:27 