|
[Sponsors] |
How to edit a single phase UDF for a multiphase case? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2020, 05:02 |
How to edit a single phase UDF for a multiphase case?
|
#1 |
New Member
Mat
Join Date: Jan 2017
Posts: 23
Rep Power: 9 |
In the first case (single phase case) liquid enters the tube and absorbs heat energy which is produced by the solid region. There is no phase change happening here. The following UDF is used to calculate the source term in single phase flow. The UDF works correctly.
#include "udf.h" DEFINE_EXECUTE_AT_END(s_calculation) { Domain *d=Get_Domain(1); int zone_id=6; Thread *t = Lookup_Thread(d,zone_id); cell_t c; thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,0)=C_T(c,t)*0.25; } end_c_loop(c,t) } } DEFINE_SOURCE(energy, c, t, dS, eqn) { real x[ND_ND]; real source; source =1680000*C_UDMI(c,t,0); dS[eqn] = 0; return source; } In second case, liquid enters the tube and undergoes phase change due heat addition. How to rewrite the above UDF for this multiphase case. am getting some segmentation fault at the end of the first timestep when using the same UDF for multiphase flow. I think i am unable to access the correct the solid zone. |
|
Tags |
energy source udf, multiphase flow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viscous dissipation UDF for multiphase DDPM (Divergence problem) | bhargavbharathan | FLUENT | 0 | November 30, 2016 13:23 |
Viscous dissipation UDF for multiphase DDPM | bhargavbharathan | Fluent Multiphase | 0 | November 30, 2016 13:17 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
Two-phase/ Single phase mix flow | Reza | Main CFD Forum | 1 | August 6, 2003 07:36 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |