|
[Sponsors] |
March 6, 2023, 11:58 |
(Evaporation) Mass Transfer UDF
|
#1 |
New Member
D20125511
Join Date: Oct 2022
Posts: 3
Rep Power: 3 |
Hello there,
I'm performing a 2D axisymmetric simulation - droplet evaporation in Ansys Fluent 2023 R1. I've prepared the udf and defined every parameter as per the requirement, however, whenever I go for initialization, I receive the following errors: Process 19816: Received signal SIGSEGV. = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = RANK 0 PID 4568 RUNNING AT Maxcore = EXIT STATUS: -1 (ffffffff) The fl process could not be started. Reference UDF: Code:
/******************************************************** DEFINITION OF MASS SOURCE TERM FOR LIQUID PHASE *******************************************************/ DEFINE_SOURCE(liq_src, c, t, ds, eqn) { #if !RP_Host real m_dot_l, T_sat; real vol = C_VOLUME(c, t); //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD Thread *pt = THREAD_SUB_THREAD(t, 0); //PRIMARY PHASE THREAD Thread *st = THREAD_SUB_THREAD(t, 1); //SECONDARY PHASE THREAD if (C_VOF(c, t) < 0.99 && C_VOF(c, t) > 0.01) { if (C_T(c,pt) >= T_sat) { m_dot_l = -0.1 * C_VOF(c,t) * C_R(c,t) * fabs(C_T(c,t) - T_sat) / T_sat; //LEE EVAPORATION MODEL ds[eqn] = -0.1 * C_R(c,t) * fabs(C_T(c,t) - T_sat) / T_sat; } else { m_dot_l = 0.1 * C_VOF(c,st) * C_R(c,st) * fabs(T_sat - C_T(c,pt)) / T_sat; //LEE CONDENSATION MODEL ds[eqn] = 0; } } else { m_dot_l = 0; ds[eqn] = 0; } C_UDMI(c, t, 9) = m_dot_l; return m_dot_l; #endif } /******************************************************** DEFINITION OF MASS SOURCE TERM FOR VAPOR PHASE *******************************************************/ DEFINE_SOURCE(vap_src, c, t, ds,eqn) { #if !RP_Host real m_dot_v, T_sat; real vol = C_VOLUME(c, t); //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD Thread *pt = THREAD_SUB_THREAD(t, 0); //PRIMARY PHASE THREAD Thread *st = THREAD_SUB_THREAD(t, 1); //SECONDARY PHASE THREAD if (C_VOF(c,t) < 0.99 && C_VOF(c,t) > 0.01) { if (C_T(c,pt) >= T_sat) { m_dot_v = 0.1 * C_VOF(c,t) * C_R(c,t) * fabs(T_sat - C_T(c,pt)) / T_sat; //LEE CONDENSATION MODEL ds[eqn] = 0; } else { m_dot_v = -0.1 * C_VOF(c,t) * C_R(c,t) * fabs(T_sat - C_T(c,pt)) / T_sat; //LEE CONDENSATION MODEL ds[eqn] = -0.1 * C_R(c,t) * fabs(T_sat - C_T(c,t)) / T_sat; } } else { m_dot_v = 0; ds[eqn] = 0; } C_UDMI(c, t, 10) = m_dot_v; return m_dot_v; #endif } /******************************************************** DEFINITION OF ENERGY SOURCE TERM FOR BOTH PHASES *******************************************************/ DEFINE_SOURCE(enrg_src, c, mix_th, ds, eqn) { #if !RP_Host real m_dot, T_sat, hfg; Thread *pt, *st; pt = THREAD_SUB_THREAD(mix_th, 0); st = THREAD_SUB_THREAD(mix_th, 1); if (C_VOF(c, pt) < 0.99 && C_VOF(c, pt) > 0.01) { if (C_T(c, mix_th) >= T_sat) { m_dot = -0.1 * C_VOF(c,pt) * C_R(c,pt) * fabs(C_T(c,pt) - T_sat) / T_sat; //LEE EVAPORATION MODEL ds[eqn] = -0.1 * C_VOF(c,pt) * C_R(c,pt) / T_sat; } } else { m_dot = 0.1 * C_VOF(c,st) * C_R(c,st) * fabs(T_sat - C_T(c,mix_th)) / T_sat; //LEE CONDENSATION MODEL ds[eqn] = -0.1 * C_VOF(c,st) * C_R(c,st) / T_sat; } else { m_dot = 0; ds[eqn] = 0; } C_UDMI(c, t, 11) = m_dot; return hfg * m_dot; #endif } |
|
January 26, 2024, 03:59 |
|
#2 | |
New Member
Bidax
Join Date: Dec 2023
Posts: 10
Rep Power: 2 |
Quote:
have you solve the problem? |
||
February 4, 2024, 07:27 |
|
#3 |
Member
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7 |
T_sat has no definition. It is declared as a real, but has no definition, and so I is used initialised resulting in errors.
I would suggest using the temperature explicit form of the Antoine equation to work out what the saturation temperature is of each cell. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with Saturation Temperature UDF and mass transfer UDF | SteffenBcfd | Fluent UDF and Scheme Programming | 12 | February 4, 2024 07:43 |
UDF for mass transfer from DPM to continuous phase | mpcaixeta | Fluent UDF and Scheme Programming | 0 | September 22, 2022 10:52 |
How UDF can be define for local volumetric mass transfer coefficients in packed bed a | John zink | FLUENT | 0 | February 19, 2022 14:07 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 05:15 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | FLUENT | 0 | August 19, 2010 03:01 |