|
[Sponsors] |
May 1, 2018, 19:01 |
Multiphase UDF problem
|
#1 |
New Member
Lukas
Join Date: Mar 2018
Posts: 6
Rep Power: 8 |
Hello,
I am simulating liquid-gas muliphase flow. I need a UDF to define the bubble diameter for the gas phase. I can interpret the UDF, but after initialization I get this error message: "Node X: Process 11780: Received signal SIGSEGV" Something is going wrong in the part of the code that is calling the properties of the primary and secondary phases. Thank you for responding. UDF: #include "udf.h" DEFINE_PROPERTY(BubbleDiameter, c, mixture_thread) { real BD; /* Bubble diameter */ int SurfaceTension; int PhaseOneIndex = 0; int PhaseTwoIndex = 1; real DensS; /* S = primary (liquid) phase */ real DensG; /* G = secondary (gas) phase */ real XVelS; real XVelG; real YVelS; real YVelG; real ZVelS; real ZVelG; real EffViscG; Thread *p1 = THREAD_SUB_THREAD(mixture_thread,PhaseOneIndex); Thread *p2 = THREAD_SUB_THREAD(mixture_thread,PhaseTwoIndex); DensS = C_R(c,p1); /* density liquid */ DensG = C_R(c,p2); /* density gas */ XVelS = C_U(c,p1); /* x velocity liquid */ XVelG = C_U(c,p2); /* x velocity gas */ YVelS = C_V(c,p1); /* y velocity liquid */ YVelG = C_V(c,p2); /* y velocity gas */ ZVelS = C_W(c,p1); /* z velocity liquid */ ZVelG = C_W(c,p2); /* z velocity gas */ EffViscG = C_MU_EFF(c,p1); /* effective viscosity of the gas phase */ SurfaceTension = 1.76; BD = XXX ; /* HERE WILL BE MY FORMULA */ return BD; } |
|
May 2, 2018, 13:27 |
|
#2 | |
New Member
Star
Join Date: Apr 2018
Posts: 3
Rep Power: 8 |
Quote:
|
||
May 2, 2018, 20:51 |
|
#3 | |
New Member
Lukas
Join Date: Mar 2018
Posts: 6
Rep Power: 8 |
Quote:
The solution that I found was to first look up the mixture_thread with THREAD_SUPER_THREAD(p2), in which p2 is the thread of the secondary phase, that was passed by the solver through the DEFINE_PROPERTY macro. Then, in a next step, I define the thread of the primary phase by using the macro THREAD_SUB_THREAD(mixture_thread,0). Of course, it is not needed to explicitly lookup the thread of the secondary phase with THREAD_SUB_THREAD(mixture_thread,1), because it was already passed to the UDF by the solver. Unfortunately, I do not have a UDF for terminal velocity. I never used this. Regards Last edited by Sijnhaven; May 8, 2018 at 12:08. |
||
May 8, 2018, 11:59 |
|
#4 |
Member
tahir
Join Date: May 2010
Posts: 35
Rep Power: 16 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem accessing material properties in UDF for Multiphase Multispecies | pmtgt | Fluent Multiphase | 3 | January 17, 2021 08:11 |
Mesh UDF problem | kornetka | Fluent UDF and Scheme Programming | 4 | July 25, 2013 07:54 |
Help! Compiled UDF problem 4 Wave tank tutorial | Shane | FLUENT | 1 | September 3, 2010 03:32 |
UDF using problem, error happens-heip!! | Michael | FLUENT | 1 | December 9, 2008 08:51 |
UDF variables F1, y / problem with UDF | Fabian | FLUENT | 6 | June 2, 2003 11:22 |