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

Parse error in fopen line

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2015, 18:33
Question Parse error in fopen line
  #1
New Member
 
Mario Alberto
Join Date: Sep 2015
Location: Russian Federation
Posts: 10
Rep Power: 11
mrwts is on a distinguished road
Hi guys, I am a new in Fluent and I am creating a source, whose position changes respect to time. I am using coordinates that are written in a separated text file, so I need to read those coordinates and assign them to an specific array. While interpreting the only the only error that comes out is:

fp = fopen("values.txt","r"); ) /*parse error*/
DEFINE_SOURCE(energ_source,c,t,dS,eqn) /*parse error*/

How is that possible?
How can I overcome that problem? Where could the problem lie?
mrwts is offline   Reply With Quote

Old   October 5, 2015, 17:59
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by mrwts View Post
Hi guys, I am a new in Fluent and I am creating a source, whose position changes respect to time. I am using coordinates that are written in a separated text file, so I need to read those coordinates and assign them to an specific array. While interpreting the only the only error that comes out is:

fp = fopen("values.txt","r"); ) /*parse error*/
DEFINE_SOURCE(energ_source,c,t,dS,eqn) /*parse error*/

How is that possible?
How can I overcome that problem? Where could the problem lie?
Well, you have extra parenthesis at the end of the fopen line. Maybe try fixing that first. And I'm not sure if the UDF interpreter allows calls to system libraries, like fopen. You may have to do that as a compiled UDF. But, my Fluent skills are several years out of date at this point, so things may have changed.
mprinkey is offline   Reply With Quote

Reply

Tags
fopen, source energy term, udf and programming


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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 05:18
[OpenFOAM] Take derivative of mean velocity in paraFoam hiuluom ParaView 13 April 26, 2016 07:44
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19


All times are GMT -4. The time now is 03:22.