|
[Sponsors] |
October 21, 2021, 10:45 |
Udf
|
#1 |
New Member
AHMED KANDIL
Join Date: Oct 2021
Posts: 14
Rep Power: 5 |
Last edited by Ahmed kandil; October 21, 2021 at 14:20. |
|
October 21, 2021, 13:52 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Homework for which course?
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
October 22, 2021, 07:40 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you may find the example to start with in anays fluent customization manual
look for DEFINE_ON_DEMAND
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 22, 2021, 07:40 |
|
#4 |
New Member
AHMED KANDIL
Join Date: Oct 2021
Posts: 14
Rep Power: 5 |
I don’t understand what you mean ..
|
|
October 22, 2021, 15:09 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
1. Open the manual.
2. Look for DEFINE_ON_DEMAND 3. Read, and find out how close this example is to your problem. 4. Try to make the necessary changes, test your resulting UDF. 5. If it does not work like you want, show what you tried and what the outcome was.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
October 30, 2021, 10:48 |
this UDF i do it to work as the follow
|
#6 |
New Member
AHMED KANDIL
Join Date: Oct 2021
Posts: 14
Rep Power: 5 |
I do it to calculate inlet temp based on outlet temperature but there are a large divergence has occurred so what is the problem ?
i need from this code inlet and outlet temp for 252000 second. the first assumption for inlet temp=288.15k and this temp will reduced as fluid pass through borhole and the outlet temp used again to calculate inlet temp from heating equation and still working to decrease error and give accurate outlet and inlet temp. noted that ID=17 is outlet temp. #include "udf.h" #define Q 5600 #define m 0.248 #define Cp 4200 #define stop_time 252000 real ave_T; DEFINE_ADJUST(temp_ave, domain) { int ID = 17; int i=0; real total_temp = 0; real T; Thread *thread = Lookup_Thread(domain, ID); face_t face; begin_f_loop(face, thread) { T = F_T(face, thread); total_temp = total_temp + T; i = i + 1; } end_f_loop(face, thread) ave_T = total_temp / i ; printf("outlet average of temp : %f\n" , ave_T); } DEFINE_PROFILE(Temp_inlet,t,i) { face_t f; real current_time; current_time=CURRENT_TIME; if (current_time < stop_time) { begin_f_loop(f,t) { F_PROFILE(f,t,i)= (Q/(m*Cp)) + ave_T; } end_f_loop(f,t) } else { begin_f_loop(f,t) { F_PROFILE(f,t,i)= 288.15; } end_f_loop(f,t) } } this the error[erature using GMRES to enhance linear solver robustness. Divergence detected in AMG solver: temperature turbulent viscosity limited to viscosity ratio of 1.000000e+05 in 56612 cells outlet average of temp : -nan(ind) Divergence detected in AMG solver: temperatureoutlet average of temp : -nan(ind) Divergence detected in AMG solver: temperatureoutlet average of temp : 5000.000000 Divergence detected in AMG solver: temperatureoutlet average of temp : -nan(ind) Divergence detected in AMG solver: temperatureoutlet average of temp : -nan(ind) Divergence detected in AMG solver: temperatureoutlet average of temp : -nan(ind) Divergence detected in AMG solver: temperature Error at host: floating point exception Error at Node 0: floating point exception Error at Node 1: floating point exception Error at Node 2: floating point exception Error at Node 3: floating point exception Error at Node 4: floating point exception Error at Node 5: floating point exception Error at Node 6: floating point exception ===============Message from the Cortex Process================================ Compute processes interrupted. Processing can be resumed. ================================================== ============================ Error: floating point exception Error Object: #f Registering Udf, ("F:\Eng.Ahmed Kandiel\UDF.c") Calculation complete.] |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for one dimensional linear motion based on force | maccheese | Fluent UDF and Scheme Programming | 2 | September 1, 2019 03:18 |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 13:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |