How to set the boundary temperature in different sections?

Hello everyone:
As shown in the figure, I want to set the temperatures of the boundaries where y is less than 0.5 on the left and right sides of the box model, as well as the bottom boundary (the area marked by the black line) to 1, and the temperatures of other boundaries to 0. How can I set this?How to modify the following code?


Hello @sxj

You can achieve this by using the Function temperature model. You would modify the input file to look something like this:

subsection Boundary temperature model
  set List of model names = function
  set Fixed temperature boundary indicators = bottom, top
  subsection Function
    set Function expression = if(y<=0.5, 1.0, 0.0)
  end
end

Here the function is saying if y<= 0.5, set the temperature to 1.0, otherwise if y>0.5 set the temperature to 0.0. More information on this can be found in the manual here

Hopefully this helps!
Cheers,
Daniel

Thank you for your answer. It will be very helpful for my subsequent design. Thank you again

1 Like