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