|
[Sponsors] |
Error: receive a fatal signal(Segmentation fault) |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Nate Lau
Join Date: Mar 2016
Posts: 33
Rep Power: 11 ![]() |
I wirte UDF to get momentum flux in x direction on a face after each iteration. However, it shows error: receive a fatal signal(Segmentation fault). Error Object: #f and it cannot continue. Could any one tell me where is the mistake(k-e, series)? Thanks.
#include "udf.h" DEFINE_EXECUTE_AT_END(momentumxflux) { real mf=0; Domain *d; Thread *t; face_t f; thread_loop_f(t,d) { begin_f_loop(f,t) mf+=F_FLUX(f,t)*F_U(f,t); end_f_loop(f,t) } printf("Momentum flux on this face is: %g\n", mf); } |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
Quote:
Two relevant lines from the code: Code:
Domain *d; Code:
thread_loop_f(t,d) And actually, you don't want to loop through all threads. You want to have only one thread: the face that you are interested in. You need to find a way to specify this face, look in the help for this. |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Nate Lau
Join Date: Mar 2016
Posts: 33
Rep Power: 11 ![]() |
Yes, I revised the code and it works! Thank you.
|
|
![]() |
![]() |
![]() |
Tags |
fluent - udf, fluent 14 to fluent 15., momentum, segmentation fault, udf and programming |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluentError: received a fatal signal (Segmentation fault). | thomaszhangjing | Fluent UDF and Scheme Programming | 11 | January 13, 2021 10:37 |
a fatal signal (segmentation fault) | Turbo_hrf | Fluent UDF and Scheme Programming | 4 | September 14, 2017 10:35 |
Fluent error: Fatal error (Segmentation fault) | shufang | FLUENT | 2 | April 20, 2015 08:06 |
receive fluent received a fatal signal (Segmentation fault). | chenkaiqe | FLUENT | 2 | March 10, 2015 09:21 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |