Calculating Gradient of a Scalar
Hello,
I am going to calculate gradient of a scalar (UDS) which is solved through iterations, and its quantity is known. Here is my 'on demand' UDF which tries(!) to store x-gradient of scalar 0 to scalar 1, yet after executing the UDF, I receive an 'ACCESS VIOLATION' error. Would you please help me. Thanks. Code:
#include "udf.h" |
Did you activate 2 UDSs?
Did you set a command in TUI in order to store gradients during iteration? if yes, before executing this macro, allocate 2nd UDS simply by patching it with arbitrary value. Amir |
Hi Amir,
Thanks for your help. I pursued these two methods and got desired solution: 1. I solved the problem with defining all UDSs before iterating. 2. I solved the problem just by defining scalar 0 and after convergence, I patched scalar 1 to fluid zone with arbitrary value. Subsequent to things done above, I executed the UDF without any error. Thanks again. |
All times are GMT -4. The time now is 23:56. |