﻿ Sample Problems > Usage > Periodicity > periodic_map

periodic_map

Navigation:  Sample Problems > Usage > Periodicity >

periodic_map   { PERIODIC_MAP.PDE

This example is a modification of PERIODIC.PDE, and shows the use of the MAP facility in applications with periodic boundaries.

( Only FlexPDE versions 7.16 or later support this facility. )

The PERIODIC (or ANTIPERIODIC) statement presets the behavior of all variables.

A statement MAP() = 1 or MAP() = -1 may then appear for any number of variables,

to independently set the behavior of that variable.

MAP(.)=1 means PERIODIC,  MAP(.)=-1 means ANTIPERIODIC

}

title 'MAPPED PERIODIC BOUNDARY TEST'

variables

u,v

definitions

k = 0.1

h=0

x0=0.5  y0=-0.2

x1=1.1  y1=0.2

offset = sqrt(5)-2

select

debug(periodics)

equations

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

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

boundaries

region 1

start(-1,-1)

value(u)=0 value(v)=0   line to (0.9,-1) to (1,-1)

{ The following boundary is required to be a periodic image of the boundary

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

periodic(x-2,y)

{ The variable U is declared PERIODIC, and the variable V is declared ANTIPERIODIC: }

map(u)=1 map(v)=-1

{ the boundary is declared to be an arc: }

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

value(u)=0 value(v)=0 line to (-1,1)

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

periodic statement }

nobc(u) nobc(v) { turn off the value BC }

arc(center= -3,0) to close

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

demonstrate the periodicity of the solution }

region 2  h=10 k=10

start(x0,y0) line to (x1,y0) to (x1,y1) to (x0,y1) to close

monitors

grid(x,y)

contour(u)

contour(v)

plots

grid(x,y)

contour(u)

contour(v)

elevation(u,v) from(-1+offset,0) to (1+offset,0)

end