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

compiler

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2002, 09:04
Default compiler
  #1
stephanie
Guest
 
Posts: n/a
Hello dear Fluent Users,

I am a new user of Fluent and I would like to compile the following source programm in fluent 6.0.

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

#include "udf.h"

DEFINE_SOURCE(cell_x_source,cell,thread,dS,eqn) {

float source;

double C,A,dh,S2,S1,SpeedValue,T;

SpeedValue=sqrt(C_U(cell,thread)*C_U(cell,thread)+ C_V(cell,thread)*C_V(cell,thread)+C_W(cell,thread) *C_W(cell,thread));

T = 300.;

C = 1000 ;

A = 0.2;

dh = 0.001;

S2 = pow(C*(C_R(cell,thread)*SpeedValue*dh/C_MU_L(cell,thread)),A);

S1 = T*S2;

source = S1-S2*C_T(cell,thread);

return source;

}

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

With cpp I obtain the following error:

cpp -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/cortex/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/client/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" source.csh: cpp: not found

Error: source.c: line 1: Syntax error.

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

And with cc:

cc -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/cortex/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/client/src -I/usr2/fluent_6012/Fluent.Inc/fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" source.cNo such feature exists (-5,116:2) No such file or directory

The MIPSpro C Compiler (license FEATURE string = cc) requires a license password.

For license installation and trouble shooting information visit the web page:

http://www.sgi.com/Support/Licensing/install_docs.html

To obtain a Permanent license (proof of purchase required) or an Evaluation license please visit our license request web page:

http://www.sgi.com/Products/license.html

or send a blank email message to:

license@sgi.com

In North America, Silicon Graphics' customers may request Permanent licenses by sending a facsimile to:

(650) 932-0537

or by calling our technical support hotline

1-800-800-4SGI

If you are Outside of North America or you are not a Silicon Graphics support customer then contact your local support provider.

ld32: ERROR 33 : Unresolved text symbol "main" -- 1st referenced by /usr/lib32/mips4/crt1.o.

Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "sqrt" -- 1st referenced by source.o.

Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "pow" -- 1st referenced by source.o.

Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: INFO 152: Output file removed because of error. Error: source.c: line 1: Syntax error.

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

Has somebody an idea what the problem could be?
  Reply With Quote

Old   June 14, 2002, 11:23
Default Re: compiler
  #2
Damien
Guest
 
Posts: n/a
Voilą ! ----------------- #include "udf.h"

DEFINE_SOURCE(cell_x_source,cell,thread,dS,eqn)

{

real source;

real C,A,dh,S2,S1,SpeedValue,T;

SpeedValue=sqrt(C_U(cell,thread)*C_U(cell,thread)+ C_V(cell,thread)*C_V(cell,thread)+C_W(cell,thread) *C_W(cell,thread));

T = 300.; C = 1000. ; A = 0.2; dh = 0.001; S2 = pow(C*(C_R(cell,thread)*SpeedValue*dh/C_MU_L(cell,thread)),A); S1 = T*S2; source = S1-S2*C_T(cell,thread); dS[eqn]=-S2; return source;

} ------------------- It works for me, and you? I used it as a compiled UDF, I'm not sure if you are trying to use Interpreted UDF. I prefer to avoid it, especially if its to use it every iteration. I just changed float and double by real. and added the dS[eqn] sequence

I hope it helps

Kind Regards

Damien
  Reply With Quote

Old   June 19, 2002, 08:49
Default Re: compiler
  #3
stephanie
Guest
 
Posts: n/a
Salut Damien,

I could compile the programm. Thank you for your help.

Salutations,

Stephanie
  Reply With Quote

Reply


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
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Fortran compiler Erik Siemens 2 November 28, 2008 21:05
Intel compiler for linux x86 marcus Siemens 1 November 9, 2006 17:43
Fluent 6.2 and gcc compiler in Sun Blade 2500 Nitu Gupta FLUENT 8 April 29, 2005 14:58
Fortran compiler Arnab Siemens 5 September 14, 2004 04:59


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