|
[Sponsors] |
UDF 3D Rotation for Fluid in concentric sphere |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 21, 2019, 02:18 |
UDF 3D Rotation for Fluid in concentric sphere
|
#1 |
New Member
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 7 |
Hi everyone,
I am first time user to UDF, and using ansys 2016. I need UDF for the lower momentum boundary condition. I am trying to put expressions for a 3D , 1/8 concentric sphere, and the fluid is driven by lower surface to oscillate with respect to z-axis. I have attached the 2 diagrams below of the fluid surfaces. In 2019 version, i can put the boundary conditions as expression as sin(t/1[s])*1[rad/s] for the lower oscillating surface. If I want to write in UDF, can I write in this way ? Please help. [CODE] /************************************************** ******************** oscillatingwall.c UDF for specifying a transient simple harmonic motion ************************************************** *********************/ #include "udf.h" #define angular_freq 1 DEFINE_GRID_MOTION(inneroscillatingwall, dt, cg_vel, cg_omega, time, dtime) { Thread*t; /*is the pointer to the structure that store*/ real omega; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); t=DT_THREAD(dt); /*Get the tread pointer for which this motion is defined*/ omega = sin(angular_freq*time); /*rotional speed about axis*/ cg_vel[0] = 0.0; /*x y z translation*/ cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0]=0.0; /* x y z rotational axis*/ cg_omega[1]=0.0; cg_omega[2]=omega; } |
|
December 22, 2019, 20:40 |
|
#2 |
New Member
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 7 |
I have tried several methods, and amending the code, this is what I currently face, could anyone please help ?
#include "udf.h" #define angular_freq 1.0 DEFINE_CG_MOTION(inneroscillatingwall, dt, cg_vel, cg_omega, time, dtime) { real omega; omega = sin(angular_freq*time); /*rotional speed about axis*/ cg_vel[0] = 0.0; /*x y z translation*/ cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0]=0.0; /* x y z rotational axis*/ cg_omega[1]=0.0; cg_omega[2]=omega; } /*When I press build button, it gives */ Setting Post Processing and Surfaces information ... Done. Copied C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent/C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\UDF oscillating.c to libudf\src Creating user_nt.udf file for 3ddp ... (system "copy "C:\PROGRA~1\ANSYSI~1\v170\fluent"\fluent17.0.0\sr c\udf\makefile_nt.udf "libudf\win64\3ddp\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp")'nmake' is not recognized as an internal or external command, operable program or batch file. Done. /*When I press load button, it gives*/ Opening library "C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\libudf"...RPC RCX_SC_SET_ERR_MSG failed: RPC: Can't encode arguments Error: The UDF library you are trying to load (C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\libudf) is not compiled for 3ddp on the current platform (win64). The system cannot find the file specified. C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\libudf\win64\3ddp\libudf. dll Error: The UDF library you are trying to load (C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\libudf) is not compiled for 3ddp on the current platform (win64).\n\nThe system cannot find the file specified. \n\nC:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\C:\Users\Dell T7600\Desktop\Chee Hao Ansys\Hip Gap_files\dp0\FFF\Fluent\libudf\win64\3ddp\libudf. dll Error Object: #f /*And then I restart Ansys, it somehow have the UDF file, when I load to the boundary, and press ok, it gives */ Error: received a fatal signal (Segmentation fault). Error: received a fatal signal (Segmentation fault). Error Object: #f |
|
December 23, 2019, 00:05 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you didn't compile the code: nmake error in log
solution: run Visual Studio console, run fluent from console, compile udf, load udf, hook udf function
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 23, 2019, 05:11 |
|
#4 |
New Member
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 7 |
Dear AlexanderZ,
Thanks for your comment, anyway, I did follow your advise, and follow steps as in this video, using visual studio to launch fluent, but I still face the same problem, nmake error, could you please advise ? I need your help . Hope to hear from you very soon. https://www.youtube.com/watch?v=xt2hnE9_LdM |
|
December 23, 2019, 05:27 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
there should be no problem, if you run fluent from visual studio console
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 23, 2019, 07:46 |
|
#6 |
New Member
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 7 |
Dear AlexanderZ,
There are 3 types of VS, 1. Community 2019 2. Professional 2019 3. Enterprise 2019 Which one should I actually select to install ? I had selected the Community 2019, but inside, there are a lot of tick to choose, which consume a lot of space, if all are selected, like 30GB++, but I have limited harddisk space. To install VS alone is only 600MB++, any part I should specifically to tick to include during the installation process ? Thank you. |
|
December 24, 2019, 02:21 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you may try to use other approach
download microsoft windows sdk 7.1, if your system is x64 -> downlaod x64 version https://www.microsoft.com/en-us/down...s.aspx?id=8279 download: https://www.microsoft.com/en-gb/down...s.aspx?id=4422 delete from your machine: Microsoft Visual C++ 2010 x64 Redistributable 10.0.30319 (numbers could be different) Microsoft Visual C++ 2010 x86 Redistributable 10.0.30319 (numbers could be different) install: SDK Install VS compiler
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 2, 2020, 01:43 |
|
#8 |
New Member
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 7 |
Dear AlexandarZ,
Happy New Year, I had followed ur step, the UDF can build in an original version, but not cracked version. Step one is done. I am trying to solve the load problem first. Will ask again if i could not solve the load problem. Last edited by andyhor; January 2, 2020 at 01:51. Reason: Error in message, need go retry |
|
Tags |
fluent, udf code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Rotation | lepetitmort | Fluent UDF and Scheme Programming | 38 | October 15, 2020 07:29 |
sinusoidal rotation UDF | denis Kim | Fluent UDF and Scheme Programming | 9 | May 22, 2020 18:39 |
UDF Dynamic Meshing for Rotation and Translation | Aidan100 | Fluent UDF and Scheme Programming | 2 | August 17, 2015 00:39 |
Simulating a rotating sphere, with axis of rotation normal to flow direction | gamer_lester | FLUENT | 2 | December 19, 2014 15:47 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 13:37 |