|
[Sponsors] |
July 2, 2006, 22:55 |
I need help FLUENT
|
#1 |
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
|
|
July 3, 2006, 02:47 |
Re: I need help FLUENT
|
#2 |
Guest
Posts: n/a
|
If you need Fluent help, why not try seeking it in the Fluent forum?
|
|
July 3, 2006, 11:25 |
Re: I need help FLUENT
|
#3 |
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.
|
|
July 3, 2006, 14:23 |
Re: I need help FLUENT
|
#4 |
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
|
|
July 3, 2006, 18:04 |
Re: I need help FLUENT
|
#5 |
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.
|
|
July 3, 2006, 22:49 |
Re: I need help FLUENT
|
#6 |
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. |
|
July 4, 2006, 01:22 |
Re: I need help FLUENT
|
#7 |
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?
|
|
July 4, 2006, 01:50 |
Re: I need help FLUENT
|
#8 |
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
|
|
July 4, 2006, 09:19 |
Re: I need help FLUENT
|
#9 |
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
|
|
July 4, 2006, 09:21 |
Re: I need help FLUENT
|
#10 |
Guest
Posts: n/a
|
ok. I think this will solve my problem. Thank you Greg
|
|
July 4, 2006, 18:36 |
Re: I need help FLUENT
|
#11 |
Guest
Posts: n/a
|
HIHIHIHIHI, Example (e.g., extfile.h).
:-> |
|
|
|
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 |