|
[Sponsors] |
Error: udf received a fatal signal(segmentation fault) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 7, 2017, 10:56 |
Error: udf received a fatal signal(segmentation fault)
|
#1 |
New Member
Bob
Join Date: Dec 2016
Posts: 3
Rep Power: 9 |
Dear all,
when I try to use the following udf code to define droplet diameter, the 'error: udf received a fatal signal(segmentation fault)' is appeared. DEFINE_PROPERTY(droplet_diam, c, mix_th) { real bubble_diam; real max_size,min_size; real vg; real Reg; Thread *pri_th, *sec_th; pri_th = THREAD_SUB_THREAD(mix_th,0); sec_th = THREAD_SUB_THREAD(mix_th,1); max_size=1e-1; min_size=1e-6; vg=sqrt(pow(C_U(c,pri_th),2)+pow(C_V(c,pri_th),2)+ pow(C_W(c,pri_th),2));// vapor_v Reg=C_R(c,pri_th)*vg*0.008/C_MU_EFF(c,pri_th);// Reynolds number bubble_diam=0.00796*0.026/C_R(c,pri_th)/pow(C_VOF(c,pri_th)*vg,2)*pow(Reg,2/3)*pow(C_R(c,pri_th)/C_R(c,sec_th),-1/3)*pow(C_MU_EFF(c,pri_th)/C_MU_EFF(c,sec_th),2/3); if (bubble_diam > max_size) { bubble_diam = max_size; } else if (bubble_diam < min_size) { bubble_diam = min_size; } return bubble_diam; } |
|
February 7, 2017, 11:36 |
|
#2 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 9 |
Not easy to see what it could be caused, but some advices:
1. Check the correctness of your formula. There's a lot of multiplications and divisions in the bubble_diam equation and I don't see any brackets so it may not be doing what you'd want it to do. 2. Change powers such as 2/3 to their real counterparts, i.e., 2./3., otherwise you'll just get 0. 3. Include messages, or print statements, so you can see at what line it crashes. |
|
February 8, 2017, 04:54 |
|
#3 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You are asking information from Fluent (with the macro's "C_U(c,pri_th)" and so on).
At least one of them is not present in your model. To find out which one it is: replace them one by one by a number (for example 2.3), and see if the same error still occurs. If the error disappears, you have found the problematic macro. How to fix the problem, depends on which macro is the problem. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluentError: received a fatal signal (Segmentation fault). | thomaszhangjing | Fluent UDF and Scheme Programming | 11 | January 13, 2021 10:37 |
Fluent udf Error: received a fatal signal (Segmentation fault) | syble | FLUENT | 3 | December 9, 2016 17:28 |
Wave Tank Numerical Beach Error: received a fatal signal (Segmentation fault) | Shyam Kaushik | Fluent Multiphase | 0 | November 15, 2016 14:59 |
received a fatal signal(segmentation fault) | kihoon1214 | Fluent UDF and Scheme Programming | 1 | April 28, 2016 09:26 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |