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

What is the syntax error about '='

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tufan Tuna

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2021, 11:33
Default What is the syntax error about '='
  #1
New Member
 
Tufan Tuna Köseler
Join Date: Oct 2020
Posts: 5
Rep Power: 5
Tufan Tuna is on a distinguished road
I'm giving the rotational movement to circle boundary. Im getting syntax error at the F_PROFILE line about '='. I don't know why? Here is my code

Code:
#include <udf.h>
#include <math.h>
#define q = 5.0
				
DEFINE_PROFILE(inlet_x_velocity_on_cylinder, thread, position)
{
	
real x[ND_ND]; /* this will hold the position vector */
real y, xx;
real ang, r, u;
face_t f;


begin_f_loop(f,thread)
	{
	F_CENTROID(x, f, thread);
	xx = x[0];
	y = x[1]; 
	r = sqrt(pow(xx,2) + pow(y, 2));
	u = xx/r;

	F_PROFILE(f, thread, position)= sqrt(1.0 - pow(u,2)) + (sqrt(1.0 - pow(u,2)) / (2.0 * pow(r,3))) + ((3.0 / 2.0) * q * (1 / pow(r,4)) *(u * sqrt(1.0 - pow(u,2))) );
	}
end_f_loop(f, thread)
}
Tufan Tuna is offline   Reply With Quote

Old   April 23, 2021, 11:57
Default
  #2
New Member
 
Tufan Tuna Köseler
Join Date: Oct 2020
Posts: 5
Rep Power: 5
Tufan Tuna is on a distinguished road
Solved it. Macro definitions shouldn't contain equals sign.
at the line #define q = 5.0 sould be #define q 5.0
pakk likes this.
Tufan Tuna 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
UDF syntax error Ratel Fluent UDF and Scheme Programming 4 May 23, 2015 05:15
what is syntax error : missing ')' before ';' aleisia Fluent UDF and Scheme Programming 8 March 10, 2015 15:42
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 20:47.