CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF - Error loading libudf (https://www.cfd-online.com/Forums/fluent-udf/85610-udf-error-loading-libudf.html)

Marya August 24, 2015 02:41

Thanks a lot. It worked for me :)

gyf135 September 30, 2015 15:51

The description in the pdf file works for me!

I was trying to load the libudf to Fluent after I thought I have built it. Actually it didn't. Even though there is no error message showing up when I click on the build button.

The problem I encountered was due to a space in the name of my .c file. So I suggest to make a simple name for the .c file. And I found this when I checked the log file under the /libudf/win64/ folder. Hope this would help someone.:)

roi247 October 14, 2015 18:52

Amazing!!
 
Thank you for the help

Ozair Piracha April 18, 2016 14:52

Hey all,
I am using Windows 10 (64 Bits). Would I have to install SDK for Windows 10 to run the Fluent according to the method mentioned in the above posts?
I will be obliged to have any reply.
Thank you.

Johnr May 25, 2016 19:02

Loading a UDF
 
Hi,
I have made a udf ".c" file. now i don't know how to load this file in fluent. It basically takes outlet temp at each time step and regulates x momentum source term from that.

I am new to udfs....Help is needed...

jyothsna k May 26, 2016 02:22

1. copy your .c file to your project's 'Fluent' folder
2. In Fluent, go to
Define->User Defined-> Functions->Compiled->Add->(select your file)-> Build
3. if you see any error, rectify it in your .c file , save and compile again(no need to add again. just click 'compile')
4. when you have no errors click on 'Load'
5. hook the udf's and run

macfly May 27, 2016 09:48

Quote:

Originally Posted by macfly (Post 520552)
Only 2 steps did the trick for me in order to compile UDFs in Fluent 14.5 or 15 on Windows 8.1:

- Installing Microsoft Visual Studio Express 2012 for Windows 8: http://www.microsoft.com/en-ca/downl....aspx?id=30664

- Add the path to nmake.exe to the Path environment variable.

Hi all,
I just want to mention that the same setup works just fine for compiling UDFs with Windows 10 64 bit/Fluent 17.0 (even if the Visual Studio version is supposedly for Windows 8).

jpap87 June 2, 2016 04:26

Quote:

Originally Posted by macfly (Post 602107)
Hi all,
I just want to mention that the same setup works just fine for compiling UDFs with Windows 10 64 bit/Fluent 17.0 (even if the Visual Studio version is supposedly for Windows 8).

Hey macfly

Pardon my "noobness" but what exactly is/meant by "- Add the path to nmake.exe to the Path environment variable." what do you do exactly?

Thank you very much

macfly June 2, 2016 10:36

3 Attachment(s)
How to add the path to nmake.exe to the Path environment variable:
- Go to Control Panel => System => Advanced System Properties => Advanced tab and you should get the window shown on the 1st attached picture.
- Click on Environment Variables...
- Select the Path environment variable and click Edit... (see 2nd attached picture)
- In the Edit environment variable window, click New and add the path where nmake.exe is located under the Visual Studio installation. On my computer it's C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin (see 3rd attached picture)

That's it

jpap87 June 2, 2016 12:22

Quote:

Originally Posted by macfly (Post 603102)
How to add the path to nmake.exe to the Path environment variable:
- Go to Control Panel => System => Advanced System Properties => Advanced tab and you should get the window shown on the 1st attached picture.
- Click on Environment Variables...
- Select the Path environment variable and click Edit... (see 2nd attached picture)
- In the Edit environment variable window, click New and add the path where nmake.exe is located under the Visual Studio installation. On my computer it's C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin (see 3rd attached picture)

That's it


Thank you very much for your help!

osamaajaz December 20, 2016 06:02

2 Attachment(s)
i am using MSVB2010 and getting error that is displayed in attached pictures

osamaajaz January 13, 2017 09:40

#F error
 
1 Attachment(s)
respected mates, there is a problem i am facing with UDF file. Kindly check and pont out what is the main error

this is code i am using for 2D
and getting the error that is showed in the attached picture


#include "udf.h"
DEFINE_CG_MOTION(move,dt,vel,omega,time,dtime)
{
vel[1] = 0.0942*sin(0.628*time);

}

DEFINE_CG_MOTION(ball1,dt,vel,omega,time,dtime)
{
if (time>0 && time<1)
vel[1]=0.018*time;
else if (time>5 && time<5.1)
vel[1]=-0.0005;
else if (time>5.1 && time<5.5)
vel[1]=-0.035;
else
vel[1]=-0.00;

}

DEFINE_CG_MOTION(ball2,dt,vel,omega,time,dtime)
{
if (time>0 && time<0.4)
vel[1]=-0.01;
else if (time>0.4 && time<5.5)
vel[1]=0.0942*sin(0.628*time);
else if (time>5.5 && time<6.17)
vel[1]=-0.0028;
else
vel[1]=0.0942*sin(0.628*time);
}

pakk January 13, 2017 09:54

You are showing the error that you get when you try to load the UDF. But the problem happened when you tried to compile ("build") the UDF. Show the text that is printed after you click 'build'.

KevinZ09 January 13, 2017 10:03

It's saying you don't have a library compiled for your 64-bits OS and 2D solver So compile it and load the library. If it still doesn't work, go through the suggestions in this thread.

osamaajaz January 13, 2017 11:22

how to compile for that
kindly guide me...
do i need to change all coding or some part in that?

osamaajaz January 13, 2017 11:27

2 Attachment(s)
Quote:

Originally Posted by pakk (Post 633159)
You are showing the error that you get when you try to load the UDF. But the problem happened when you tried to compile ("build") the UDF. Show the text that is printed after you click 'build'.

it is building but the problem occurs in loading, as showing in the corresponding pictures. i dont know how to fix it
need your guidance

Boh January 13, 2017 11:30

Quote:

Originally Posted by macfly (Post 603102)
How to add the path to nmake.exe to the Path environment variable:
- Go to Control Panel => System => Advanced System Properties => Advanced tab and you should get the window shown on the 1st attached picture.
- Click on Environment Variables...
- Select the Path environment variable and click Edit... (see 2nd attached picture)
- In the Edit environment variable window, click New and add the path where nmake.exe is located under the Visual Studio installation. On my computer it's C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin (see 3rd attached picture)

That's it

I think you need to do this to fix the problem

pakk January 14, 2017 06:06

Quote:

Originally Posted by osamaajaz (Post 633175)
it is building but the problem occurs in loading, as showing in the corresponding pictures. i dont know how to fix it
need your guidance

Your first picture clearly indicates that the problem occurs in building. I see the following text:
Quote:

'nmake' is not recognized as an internal or external command, ...
Your installation of Fluent can not find the compiler. The problem is not in your code.

osamaajaz January 20, 2017 12:54

Quote:

Originally Posted by pakk (Post 633242)
Your first picture clearly indicates that the problem occurs in building. I see the following text:

Your installation of Fluent can not find the compiler. The problem is not in your code.

how to fix it?

macfly January 20, 2017 15:07

Quote:

Originally Posted by osamaajaz (Post 634148)
how to fix it?

https://www.cfd-online.com/Forums/fl...tml#post603102

Please read the whole thread before participating in it, it's a minimum.


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