CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF error: member reference base type 'void' is not a structure or union (https://www.cfd-online.com/Forums/fluent-udf/255084-udf-error-member-reference-base-type-void-not-structure-union.html)

BlueLumos March 17, 2024 16:11

UDF error: member reference base type 'void' is not a structure or union
 
Hi there,

I've run into a repeated error when attempting to compile UDF using Ansys 2023 R2 Fluent's built in compiler Clang. The code has been sourced from Sandia Gov and error message in Ansys when compiling is as the following:

uvdose_par.c(42,50): error: member reference base type 'void' is not a structure or union
par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);

It seems to indicate that line " par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);" of my code below has a problem. Here is part of the code of concern:

if (header)
{
if (NNULLP(thread))
par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);
else
par_fprintf_head(fp,"(%s %d)\n",plane->sort_file_name,14);

par_fprintf_head(fp,"(%10s %10s %10s %10s %10s %10s %10s"
" %10s %10s %10s %10s %10s %10s %10s %s)\n",
"X0","Y0","Z0",
"X","Y","Z","U","V","W","diameter","T","mass-flow",
"time","UV-Dosage","name");
}

I've had a talk with the individual who made this code, yet they have only mentioned to me that "The UDF was developed by Sandia based on the version of Fluent available in 2008. Ansys made some changes to their libraries when they changed HPC licensing. You’ll have to update the UDF to run on the current version of fluent".

I've tried and searched for weeks to solve this error yet have been unable to do so. My deadline to utilize this UDF is soon approaching, and was hoping if anybody is able to help. I would sincerely appreciate it if someone could attempt to help me solve this issue or even reply!

Thank you so much for your precious time.

Kind regards,
Niall


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