YasserSelima
Subscriber
Define adjust is called every iteration. Do you want this to be done every iteration?nSecond, your code uses the density gradient macro, but it does nothing with it. nYou can save them to UDM, you need to declare number of UDM 2 before compiling the code. Now they will be stored in the user defined memory and available for contours. Not sure about post processing if they can be available or not.n thread_loop_c (t,d)n {n begin_c_loop (c,t)n {n C_UDMI(c,t,0) = C_R_G(c,t)[0]; /*x-gradient of Density in density-based solvers*/n C_UDMI(c,t,1) = C_R_G(c,t)[1]; /*y-gradient of Density in density-based solvers*/n }n end_c_loop (c,t)n }nnIf you have steady simulation, put this in Define_on_demand and call the function when needed. You can even save case and data before calling it to avoid the crash.n