-
-
July 16, 2018 at 5:03 pm
Naiara
SubscriberHello!
I am trying to write a UDF in order to read a table, and then to find the index of the table. I was able to write the programme to read the table by DEFINE_ON_DEMAND macro, but then when I try to write a function to find the index in the table I have the following error message during compilation:
"read_Table_indexRev00.c
....srcread_Table_indexRev00.c(80): error C2143: error de sintaxis: falta ')' delante de 'constante'
....srcread_Table_indexRev00.c(80): error C2143: error de sintaxis: falta '{' delante de 'constante'
....srcread_Table_indexRev00.c(80): error C2059: error de sintaxis: 'constante'
....srcread_Table_indexRev00.c(80): error C2059: error de sintaxis: ')'"
Line 80 corresponds to the function definition to find the index, I am not able to see the error, I enclosure to the email the code.
Thank you!
Regards,
Naiara
-
July 16, 2018 at 8:24 pm
DrAmine
Ansys EmployeeHi,
Please write debugging message which might help you to identify the root of the error. For more information about reading files please check the customization manual and any C programming Ressource.
A.
-
July 17, 2018 at 6:27 am
Naiara
SubscriberHi,
I write some "printf" to output some values and the table is wrote correctly, but when I try to find the intex of the table for doing a linear interpolation latter, I get that error. I have been checking the construction of a function in the customization manual and I think that I am writing correctly, but then it does not work...
Thank you.
Regards,
Naiara
-
July 17, 2018 at 8:17 am
DrAmine
Ansys EmployeeHi,
Your function uses N1 which has been already defined as constant in the pre-processor. Moreover I won't try to declare variables several times like you do in the definitions and then in the function itself.
A.
-
July 17, 2018 at 10:20 am
Naiara
SubscriberHi,
Thank you, I change function to the following one:
void find_index(int *i0, double x0, double *x, int n)
and then I call the function inside a FLuent macro by:
find_index(q0, varZ0, varZ, N1);
and now it works,
Thank you!
-
July 17, 2018 at 12:05 pm
DrAmine
Ansys EmployeeHi,
Good to know that everything is working as it should.
A.
-
- You must be logged in to reply to this topic.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
2524
-
2066
-
1279
-
1096
-
457
© 2023 Copyright ANSYS, Inc. All rights reserved.