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

parse error for DEFINE_ZONE_MOTION

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By DungPham

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2014, 14:24
Default parse error for DEFINE_ZONE_MOTION
  #1
New Member
 
Pipat Prasit
Join Date: Jul 2012
Posts: 1
Rep Power: 0
wisawadol is on a distinguished road
Hi everyone,

I'm using ANSYS FLUENT 12 to model a pitching airfoil. Sliding mesh and UDF are used to represent the movable airfoil. First, to test the interpreting working properly, I make my UDF as simple as possible BUT FLUENT shows some errors:

cpp -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/client/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/multiport/src" -I. -DUDF
ONFIG_H="<udfconfig.h>" "D:\v002\udftest02.c"
Error: D:\v002\udftest02.c: line 3: parse error.

My UDF is

#include "udf.h"

DEFINE_ZONE_MOTION(mymotion, omega, axis, origin, velocity, time, dtime)
{
*omega = 2500.0*time;
}

I run FLUENT 12 on Windows 7.
wisawadol is offline   Reply With Quote

Old   February 20, 2014, 20:30
Talking
  #2
New Member
 
Dustin
Join Date: Sep 2011
Location: Earth
Posts: 23
Rep Power: 14
DungPham is on a distinguished road
Quote:
Originally Posted by wisawadol View Post
Hi everyone,

I'm using ANSYS FLUENT 12 to model a pitching airfoil. Sliding mesh and UDF are used to represent the movable airfoil. First, to test the interpreting working properly, I make my UDF as simple as possible BUT FLUENT shows some errors:

cpp -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/client/src" -I"C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.2/multiport/src" -I. -DUDF
ONFIG_H="<udfconfig.h>" "D:\v002\udftest02.c"
Error: D:\v002\udftest02.c: line 3: parse error.

My UDF is

#include "udf.h"

DEFINE_ZONE_MOTION(mymotion, omega, axis, origin, velocity, time, dtime)
{
*omega = 2500.0*time;
}

I run FLUENT 12 on Windows 7.
With DEFINE_ZONE_MOTION you must specify a special rotational origin by using macros like the example below:

N3V_D (velocity,=,1.0,0.0,0.0);
N3V_S(origin,=,0.0);
N3V_D(axis,=,0.0,0.0,1.0);

But I think that better is you should manage the DEFINE_TRANSIENT_PROFILE macro. You just need to give a speed (rad/s) correspond to "Rotational Velocity" then directly put the "Rotation-Axis Origin" that located in the Mesh Motion tab

Attached Images
File Type: png dfdfd.PNG (46.9 KB, 99 views)
Mike Romeo likes this.
DungPham is offline   Reply With Quote

Old   February 26, 2014, 11:06
Default
  #3
New Member
 
He Zhao
Join Date: Feb 2013
Location: Shanghai(now)
Posts: 11
Rep Power: 13
zhereal is on a distinguished road
please try 14.0
my udf :

#include "udf.h"
DEFINE_ZONE_MOTION(qqmotion,omega,axis,origin,velo city,time,dtime)
{
*omega =6.283185307;
N3V_D (velocity,=,10.0,0.0,0.0);
N3V_S(origin,=,0.0); /* default values, line could be omitted */
N3V_D(axis,=,0.0,0.0,1.0); /* default values, line could be omitted */

return;
}

i think my udf is similar to yours.
and it's right in my laptop.
zhereal 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
Parse error mehdimoradi. Fluent UDF and Scheme Programming 2 October 25, 2013 05:24
parse error in DEFINE_DPM_BODY_FORCE 89566008 FLUENT 0 October 24, 2012 02:38
parse error in transient udf spring FLUENT 1 July 6, 2010 06:26
Parse Error Message While interpreting UDF in FLUENT dhimans Fluent UDF and Scheme Programming 1 July 10, 2009 06:29
PARSE ERROR Message when interpreting UDF in FLUENT dhimans FLUENT 0 May 24, 2009 11:40


All times are GMT -4. The time now is 19:16.