|
[Sponsors] |
June 12, 2018, 10:08 |
"fatal signal (Segmentation fault)" error
|
#1 |
New Member
hamid
Join Date: Mar 2012
Posts: 4
Rep Power: 14 |
Hi `e` i am writing a udf code to define a mixture density that related to uds but when i want to initialize the solution this error appears: received a fatal signal (Segmentation fault)
here is my code: #include "udf.h" DEFINE_PROPERTY(cell_density,cell,thread) { Thread *t; cell_t c; real c_h2,c_n2,rh2,rn2,rmix=1,c_mix ; c_h2 = C_UDSI(c,t,0); c_n2=40.46-c_h2; rh2=c_h2*2; rn2=c_n2*28; rmix=rh2+rn2; return rmix/1000; } how can i solve the problem help me please |
|
June 12, 2018, 10:37 |
|
#2 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10 |
Dear abdihamid,
Segmentation fault means you are trying to access something that is not defined. I can’t understand why you define the thread and cell inside your udf, these two are already given by the DEFINE_PROPERTY macro. I’d suggest you try to remove the lines : “Thread *t; cell_t c;” and replace DEFINE_PROPERTY(cell_density,cell,thread) by DEFINE_PROPERTY(cell_density,c,t) Hope this will help. Good luck Annan |
|
June 12, 2018, 11:43 |
|
#3 |
New Member
hamid
Join Date: Mar 2012
Posts: 4
Rep Power: 14 |
Dear annan thank you for your help. I apply the changes you suggested but the error still reamins. i dont know how to solve it.
|
|
June 13, 2018, 21:43 |
|
#4 | |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Have you added at least one UDS to your model? Otherwise, debug your code by determining which line is causing the error.
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 07:35 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 08:24 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |