|
[Sponsors] |
September 15, 2012, 11:28 |
parse error in DEFINE_PROFILE line
|
#1 |
New Member
Kestas
Join Date: May 2009
Location: Lithuania
Posts: 13
Rep Power: 17 |
Hello,
I am learning using Ansys Fluent 14, tried to interpret UDF example, but I got error: Code:
cpp -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/multiport/src" -I. -DUDF ONFIG_H="<udfconfig.h>" "D:\CFDprojektai\pirmas_files\dp0\FFF\Fluent\udfexample.c" Error: D:\CFDprojektai\pirmas_files\dp0\FFF\Fluent\udfexample.c: line 8: parse error. Code:
/*********************************************************************** udfexample.c UDF for specifying steady-state velocity profile boundary condition ************************************************************************/ #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y, h; face_t f; h = 0.016; /* inlet height in m */ begin_f_loop(f,thread) { F_CENTROID(x, f, thread); y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */ F_PROFILE(f, thread, position) = 0.1*(1.0-y*y); } end_f_loop(f, thread) } Thank you, Kestas |
|
September 16, 2012, 04:44 |
|
#2 |
Member
Join Date: Mar 2011
Posts: 64
Rep Power: 15 |
Hi.
I have checked your file. It is correct. Your UDF file may not be in the same folder as your case file.
__________________
Saeed Sadeghi Ansys Fluent CFD Consultant |
|
September 16, 2012, 11:43 |
|
#3 |
New Member
Kestas
Join Date: May 2009
Location: Lithuania
Posts: 13
Rep Power: 17 |
UDF is in same directory where is case files(..\dp0\FFF\Fluent\). I also noticed that if I changed #include "udf.h" on first line, to random, say, "udfasdasdasd.h", I got same error on line 8, not on line 1, isn't strange?
|
|
September 16, 2012, 12:07 |
|
#4 |
Member
Join Date: Mar 2011
Posts: 64
Rep Power: 15 |
Really I have tried again, still no error
I should connect your computer using teamviewer software to see the problem. Please email me for more questions.
__________________
Saeed Sadeghi Ansys Fluent CFD Consultant |
|
October 8, 2012, 05:49 |
|
#5 |
Senior Member
Join Date: Nov 2009
Posts: 125
Rep Power: 17 |
Hi Saeed,
what is a teamviewer software please? regards, mactech001 |
|
October 8, 2012, 05:53 |
|
#6 |
Member
Join Date: Mar 2011
Posts: 64
Rep Power: 15 |
It is for connecting to others computer and helping them soling their problems. Like Remote Desktop but much efficient.
__________________
Saeed Sadeghi Ansys Fluent CFD Consultant |
|
December 17, 2012, 17:18 |
were you able to finally solve the problem?
|
#7 | |
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 14 |
I am getting the same error; were you able to finally solve the parse error problem?
Quote:
|
||
December 18, 2012, 03:26 |
|
#8 |
Senior Member
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 15 |
No error. It may have some hidden characters in it that cause error.
Have you copied the UDF from Fluent Help? If yes, there are so much hidden characters in your file that won't allow to be interpretted correctly. Find and delete them. |
|
January 13, 2013, 08:14 |
|
#9 |
Senior Member
Join Date: Nov 2009
Posts: 125
Rep Power: 17 |
when copying from Help to a notebook/text file, some characters are not recognised by Compiler. so, as Saeed suggests, just delete all the 'spaces' in the text.
reapply the 'ENTER' to make the next line again also. also first make sure your Compiler is working using simple codings.
__________________
Thank you for your kind attention. Kind regards, mactech001 Currently using: ANSYS v13 |
|
March 1, 2013, 16:23 |
|
#10 |
Member
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 15 |
Hi guys,
I have a question, I am trying to move my whole domain in a sinusoidal way. Basically I have a box which is fixed and i am trying to move the whole flow around in a sinusoidal transient way. Which kind of UDF would you suggest me to use? Thanks for your help |
|
March 2, 2013, 16:37 |
|
#11 |
Member
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 15 |
Any comments? I need to hear from you experts...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
8x icoFoam speed up with Cufflink CUDA solver library | kmooney | OpenFOAM Running, Solving & CFD | 42 | November 6, 2012 12:37 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 09:48 |
Regarding FoamX running Kindly help out | hariya03 | OpenFOAM Pre-Processing | 0 | April 18, 2008 05:26 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |