• No se han encontrado resultados

poisson

N/A
N/A
Protected

Academic year: 2020

Share "poisson"

Copied!
25
0
0

Texto completo

(1)

Numerical approximation of the Poisson equation

Grado en Ing. Civil y Territorial

(Univ. Polit´ecnica de Madrid)

(2)

The heat equation on a plate

Consider a plate as follows

Letu(x1,x2,x3,t) be the temperature at the point (x1,x2,x3)∈

plate, and timet>0.

Assume that the cross section is so small that we can consider the

plate as a bidimensional object in a domainx ∈Ω,

u(x1,x2,x3,t) =u(x1,x2,t).

(3)

The following equation describes the heat behavior

∂u

∂t(x1,x2,t)− ∂2u ∂x2 1

(x1,x2,t)− ∂2u ∂x2 2

(x1,x2,t) = 0, (x1,x2)∈Ω,

or, abreviated

ut−(ux1x1+ux2x2) = 0, (x1,x2)∈Ω, t >0,

or, more usually

(4)

The Laplace operator ∆

In dimesiond = 1,

∆u =uxx, x ∈(0,L),

In dimensiond = 2,

∆u =ux1x1+ux2x2 = div (∇u), (x1,x2)∈Ω,

In dimensiond = 3,

∆u =ux1x1+ux2x2+ux3x3 = div (∇u), (x1,x2,x3)∈Ω,

(5)

The heat equation can be written in any dimension as

ut−∆u = 0, x∈Ω⊂Rd, t>0.

If there is a heat source described by a functionf(x,t), then

ut−∆u =f(x,t), x∈Ω⊂Rd, t>0.

If the heat flow remains stationary (ut = 0), as for large time, then

we have thePoisson equation

(6)

Boudary conditions

To obtain a unique solution, we have to include conditions at the boudary

u(x) =g(x), x∈∂Ω.

(7)

The complete system of equations is given by

−∆u(x) =f(x), x ∈Ω⊂R2,

u(x) =g(x), x∈∂Ω,

(8)

Two different approaches

1 Finite differences for the Poisson equation

−∆u(x) =f(x), x∈Ω⊂R2,

u(x) = 0, x∈∂Ω,

2 Fourier method for Laplace equation

−∆u(x) = 0, x∈Ω⊂R2,

u(x) =g(x), x∈∂Ω,

(9)

Finite differences approximation

We focus on a rectangle and cosiderx= (x1,x2) = (x,y)

−∆u(x,y) =f(x,y), (x,y)∈Ω⊂R2, u(x,y) = 0, (x,y)∈∂Ω,

(10)

Space mesh

Take a partition ofx∈[0,L1] andy ∈[0,L2] with steph

(11)

Defineui,j(t)∼u(xi,yj),and replace

−uxx(x,y) by

−ui−1,j+ 2ui,j −ui+1,j

h2

−uyy(x,y) by

(12)

Then, we have the system

 

−ui−1,j−ui,j−1+4ui,j−ui+1,j−ui,j+1

h2 =fi,j, i,j = 1,2, ...,N−1,

u0,j =uN,j = 0, j = 0,1, ...,N

ui,0=ui,N = 0, i = 0,1, ...,N.

wherefi,j ∼f(xi,yj).

(13)

Matrix formulation

Renumbering the nodes

(14)

The final system reads

KU =F,

where

K = 1

h2 

  

B −I 0 0 ... 0 0

−I B −I 0 ... 0 0

... ... ... ... ... ... ...

0 0 0 0 ... −I B

  

∈ M(N−1)(M−1)×(N−1)(M−1)

B =

   

4 −1 0 0 ... 0 0

−1 4 −1 0 ... 0 0

... ... ... ... ... ... ...

0 0 0 0 ... −1 4

   

∈ M(N−1)×(N−1)

I = 

  

1 0 0 0 ... 0 0

0 1 0 0 ... 0 0

... ... ... ... ... ... ...

0 0 0 0 ... 0 1

  

∈ M(N−1)×(N−1)

(15)

Matlab code

N = 40; h = 1/N; x = h:h:1-h; y = h:h:1-h; n=N-1; % space mesh

B=4*diag(ones(1,n))-diag(ones(1,n-1),1)-diag(ones(1,n-1),-1); K = zeros(n2); % matrix formulation−uxx−uyy

for j=0:n-2

K(i*n+1:(i+1)*n,i*n+1:(i+1)*n)=B;

K(i*n+1:(i+1)*n,(i+1)*n+1:(i+2)*n)=-eye(n); K((i+1)*n+1:(i+2)*n,i*n+1:(i+1)*n)=-eye(n); end

K((n-1)*n+1:n*n,(n-1)*n+1:n*n)=B; K = K/h2; [xx yy] = meshgrid(x,y); f=(xx-1).*(yy-1); % force

sm=f(1,:)’;

for i=2:n % vector formulation

(16)

Numerical solution

(17)

The Fourier method in a circle

ρ

R

(18)

The Fourier method to obtain solutions

We search for solutions of the form,

u(ρ, θ) =ϕ(θ)T(ρ)

RemarkIfϕ(x) is solution of the eigenvalue problem

ϕ00(θ) +λϕ(θ) = 0, ϕ(θ) 2π-periodic,

for someλ≥0, then

u(ρ, θ) = (ρ/R)

√ λϕ(θ)

is a solution of the Laplace equation ∆u = 0.

(19)

The eigenvalues of this problem areλk =k2 with k = 0,1,2,3, ...

and the associated eigenfunctions are

ϕ0= 1, ϕk = sin(kθ), ψk = cos(kθ), k ≥1.

Therefore, all these functions are solutions of the Laplace equation

u0(ρ, θ) = 1,

(20)

Case

R

= 1

first eigenfunction second eigenfunction third eigenfunction

solution solution solution

(21)

eigenfunction eigenfunction eigenfunction

(22)

eigenfunction eigenfunction eigenfunction

solution solution solution

(23)

Matlab code

dt=1/20; % angle mesh step

theta=0:dt:2*pi; % angle mesh

dr=1/10; % rho mesh step

rho=0:dr:2; % rho mesh

k=3; % number of eigenvalue

[rr,tt]=meshgrid(rho,theta); % (ρ, θ) coordinates of the mesh

u= ((rr/2).k).∗sin(k∗tt);

xx=rr.∗cos(tt); yy =rr.∗sin(tt); % cartesian coordinates

(24)

Boundary condition at

ρ

= 1

Assume that we can write the boundary datag(θ) as

g(θ) =c0+

N

X

k=1

cksin(kθ) + N

X

k=1

dkcos(kθ),

for some coefficientsck,dk ∈R. Then

u(ρ, θ) =c0+

N

X

k=1

ckρksin(kθ) + N

X

k=1

ckρkcos(kθ),

is a solution of the full system: Laplace equation and boundary condition.

(25)

As we know, anyL2(0,1)-function can be approximated with a finite number of terms of the Fourier series and this allows to find approximations of Laplace solutions.

Referencias

Documento similar

No obstante, como esta enfermedad afecta a cada persona de manera diferente, no todas las opciones de cuidado y tratamiento pueden ser apropiadas para cada individuo.. La forma

The general idea to prove the latter is to first show that any φ admitting an AAT can be analytically extended to a multivalued analytic map with a finite number of branches (see

The guide includes a comparison to the windowed Fourier transform, the choice of an appropriate wavelet basis function, edge effects due to finite-length time series, and

Without pumping and losses, the eigenstates of this system can be understood, under certain approximations, as momentum-space toroidal Landau levels, where the Berry curvature,

The broad “WHO-ICF” perspective on HrWB provided at Figure 1 has a significant implication also for HRQoL. The develop- ment of ICF and its conceptual approach has challenged to

The basic geometric assumption, as well as the main theoretical results concerning the estimation of the boundary measure L 0 , are established in Section 3.. To be more specific,

Consequently, the Neumann boundary value problem associated to (2) on the time interval [0, T /2] is not solvable either, as any solution would give rise to a solution of the

In the preparation of this report, the Venice Commission has relied on the comments of its rapporteurs; its recently adopted Report on Respect for Democracy, Human Rights and the Rule