|
[Sponsors] |
February 24, 2022, 12:46 |
error signal sigsegv when using C_VOLUME
|
#1 |
New Member
București
Join Date: Jan 2021
Posts: 3
Rep Power: 5 |
Hi everybody!
I have this very bothering issue with the C_VOLUME macro, as well as with the C_R(c,t). I'm using a one phase mixture model with water vapors and air and I would like to determine de partial pressure for water. For this I need to determine the volume for each cell. The issue is that every time I insert one of the following macros I receive the signal sigsegv error. Could you please help me determine the reason for this? I streamed down my code to this. #include "udf.h" #include "mem.h" DEFINE_ON_DEMAND(mass) { Domain *d = Get_Domain(1); Thread *t; int ID = 5; t = Lookup_Thread(d, ID); cell_t c; real vol; begin_c_loop(c,t) { vol = C_VOLUME(c,t); Message("%e\n", vol); } end_c_loop(c,t) } Last edited by alexandraene; February 25, 2022 at 06:23. |
|
February 25, 2022, 08:49 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
in code you've posted thread (t) is not defined
you may do following Code:
#include "udf.h" DEFINE_ON_DEMAND(mass) { Domain *d = Get_Domain(1); Thread *t; cell_t c; real vol; int zone_ID = 12; t = Lookup_Thread(d,zone_ID); begin_c_loop(c,t) { vol = C_VOLUME(c,t); Message0("%e\n", vol); } end_c_loop(c,t) }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
February 25, 2022, 08:58 |
|
#3 |
New Member
București
Join Date: Jan 2021
Posts: 3
Rep Power: 5 |
Hi! Thank you for your replay! I attach my code with the ID changed in accordance with my geometry. The issue is that I want it to show me all the volumes of the cells in ID 5, but it does not. I compile the file and then when I want to execute it I receive the signal sigsegv error. I do not know what else to do.
#include "udf.h" #include "mem.h" DEFINE_ON_DEMAND(mass) { Domain *d = Get_Domain(1); Thread *t; cell_t c; real vol; int zone_ID = 5; t = Lookup_Thread(d,zone_ID); begin_c_loop(c,t) { vol = C_VOLUME(c,t); Message0("%e\n", vol); } end_c_loop(c,t) } |
|
Tags |
cell volume, density property, sigsegv |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error SIGSEGV using VOF and UDF | JERC_UTFSM | Fluent UDF and Scheme Programming | 14 | November 8, 2021 00:17 |
Negative cell volume generated / SIGSEGV issue | michu | STAR-CCM+ | 2 | July 12, 2021 21:34 |
SIGSEGV error when running UDF | tricha122 | Fluent UDF and Scheme Programming | 2 | November 26, 2020 11:27 |
error: Received signal SIGSEGV | ianziti92 | Fluent UDF and Scheme Programming | 2 | December 5, 2018 17:25 |
define_wall_functions density and dynamic viscosity | Ionut G | Fluent UDF and Scheme Programming | 3 | March 15, 2017 11:10 |