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/)
-   -   if Statement for multiple UDS not working? (https://www.cfd-online.com/Forums/fluent-udf/232115-if-statement-multiple-uds-not-working.html)

schwaral November 30, 2020 13:15

if Statement for multiple UDS not working?
 
Hi, somehow I am unable to use the if statement for my two UDS FLUX I have. Where is my mistake?

I used this form:

Code:

DEFINE_UDS_FLUX(my_uds_flux, f, t, i)
{
if (i==0)
{.....
return flux;
}
}
if (i==1)
{
.....
return flux;
}
}


AlexanderZ November 30, 2020 21:17

are you sure about brackets in your code scheme?

compile udf and read the log
this code should work well in case there are no problems with syntax


All times are GMT -4. The time now is 14:54.