﻿ Sample Problems > Usage > Periodicity > three-way_periodic_3d

# three-way_periodic_3d

Navigation:  Sample Problems > Usage > Periodicity >

# three-way_periodic_3d

{  THREE_WAY PERIODIC.PDE

}

title '3D THREE-WAY PERIODIC BOUNDARY TEST'

coordinates

cartesian3

Variables

u

definitions

k = 20

h=0

x0=0.3  y0=0.3  z0 = 0.6

x1=0.8  y1 = 0.8  z1 = 0.8

xc = (x0+x1)/2

yc = (y0+y1)/2

zc = (z0+z1)/2

equations

u : div(K*grad(u)) + h = 0

! declare periodicity in z-dimension

periodic extrusion z=0,z0,z1,1

boundaries

region 1

h=-20

start(-1,-1)

periodic(x,y+2)

line to (1,-1)

{ The following arc is required to be a periodic image of an arc

two units to its left. (This image boundary has not yet been defined.) }

periodic(x-2,y)

arc(center=-1,0) to (1,1)

{ The following line provides the required image boundary for the previous

y-periodic statement }

line to (-1,1)

{ The following arc provides the required image boundary for the previous

x-periodic statement }

arc(center= -3,0) to close

{ an off-center heat source in layer 2 provides the asymmetric conditions to

demonstrate the periodicity of the solution }

limited region 2

layer 2 h=20 k=10

start(x0,y0)

value(u)=1 line to (x1,y0) to (x1,y1) to (x0,y1) to close

monitors

contour(u) on z=zc

contour(u) on y=yc

contour(u) on x=xc

plots

contour(u) on z=zc painted as "U(x,y)"

contour(u) on y=yc   painted as "U(x,z)"

contour(u) on x=xc   painted as "U(y,z)"

elevation(u) from(xc, yc, 0) to (xc, yc, 1)

elevation(u) from(-1, yc, zc) to (1.5, yc, zc)

elevation(u) from(xc, -1, zc) to (xc, 1, zc)

contour(u-eval(u,x,y,z-1)) on z=1

contour(u-eval(u,x,y-2,z)) on y=1

end