Harj5 hints and instructions

Some PDEtool instructions and Q/A

Q: How to provide boundary conditions, source terms (f in Poisson) etc., other than constants?

A:

Boundary conditions given in polar coords

Let's try Laplace(u)=0, u(theta)=1+sin(theta) (unit circle)

Analytic sol: u(r,theta)=1+r*sin(theta)

In boundary mode set h=1 (default) and r=gg(x,y) (Don't use the name g, which is reserved for "geometry".)

Your task is just to write an m-file gg.m .

Note: theta=atan2(y,x) is a good way of producing the angle theta
(another is theta=angle(x+i*y) )

Poisson's equ on a rectangle, regular mesh

>> pderect([0 1 0 1]) 
export geometry and boundary cond -> g
>> [p,e,t]=poimesh(g,10,10)
>> pdemesh(p,e,t)