|
[Sponsors] |
June 17, 2023, 11:49 |
[FLUENT UDF] Received signal SIGSEGV
|
#1 |
New Member
Join Date: Mar 2021
Posts: 25
Rep Power: 5 |
Hi all,
Recently I was trying to run a simulation with UDF. The UDF contains 4 functions as below: Code:
#include "udf.h" DEFINE_MASS_TRANSFER(ammonia_con, cell, thread, from_index, from_species_index, to_index, to_species_index) { real rate; Thread *gas = THREAD_SUB_THREAD(thread, from_index); Thread *liquid = THREAD_SUB_THREAD(thread, to_index); real temp = C_T(cell, gas); rate = 0.; if (temp >= -20.0 && temp <= 20.0) { rate = -0.2056*temp*temp - 0.5981*temp + 9.9534; } if ((rate == 0. ) && (temp > 20.0)) { rate = 0; } return (rate); } DEFINE_MASS_TRANSFER(ammonia_eva, cell, thread, from_index, from_species_index, to_index, to_species_index) { real rate; Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *gas = THREAD_SUB_THREAD(thread, to_index); real temp = C_T(cell, liq); rate = 0.; if (temp >= 25.0 && temp <= 140.0) { rate = 0.0173*temp*temp + 1.931*temp + 3.5726; } if ((rate == 0. ) && (temp < 25.0)) { rate = 0; } return (rate); } DEFINE_MASS_TRANSFER(water_con, cell, thread, from_index, from_species_index, to_index, to_species_index) { real rate; Thread *gas = THREAD_SUB_THREAD(thread, from_index); Thread *liq = THREAD_SUB_THREAD(thread, to_index); real temp = C_T(cell, gas); rate = 0.; if (temp >= -20.0 && temp <= 20.0) { rate = 0.3435*temp*temp + 6.9549*temp + 78.262; } if ((rate == 0. ) && (temp > 20.0)) { rate = 0; } return (rate); } DEFINE_MASS_TRANSFER(water_eva, cell, thread, from_index, from_species_index, to_index, to_species_index) { real rate; Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *gas = THREAD_SUB_THREAD(thread, to_index); real temp = C_T(cell, liq); rate = 0.; if (temp >= 25.0 && temp <= 140.0) { rate = 0.0195*temp*temp + 0.5216*temp; } if ((rate == 0. ) && (temp < 25.0)) { rate = 0; } return (rate); } Code:
Node 0 Fatal signal raised sig = Segmentation fault aa053010 CX_Primitive_Error 9c08b8f0 log2f aa0f5a20 logical_right_shift 98f6ec30 _C_specific_handler 9ecb3bd0 _chkstk 9ec2d9c0 RtlFindCharInUnicodeString 9ecb2cc0 KiUserExceptionDispatcher a8c061b0 init_cell_vector aa0f5a20 logical_right_shift a7d48550 Calculate_Mass_Transfer a79fea10 Init_Face_Flux a7a10c00 Init_Flow a72b5fc0 Delay_Error aa0e0250 eval a72a7e50 PRF_Command_Start a72aa570 PRF_Node_repl a72b5fc0 Delay_Error aa0f5a20 logical_right_shift 9d3b2690 BaseThreadInitThunk 9ec6a9d0 RtlUserThreadStart Node 0 Fatal signal raised sig = Segmentation fault 2e673010 CX_Primitive_Error 6473b8f0 log2f 2e715a20 logical_right_shift 4782ec30 _C_specific_handler 670d3bd0 _chkstk 6704d9c0 RtlFindCharInUnicodeString 670d2cc0 KiUserExceptionDispatcher 2d2261b0 init_cell_vector 2e715a20 logical_right_shift 2c368550 Calculate_Mass_Transfer 2c01ea10 Init_Face_Flux 2c030c00 Init_Flow 2b8d5fc0 Delay_Error 2e700250 eval 2b8c7e50 PRF_Command_Start 2b8ca570 PRF_Node_repl 2b8d5fc0 Delay_Error 2e715a20 logical_right_shift 65f82690 BaseThreadInitThunk 6708a9d0 RtlUserThreadStart Error [node 0] [time 6/17/23 23:38:49] Abnormal Exit! Thanks in advance. |
|
Tags |
fluent - udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Node xx: Process: xx received signal SIGSEGV | kds | Fluent UDF and Scheme Programming | 1 | February 4, 2023 10:40 |
Received signal SIGSEGV and BAD TERMINATION | ali.ashouri | Fluent UDF and Scheme Programming | 1 | September 21, 2022 00:31 |
Process 10300: Received signal SIGSEGV | metaliat93 | FLUENT | 2 | January 28, 2020 00:53 |
error: Received signal SIGSEGV | ianziti92 | Fluent UDF and Scheme Programming | 2 | December 5, 2018 16:25 |
define_wall_functions density and dynamic viscosity | Ionut G | Fluent UDF and Scheme Programming | 3 | March 15, 2017 10:10 |