|
[Sponsors] |
October 17, 2010, 13:19 |
Fluent (ANSYS12) UDF Help, PLEASE! Urgent!
|
#1 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Hi, all. First-time poster, and very, very frustrated.
I have to analyze the flow around a wind turbine, and have set up my model and mesh in Gambit. I can read the mesh just find in Fluent (I am using ANSYS 12) and can do everything except compile UDFs. I need to write a UDF that simulated unsteady wind flow (in any way, as long as it's unsteady) and I need a second UDF that analyzes the flow around the windmill and animates its rotation using a dynamic mesh. I have the code written, but it's full of errors, so if someone wants to help me with that, I'd greatly appreciate it. However, the biggest problem is when I try to compile my UDFs. I get the following error: Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified. I have searched online and found several solutions, but none seem to work. I don't know how to fix my environment variables with ANSYS 12, because I can't find anything in START -> ANSYS 12 ... Can someone PLEASE help me? It's very urgent, and I'm very frustrated. I've been working on this project for months, and have made no progress once I got to the UDF part of it. I'm desperate! TIS |
|
October 17, 2010, 17:52 |
|
#2 |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
This error occur when U tried compile UDF while libudf do not "Build" correctly. Make sure that, Visual C ++ correctly installed on your computer(later than install Fluent, Register environment variables is checked when installs Visual C++...). I not work in fluent 12.1, but hope this help!
|
|
October 17, 2010, 17:54 |
|
#3 | |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Quote:
Can anyone shed some more light? And can anyone take a look at my UDF to see what I'm doing wrong in the code? TIS |
||
October 18, 2010, 05:09 |
|
#4 |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
Environment Variables were automatically installed when you installed Visual C++ if you check box "Register Environment Variables". What was error when you click "Build" UDF? I think you need read more information about this problem here:
http://www.cfd-online.com/Wiki/Fluen...tch_file.22.3F Best wish for you! |
|
October 18, 2010, 13:51 |
|
#5 | |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Quote:
Anyone else have some input? I'm going to post my code here later as well, if someone wants to take a look, because I don't have any idea how to write a good UDF. TIS |
||
October 20, 2010, 11:45 |
|
#6 |
Member
Akour
Join Date: May 2009
Posts: 79
Rep Power: 17 |
the fact that its saying it cant find a libudf file, means that at the moment you shouldnt be worrying about errors in your source code...because now it is even compiling your source code to begin with...so dont bother posting your source code until you figure out why it isnt compiling.
1. make *SURE* you launch fluent from within the visual studio command prompt...otherwise fluent wont link to the appropriate compiler... 2. make sure you enter the full directory where it asks you what the name of the library file is...or, when you launch from the vis studio command prompt, launch fluent from the appropriate directory... 3. check your environment variables... have you done all of that? good luck
__________________
akour |
|
October 20, 2010, 11:46 |
|
#7 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
That's the only thing I don't know how to do. My Start menu looks different than the examples I've seen elsewhere, and there's no Environment Variables option in the ANSYS 12 directory, or the Visual Studio directory. How should I check them??
Thanks. TIS |
|
October 20, 2010, 12:19 |
|
#8 |
Member
Akour
Join Date: May 2009
Posts: 79
Rep Power: 17 |
unfortunately I dont use Fluent 12...so I cant be certain for you, but in fluent 6 you dont have to set anything within fluent...but i remember i had this problem, and re-installed visual directly onto the c: directory...and my environment variable for fluent 6.3.26 is:
Variable: FLUENT_INC Value: c:\fluent.inc ...incase you dont know where to find all your user variables (system and environment)...go to your start menu, right click on my computer, then click on properties...advanced, and then environment variables. (in xp thats what you do)... also, something major i forgot, your fluent.inc directory and your visual studio directories must be shared, otherwise fluent wont find the udf.h file which contains everything fluent needs to compile through visual studio...hope that works.
__________________
akour |
|
October 20, 2010, 12:21 |
|
#9 | |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Quote:
Fluent definitely finds and copies nmake and udf.h correctly when trying to compile. It builds the libudf directory in my project folder correctly, it just won't load it when I want to. TIS |
||
October 20, 2010, 15:49 |
|
#10 |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
ur problem is set environment Variables, and ak6g08 helped. Best wish for you! Can I see ur code and mesh file?
|
|
October 26, 2010, 19:48 |
Files
|
#11 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Here is the link to the relevant files: http://www.yousendit.com/download/ZG...TStsUjgwTVE9PQ
HELP PLEASE! I still have the same "Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified." error despite everything I have tried. TIS |
|
October 27, 2010, 07:15 |
|
#12 | |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
Quote:
Best wish for you! |
||
October 27, 2010, 09:25 |
|
#13 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
I have designed and meshed an industrial windmill in GAMBIT. I now need to analyze its response to flow through the control volume. I need to determine the Coefficients of Lift, Drag, and Moment, and animate its angular motion based on the wind moving past it.
Does the UDF you wrote have to be compiled, or can it be interpreted? Thank you so much, I will try running the UDF later today and let you know how it goes. TIS |
|
October 27, 2010, 11:57 |
|
#14 |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
Yes, it compiled well on my mechanic. I haven't iterated mesh file, because i didn't know task of problem. What did you write in apflow.c? It's angular motion of windmill, isn't it?
Tell me if you have done! Regards! |
|
October 27, 2010, 17:01 |
|
#15 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Thank you so much! Both UDF files compiled perfectly (I finally fixed my environment variables).
The UDF "apflow.c" should create a parabolic flow through the control volume, so that the air does not move in a constant velocity. The other one ("apmotion.c") should calculate the windmill's angular momentum based on the lift forces acting on it, and then send that back to Fluent's dynamic mesh to move the windmill and re-calculate everything. Now, I have a new problem. I don't know how to make the animation show the windmill's motion. I have run the calculation, and my residuals converge to the values I expect. However, I cannot get the animation to show a moving windmill. Anybody have any feedback?? Thanks again. TIS |
|
October 27, 2010, 18:05 |
|
#16 |
Member
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16 |
Congratulations!
Your UDF apflow.c describes sinusoidal velocity from INLET, I'm right? In order to create animation, go to online help http://my.fit.edu/itresources/manual...g/node1157.htm I hope this help. If you want to create motion of windmill, then to do this: Solve>animate>define>.... On this window, increase "animation sequences" to 1, and define it. Set its name, every, when(iteration or time), define>..... Regards! |
|
October 27, 2010, 19:07 |
|
#17 |
Member
Arash
Join Date: Dec 2009
Location: Denmark
Posts: 37
Rep Power: 17 |
Dear Antonis,
I have not work with UDF too but I just saw your mesh and your geometry and i think you want to analyze Horizontal Wind turbine, am i right? I think you need to pitch your blades 90 degree because your turbine is rotating. if you don't rotate it 90 degree, then the flow will separate and you will not get proper result for your simulation. Also about UDF, why dont you use Sliding mesh method to give rotation to your blades? so that you do not need to write any UDF file! feel free to correct me if I am wrong or I misunderstood something. (i meant everyone ) Good luck |
|
October 27, 2010, 19:44 |
|
#18 |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Hi. I have pitched my blades to an angle of attack of 8 degrees, because that is the most commonly used angle for industrial windmills. The windmill is vertical, with flow through its operating diameter wing horizontal. I don't know if you misunderstood that or not. Again, to clarify, I am analyzing axial flow through the turbine's operating circle.
As for the sliding mesh, I don't have any experience with this, so I wouldn't know how to apply it. Will it analyze the forces on the windmill and iterate it for each step to show the acceleration of the windmill, as my UDF is supposed to do? TIS Last edited by ANITIX87; October 27, 2010 at 19:54. Reason: clarification of information |
|
October 27, 2010, 20:32 |
|
#19 | |
Member
Arash
Join Date: Dec 2009
Location: Denmark
Posts: 37
Rep Power: 17 |
Quote:
Hi again, I am sorry, again I think i cannot get what you mean by " the windmill is vertical". I attach a photo of both "Horizontal axis wind turbine" and "vertical axis wind turbine". I emphasis again if you analyze "HAWT", pitching your bladed 8 degrees is not correct specially for the tip of your blades. Concerning Sliding meshes, I suggest you to read Tutorial number 12 of Fluent. it's about Sliding meshes. About Loads, the answer is i dont know. but if you define your "reference value" then you can get your "CL" and "CD" per iteration or per time step. good luck |
||
October 27, 2010, 23:23 |
|
#20 | |
New Member
Antonis
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
Quote:
Thanks again to everyone for the help. I will run my simulation again tomorrow with the UDFs active, and let you all know how it goes! TIS |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for Viscoelastic Fow in Fluent | skris2009 | FLUENT | 2 | September 20, 2011 00:59 |
Urgent Help Needed!!! (regarding FLUENT UDF) | dsen | FLUENT | 2 | May 28, 2010 14:36 |
need some basic help with fluent udf | aarti sekaran | FLUENT | 8 | February 12, 2008 01:57 |
UDF in parallel version of fluent | yobee | FLUENT | 2 | August 5, 2004 01:36 |
URGENT ! UDF ERROR! | Prateep Chatterjee | FLUENT | 6 | October 16, 2001 20:20 |