Rob
Forum Moderator

What stops the UDF returning a solid/frozen result which triggers the change in boundary condition, but in the following step the zone is nolonger frozen which then triggers the fluid setting? Have a very careful look at how your IF statements link - would IF AND type logic make more sense? 

What is  while(current_time<=total_time) for?