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

error when compiled UDF on fluent 15.0

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

Like Tree1Likes
  • 1 Post By Isitv2A

Reply
 
LinkBack Thread Tools Display Modes
Old   June 24, 2014, 04:29
Default error when compiled UDF on fluent 15.0
  #1
New Member
 
hannecart
Join Date: Jun 2014
Posts: 16
Rep Power: 3
Isitv2A is on a distinguished road
when try to compile my udf i get this message .


The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).
Le fichier spécifié est introuvable.


my udf ,

#include "udf.h"
DEFINE_CG_MOTION(pipe,dt,vel,omega,time,dtime) /* macro de fluent pour définir le mouvement du centre de gravité d'une partie (ici le pipe ) */
{
Thread *t; /* pointeur t vers thread */
Domain *d=Get_Domain(1) ; /* pointeur vers le domaine */
real x_cg[3];
real force [3] ;
real moment[3]; /* définit la position la force la vitesse en 3D */
real accl;
real dv ; /* accélération et dv */
real mass= 0.2; /* mass du système */
real wn=12.0; /* pulsation ??????????????? a voir */
real k= mass * wn*wn ; /* raideur du pipe */
real c=2*mass*0.10 ; /* coefficient de trainé eau->solide */
NV_S(vel,=,0.0); /* initialisation de la vitesse linéarire */
NV_S(omega,=,0.0); /* vitesse angulaire */
t=DT_THREAD(dt) ; /* donne au pointeur le thread ou le mouvement se produit */


for (i=0 ; i<3 ,i++)
x_cg[i]=DT_THREAD(dt)[i]; /* initialisation de la position du centre de gravité */


/* pour l'instant le mopuvement est uniquement celon l'axe x */
Compute_Force_And_Moment(d,t,x_cg,force,moment,TRU E); /* calcule les forces de les moments appliqués au centre de gravité */
force[1]+= -k*x_cg[1]-c*vel[1]; : /* force sur l'axe x un terme en k*x_cg qui correpond a un ressort mécanique et un terme de trainé en c*vel */
accl=force[1]/mass ; dv =accl*dtime; /*calcul de accl et dv */
v_prev+=dv; vel[1]=v-prev; /* calcul de vel sur l'axe x */
printf("Computed force : %g\n ",force[1]); /* afiche sur la console la force et la vitesse */
printf("Velocity: %g\n ", vel[1]);
}
Isitv2A is offline   Reply With Quote

Old   June 24, 2014, 09:57
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 770
Rep Power: 11
pakk will become famous soon enough
To use a compiled UDF in Fluent, you need to do two things:

1. Compile the UDF
2. Load the compiled UDF.

You show the result of step 2, but the problem was in step 1. If you want help, you should show what message you get after step 1.
pakk is offline   Reply With Quote

Old   June 24, 2014, 10:36
Default
  #3
New Member
 
hannecart
Join Date: Jun 2014
Posts: 16
Rep Power: 3
Isitv2A is on a distinguished road
hi pakk thanks for help i search on this forum and internet because i try to compiled udf.c with a free compiler with Dev-c++ . ( http://fr.wikipedia.org/wiki/Dev-C%2B%2B ) . i try example i found on net , to see if it was mine udf who don't work but i don't suceed either to compiled them .

my compiler said error using one 1srt line .

People speack about using visual studio to compiled their udf . Do we have choice or do we must use this programme ?


Sorry for my english and for my noob question . i still student and try to learn by myself .
Isitv2A is offline   Reply With Quote

Old   June 24, 2014, 15:59
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 770
Rep Power: 11
pakk will become famous soon enough
Hi Isitv2A, I didn't mean to imply that this was a stupid question,

As far as I know, the visual studio program is the only thing that works. But, I should ust say that I never tried anything else, so I'm only repeating what other people said to me.

Your English is not a problem at all. Et je peux lire Français aussi, et aussi écrire, mais avec plusieurs erreurs. Mais je préfère les questions Anglaises, ils sont plus facile pour moi
pakk is offline   Reply With Quote

Old   June 25, 2014, 10:15
Default
  #5
New Member
 
hannecart
Join Date: Jun 2014
Posts: 16
Rep Power: 3
Isitv2A is on a distinguished road
hi pakk i have install Visual studio 2010 express . And when i try to compiled using the promt command with cl .

i write cl udf.c , and i get error udf.h no such file or directory .


I also try to lauch fluent from sdk 7.0 or visual studio than try to compiled in fluent using define ->function -> compiled . But always say that libudf.dll missing .


thanks for all help ! have a good day all
Isitv2A is offline   Reply With Quote

Old   June 25, 2014, 11:32
Default Problem solve
  #6
New Member
 
hannecart
Join Date: Jun 2014
Posts: 16
Rep Power: 3
Isitv2A is on a distinguished road
Thanks to this forum i succeed to compiled my udf thanks all .
pakk likes this.
Isitv2A is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiled udf functions at fluent 15 win 8 64 bit hillat Fluent UDF and Scheme Programming 2 January 25, 2014 08:08
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 23:56
UDF interpret in Fluent wanghaojie Fluent UDF and Scheme Programming 1 February 3, 2012 15:51
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 10:16
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 04:07


All times are GMT -4. The time now is 03:29.