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

Could not find "libudf"

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2020, 13:02
Default Could not find "libudf"
  #1
Senior Member
 
acalado's Avatar
 
André
Join Date: Mar 2016
Posts: 123
Rep Power: 6
acalado is on a distinguished road
Hi!

I was trying to load a case file that was sent over which has a custom UDF (.c), however I am getting this error which seems to relate to the default libudf.

Any ideas on how to solve this? Thanks in advance!



Checking the existence of compiled "libudf" UDF library for current platform.
If needed will attempt auto-compilation...

Error: Auto-compilation skipped. Could not find "libudf" or input files for creating "libudf" library
Error Object: #f

Warning: the rp-structure-time? option is not available in this solver

Warning: this is a double-precision solver.
__________________
Sapere aude!
acalado is offline   Reply With Quote

Old   June 26, 2020, 03:07
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,239
Rep Power: 20
AlexanderZ will become famous soon enough
libudf is a default name for UDF library (could be different)
to run UDF you should put source file into working directory and interpret it from FLUENT GUI
or you should put pre compiled UDF library in working directory (for your case it probably has name libudf). You always can recompile your UDF (user-defined -> compiled -> build )
__________________
best regards


******************************
press LIKE if this message helped you

How to ask questions:
https://www.cfd-online.com/Forums/si...tml#post612025
AlexanderZ is offline   Reply With Quote

Old   June 26, 2020, 08:23
Default
  #3
Senior Member
 
acalado's Avatar
 
André
Join Date: Mar 2016
Posts: 123
Rep Power: 6
acalado is on a distinguished road
I have the UDF file in the same directory, and when I interpret it get the following error:

20: TP_USER_REAL: undeclared variable

The UDF is the following - would appreciate any help interpreting this. Maybe it has something to do with missing header files?

Quote:
/************************************************** *********************/
/* UDF for computing the UV dosage along a particle trajectory */
/************************************************** *********************/

#include "udf.h"
#include "dpm.h"
#include "sg_disco.h"
#include "models.h"

#define C_DO(c,t,i)C_STORAGE_R_XV(c,t,SV_DO_IRRAD,i)
#define nb 1

DEFINE_DPM_SCALAR_UPDATE(uv_dosage, cell, thread, initialize, tp)
{
int i=0;
if (initialize)
{
for(i=0;i<nb;i++)
{
TP_USER_REAL(tp,i) = 0.0;
TP_USER_REAL(tp,nb+i) = C_DO(cell,thread,i);
}
}

else
{
for(i=0;i<nb;i++)
{
TP_USER_REAL(tp,i) += TP_DT(tp) * .5 * (TP_USER_REAL(tp,nb+i) + C_DO(cell,thread,i));
TP_USER_REAL(tp,nb+i) = C_DO(cell,thread,i);
C_UDMI(cell,thread,0) += TP_USER_REAL(tp,i);
}
}
}

DEFINE_DPM_OUTPUT(uv_output, header, fp, tp, thread, plane)
{

char name[100];
int i=0;


if (header)
{
if (NNULLP(thread))
par_fprintf_head(fp,"(%s %d)\n",THREAD_HEAD(thread)->dpm_summary.sort_file_name,14);
else
par_fprintf_head(fp,"(%s %d)\n",plane->sort_file_name,14);

par_fprintf_head(fp,"(%4s %12s %12s %12s %12s %12s"
"%12s %12s %12s %12s %12s %12s %12s %12s)\n",
"X0","Y0","Z0","X","Y","Z",
"U","V","W","dia","temp","mass-flow","time","uvdose");

/*for(i=0;i<nb;i++)
{
par_fprintf_head(fp,"%12s %d","UV-Dosage-band-",i);
}

par_fprintf_head(fp,"%20s\n","name"); */
}

if(NULLP(tp))
return;

/*sprintf(name,"%s:%" int64_fmt,tp->injection->name,tp->part_id);*/

par_fprintf(fp,"%d %" int64_fmt " (("
"%12.4e %12.4e %12.4e"
"%12.4e %12.4e %12.4e"
"%12.4e %12.4e %12.4e"
"%12.4e %12.4e %12.4e"
"%12.4e %12.4e))\n",
P_INJ_ID(TP_INJECTION(tp)), tp->part_id,
TP_INIT_POS(tp)[0],TP_INIT_POS(tp)[1],TP_INIT_POS(tp)[2],
TP_POS(tp)[0],TP_POS(tp)[1],TP_POS(tp)[2],
TP_VEL(tp)[0], TP_VEL(tp)[1], TP_VEL(tp)[2],
TP_DIAM(tp), TP_T(tp), TP_FLOW_RATE(tp),
TP_TIME(tp),TP_USER_REAL(tp,0));

/*par_fprintf(fp,"%d %" int64_fmt " (("
"%12.4e %12.4e %12.4e"
"%12.4e %12.4e))\n",
P_INJ_ID(TP_INJECTION(tp)), tp->part_id,
TP_POS(tp)[0],TP_POS(tp)[1],TP_POS(tp)[2],
TP_USER_REAL(tp,0),TP_TIME(tp));*/

/*par_fprintf(fp,"%20.6g",TP_USER_REAL(tp,0));*/

/*par_fprintf(fp,"%20s\n",name); */


}

DEFINE_DPM_OUTPUT(sample_cphase_vel, header, fp, tp, t, plane)
{
int id;
real time;
real vel_x, vel_y, vel_z;



#if 0
if (header)
par_fprintf_head(fp,"ID Time[s] x-velocity[m/s] y-velocity[m/s] z-velocity[m/s] \n");
#endif



if (NULLP(tp))
return;

id = tp->part_id;
time = tp->state.time;
vel_x = tp->cphase->V[0];
vel_y = tp->cphase->V[1];
vel_z = tp->cphase->V[2];



if ( NULLP(tp->user) )
Message("ERROR: Please allocate one DPM User Scalar\n");
else
{
int interp = (int)(tp->user[0]);
par_fprintf(fp, "%d %d %2d %3d %7.5f %14.5e %14.5e %14.5e \n", id, interp,
id, interp, time, vel_x, vel_y, vel_z);
}
}
__________________
Sapere aude!
acalado 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
[foam-extend.org] 3.2 Installation in Debian 8.5 jsm OpenFOAM Installation 2 June 19, 2016 10:53
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 09:18
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 06:32


All times are GMT -4. The time now is 02:04.