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

UDF compiling error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2013, 20:47
Default UDF compiling error
  #1
Member
 
Join Date: Apr 2012
Posts: 48
Rep Power: 14
vagaikwa is on a distinguished road
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 is offline   Reply With Quote

Old   April 19, 2013, 21:26
Default
  #2
Member
 
Join Date: Apr 2012
Posts: 48
Rep Power: 14
vagaikwa is on a distinguished road
I guess the reason was because of the natural log..I could load it successfully.
vagaikwa 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
error compiling modified applications yvyan OpenFOAM Programming & Development 21 March 1, 2016 04:53
[swak4Foam] installing funkySetFields igo OpenFOAM Community Contributions 1 November 20, 2012 20:16
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31


All times are GMT -4. The time now is 11:21.