I am trying to write the conditional statement in the named expression tab using the IF statement based on the PCM liquidus temperature as IF(T_avg(PCM)<=514 K, heat flux boundary condition, convection boundary condition). The IF condition statement provided in the Ansys named expression is given below,Â

IF(Average(T,['pcm_domain'],Weight='Volume')<=514 [K],20000 [W m^-2],10[W m^-2 K^-1]*((Average(T,['tube_outer_surface'],Weight='Area'))-300[K]))

where, 514 K denotes the PCM liquidus temperature, 20000 [W m^-2] denotes the heat flux, 10[W m^-2 K^-1]*((Average(T,['tube_outer_surface'],Weight='Area'))-300[K]) denotes the convection boundary, 300 K is the ambient temperature, respectively.

The convection boundary condition applies when the PCM domain temperature exceeds 514 K. However, the problem occurred when the PCM domain temperature slightly decreased from 514 K (due to the convection boundary condition), and the heat flux boundary condition was applied again. So, can you please suggest how to resolve this issue so that the PCM domain temperature decreases to its solidus temperature (494 K) without using the flux boundary condition? Also, the PCM melts and solidifies in a similar fashion for another time cycle.Â Â Â Â