|
[Sponsors] |
A Problem of Fluent Interpreted UDF: parse error |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#21 |
Member
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 7 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#22 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 25 ![]() |
It depends on which errors comes on your screen after you click "build". I can not look at your screen.
Please read carefully: NOT the error that you get after clicking "load". That one you have shown me already. |
|
![]() |
![]() |
![]() |
![]() |
#23 |
Senior Member
Join Date: Sep 2017
Posts: 232
Rep Power: 10 ![]() |
On the wider question of learning UDFs and compiling UDFs:
-- Look at the help files and the tutorials. -- I recently made a list of the steps that you have to follow to compile a UDF: see The UDF library you are trying to load (libudf) is not compiled for 3D on the current. But if you have not read any help materials at all, then this list might not make any sense. -- When you compile, scroll back up and see if there are any compilation errors. If there are, you need to fix them before running the libudf. If they refer to specific lines in your input code, go and look at those lines. If they do not refer to your input code, something is wrong with your compiler setup -- check out pakk's helpful post from 2016: How to solve UDF compilation problems in Fluent. |
|
![]() |
![]() |
![]() |
![]() |
#24 | |
Member
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 7 ![]() |
Quote:
now these pictures are the build result,but there are some messy code on the screen,can you tell me what is the reason?thank you. IMG_5535.jpg IMG_5537.jpg |
||
![]() |
![]() |
![]() |
![]() |
#25 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 25 ![]() |
Surprisingly: yes, I can.
You get the error message: Quote:
This means that your compiler is not set up correctly. Currently, your UDF code is not the problem. Solve this. Look for the error message on this forum to find out how, I am no expert on this. |
||
![]() |
![]() |
![]() |
![]() |
#26 |
New Member
Ken
Join Date: Jul 2018
Posts: 6
Rep Power: 6 ![]() |
I'm getting a parse error as well for my UDF file. I would really appreciate if anyone could help me with it.
UDF File: #include "udf.h" DEFINE_PROFILE(x_velocity_a,thread,nv) { float pos[3]; /* an array for the coordinates */ float y; face_t f; /* f is a face thread index */ begin_f_loop(f, thread) { F_CENTROID(pos,f,thread); y = pos[1]; F_PROFILE(f, thread, nv) = 1.-(400.*y-1.)*(400.*y-1.); } end_f_loop(f, thread) } Error, when using Interpreted UDFs: ....... line 15: parse error. Thank You! |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 06:43 |
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! | alban | Fluent UDF and Scheme Programming | 2 | June 8, 2010 18:54 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 17:38 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |