|
[Sponsors] |
June 24, 2018, 13:35 |
UDF compiled and loaded but not available
|
#1 |
New Member
Grigory
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Good time of day everyone!
My case is an inside circular domain containing an airfoil inside of another domain. My strategy is to apply UDF to the inside domain to make it rotate according to the UDF equation, so the airfoil would perform a pitching maneuver. I have a problem using a DEFINE_ZONE_MOTION UDF which was successfully compiled and loaded into Fluent (as far as I know). I launch fluent from the Visual Studio command prompt, all of the environment variables are there, udflib builds and the UDF loads (see pic1). But when I go to Setup-Dynamic Mesh section to set the dynamic zone as a rigid body and select the UDF is just not there (see pic2). Am I doing something wrong or missing some steps to see my UDF there? If you can give me some advice on improving my UDF, please do, I'll be glad to hear. Thanks in advance, Greg. |
|
June 24, 2018, 19:39 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Try my compiling process for Fluent UDFs with an existing library loaded. Otherwise, have you tried running the example UDF in the manual?
|
|
June 25, 2018, 01:49 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
from your first screen we may clearly see, that your UDF was not compiled. Source files up to date.
Try to make any change in source file and recompile, read carefully console output. best regards |
|
June 25, 2018, 05:02 |
|
#4 |
New Member
Grigory
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
' e', tried your manual, same output.
What confuses me a lot is that I can see and choose my UDF in the Cell zone conditions menu, but can't in the Dynamic mesh menu. AlexanderZ, I've built the libudf, which was successfully built, saved the case, re-read it and the console said: "Opening library "D:\CFD\2d-fluent\libudf"... Library "D:\CFD\2d-fluent\libudf\win64\2d\libudf.dll" opened overset Done." Doesn't it mean that the libudf is loaded and the UDF is compiled (it is in the src folder)? |
|
June 25, 2018, 07:00 |
|
#5 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Greg,
From memory, this was a bug in many versions of Fluent, where a Moving/Deforming Mesh setup would not survive saving the .cas and reopening the .cas. You had to hook the UDF back in every time. Actually, I think it applied to any MDM setup, whether or not it used UDF. In the (slightly esoteric) MDM cases without UDFs, you needed to edit some part of the MDM setup to get Fluent to remember/activate it. UDFs are not normally like this -- this was specific to MDM. I think it was fixed about a year ago, maybe release 19.0. So, either update Fluent or tweak the MDM setup every time you reopen a case -- or (if you're paranoid like me) do both. Good luck! Ed |
|
June 28, 2018, 06:17 |
|
#6 | |
New Member
Grigory
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Quote:
|
||
June 28, 2018, 06:36 |
|
#7 | |
New Member
Grigory
Join Date: Apr 2018
Posts: 10
Rep Power: 8 |
Quote:
|
||
June 28, 2018, 12:54 |
|
#8 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Easyeight,
This is all quite confusing. Apologies for sending you down the wrong path earlier -- I was answering a different question from the one you asked. Updating to 19.1 is the right thing to do, anyway -- not least because of the bug I mentioned. I am not sure what AlexanderZ spotted that was wrong with the text output in your screenshots. (AlexanderZ: please can you elaborate?) Blah blah "up to date" sounds like a good thing to me. However, there is a line of gobbledegook symbols in that text output, which is worrying. Here are some things to try -- some of them might be pointless and paranoid, but some of them are definitely really important. Unfortunately I'm not sure which. (1) Remove the space before "DEFINE_ZONE_MOTION" in the source file. Yes, really. (2) Your screengrabs show Fluent 2D, but your source file can only be 3D: it defines origin[2] and axis[2], and it defines the axis to be the z-axis, which does not exist in a 2D simulation. This is pretty bad -- but I would not expect Fluent to have spotted that in advance; I would expect it to explode later. Fix this. (2a) While you're there, get rid of pi as a variable and use the built-in constant M_PI. Also, put parenthesis around pi/3, so that nobody can think that pi/3*pi == 1./3.. (These are not the issue, but they distract me.) (3) Close down Fluent. Delete the entire libudf directory (if necessary using a Command prompt). Open Fluent and recompile the libudf before you open the .cas file. (4) I am not familiar with using Mesh Motion in a cell zone as well as Dynamic Mesh. In fact, the combination confuses me. So try setting up Dynamic Mesh without that setting in any cell zones. For full paranoia, unhook the UDF before you turn off the setting -- or, even better, go back to a version where you never turned it on. (5) Set up some Dynamic Mesh methods (smoothing/layering/remeshing) *before* you set up any Dynamic Mesh zones. Your first screenshot shows all options blank there. Your later screenshot shows some settings in place, but it is tainted by point (4). Please tell us how it goes. Good luck! Ed |
|
Tags |
define_zone_motion, fluent, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling my Udf | noa | Fluent UDF and Scheme Programming | 8 | November 7, 2018 21:08 |
An error occurs after initialized FLuent loaded UDF. | wpdeng | Fluent UDF and Scheme Programming | 6 | April 6, 2017 22:41 |
UDF compiled successfully but not all UDF's loaded | yashganatra | Fluent UDF and Scheme Programming | 0 | May 21, 2014 10:19 |
ERROR in compiling UDF | stefanos | Fluent UDF and Scheme Programming | 1 | April 25, 2012 08:37 |
What's a UDF? | Farooq | FLUENT | 5 | December 9, 2003 07:52 |