title '3D TWO-WAY PERIODIC BOUNDARY TEST' COORDINATES Cartesian3 ('x','y','z') { coordinate system, 1D,2D,3D, etc } variables u definitions k = 1 h=0 x0=0.4 x1=0.9 { right box x-coordinates } x2=-0.5 x3=0.0 { left box x-coordinates } y0=-0.7 y1 = -0.3 {y-coordinates for both boxes } equations u : div(K*grad(u)) + h = 0 EXTRUSION SURFACE 'Bottom' z=-1/2 LAYER 'everything' SURFACE 'Top' z=1/2 boundaries region 1 { Periodic bottom boundary } start(-1,-1) line to(-0.95,-1) periodic(x,y+2) line to(0.95,-1) { New "line" spec breaks periocity } { optional: natural(u) = normal(K*grad(u)) } line to (1,-1) { Periodic right boundary } periodic(x-2,y) arc(center=-1,0) to (1,1) { Images of non-periodic stub and periodic bottom boundry } line to (0.95,1) to (-0.95,1) to (-1,1) { Image of periodic right boundary } arc(center= -3,0) to close { off-center hot box } start(x0,y0) value(u)=1 line to (x1,y0) to (x1,y1) to (x0,y1) to close { off-center cold box } start(x2,y0) value(u)=-1 line to (x3,y0) to (x3,y1) to (x2,y1) to close monitors grid(x,y) ON z=0 contour(u) ON z=0 plots grid(x,y) ON z=0 contour(u) ON z=0 end