|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
hi everybody
im using udf in simulation and i wrote it from help examples bud when i want to initilize or calculate my projet i get this error chip-exec: unsteady_velocity: wrong return type: float udf function expected Error: received a fatal signal (Segmentation fault). Error: received a fatal signal (Segmentation fault). Error Object: #f could you please help me? this is my udf #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { if (t<10) F_PROFILE(f, thread, position) = 50*t; else F_PROFILE(f, thread, position) = 500; } end_f_loop(f, thread) } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9 ![]() |
#include "udf.h"
DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { if (t<10) { F_PROFILE(f, thread, position) = 50*t; } else { F_PROFILE(f, thread, position) = 500; } } end_f_loop(f, thread) } |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
Quote:
![]() |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 ![]() |
what happens if you use this?
Code:
{ F_PROFILE(f, thread, position) = 50.0*t; } else { F_PROFILE(f, thread, position) = 500.0; } |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
it still has this error kalium
Error: received a fatal signal (Segmentation fault). Error Object: #f |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9 ![]() |
but is the "chip-exec: unsteady_velocity: wrong return type: float udf function expected" part still there?
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
No it doesn't have that error thank you😊but
it still has this error Error: received a fatal signal (Segmentation fault). Error Object: #f |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9 ![]() |
What if, instead of
real t = CURRENT_TIME; you put real t = 1; Does that still give you still give you the errors?? Basically I can only recommend commenting parts of the code out until you find exactly which part causes the error. The "segmentation error" is a very ambiguous error unfortunately. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
i changed it to real t =1 but still have segmentation fault
Updating solution at time level N...chip-exec: unsteady_velocity: wrong return type: float udf function expected Error: received a fatal signal (Segmentation fault). ![]() |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9 ![]() |
Oh sorry, I meant 1.0 to keep it as a float. But it probably wont matter that much. Maybe do something like:
#include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real time; begin_f_loop(f, thread) { time=1.0; if (t<10.0) { F_PROFILE(f, thread, position) = 50.0*t; } else { F_PROFILE(f, thread, position) = 500.0; } } end_f_loop(f, thread) } If this works, you could change: time=1.0; to time=CURRENT_TIME; Other than that I have ran out of ideas, I have used F_PROFILE many times and there is nothing wrong with the way you're using that. |
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
maryam
Join Date: Jul 2017
Posts: 10
Rep Power: 9 ![]() |
it doesnt work
thank you best wishes ![]() |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
sadik
Join Date: Feb 2018
Posts: 7
Rep Power: 9 ![]() |
Hello every one,
I am Ansys Fluent to simulate heat flux on the cylindrical pipe and I use the following codes but after a successful interpretation I calculate but have this error. chip-exec: heat flux wrong return type: void udf function expected error: received a fatal (segmentation fault). error object: # f anticipate your kind help. The codes are: #include "udf.h" #include "sg.h" DEFINE_ON_DEMAND(copy_uds_to_udm) { Domain*d=Get_Domain(1); Thread*t; cell_t c; thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,0)=C_UDSI(c,t,0); } end_c_loop(c,t) } return; } DEFINE_SOURCE(heat_flux, c, t, dS, eqn) { real source; dS[eqn] = 0.0; source = C_UDMI(c,t,0); return source; } please can someone help me |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 ![]() ![]() |
what a re you trying to do?
what do these lines mean? Code:
C_UDMI(c,t,0)=C_UDSI(c,t,0); source=C_UDMI(c,t,0); If source is not define, than the scalar is not define - > UDSI_0 is not defined. So you got segmentation error, which means some variable is not defined. best regards |
|
![]() |
![]() |
![]() |
![]() |
#14 | ||
New Member
sadik
Join Date: Feb 2018
Posts: 7
Rep Power: 9 ![]() |
Thank you AlexanderZ for the response
I have multiple nonuniform data points in XYZ and want to hook the data on surfaces body. Quote:
As for the second line is to hook the stored values from Memory to solid cell zone. Quote:
|
|||
![]() |
![]() |
![]() |
Tags |
ansys, error, fluent, segmentaion fault, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |