|
[Sponsors] |
October 14, 2014, 06:05 |
compiling problem of a mass transfer udf
|
#1 |
Member
majid kamyab
Join Date: Jul 2014
Posts: 32
Rep Power: 12 |
Hello
please help I have asked some CFD experts in my faculty about compiling and I have used both visual studio 2010 and 2013 so I know the routine compiling method I have tried on many computers and many people in our faculty have tried to compile it but all of the attempts were all unsuccessful my system type is 64-bit OS I have interpreted the code and there are no problems in interpreting but calculation diverges due to floating point exception the error is The UDF library that you are trying to load (libudf) is not compiled for parallell use on the current platform (win64) the operation completed successfully E:\MESH\udf\libudf\win64\3ddp_host\libudf.dll here is the code #include "udf.h" DEFINE_MASS_TRANSFER(mass_tran, c, t, from_index, from_species_index, to_index, to_species_index) { Thread *gas = THREAD_SUB_THREAD(t, to_index); Thread *liq = THREAD_SUB_THREAD(t, from_index); real m_lg, k_l, dal, usg, kappa, m, c_sat, a; dal = 1.46*0.000000001; usg = 0.294188; kappa = 0.000484011 / 748; m = 1.204; a = 2.287843; k_l = 2 * sqrt((dal / 3.1415)*sqrt(usg*9.8 / kappa)); m_lg = k_l*a*(C_YI(c, liq, from_species_index) - m*C_YI(c, gas, to_species_index)); return (m_lg); } |
|
October 14, 2014, 06:42 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
If you see:
Quote:
Something went wrong when you tried to compile it. Look at the text that was written on the screen when you tried to compile, that will give a hint about what was wrong. |
||
October 14, 2014, 08:10 |
|
#3 | |
Member
majid kamyab
Join Date: Jul 2014
Posts: 32
Rep Power: 12 |
Quote:
Ive found the problem. the udf file was saved in this form masstr.C but it must be saved in this form masstr.c please note that the c must be written in lowercase. |
||
October 14, 2014, 08:17 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Good that you found it. But for next time: it is more useful to include the error you get when compiling, than to include the error you get when loading.
|
|
October 14, 2014, 08:48 |
|
#5 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
So, this means that .C (uppercase) can be interpreted but not compiled?
|
|
October 14, 2014, 12:47 |
|
#6 |
Member
majid kamyab
Join Date: Jul 2014
Posts: 32
Rep Power: 12 |
||
October 14, 2014, 12:50 |
|
#7 |
Member
majid kamyab
Join Date: Jul 2014
Posts: 32
Rep Power: 12 |
well I could have interpreted it ... It did not work correctly and diverged due to floating point exception. as I am not a programmer or computer engineer I cant say for sure but why do we have to risk when we know .c is correct
|
|
October 14, 2014, 12:51 |
|
#8 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
You wrote:
I have interpreted the code and there are no problems in interpreting I'm assuming you interpreted the .C (uppercase file). Then you wrote that when you compiled the .C file you had error. So this means the .C uppercase extension file can be successfully interpreted but not compiled? PS: Floating point error is independent from successfully interpreting/compiling. |
|
October 15, 2014, 03:41 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
October 15, 2014, 11:18 |
|
#10 | |
Member
majid kamyab
Join Date: Jul 2014
Posts: 32
Rep Power: 12 |
Quote:
|
||
Tags |
compile a udf, compile error, compile problems |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using define mass transfer udf for cavitation | Komon | Fluent UDF and Scheme Programming | 14 | June 21, 2016 03:50 |
udf for mass transfer | hane | Fluent UDF and Scheme Programming | 1 | April 19, 2014 14:40 |
Problem with compiling the UDF | raghu mohan | Fluent UDF and Scheme Programming | 10 | December 17, 2011 00:34 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | Main CFD Forum | 0 | August 19, 2010 04:01 |
UDF compiling problem in Flient 6.3 | jeevan kumar | FLUENT | 2 | February 25, 2009 01:43 |