UDF For translational movement
edit: This is a bug in fluent 14.5 in version 15 works great.
I have a new problem I would like to make my object translate in the -X direction. How do I do this? Hi, I want to compile the following UDF: #include<udf.h> DEFINE_CG_MOTION(wall, dt, cg_vel, cg_omega, time, dtime) { cg_vel[0] = -0.6; /* x-velocity*/ cg_vel[1] = 0.0; cg_vel[2] = 0.0; NV_S (cg_omega, =, 0.0); /* no angular motion */ } Very simple right? When I try to hit build - I get the following error: c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2887) : error C2010: '.' : unexpected in macro formal parameter list c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2887) : error C2010: '.' : unexpected in macro formal parameter list c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2887) : error C2010: '.' : unexpected in macro formal parameter list c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2892) : error C2010: '.' : unexpected in macro formal parameter list c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2892) : error C2010: '.' : unexpected in macro formal parameter list c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2892) : error C2010: '.' : unexpected in macro formal parameter list My working folder is set to where my mesh and .c file. I've tried starting fluent with x64 visual tools command prompt launcher and that doesn't work. Any thoughts? |
By negative x direction I mean the following:
My object is currently moving in the +x and it will hit a wall boundary I want it to move in the opposite direction (-x) how do I do this? |
Hi Parradux. Its very old post but recently i have the same problem.
D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\cortex\src\ cx.h(45) : error C2632: 'long' followed by 'long' is illegal D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2887) : error C2010: '.' : unexpected in macro formal parameter list D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2887) : error C2010: '.' : unexpected in macro formal parameter list D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2887) : error C2010: '.' : unexpected in macro formal parameter list D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2892) : error C2010: '.' : unexpected in macro formal parameter list D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2892) : error C2010: '.' : unexpected in macro formal parameter list D:\ANSYS1~1.5\v145\fluent\fluent14.5.0\src\storage .h(2892) : error C2010: '.' : unexpected in macro formal parameter list How did you solve this problem? |
His solution apparently was to go to Fluent version 15.0, if I read his edit correctly.
(I can not give more help, this error is a mystery to me.) |
After 6 hours effort, I solved the problem. It's working now for Ansys 14.5.
|
If you can describe your method to solve it, it can be helpful for people who have the same problem in the future.
|
Its hard to explain step by step but I got most help from one of the post in this forum.
http://www.cfd-online.com/Forums/flu...ng-math-h.html good day |
Follow the path
You can just follow the way
c:\Program Files\ANSYS Inc\v145\fluent\fluent14.5.0\src\storage.h(2887) and find the error then correct them. It really works. |
Quote:
please can you write your udf code here ??? |
Quote:
please can you kindly write your UDF code here |
All times are GMT -4. The time now is 03:40. |