CFD Online Logo CFD Online URL
Home > Forums > FLUENT

use of static variable in udf's

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

LinkBack Thread Tools Display Modes
Old   September 12, 2001, 15:21
Default use of static variable in udf's
Posts: n/a
hi all,

can anybody tell me if it is permissible to use static variable with interpreted udfs-(static external actually) its giving me syntax error while i try to use it. is there any way around this(some other syntax). thanx for the help.
  Reply With Quote

Old   October 12, 2001, 07:04
Default Re: use of static variable in udf's
Posts: n/a
why don't you try the compiled udf instead of interpreted udf. Because in the compiled udf you can write all the c-syntaxes.(its not so with interpreted!)

thanks and regards,

  Reply With Quote

Old   October 12, 2001, 11:53
Default Re: hi ravi,use of static variable in udf's
Posts: n/a
hi ravi, thanks for the help. i am faced with a problem in setting up the compiled udf library. i run fluent on unix based machine and we have a gcc compiler. when i try to compile from my library directory, i get this error \path\cc: language optional software package not installed. i tried adding the gcc path to the directory bu it still gives the same error. can u please help me if u know about this one.
  Reply With Quote

Old   October 15, 2001, 15:50
Default Re: hi ravi,use of static variable in udf's
Posts: n/a
I don't know how did you create the directory structure in ur current working directory.

I hope u followed this procedure :

1. Create a directory called libudf ( U can name any thing to this directory).

2. copy Makefile.udf from path/Fluent.Inc/fluent5.x/src/Makefile.udf.

3. Create 2 directories src and ultra (if it is sun workstation or based on ur system architecture) in the libudf directory.

4. Copy path/Fluent.Inc/fluent5.x/src/makefile.udf in to the src directory.

Important : Note that u have to change the names of the Makefile.udf to Makefile and makefile.udf to makefile

5. Put the udf file (*.c file) in to the src directory.

6. create two directories called 2d and 3d in ultra (if ur's is sun machine or if it is hp machine hpux etc. - if u type "uname -a" at the command prompt it will show you the machine architecture name)

7. Edit makefile to set the following parameters :

SOURCES -- the user defined function to be compiled

FLUNET_INC --- the path to ur release directory

8. Go to libudf directory and type make 'FLUENT_ARCH=(architecture of ur machine)'

9. U can find out ur system architecture by starting any fluent session. Scroll up the Fluent console window to the message that begins with "Starting", and identify the Fluent architecture (for eg. ultra for sun)

10. Go to Define -->User-Defined-->Function Hooks--> compiled and give the name of the directory containing makefiles and udf file etc. In this case "libudf"

by the way where are u working on Fluent...


  Reply With Quote


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
error: uninitialized local variable 't' used MASOUD Fluent UDF and Scheme Programming 5 October 17, 2016 04:24
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
defining a term for a domain using DEFINE_ADJUST MASOUD Fluent UDF and Scheme Programming 1 September 24, 2010 05:08
enum MASOUD Fluent UDF and Scheme Programming 0 June 5, 2010 00:49
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09

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