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

error in compiling UDF

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2012, 03:47
Default error in compiling UDF
  #1
New Member
 
IVI
Join Date: Oct 2012
Posts: 14
Rep Power: 13
89566008 is on a distinguished road
hi all , I try to compile my UDF , but I have an error :
'nmake' is not recognized as an internal or external command,
I link the Visual studio with fluent and do any thing else!
please help
thank you
89566008 is offline   Reply With Quote

Old   November 2, 2012, 05:17
Default
  #2
Member
 
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 14
Sixkillers is on a distinguished road
Read FAQ first

http://www.cfd-online.com/Wiki/Fluen...tch_file.22.3F
Sixkillers is offline   Reply With Quote

Old   November 2, 2012, 08:00
Default
  #3
New Member
 
IVI
Join Date: Oct 2012
Posts: 14
Rep Power: 13
89566008 is on a distinguished road
Quote:
Originally Posted by Sixkillers View Post
thanks Sixkillers
I do it , but now I get a new messages :
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2143: syntax error : missing '{' before ':'
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2059: syntax error : ':'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2061: syntax error : identifier 'CX_DLL_GetProc'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : ';'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : 'type'


here is my UDF :

#include "udf.h"
#include "dpm.h"
#include "mem.h"
#include "metric.h"
#include "math.h"
#define Pia 3.14
#define epsilon_0 8.85e-12
#define epsilon_r 1.000590
#define K_ion 0.00022

DEFINE_DPM_BODY_FORCE(particle_body_force,p,i)
{
real bforce=0,Qd,Q, halftime;
cell_t c;
Thread *t;
if(i==1)
{
Qd=3*Pia*epsilon_0*(epsilon_r/(epsilon_r+2))*pow(P_DIAM(p),2.0)*C_UDSI_G(c,t,1)[0];
halftime=4*epsilon_0/(C_UDSI(c,t,0)*K_ion);
if(P_TIME(p)<=0)
{
Q=0;
}
else if(P_TIME(p)<=halftime)
{
Q=(3*Qd/2)-(halftime*Qd/P_TIME(p));
}
else
{
Q=fabs(Qd);
}
bforce=Q*C_UDSI_G(c,t,0)[0];
}
return (bforce/P_MASS(p));
}

thank you
IVI
89566008 is offline   Reply With Quote

Old   November 9, 2012, 01:55
Default
  #4
Member
 
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 14
Sixkillers is on a distinguished road
It works for me. Don't you have non-ASCII characters in your source code? Copy your code from this forum and try it one more time.
Sixkillers is offline   Reply With Quote

Old   November 9, 2012, 02:07
Default
  #5
New Member
 
IVI
Join Date: Oct 2012
Posts: 14
Rep Power: 13
89566008 is on a distinguished road
thank you for your reply
I do it and it work . thank you
89566008 is offline   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
compiling udf at window Nt(64BIT) noa FLUENT 3 July 29, 2014 23:01
Compiling UDF on a cluster Adya FLUENT 1 December 14, 2009 11:30
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 00:43
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
On Compiling a UDF David Chabot FLUENT 5 May 20, 2005 09:13


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