CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF compiling error (https://www.cfd-online.com/Forums/fluent-udf/116478-udf-compiling-error.html)

vagaikwa April 19, 2013 20:47

UDF compiling error
 
Hello guys,
I am writing a UDF, and following is the error which I am getting. Can someone please help me to eliminate it?

#include "udf.h"

#include "stdio.h"

#include "math.h"

#define lambda 0.11

#define erbc 0.45

#define mup 0.001

DEFINE_PROPERTY(cumul_viscosity,c,t)

{

real mu_blood,gamma,a,n,m,ko,shear_rate;

gamma = C_STRAIN_RATE_MAG(c,t);



/*Calculating Dimensionless shear rate*/



shear_rate = 1+pow((lambda*gamma),2);

ko=ln(ln(shear_rate))/ln(shear_rate);



if(shear_rate>=1.5)

{

n = 0.8092*(pow(erbc,3))-0.8246*(pow(erbc,2))-0.3503*erbc+1;

m=122.28*(pow(erbc,3))-51.213*(pow(erbc,2))+16.305*erbc+1;

}



/*Low shear rate*/



else

{

n = ko*(-0.8913*(pow(erbc,3))+2.0679*(pow(erbc,2))-1.7814*erbc)+1;

m=70.782*(pow(erbc,3))-22.454*(pow(erbc,2))+9.7193*erbc+1;

}

a = 0.5*(n-1);



/*Multiplying dimensionless shear rate by viscosity of plasma 0.001*/



mu_blood = mup*m*(pow(shear_rate,a));

return mu_blood;

}


This is the error..
Creating library libudf.lib and object libudf.exp
mod_carreau.obj : error LNK2019: unresolved external symbol ln referenced in function cumul_viscosity
libudf.dll : fatal error LNK1120: 1 unresolved externals

Any help in this regard is highly appreciated. Thanks.
-Varad

vagaikwa April 19, 2013 21:26

I guess the reason was because of the natural log..I could load it successfully.


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