How to check by UDF if a cell zone has a source term?
Valérie Gelbgras
Member, Employee Posts: 157
✭✭✭✭
Answers
-
We can use
THREAD_VAR(t).cell.sources
This return 0 is there is no source term and 1 is there is a source term.
Here is an example of DEFINE_ON_DEMAND using this function.
#include "udf.h" int zoneID = 2; DEFINE_ON_DEMAND(check_if_zone_has_source) { Thread *t; Domain *domain = Get_Domain(1); t = Lookup_Thread(domain, zoneID); Message0("\n\n %d \n\n", THREAD_VAR(t).cell.sources); }
0