CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF For translational movement

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Riki

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2013, 13:44
Default UDF For translational movement
  #1
New Member
 
asdasdasd
Join Date: Aug 2012
Posts: 15
Rep Power: 13
parradux is on a distinguished road
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?

Last edited by parradux; December 18, 2013 at 16:17. Reason: found solution
parradux is offline   Reply With Quote

Old   December 18, 2013, 16:20
Default
  #2
New Member
 
asdasdasd
Join Date: Aug 2012
Posts: 15
Rep Power: 13
parradux is on a distinguished road
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?
parradux is offline   Reply With Quote

Old   November 18, 2014, 03:26
Default
  #3
New Member
 
TAK
Join Date: Aug 2013
Location: China
Posts: 9
Rep Power: 12
Riki is on a distinguished road
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?
Riki is offline   Reply With Quote

Old   November 18, 2014, 03:41
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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.)
pakk is offline   Reply With Quote

Old   November 19, 2014, 00:33
Default
  #5
New Member
 
TAK
Join Date: Aug 2013
Location: China
Posts: 9
Rep Power: 12
Riki is on a distinguished road
After 6 hours effort, I solved the problem. It's working now for Ansys 14.5.
Riki is offline   Reply With Quote

Old   November 19, 2014, 03:01
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
If you can describe your method to solve it, it can be helpful for people who have the same problem in the future.
pakk is offline   Reply With Quote

Old   November 19, 2014, 03:42
Default
  #7
New Member
 
TAK
Join Date: Aug 2013
Location: China
Posts: 9
Rep Power: 12
Riki is on a distinguished road
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
ahmed fahmy likes this.
Riki is offline   Reply With Quote

Old   September 9, 2015, 07:29
Default Follow the path
  #8
New Member
 
Join Date: Sep 2015
Posts: 2
Rep Power: 0
Mentorslayer is on a distinguished road
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.
Mentorslayer is offline   Reply With Quote

Old   June 15, 2019, 18:09
Default
  #9
New Member
 
ahmed
Join Date: Jun 2019
Posts: 10
Rep Power: 6
ahmed fahmy is on a distinguished road
Quote:
Originally Posted by Mentorslayer View Post
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.


please can you write your udf code here ???
ahmed fahmy is offline   Reply With Quote

Old   June 15, 2019, 18:11
Default
  #10
New Member
 
ahmed
Join Date: Jun 2019
Posts: 10
Rep Power: 6
ahmed fahmy is on a distinguished road
Quote:
Originally Posted by Riki View Post
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

please can you kindly write your UDF code here
ahmed fahmy is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using UDF for fluttering movement ( oscillating motion ) ??! bluAero Fluent UDF and Scheme Programming 7 June 20, 2013 05:37
UDF for 2D translational movement ThinkQuick Fluent UDF and Scheme Programming 0 July 24, 2012 01:59
flexible wall movement with udf O.D.Y. Fluent UDF and Scheme Programming 4 March 24, 2009 05:01
UDF for Piston movement Harish FLUENT 2 July 23, 2004 06:13
Wall movement due to pressure with UDF Dimitrios FLUENT 2 November 15, 2003 07:06


All times are GMT -4. The time now is 22:29.