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

I need help FLUENT

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2006, 22:55
Default I need help FLUENT
  #1
greg
Guest
 
Posts: n/a
is there anyone who can send me "extfile.h" file. As I know it should be in src subdirectory of Fluent directory. If I am wrong please tell me. I`m looking for it for few days and no one can help me. thank you
  Reply With Quote

Old   July 3, 2006, 02:47
Default Re: I need help FLUENT
  #2
Christian
Guest
 
Posts: n/a
If you need Fluent help, why not try seeking it in the Fluent forum?
  Reply With Quote

Old   July 3, 2006, 11:25
Default Re: I need help FLUENT
  #3
greg
Guest
 
Posts: n/a
I checked posts for last 3 years, I`ve checked Fluent manual, Udf user guide and website: www.fluentusers.com. Yes you can find there one place with word "extfile.h". It is one example where they use it. That all. I wouldn`t ask for help if I`ve not check all posibble place firs (all I know). If you are able to help me pleas jus do it.
  Reply With Quote

Old   July 3, 2006, 14:23
Default Re: I need help FLUENT
  #4
Luca Cavagna
Guest
 
Posts: n/a
I don't think extfile.h is provided in the src files. Where have you discovered it? is it included in an example on the fluentusers? if yes gimme the problem ID. I'll check and try to see what's missing. Luca
  Reply With Quote

Old   July 3, 2006, 18:04
Default Re: I need help FLUENT
  #5
Allan Walsh
Guest
 
Posts: n/a
I think what Christian meant was to post in the Fluent users section of this web site. And as Luca said, extfile.h is not part of the source files, at least on versions 6.1 or 6.2 installed on our system.
  Reply With Quote

Old   July 3, 2006, 22:49
Default Re: I need help FLUENT
  #6
greg
Guest
 
Posts: n/a
hmmmmmmmmmm meybe you are right. I don`t know that extfile.h is a src file. I just fought that. bellow is a an example where they use it.

2.5.2 External Variables If you have a global variable that is declared in one source code file, but a function in another source file needs to use it, then it must be defined in the other source file as an external variable. To do this, simply precede the variable declaration by the word extern as in

extern real volume;

If there are several files referring to that variable then it is convenient to include the extern definition in a header ( .h) file, and include the header file in all of the .c files that want to use the external variable. Only one .c file should have the declaration of the variable without the extern keyword. Below is an example that demonstrates the use of a header file.

extern can be used only in compiled UDFs.

Example

Suppose that there is a global variable named volume that is declared in a C source file named file1.c

#include "udf.h" real volume; /* real variable named volume is declared globally */

DEFINE_ADJUST(compute_volume, domain) {

/* code that computes volume of some zone */

volume = .... }

If multiple source files want to use volume in their computations, then volume can be declared as an external variable in a header file (e.g., extfile.h)

/* extfile.h

Header file that contains the external variable declaration for

volume */

extern real volume;

Now another file named file2.c can declare volume as an external variable by simply including extfile.h.

/* file2.c

#include "udf.h" #include "extfile.h" /* header file containing extern declaration

is included */

DEFINE_SOURCE(heat_source,c,t,ds,eqn) {

/* code that computes the per unit volume source using the total

volume computed in the compute_volume function from file1.c */

real total_source = ...;

real source;

source = total_source/volume;

return source; }

Meybe it is a compiler problem. I really don`t know. I`m not very acquainted with advanced programming and UDF`s. I use just simple UDF`s . Thank you for your help.
  Reply With Quote

Old   July 4, 2006, 01:22
Default Re: I need help FLUENT
  #7
Christian
Guest
 
Posts: n/a
No insult was intended. I cannot help you with the question in other ways that helping you seeking help where it is supposed to be best sought. What I do not understand is; If you lack Fluent files, why not contact Fluent?

  Reply With Quote

Old   July 4, 2006, 01:50
Default Re: I need help FLUENT
  #8
Luca Cavagna
Guest
 
Posts: n/a
the extfile.h has been created by the author (so it does not belong to the src files). It simply contains the declaration of the extern variable. This is used when you want to build the libudf shared library with multiple files which can share some variables. Luca
  Reply With Quote

Old   July 4, 2006, 09:19
Default Re: I need help FLUENT
  #9
greg
Guest
 
Posts: n/a
yes you are right. I`ve started getting nervous about this problem. I`ve spent too much time for it. Thank you very much for your help wish you good luck. regards greg
  Reply With Quote

Old   July 4, 2006, 09:21
Default Re: I need help FLUENT
  #10
greg
Guest
 
Posts: n/a
ok. I think this will solve my problem. Thank you Greg
  Reply With Quote

Old   July 4, 2006, 18:36
Default Re: I need help FLUENT
  #11
AR Smith
Guest
 
Posts: n/a
HIHIHIHIHI, Example (e.g., extfile.h).

:->
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stopping a Fluent batch job AND saving the data! Possible? Volker Pawlik FLUENT 13 December 28, 2020 04:16
A Problem of Fluent Interpreted UDF: parse error knight Fluent UDF and Scheme Programming 25 August 16, 2018 10:26
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 7 March 23, 2018 03:22
Compared MRFSimpleFoam and Fluent in a centrifugal pump! renyun0511 OpenFOAM Running, Solving & CFD 8 July 6, 2010 06:24
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 16:48


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