CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

A Problem of Fluent Interpreted UDF: parse error

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2018, 09:26
Default [QUOTE=pakk;678565]You were able to find the "load" button. On the same screen, there
  #21
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 9
zhihuawan is on a distinguished road
Quote:
Originally Posted by pakk View Post
You were able to find the "load" button. On the same screen, there is the "build" button. You should click the "build" button before you click the "load" button.
I do as you said ,the error also exist,how can I solve it ?
zhihuawan is offline   Reply With Quote

Old   January 19, 2018, 04:14
Default
  #22
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by zhihuawan View Post
I do as you said ,the error also exist,how can I solve it ?
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.
pakk is offline   Reply With Quote

Old   January 19, 2018, 13:26
Default
  #23
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 12
obscureed is on a distinguished road
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.
obscureed is offline   Reply With Quote

Old   January 22, 2018, 23:11
Default [QUOTE=pakk;678658]It depends on which errors comes on your screen after you click "b
  #24
Member
 
wan zhihua
Join Date: Dec 2017
Posts: 67
Rep Power: 9
zhihuawan is on a distinguished road
Quote:
Originally Posted by pakk View Post
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.

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
zhihuawan is offline   Reply With Quote

Old   January 23, 2018, 04:00
Default
  #25
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Surprisingly: yes, I can.

You get the error message:
Quote:
'nmake' is not recognized as an internal or external command
(You don't see this literally because your computer is set to a language that does not use the Latin alphabet, and the Fluent TUI is not able to show the characters of your language, but trust me, it is there.)

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.
pakk is offline   Reply With Quote

Old   August 16, 2018, 11:26
Default
  #26
New Member
 
Ken
Join Date: Jul 2018
Posts: 6
Rep Power: 8
Ken_ is on a distinguished road
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!
Ken_ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 19:54
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


All times are GMT -4. The time now is 11:05.