Ansys Learning Forum Forums Discuss Simulation Fluids HET_RXN_RATE UDF Reply To: HET_RXN_RATE UDF

sjohn
Subscriber

 

 

Hi Rob,

I tried your suggestion but it looks like that is not an acceptable syntax. Here is the error I get after compiling (while my orginal code would compile fine).

Copyright 1987-2024 ANSYS, Inc. All Rights Reserved.

Compiler and linker: Clang (builtin)

Compiler path: “C:\PROGRA~1\ANSYSI~1\v241\fluent”\ntbin\clang\bin\clang-cl

Linker path: “C:\PROGRA~1\ANSYSI~1\v241\fluent”\ntbin\clang\bin\lld-link

C sources: [‘simple_reaction_4.c’]

simple_reaction_4.c(18,30): error: subscripted value is not an array, pointer, or vector

real vof_l = C_VOF(c, tp)[0]; /* Fraction of liquid phase */

~~~~~~~~~~~~^~

1 error generated.

scons: *** [simple_reaction_4.obj] Error 1


Instead of 0, I used 2 and got the same error. 2 is the ID of the primary phase in the Multiphase physics GUI.