|
[Sponsors] |
May 11, 2017, 15:11 |
Segmentation fault
|
#1 |
Member
sebastian bergman
Join Date: Mar 2017
Location: seattle
Posts: 52
Rep Power: 9 |
Experiencing a weird problem. solving for simple conduction based solidification.
#include "udf.h" DEFINE_EXECUTE_AT_END(temp_gradient) { Domain *d; Thread *t; cell_t c; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,1) = C_T_M1(c,t); } end_c_loop(c,t) } } in the above code I am getting segmentation fault. if I change C_T_M1(c,t) to C_T(c,t) I wont get any fault and solution will proceed. any idea what might be the reason. |
|
May 12, 2017, 08:39 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
In cases like this, the first thing you look to is the manual. There I looked for "C_T_M1", to see what the manual says about it. Only one page says something about C_T_M1, and this says:
Quote:
(By the way: the name "temp_gradient" suggests that you want to calculate the temperature gradient. But the code looks for the temperature at the previous time step. So your code is wrong, or your name is misleading.) |
||
May 12, 2017, 09:23 |
|
#3 |
Member
sebastian bergman
Join Date: Mar 2017
Location: seattle
Posts: 52
Rep Power: 9 |
thank you.
that solved the problem. also as you have noted the name is misleading. my ultimate aim is to calculate gradient hence the name of udf is as such. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 22:59 |
Segmentation fault in SU2 V5.0 | ygd | SU2 | 2 | March 1, 2017 05:38 |
Segmentation fault when running in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 8, 2015 09:12 |
Segmentation Fault w/ compiled OF 2.2.0 - motorBike example | sudo | OpenFOAM Running, Solving & CFD | 3 | April 2, 2013 18:27 |
segmentation fault when installing OF-2.1.1 on a cluster | Rebecca513 | OpenFOAM Installation | 9 | July 31, 2012 16:06 |