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

Fluent Warning C4005

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2008, 02:23
Default Fluent Warning C4005
  #1
Jack_sh
Guest
 
Posts: n/a
Hi there,

I have been trying to compile a UDF to fluent, but each time I receive the following message: ===============================================

Deleted old libudf\ntx86\2ddp\libudf.dll

1 file(s) copied. (system "copy D:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2ddp\makefile")

1 file(s) copied. (chdir "libudf")() (chdir "ntx86\2ddp")() test.c d:\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(161) : see previous definition of 'stdout' d:\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(162) : see previous definition of 'stderr' d:\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(160) : see previous definition of 'stdin' # Generating udf_names.c because of makefile test.obj

Done.

==================================================

I have installed the visual studio and aslo run fluent from visual studio command prompt as per fluent help. And then when I try to load the UDF I receive this message:

================================================== ====

"e:/dynamic_mesh/dynamic mesh 3 (cylindar)"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

================================================== =====

Can anybody help me solving this problem?

  Reply With Quote

Old   November 10, 2008, 15:49
Default Re: Fluent Warning C4005
  #2
Bak_Flow
Guest
 
Posts: n/a
Hi Jack_sh,

The error you are getting when you attempt loading the udf is clear: it did not compile and link properly.

can you post the udf here?

do you put any extra header files in the udf directory? It seems to have a complaint with:

stdio.h machine.h

Please give some more details and then we can help.

Thanks...........Bak_Flow
  Reply With Quote

Old   November 11, 2008, 05:20
Default Re: Fluent Warning C4005
  #3
jack_sh
Guest
 
Posts: n/a
Hi Bak_flow,

The UDF I am using is a sample UDF from Fluent UDF Manual as follows:

/************************************************** **********

Simple example of a SDOF property UDF for a moving body

************************************************** ************/

#include "udf.h"

DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime)

{

prop[SDOF_MASS] = 800.0;

prop[SDOF_IXX] = 200.0;

prop[SDOF_IYY] = 100.0;

prop[SDOF_IZZ] = 100.0;

printf ("\nstage: updated 6DOF properties");

}

In fact, I am trying to model an object which is moving under the influence of a cross flow. I mean its motion is determined by the forces from flow field (I use dynamic mesh).

I reinstalled Visual Studio and Fluent on the same drive (C but there was no difference and I still receive the error message. What do you suggest?
  Reply With Quote

Old   November 11, 2008, 15:37
Default Re: Fluent Warning C4005
  #4
Bak_Flow
Guest
 
Posts: n/a
Hi Jack_sh,

2 suggestions:

1. Make sure you start with just the .cas and udf.c in a directory ie. let it create the libudf directory from scratch. Sometimes if there is an existing directory and libraries which are inconsistient things can go wrong ie different versions of fluent, 2d vs 2ddp, etc.

2. Try to compile any other udf either from the manual or preferably downloaded from the fluentusers site. This will test if you have problems compiling any udf or just this one?

Let us know how you make out.

Regards,

Bak_Flow
  Reply With Quote

Old   November 12, 2008, 02:26
Default Re: Fluent Warning C4005
  #5
jack_sh
Guest
 
Posts: n/a
Dear Bak_flow,

I tried both of your suggestions but they didn't work. I still receive the same message.

I think the problem is that fluent doesn't make all the file needed for compiling the udf. It just produce these files: log, makefile, testudf.obj, udf_names.c and user_nt.udf in ntx86\2ddp folder.

The log file includes this text:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.

'sed' is not recognized as an internal or external command, operable program or batch file. NMAKE : U1077: 'sed' : return code '0x1' Stop.

Do you have any idea what the problem is?

  Reply With Quote

Old   November 17, 2009, 23:43
Default
  #6
New Member
 
Saeed Abbasi
Join Date: Sep 2009
Location: Iran
Posts: 20
Rep Power: 16
sabbasi_mr is on a distinguished road
Hi jack_sh,
I have exactly the same problem,
all warnings and .log file are same as yours.
did you solved your problem?/
sabbasi_mr is offline   Reply With Quote

Old   June 30, 2010, 11:43
Default
  #7
New Member
 
David
Join Date: May 2010
Posts: 3
Rep Power: 15
happyqj is on a distinguished road
Quote:
Originally Posted by sabbasi_mr View Post
Hi jack_sh,
I have exactly the same problem,
all warnings and .log file are same as yours.
did you solved your problem?/
I got a similar problem, can anybody provide some suggestions?
happyqj is offline   Reply With Quote

Old   May 11, 2013, 13:30
Default 'sed' program
  #8
New Member
 
G. Malvault
Join Date: May 2013
Posts: 1
Rep Power: 0
G. Malvault is on a distinguished road
Dear everybody,

This topic is quite old, but I've find a solution : 'sed' is used by the makefile :

"# This makefile uses the public domain program 'sed', make sure
# sed is in your executable path.
"

This program was missing on my computer, you can find it here :
http://sourceforge.net/projects/gnuw...p.exe/download
Just install it, and retry to run nmake.

Best regards,
G. Malvault
G. Malvault is offline   Reply With Quote

Old   December 31, 2019, 09:00
Default
  #9
New Member
 
Saeed Abbasi
Join Date: Sep 2009
Location: Iran
Posts: 20
Rep Power: 16
sabbasi_mr is on a distinguished road
Thank you very much.
sabbasi_mr is offline   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
Undefined reference to %60mainb seang OpenFOAM Installation 8 February 1, 2014 13:48
Extend Project 1.6-ext Binary Release for Mac OS X hjasak OpenFOAM Announcements from Other Sources 26 November 5, 2013 16:50
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Warning 097- AB Siemens 6 November 15, 2004 04:41


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