|
[Sponsors] |
October 30, 2018, 03:39 |
UDF checks
|
#1 |
New Member
Ki Jong Kim
Join Date: Oct 2018
Posts: 12
Rep Power: 8 |
hope all is well.
I am a new to the Fluent. Now i am trying to analysis for sloshing. But problem happened to me. Tho cylinder motion is quite difficult for me. the motion for the cylinder is sinusoidal motion towards only one way (x-dir only)with +-40mm, 4hz. Below is the UDF that i written. Thank you much in advance. #include "udf.h" DEFINE_CG_MOTION(tank_mov, dt, vel, omega, time, dtime) { real a, w, pi; pi = 3.1415; /* define motion variables */ a = 0.04; /* 0.04m movement amplitude */ w = 2 * pi * 4; /* 4Hz frequency */ /* define object movement law */ vel[0] = a * w * sin(w*time); vel[1] = 0; vel[2] = 0; } |
|
October 30, 2018, 09:02 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Denis,
This looks almost correct to me, except that "vel[0] = a * w * sin(w*time);" will give an amplitude "a * w". I think you intended to write "vel[0] = a * sin(w*time);". Apart from that, it should be OK. Remember to save .cas and .dat files before you start any Moving/Deforming Mesh case. Use an appropriately small timestep. For a long time, there was a bug in Fluent that crashed when MDM cases with UDFs were closed and reopened -- so use a recent version of Fluent, where it has been fixed. Good luck! Ed |
|
October 30, 2018, 09:29 |
|
#3 | |
New Member
Ki Jong Kim
Join Date: Oct 2018
Posts: 12
Rep Power: 8 |
Quote:
I tried once again, below message poped up. Is there any problem this UDF? Please help me.. =============================================== test2.c # Generating udf_names.c because of makefile test2.obj udf_names.c # Linking libudf.dll because of user_nt.udf udf_names.obj test2.obj Microsoft (R) Incremental Linker Version 14.00.24215.1 Copyright (C) Microsoft Corporation. All rights reserved. LINK : fatal error LNK1104: cannot open file 'libudf.dll' Done. |
||
October 30, 2018, 09:33 |
|
#4 |
New Member
Ki Jong Kim
Join Date: Oct 2018
Posts: 12
Rep Power: 8 |
Also, what is meaning of "Remember to save .cas and .dat files before you start any Moving/Deforming Mesh case."
|
|
October 30, 2018, 20:37 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
this error means that you are trying to modify library, which is in use (you have loaded your UDF library in fluent) So you should unload first, than compile.
Best regards |
|
October 30, 2018, 20:38 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
||
November 1, 2018, 00:04 |
|
#7 |
New Member
Ki Jong Kim
Join Date: Oct 2018
Posts: 12
Rep Power: 8 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 13:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
Help! Delete the UDM codes in the UDF | Messi | Fluent UDF and Scheme Programming | 2 | January 28, 2014 10:01 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |