cfd compilation error - LNK2019
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 . |
fixed it
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.
|
Why did you need a UDF code?
|
Quote:
|
2 Attachment(s)
Quote:
Attachment 86130 Attachment 86131 Ps: Thanks to Ahmet Kozanoglu for images |
Quote:
|
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. |
Quote:
|
All times are GMT -4. The time now is 06:44. |