CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Boiling and Condensation (Phase Change) UDF (https://www.cfd-online.com/Forums/fluent-udf/120551-boiling-condensation-phase-change-udf.html)

Bin July 9, 2013 11:02

Boiling and Condensation (Phase Change) UDF
 
Hi all,

I'm new to ANSYS fluent, but I need to write udf for phase change including boiling and condensation in VOF model (which I think is a very difficult task for a newcomer like me). I had read through ANSYS UDF guide for some brief ideas. The following is what I think I need to write in the UDF after those readings (correct me if i'm wrong):

1. Define source terms in both liquid and vapor phases;
2. Define the mass transfer macro(where phase changes occur).

Is this correct? If I'm wrong what should I focus on? Any suggestions and advice are highly appreciate.

Best regards,
Bin

aayushjain27 February 5, 2015 05:08

Hello friend i am trying to do the same. Have you got it done with this??

MDSHUJAN June 17, 2016 09:26

Quote:

Originally Posted by Bin (Post 438708)
Hi all,

I'm new to ANSYS fluent, but I need to write udf for phase change including boiling and condensation in VOF model (which I think is a very difficult task for a newcomer like me). I had read through ANSYS UDF guide for some brief ideas. The following is what I think I need to write in the UDF after those readings (correct me if i'm wrong):

1. Define source terms in both liquid and vapor phases;
2. Define the mass transfer macro(where phase changes occur).

Is this correct? If I'm wrong what should I focus on? Any suggestions and advice are highly appreciate.

Best regards,
Bin

Yes, you are right. You can do both way

SACHIN1639 July 21, 2016 09:44

#include "udf.h"
#include "sg_mphase.h"
#define T_SAT 373
#define LAT_HT 1.e3
DEFINE_SOURCE(liq_src, cell, pri_th, dS, eqn)
{
Thread *mix_th, *sec_th;
real m_dot_l;
mix_th = THREAD_SUPER_THREAD(pri_th);
sec_th = THREAD_SUB_THREAD(mix_th, 1);
if(C_T(cell, mix_th)>=T_SAT)
{
m_dot_l = -0.1*C_VOF(cell, pri_th)*C_R(cell, pri_th)* fabs(C_T(cell, mix_th) - T_SAT)/T_SAT;
dS[eqn] = -0.1*C_R(cell, pri_th)*fabs(C_T(cell, mix_th) - T_SAT)/T_SAT;
}
else
{
m_dot_l = 0.1*C_VOF(cell, sec_th)*C_R(cell, sec_th)* fabs(T_SAT-C_T(cell,mix_th))/T_SAT; dS[eqn] = 0
}
return m_dot_l;
}

zakizadeh January 22, 2017 03:10

1 Attachment(s)
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


All times are GMT -4. The time now is 13:10.