elwinxavier
Subscriber
Hi Dr. Amine, I've try on the UDF and I think i might have made mistake, because realize my porous flow during moisture absorption and resorption the H2O species absorb and desorp too fast. I think i made mistake in UDF script.nnBackground:1 Mixture Species (Contain 3 Porous Zone + 1 Air). In Resorption Model, Transient Model; but my model diffusivity should be constant throughout the simulation (I think I dont need time in my UDF?)nnI wanted to simulate for 3 Porous Zone & 1 Air; with following Cell Zone ID and Diffusivity:nCell Zone (ID=19) 1.28e-11(Porous)nCell Zone (ID=20) 2.93e-11(Porous)nCell Zone (ID=21) 1.28e-11 (Porous)nCell Zone (ID=16) 2.42e-5 (This is Air)nnSorry for the long question.nBut is my UDF function below correct?nWhere should I make correction to make my UDF works per situation above?.----------------------------nn#include udf.hnnn#define ZONE1_ID 19n#define ZONE2_ID 20n#define ZONE3_ID 21nnDEFINE_DIFFUSIVITY(uds_diff, c, t, i)n{n real diff;n if (THREAD_ID(t) == ZONE1_ID)n  diff = 1.28e-11;n else if (THREAD_ID(t) == ZONE2_ID)n  diff = 2.93e-11;n else if (THREAD_ID(t) == ZONE3_ID)n  diff = 1.28e-11;nn elsen  diff = 2.42e-5;n return diff;n}n