|
[Sponsors] |
FLUENT received fatal signal (ACCESS_VIOLATION) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 21, 2013, 19:39 |
FLUENT received fatal signal (ACCESS_VIOLATION)
|
#1 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
Hi,
I wrote an UDF which fluent interprets without any errors but when initializing the solution i get: Code:
Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: #f Code:
C_T(cell, thread) Energy equation is turned on. Whole code: Code:
#include "udf.h" DEFINE_PROPERTY(gestosc_miesa, cell, thread) { real rom; real t = C_T(cell, thread); rom = 1226 - 0,56 * t; return rom; } DEFINE_PROPERTY(wsp_przew_ciepla_mieso, cell, thread) { real km; real t = C_T(cell, thread); km = 0,044 + t * 1,56 * 10^-3; return km; } DEFINE_PROPERTY(cp_miesa, cell, thread) { real cpm; real m; real t = C_T(cell, thread); //here is the problem m = 0,7; if (t < 303.) cpm = 1675 + 2510 * m; else cpm = 3000.; return cpm; } DEFINE_PROPERTY(gestosc_tluszczu, cell, thread) { real rot; real t = C_T(cell, thread); rot = 1052 - 0,377 * t; return rot; } |
|
August 22, 2013, 07:51 |
|
#3 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
It doesnt help...
I even tried this: Code:
#include "udf.h" DEFINE_PROPERTY(cp_miesa, cell, thread) { real t; if (NNULLP(THREAD_STORAGE(thread, SV_T))) t = C_T(cell, thread); else t = 300.0; /* or whatever appropriate */ return t; } What else can cause such an error? Deleting "C_T(cell, thread)" from code makes error disappear. |
|
August 22, 2013, 14:36 |
|
#5 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
Everything but
Code:
DEFINE_PROPERTY(cp_miesa, cell, thread) { real cpm; real m; real t; m = 0,7; if (NNULLP(THREAD_STORAGE(thread, SV_T))) { t = C_T(cell, thread); if (t < 303.) cpm = 1675 + 2510 * m; } else { cpm = 3000.; } return cpm; } Whole code: Code:
#include "udf.h" DEFINE_PROPERTY(gestosc_miesa, cell, thread) { real rom; real t = C_T(cell, thread); rom = 1226 - 0,56 * t; return rom; } DEFINE_PROPERTY(wsp_przew_ciepla_mieso, cell, thread) { real km; real t = C_T(cell, thread); km = 0,044 + t * 1,56 * 10^-3; return km; } DEFINE_PROPERTY(cp_miesa, cell, thread) { real cpm; real m; real t; m = 0,7; if (NNULLP(THREAD_STORAGE(thread, SV_T))) { t = C_T(cell, thread); if (t < 303.) cpm = 1675 + 2510 * m; } else { cpm = 3000.; } return cpm; } DEFINE_PROPERTY(gestosc_tluszczu, cell, thread) { real rot; real t = C_T(cell, thread); rot = 1052 - 0,377 * t; return rot; } DEFINE_PROFILE (T_ot, thread, index) { int s; real tval; double tab[8547]={}; face_t f; s=RP_Get_Real("flow-time"); tval = s < 8547 ? tab[s] : tab[8546]; begin_f_loop(f, thread) { F_PROFILE(f, thread, index) = tval; } end_f_loop(f, thread); } |
|
August 22, 2013, 21:23 |
|
#6 |
Senior Member
|
You have several "C_T" in your code and only this one is wrapped by pointer-checking. When you said that the error disappear after deleting the "C_T" line, did you delete this specific "C_T" line or did you delete all the occurrence of "C_T"? If this specific line caused segmentation fault, I have no idea what is going on but I doubt it should happen.
You are French, right? Note that 0,56 1,56 0,377 should be changed to 0.56, 1.56 and 0.377, respectively. The expression "1,56 * 10^-3" should be changed to "1.56e-3". " |
|
August 23, 2013, 04:39 |
|
#7 |
New Member
Join Date: Aug 2013
Posts: 12
Rep Power: 13 |
I know it seems strange but only this specific C_T couse trouble.
I am from Poland. Thanks for your advice. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FLUENT received fatal signal (ACCESS_VIOLATION) | CHAKER | FLUENT | 4 | December 11, 2015 04:20 |
FLUENT received fatal signal (ACCESS_VIOLATION) | Mike Wong | FLUENT | 7 | October 17, 2014 14:17 |
FLUENT received fatal signal (ACCESS_VIOLATION) | rubis | Fluent UDF and Scheme Programming | 6 | April 22, 2014 16:42 |
fatal signal (ACCESS_VIOLATION) | manu | FLUENT | 0 | December 10, 2007 07:10 |
FLUENT received fatal signal (ACCESS_VIOLATION) | samy | FLUENT | 0 | November 10, 2007 14:09 |