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

Error while Compiling UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2015, 05:47
Default Error while Compiling UDF
  #1
New Member
 
Ayush
Join Date: Oct 2015
Posts: 1
Rep Power: 0
ayush12008 is on a distinguished road
Somebody suggest me to solve the following problem which I'm encountering while compiling fluent udf

The UDF library you are trying to load (G:\BTP\Fluent test files\final ugri 2 est1_files\dp0\FFF\Fluent\libudf) is not compiled for 2ddp on the current platform (win64).
The system cannot find the file specified
.

G:\BTP\Fluent test files\final ugri 2 est1_files\dp0\FFF\Fluent\G:\BTP\Fluent test files\final ugri 2 est1_files\dp0\FFF\Fluent\libudf\win64\2ddp\libudf .dll


also after opening fluent from cmd shell how to read the mesh files in the fluent

ayush12008 is offline   Reply With Quote

Old   October 30, 2015, 08:47
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
The error you show now is the error when you try to load the udf. It says that the UDF "is not compiled", so something went wrong in compiling.
Please show the error that you get when compiling the udf (when you click 'build') if you need help to find out what went wrong.
pakk is offline   Reply With Quote

Old   October 30, 2015, 09:17
Default
  #3
New Member
 
Join Date: Nov 2010
Posts: 17
Rep Power: 16
Achin is on a distinguished road
This error would show up when you click load. But after clicking build, if you are getting an error like "nmake not recognized as an internal or external command" then you need to make sure to have visual studio installed.
Achin is offline   Reply With Quote

Old   October 30, 2015, 09:22
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
And for compiling it is better not to have any spaces in folder names/file names.
pakk is offline   Reply With Quote

Old   November 7, 2015, 22:33
Default
  #5
New Member
 
Gbenga
Join Date: Nov 2015
Posts: 4
Rep Power: 11
noponusd is on a distinguished road
Pakk
Please I have been trying to reach you

I have a UDF that suppose to
he UDF
1: Specify initial moisture content
2: Calculate the source term for moisture in the mass transfer equation
3: Adjust moisture values at every time step
4: Calculate the source term for energy balance (this is where I guess I have an error)

The code compiled but i got the error after it run:
Error: received a fatal signal (Segmentation fault)
please I need your help:

my code is this
#include "udf.h"


/*Chung-post constants */
#define ACP 921.69
#define BCP 18.077
#define CCP 112.35

#define RHOB 639.2
#define PATM 101325

/*Define ambient temperature conditions */
#define TMEAN 288.15
#define TAMP 5
#define d_b 0.0003 /* mean diameter of bulk material */

real A_V_sphere = 6.0 / d_b; /* area-to-volume ratio of a sphere*/
real A_b_V;

enum
{
T_B,
N_REQUIRED_UDS
};

/*Define a global variable that compare in macro Define_Adjust*/
int last_ts = -1;

DEFINE_INIT(moisture_init, d)
/*The initial solids moisture content, W is set and the corresponding humidity, w of the intergranular air is calculated*/
{
cell_t c;
Thread *t;
real W, Tabss, TC, r, psat, p, w;
/*Loop over all of the cell thread in the bulk grain */

thread_loop_c(t, d)
{
begin_c_loop(c, t)
{
C_UDMI(c, t, 0) = 0.1364;
W = C_UDMI(c, t, 0);
Tabss = 288;
TC = Tabss - 273.15;
/* calculate the relative humidity of inter granular air, eqn 11. */
r = exp((-ACP / (TC + CCP))*exp(-BCP*W));
/*Ensure the air does not become supersaturaed */
if (r > 0.99)
{
r = 0.99;
}
psat = 6.0e25 / pow(Tabss, 5)*exp(-6800 / Tabss);
p = r*psat;
w = 0.622*p / (PATM - p); /*Eqn 12 */
C_UDSI(c, t, 0) = w;
}
end_c_loop(c, t);
}

}

/* heat transfer coefficient in porous media, see Wakao and Kaguei, 1982 */
real htc(cell_t c, Thread *t)
{
real Nu, Re, Pr;

Re = ND_MAG(C_U(c, t), C_V(c, t), C_W(c, t))*d_b*C_R(c, t) / C_MU_L(c, t);
Pr = C_CP(c, t)*C_MU_L(c, t) / C_K_L(c, t);
Nu = 2. + 1.1 * pow(Re, 0.6) * pow(Pr, 1. / 3.);

return Nu*C_K_L(c, t) / d_b;
}


DEFINE_SOURCE(mass_source, c, t, dS, eqn)
{
real Tabs, TC, W, w, pe, re, drebydpe, We, Source_w, psat, drying_constant;
Tabs = C_T(c, t);
TC = Tabs - 273.15;
psat = 6.0e25 / pow(Tabs, 5)*exp(-6800 / Tabs);
W = C_UDMI(c, t, 0);
w = C_UDSI(c, t, 0);
/* The post-fix 'e' denote variables that relates to the equilibrum moisture content, We*/
pe = w* PATM / (0.622 + w);
re = pe / psat;
We = -1 / BCP*log(-(TC + CCP) / ACP*log(re)); /*Eqn 6 */
drying_constant = 2000 * exp(-5094 / Tabs); /*Eqn 5 */
C_UDMI(c, t, 3) = re;
C_UDMI(c, t, 2) = We; /*Eqn 3:*/
C_UDMI(c, t, 1) = -RHOB*drying_constant*(W - We);
Source_w = -C_UDMI(c, t, 1);
dS[eqn] = 0.0;
return Source_w;
}


DEFINE_ADJUST(update_mc, d)
{
real Tabs, TC, physical_dt, W, We, w, pe, re, Wnew, psat;
cell_t c;
Thread *t;
/*The integer time step count (accessed using N_TIME is useful in DEFINE_ADJUST functions for detecting wherther the current iteration is the first in the time step */
int curr_ts;
curr_ts = N_TIME;
if (last_ts != curr_ts)
{
last_ts = curr_ts;
physical_dt = RP_Get_Real("physical-time-step");
/*Loop over all of the cell threads in the porous region */
thread_loop_c(t, d)
{
begin_c_loop(c, t)
{
Tabs = C_T(c, t);
TC = Tabs - 273.15;
psat = 6.0e25 / pow(Tabs, 5)*exp(-6800 / Tabs);
W = C_UDMI(c, t, 0);
w = C_UDSI(c, t, 0);
/*The post-fix 'e' denotes variable that relate to the equilibrum moisture content */
pe = w*PATM / (0.622 + w); /*Eqn 7*/
re = pe / psat;
We = -1 / BCP*log(-(TC + CCP) / ACP*log(re)); /*eqn 6 */
Wnew = W + C_UDMI(c, t, 1)* physical_dt / RHOB; /*Eqn 10 */
W = Wnew;
C_UDMI(c, t, 0) = W;
}
end_c_loop(c, t)
}
}
}

DEFINE_SOURCE(hygro_source, c, t, dS, eqn)
{
real Tabs, TC, w, psat, dpsatdt, drdt, hsbyhv, hs;
real pe, re, We, we, dwsebydt, Source_t, pref;

Tabs = C_T(c, t);
TC = Tabs - 273.15;
we = C_UDSI(c, t, 0);
psat = 6.0e25 / pow(Tabs, 5) *exp(-6800 / Tabs);
pe = we*PATM / (0.622 + we);
re = pe / psat;
We = -1 / BCP*log(-(TC + CCP) / ACP*log(re));
dpsatdt = psat / Tabs*(-5 + 6800 / Tabs);
drdt = (ACP*re / pow((TC + CCP), 2))*exp(-BCP*We);
hsbyhv = 1 + psat / re * 1 / dpsatdt*drdt;
hs = hsbyhv*(2501.33 - 2.363*TC)*1.0e3;
C_UDMI(c, t, 4) = hs;
Source_t = C_UDMI(c, t, 1) * hs;
dS[eqn] = -pref;
return Source_t;
}
noponusd 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
fluent udf error while compiling: unknown type name __locale_t aditya.pandare Fluent UDF and Scheme Programming 3 April 12, 2014 15:52
ERROR in compiling UDF stefanos Fluent UDF and Scheme Programming 1 April 25, 2012 08:37
Problem with compiling the UDF raghu mohan Fluent UDF and Scheme Programming 10 December 17, 2011 00:34
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
On Compiling a UDF David Chabot FLUENT 5 May 20, 2005 10:13


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