Define time step size with max or min of Temp in a domain
Hi cfd-online
I have a very very sensible unsteady simulation and it must run with small time step size. I want to use DEFINE_DELTAT and set Deltat function of some cell variable in a domain. for example if max Temp < T1 then Deltat=a if max Temp >= T1 then Deltat=b if max Liquid fraction > 0 then Deltat=c . . . is it possible to do that? I think "Looping Over Cell Threads in a Domain (thread_loop_c)" can help me if I use that in DEFINE_DELTAT macro. thank you |
my udf is:
Red number is line number in udf commands . Code:
DEFINE_DELTAT(mydeltat, domain) error after build in compiler window: Done. (chdir "libudf")(chdir "win64\2ddp")# Generating ud_io1.h Paper_PCM_Prop_and_DeltaT_v2.c ..\..\src\Paper_PCM_Prop_and_DeltaT_v2.c(54) : error C2440: '=' : cannot convert from 'thread_struct *' to 'Thread' ..\..\src\Paper_PCM_Prop_and_DeltaT_v2.c(54) : error C2088: '!=' : illegal for struct ..\..\src\Paper_PCM_Prop_and_DeltaT_v2.c(54) : error C2232: '->next' : left operand has 'struct' type, use '.' ..\..\src\Paper_PCM_Prop_and_DeltaT_v2.c(56) : error C2232: '->nelements' : left operand has 'struct' type, use '.' ..\..\src\Paper_PCM_Prop_and_DeltaT_v2.c(58) : error C2232: '->storage' : left operand has 'struct' type, use '.' Done. whats wrong in udf? |
Instead of making "t" a thread variable, in
Code:
Thread t; Code:
Thread *t; |
ok , Its work :)
|
All times are GMT -4. The time now is 09:26. |