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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2020, 14:02
Default Could not find "libudf"
  #1
Senior Member
 
acalado's Avatar
 
André
Join Date: Mar 2016
Posts: 133
Rep Power: 10
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, 04:07
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ 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 was helpful
AlexanderZ is offline   Reply With Quote

Old   June 26, 2020, 09:23
Default
  #3
Senior Member
 
acalado's Avatar
 
André
Join Date: Mar 2016
Posts: 133
Rep Power: 10
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

Old   June 21, 2021, 09:02
Default
  #4
New Member
 
Join Date: Jun 2020
Posts: 1
Rep Power: 0
kuloek is on a distinguished road
DEFINE_INIT(init_charge, domain)
{
if (NULLP(user_particle_vars))
Init_User_Particle_Vars();
strcpy(user_particle_vars[0].name,"Particle Сharge");
strcpy(user_particle_vars[0].label,"Particle Сharge");
strcpy(user_particle_vars[1].name,"Cell Index");
strcpy(user_particle_vars[1].label,"Сell Index");
}
kuloek is offline   Reply With Quote

Old   June 21, 2021, 13:33
Default
  #5
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Compile, don't interpret.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   July 12, 2022, 10:12
Default Udf
  #6
New Member
 
Antonio Santoyo
Join Date: Jun 2022
Posts: 2
Rep Power: 0
antoniosantoyo is on a distinguished road
Someone have the UDF uv_dosage::libudf?
antoniosantoyo is offline   Reply With Quote

Old   July 14, 2022, 04:49
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Quote:
Originally Posted by antoniosantoyo View Post
Someone have the UDF uv_dosage::libudf?
the person, who made case you are using has that UDF, ask him better
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   March 5, 2024, 14:08
Default
  #8
New Member
 
Niall
Join Date: Mar 2024
Posts: 4
Rep Power: 2
BlueLumos is on a distinguished road
Dear André,

I trust this message finds you well. While perusing the forums, I noticed your post regarding a particular issue with Ansys Fluent, and I couldn't help but reach out.

I am currently facing a similar challenge with the same code you discussed in your previous post. Despite my efforts to resolve the issue, I find myself at an impasse. It seems you encountered a similar situation some time ago, and I'm curious to know if you were able to find a solution.

In my pursuit of answers, I reached out to the code's original creator, but their guidance was limited to suggesting an update to the UDF code, leaving me with little direction. Given your prior experience, I am hopeful that you may have discovered a more comprehensive solution.

Your insights on how you resolved the issue, if indeed you did, would be immensely valuable to me. I understand that time has passed since your initial post, but any assistance you can provide would be sincerely appreciated.

Thank you very much for considering my request, and I look forward to any insights or guidance you may have to offer.

Warm regards,

Niall
BlueLumos 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
[foam-extend.org] 3.2 Installation in Debian 8.5 jsm OpenFOAM Installation 2 June 19, 2016 11:53
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 10:18
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32


All times are GMT -4. The time now is 12:08.