Hi all,

is there a way to prescribe temperature on a portion of a boundary? say for instance I want to prescribe T at the bottom of a unit square for 0.4<x<0.6 and not prescribe anything at all outside of this segment.

# Partial temperature boundary condition

Yes, but you have to find a way to mark that part of the boundary with

different boundary indicators – then you can map boundary indicators to

boundary conditions.

In your case, that would probably involve writing a different geometry plugin.

That shouldn’t be too difficult: Just derive a class from the one that already

implements the unit square; in the function that creates a triangulation,

you’d call the corresponding function of the base class (which creates the

unit square) and then loops over all faces and does the additional work. I’ll

note that 0.4<x<0.6 does not consist of full faces if you start your square

with one cell. You’d be better off starting with a 5x5 coarse mesh since then

the part you’d like to mark consists of full faces.

Best

W.

This is similar to the two_merged_boxes geometry model, where additional boundary indicators are added to the vertical boundaries to prescribed conditions pertaining to the lithosphere.