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

How to use a non-standard C library in a UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2021, 14:22
Default How to use a non-standard C library in a UDF
  #1
New Member
 
Join Date: Jun 2021
Posts: 2
Rep Power: 0
Krite2002 is on a distinguished road
The UDF I am writing needs to be able to access a NetCDF file which requires the NetCDF library.

It is simple to use the additional library when I am writing a regular program. I am using Windows 10 and Visual Studio 2017. I have NetCDF added to the system path. Within Visual Studio, I can edit the project configuration properties to link to the include directories and additional library directories. Once those settings are changed I can use #include<netcdf.h>. It would be the same process for other libraries.

Is there a way to make it so when I compile a UDF in Fluent 19.1, it will recognize the NetCDF library? I tried just adding the netcdf.h header file in the functions\compile… dialogue box, but since there is more to the library than just the header file, it did not work. Are there settings for this somewhere within Fluent, or maybe some way to modify the libudf directory using Visual Studio after it is built in Fluent?
Krite2002 is offline   Reply With Quote

Old   June 29, 2021, 04:54
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
ansys fluent customization manual
look for
Link Precompiled Object Files From Non-ANSYS Fluent Sources
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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
Need help with udf library ("undefined symbol: user_outputs_init" error) shoaib_maverick CONVERGE 2 April 5, 2021 16:29
The UDF library you are trying to load is not compiled for 2ddp on the current platfo umeralizuberi Fluent UDF and Scheme Programming 6 March 25, 2021 04:25
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 23:28
Error, could not find CONVERGE UDF LIBRARY, libconverge_udf.so kri321shna CONVERGE 11 December 12, 2016 16:27
Error in opening UDF library anon_d Fluent UDF and Scheme Programming 4 May 21, 2011 03:10


All times are GMT -4. The time now is 15:12.