CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

cfd compilation error - LNK2019

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By vivjk94

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2021, 00:52
Default cfd compilation error - LNK2019
  #1
Member
 
Vivek MJ
Join Date: Oct 2020
Location: India
Posts: 53
Rep Power: 6
vivjk94 is on a distinguished road
The code below is my udf for simulating a gear pump which was taken from a youtube video:

for second gear,

#include "udf.h"

DEFINE_CG_MOTION(gear_2_new,dt,vel,omega,time,dtim e)
{


real t = CURRENT_TIME;
NV_S (vel, = , 0.0);
NV_S (omega, = , 0.0);
omega[2] = -60.0;


}

for first gear,

#include "udf.h"

DEFINE_CG_MOTION(gear_1_new,dt,vel,omega,time,dtim e)
{

real t = CURRENT_TIME;
NV_S (vel, = , 0.0);
NV_S (omega, = , 0.0);
omega[2] = 60.0;

}

This is the error message i recieve:
gearone.obj : error LNK2019: unresolved external symbol __imp__RP_Get_Float referenced in function _gear_1_new
geartwo.obj : error LNK2001: unresolved external symbol __imp__RP_Get_Float
C:\PROGRA~1\ANSYSI~1\v192\fluent\fluent19.2.0\mult iport\win64\mpi\shared\mport.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\PROGRA~1\ANSYSI~1\v192\fluent\fluent19.2.0\win6 4\2d_node\fl_mpi1920.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
libudf.dll : fatal error LNK1120: 1 unresolved externals

The weird thing about this is that this udf executed perfectly the previous day and today its throwing me this error. i use fluent 19.2 and Visual studio 2017 .
vivjk94 is offline   Reply With Quote

Old   September 2, 2021, 09:08
Default fixed it
  #2
Member
 
Vivek MJ
Join Date: Oct 2020
Location: India
Posts: 53
Rep Power: 6
vivjk94 is on a distinguished road
The issue is fixed. i reinstalled visual basic studio 2017 and got the x86 version of the visual basic studio community 2017 instead of the x64 version. Hope it helps others.
vivjk94 is offline   Reply With Quote

Old   September 2, 2021, 09:27
Default
  #3
Member
 
Guvennergiz's Avatar
 
Guven Nergiz
Join Date: Jul 2020
Location: Turkey
Posts: 52
Rep Power: 6
Guvennergiz is on a distinguished road
Why did you need a UDF code?
Guvennergiz is offline   Reply With Quote

Old   September 2, 2021, 10:20
Default
  #4
Member
 
Vivek MJ
Join Date: Oct 2020
Location: India
Posts: 53
Rep Power: 6
vivjk94 is on a distinguished road
Quote:
Originally Posted by Guvennergiz View Post
Why did you need a UDF code?
i was trying to do a dynamic mesh with 2d gear pump setup.
vivjk94 is offline   Reply With Quote

Old   September 2, 2021, 10:31
Default
  #5
Member
 
Guvennergiz's Avatar
 
Guven Nergiz
Join Date: Jul 2020
Location: Turkey
Posts: 52
Rep Power: 6
Guvennergiz is on a distinguished road
Quote:
Originally Posted by vivjk94 View Post
i was trying to do a dynamic mesh with 2d gear pump setup.
I dont know which software you use for this analysis but I think its better to use discontinuous mesh instead of adaptive mesh with such a moving part analysis.

Disc-Mesh-1.PNG
Disc-Mesh-2.jpg

Ps: Thanks to Ahmet Kozanoglu for images
Guvennergiz is offline   Reply With Quote

Old   September 2, 2021, 11:02
Default
  #6
Member
 
Vivek MJ
Join Date: Oct 2020
Location: India
Posts: 53
Rep Power: 6
vivjk94 is on a distinguished road
Quote:
Originally Posted by Guvennergiz View Post
I dont know which software you use for this analysis but I think its better to use discontinuous mesh instead of adaptive mesh with such a moving part analysis.

Attachment 86130
Attachment 86131

Ps: Thanks to Ahmet Kozanoglu for images
i am currently using Ansys Fluent. discontinuous mesh sounds interesting. which software do you recommend for doing the analysis using discontinuous mesh?
vivjk94 is offline   Reply With Quote

Old   September 2, 2021, 11:10
Default
  #7
Member
 
Guvennergiz's Avatar
 
Guven Nergiz
Join Date: Jul 2020
Location: Turkey
Posts: 52
Rep Power: 6
Guvennergiz is on a distinguished road
I prefer Cradle CFD especially moving part analysis. You can download student version of it. There is many tutorials inside to better understand how CFD analysis can perform.

https://www.mscsoftware.com/node/10211

Note: Cradle is 3D CFD software, 2D analysis may not allowed. But you can define symmetrical or periodic boundaries.
Guvennergiz is offline   Reply With Quote

Old   September 2, 2021, 11:17
Thumbs up
  #8
Member
 
Vivek MJ
Join Date: Oct 2020
Location: India
Posts: 53
Rep Power: 6
vivjk94 is on a distinguished road
Quote:
Originally Posted by Guvennergiz View Post
I prefer Cradle CFD especially moving part analysis. You can download student version of it. There is many tutorials inside to better understand how CFD analysis can perform.

https://www.mscsoftware.com/node/10211

Note: Cradle is 3D CFD software, 2D analysis may not allowed. But you can define symmetrical or periodic boundaries.
wow, thanks. i will try it using cradle.
Guvennergiz likes this.
vivjk94 is offline   Reply With Quote

Reply

Tags
dynamic mesh, user defined function


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
Cfd to ansys thermal to ansys structural interface ssixr ANSYS 17 July 31, 2015 16:18
STAR-Works : Mainstream CAD with CFD CD adapco Group Marketing Siemens 0 February 13, 2002 13:23
Where do we go from here? CFD in 2001 John C. Chien Main CFD Forum 36 January 24, 2001 22:10
ASME CFD Symposium, Atlanta, July 2001 Chris R. Kleijn Main CFD Forum 0 August 21, 2000 05:49
Which is better to develop in-house CFD code or to buy a available CFD package. Tareq Al-shaalan Main CFD Forum 10 June 13, 1999 00:27


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