|
[Sponsors] |
April 23, 2021, 11:33 |
What is the syntax error about '='
|
#1 |
New Member
Tufan Tuna Köseler
Join Date: Oct 2020
Posts: 5
Rep Power: 5 |
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) } |
|
April 23, 2021, 11:57 |
|
#2 |
New Member
Tufan Tuna Köseler
Join Date: Oct 2020
Posts: 5
Rep Power: 5 |
Solved it. Macro definitions shouldn't contain equals sign.
at the line #define q = 5.0 sould be #define q 5.0 |
|
|
|
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 |