|
[Sponsors] |
April 17, 2017, 04:08 |
UDF Problem
|
#1 |
New Member
Antariksh Gupta
Join Date: Apr 2017
Posts: 3
Rep Power: 9 |
Hello,
Please look into following UDF #include "udf.h" real ts1_temp; DEFINE_EXECUTE_AT_END(temp1) { real ts1_coordinate[ND_ND]; real x1,y1,z1; cell_t c; Domain *d; Thread *t; x1=0.020; y1=0.0075; z1=0.0; d=Get_Domain(2); thread_loop_c(t,d) { begin_c_loop(c,t) { C_CENTROID(ts1_coordinate,c,t); x1=ts1_coordinate[0]; y1=ts1_coordinate[1]; z1=ts1_coordinate[2]; ts1_temp=C_T(c,t); printf("temperature_1, %g/n", ts1_temp); } end_c_loop(c,t) } } This UDF is being interpreted successfully but upon start of simulation fluent is giving error Error: received a fatal signal (Segmentation fault). Error Object: #f Please help in resolving this problem |
|
April 21, 2017, 02:12 |
|
#2 |
Member
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
Hi
you should write the line "real ts1_temp" in the main body of your code, not out of it, or if you still want to write it there (out of the body), use static real instead of real. the error "segmentation fault" usually happens because of a not identified parameter in the code. let me know if it solved your problem or not. |
|
April 25, 2017, 03:08 |
|
#3 |
New Member
Antariksh Gupta
Join Date: Apr 2017
Posts: 3
Rep Power: 9 |
Dear Davoud,
Thanks for your reply. I tried after changing to "static real" instead of "real" But now while interpreting the UDF fluent is showing parse error in the line of static real ts1_temp. Please help me with some solution. |
|
April 29, 2017, 18:05 |
Velocity UDF
|
#4 |
New Member
Nitesh Kumar
Join Date: Nov 2015
Posts: 5
Rep Power: 11 |
hi,
I am new to UDF. can anyone please help me write a udf for the plot shown in the attachment. please help. My mail ID, nitesh_n@hotmail.com. Will be grateful Plot.jpg |
|
May 2, 2017, 05:35 |
|
#5 |
Member
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
#include "udf.h"
DEFINE_EXECUTE_AT_END(temp1) { real ts1_temp; real ts1_coordinate[ND_ND]; real x1,y1,z1; cell_t c; Domain *d; Thread *t; x1=0.020; y1=0.0075; z1=0.0; d=Get_Domain(2); thread_loop_c(t,d) { begin_c_loop(c,t) { C_CENTROID(ts1_coordinate,c,t); x1=ts1_coordinate[0]; y1=ts1_coordinate[1]; z1=ts1_coordinate[2]; ts1_temp=C_T(c,t); printf("temperature_1, %g/n", ts1_temp); } end_c_loop(c,t) } } try this , i compiled it without any errors. |
|
May 2, 2017, 05:39 |
|
#6 | |
New Member
Nitesh Kumar
Join Date: Nov 2015
Posts: 5
Rep Power: 11 |
Quote:
Thank u. My plot is velocity vs time. Wat changes r reqd? Or should I upload as it is Sent from my XT1562 using CFD Online Forum mobile app |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
Problem with DPM simulation with particles injection and EXECUTE_AT_THE_END UDF. | Ari | Fluent UDF and Scheme Programming | 4 | May 31, 2016 09:51 |
udf loading problem | santu | Fluent UDF and Scheme Programming | 1 | May 22, 2015 16:47 |
Vaporization pressure UDF property problem? | lehoanganh07 | Fluent UDF and Scheme Programming | 1 | September 13, 2014 11:59 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |