How to plot a Integral length scale contour of a RANS and LES simulation?

Hallo Everyone,
I am trying to plot a Integral length scale contour of an RANS simulation in Ansys fluent. I have tried to plot I just just find Sub grid scale length for LES but nothing for RANS, but I am looking for integral scale using k and epsilon.

I have written an UDF function as follows:

#include “udf.h”

Domain *domain;
real k, epsilon, L;
Thread *t;
cell_t c;

domain = Get_Domain(1);

/* Loop through all cells in all threads */
thread_loop_c(t, domain)
begin_c_loop(c, t)

k = C_K_L(c, t);
epsilon = C_R_G(c, t)[1];
L = pow(k, 1.5) / epsilon;

/* Store the calculated value of L in C_LENGTH_SCALE */

end_c_loop(c, t)

Message(“Integral length scale calculated successfully!\n”);

But I am getting an error as C_LENGTH_SCALE: undefined variable. I dont understant why am I getting the error and how can i solve it.
Thanks in advance.

Dear @vtanga, this is a SimScale forum. I don’t think you will find an answer here.