|
[Sponsors] |
July 25, 2017, 17:26 |
Error Compiling UDF
|
#1 |
New Member
Allen Hammack
Join Date: Sep 2009
Posts: 7
Rep Power: 17 |
I have the attached UDF that has worked for another user but isn't working for me. I'm running Fluent on a UNIX system. When I try to interpret this UDF, I keep getting a syntax error that is said to be in Line 2. I can't seem to figure it out. Can someone help?
#include "udf.h" DEFINE_PROFILE(inflow_v, t, nv) { face_t f ; real flow_time = RP_Get_Real("flow-time"); real A = 16.999874; real v1 = 0.0; real v2 = 1034*(0.3048*0.3048*0.3048)/A; if (flow_time <= 7 ) { begin_f_loop(f,t) { F_PROFILE(f,t,nv) = -1*(v1+(v2-v1)*(flow_time-0)/7); } end_f_loop(f,t) printf("Time = %f sec. \n",flow_time); printf("Flow rate set at %f cfs \n", -1*(v1+(v2-v1)*(flow_time-0)/7)*A/(0.3048*0.3048*0.3048)); } else { begin_f_loop(f,t) { F_PROFILE(f,t,nv) = -1.722343325; } end_f_loop(f,t) printf("Time = %f sec. \n",flow_time); printf("Flow rate set at %f cfs \n", -1.722343325*A/(0.3048*0.3048*0.3048)); } } |
|
July 31, 2017, 11:22 |
|
#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 |
I can interpret this without any issue. Probably ur Fluent installation is fucked, I'd try to re-install the entire thing, otherwise I don't know, sorry and good luck to you.
|
|
August 1, 2017, 06:31 |
|
#3 |
Member
Join Date: Mar 2014
Posts: 56
Rep Power: 12 |
Before going as far as reinstalling the software, you could try to compiling the code instead of interpreting it. Second thing worth trying is to double check that the file in which the code is saved is in correct form. With this I mean that the file has been somehow altered for instance if it has been read and written in a windows environment and then handled in an unix environment. You could create a new file in your unix environment and copy-paste the code in the new file. Hope this helps, albeit it might seem a long shot!
|
|
Tags |
compile a udf, fluent, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
Parallelize UDF? Which kind of UDF? | Lilly | FLUENT | 5 | March 25, 2014 03:05 |
Help! Delete the UDM codes in the UDF | Messi | Fluent UDF and Scheme Programming | 2 | January 28, 2014 10:01 |
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 |