CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF intrepreting errors

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 2, 2004, 18:27
Default UDF intrepreting errors
  #1
Satish Perivilli
Guest
 
Posts: n/a
Hello all

I am trying to use a UDF for one of my simulations. I am trying to intrepret the UDF by specifying a source file written in C. I get an error in the console window stating the following:

error: N:\Research with Fluent\UDF_EXs_from_Fluent.com\udf-temp\viscosity.c: line 1: parse error.

Please let me know what the problem is and how can I sort this out.

Thanks
  Reply With Quote

Old   November 3, 2004, 08:08
Default Re: UDF intrepreting errors
  #2
anni
Guest
 
Posts: n/a
Hello,

you have done something wrong in proggramming, in the first line of your program.

Because it says: line 1: parse error.

Anni
  Reply With Quote

Old   November 3, 2004, 18:12
Default Re: UDF intrepreting errors
  #3
Satish Perivilli
Guest
 
Posts: n/a
Hi all

thanks to anni for the reply. I had a look at my program but was not able to find out any error myself. So if anybody could find out any error pls. let me know, also let me know whether the locations of udf.h and corresponding files do matter. Here is what i am trying to use for my UDF.

/* This program is to write a macro to define the heat flux boundary conditions on the tool and shoulder */

# include "udf.h"

DEFINE_HEAT_FLUX (shdr_n_tool_heat_flux, f, t, c0, t0, cid, cir) /* Using a macro from "Model Specific DEFINE macros" */

{

real x[ND_ND], x_coord, z_coord; /* This will hold the position vector of the centroid of a cell, its x&z cordnates */

real temp, dim_less_temp; /* Temperature, Dimensionless temperature */

cell_t c; /* Cell identifier */

/* Beginning of the loop over all cells in the thread */

begin_c_loop(c, t)

{

/* To find the cell centroid and approximate it as the node at which the cell temperature acts */

C_CENTROID(x,c,t);

x_coord = x[0];

z_coord = x[2];

/* To find the cell temperature and define a dimensionless temperature */

temp = C_T(c,t);

dim_less_temp = 1-temp/926;

/* heat_flux is the flux to be applied at each node on the shoulder and the tool surface */

/* heat_flux = Tau0,0 [N/m2] * omega [rad/s] *sqrt (x^2+z^2)*{1-T/926[K]} */

heat_flux = 104191920*26.19*sqrt(x_coord*x_coord+z_coord*z_coo rd)*dim_less_temp;

}

end_c_loop(c,t)

/* End of the loop over all cells in the thread */

}

----------------------------------------------------

the error i get when i try to compile is this

"error: N:\Research with Fluent\UDF_EXs_from_Fluent.com\udf-temp\viscosity.c: line 1: parse error. "

thanks and please let me know if I can work this out.

  Reply With Quote

Old   November 5, 2004, 16:59
Default Re: UDF intrepreting errors
  #4
Satish Perivilli
Guest
 
Posts: n/a
HI

I have had this sorted out and I had to move my mesh files to c:\fluent.inc\ntbin\ntx86 folder . Now I am able to intrepret my UDF finally, but have encountered a newer problem. Can anybody tell me how to sort this out?? thanks.

The error is

Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: ()
  Reply With Quote

Old   November 6, 2004, 14:47
Default Re: UDF intrepreting errors
  #5
Kartz
Guest
 
Posts: n/a
if you have placed the c file in the ntx folder, you do not have to call the file (at the place where you put in the file name )with its whole address, since this the working directory.Just give the name of the file.

However if you decide, to place your mesh file at some other folder(like in ur 1st msg), then put in the c file in that same folder. And when you call for the file, use the full address. Hope it solves your problem. G.Luck
  Reply With Quote

Old   November 9, 2004, 05:35
Default Re: UDF intrepreting errors
  #6
Bowling
Guest
 
Posts: n/a
I have ever found the problem like yours. I didn't know why but I installed the program again. It was ok. You have to install FLUENT before C++. If you have more problem, post it. I try to help you.

Bowling
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 20:48
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 12:53.