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

LINK errors compiling udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 5, 2018, 07:13
Default LINK errors compiling udf
  #1
New Member
 
Marco
Join Date: Dec 2018
Posts: 2
Rep Power: 0
marco91 is on a distinguished road
Hi everyone,

my task is to simulate an oscillating cylinder in vortex shedding conditions.

You found in below the UDF and the messages of fluent's console.
I'm quite sure about the udf, the cylinder has to oscillate along y with a frequency of 5Hz and an amplitute of 30mm.
My issues are related to visual studio end link errors. I started fluent by cross platform visual studio 2017 prompt, both pc and ansys are x64.

#include "udf.h"

DEFINE_CG_MOTION(object_mov, dt, vel, omega, time, dtime)
{
real a, w, pi;

pi = 3.1415;

/* define motion variables */
a = 0.03; /* 30mm movement amplitude */
w = 2 * pi * 5; /* 5Hz frequency */

/* define object movement law */
vel[0] = 0;
vel[1] = a * w * sin(w*time);
vel[2] = 0;

}

> Copied D: est_UDF/myUDF.c to libudf\src
Creating user_nt.udf file for 2ddp_host ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v190\fluent"\fluent19.0.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp_host\makefile" ")
1 file copiati.
(chdir "libudf")(chdir "win64\2ddp_host")# Generating ud_io1.h
myUDF.c
# Generating udf_names.c because of makefile myUDF.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj myUDF.obj
Microsoft (R) Incremental Linker Version 14.16.27024.1
Copyright (C) Microsoft Corporation. All rights reserved.

Creazione della libreria libudf.lib e dell'oggetto libudf.exp
myUDF.obj : error LNK2019: riferimento al simbolo esterno _sin non risolto nella funzione _object_mov
myUDF.obj : error LNK2001: simbolo esterno __fltused non risolto
LINK : error LNK2001: simbolo esterno __DllMainCRTStartup@12 non risolto
C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\mult iport\win64\net\shared\mport.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\win6 4\2ddp_host\fl1900.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\li b\x64\LIBCMT.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
libudf.dll : fatal error LNK1120: 3 esterni non risolti
Creating user_nt.udf file for 2ddp_node ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v190\fluent"\fluent19.0.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp_node\makefile" ")
1 file copiati.
(chdir "libudf")(chdir "win64\2ddp_node")# Generating ud_io1.h
myUDF.c
# Generating udf_names.c because of makefile myUDF.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj myUDF.obj
Microsoft (R) Incremental Linker Version 14.16.27024.1
Copyright (C) Microsoft Corporation. All rights reserved.

Creazione della libreria libudf.lib e dell'oggetto libudf.exp
myUDF.obj : error LNK2019: riferimento al simbolo esterno _sin non risolto nella funzione _object_mov
myUDF.obj : error LNK2001: simbolo esterno __fltused non risolto
LINK : error LNK2001: simbolo esterno __DllMainCRTStartup@12 non risolto
C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\mult iport\win64\mpi\shared\mport.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
C:\PROGRA~1\ANSYSI~1\v190\fluent\fluent19.0.0\win6 4\2ddp_node\fl_mpi1900.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\li b\x64\LIBCMT.lib : warning LNK4272: il tipo 'x64' del computer della libreria è in conflitto con il tipo 'x86' del computer di destinazione
libudf.dll : fatal error LNK1120: 3 esterni non risolti

Done.

I hope you'll help to find a solution.

Thx for your time
marco91 is offline   Reply With Quote

Reply

Tags
lnk1120, lnk2001, lnk2019, lnk4272, udf


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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 6, 2023 00:48
UDF compiling error Weiqiang Liu FLUENT 2 November 21, 2018 10:36
p_rgh initial residual no change with different settings manuc OpenFOAM Running, Solving & CFD 3 June 26, 2018 16:53
Errors when Compiling UDF: error C2040/error C2099 Julian K. FLUENT 1 December 21, 2008 01:23
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 00:17.