use finite element method to solve the PDE

70 Views Asked by At

Hi so I want to use the finite element method to solve this question ∂/∂x (y^2 ∂u/∂x (x,y))+∂/∂y (y^2 ∂u/∂y (x,y))-yu(x,y)=-x (x,y)∈D where the boundary conditions are: u(0,y)=0 for 0.5 ≤y ≤1 and u(x,0.5)=2x, for 0≤x ≤ 0.5 on S1 y^2 ∂u/∂x (x,y)cosθ_1+y^2 ∂u/∂y (x,y)cosθ_2=√2/2 (y-x) on S2 compute the solution for (0,1) and (0.25,0.75) I already divided the domain into two triangular elements: T_1: (x_1, y_1)= (0,0.5),(x_2, y_2 )= (0.25,0.75),and (x_3, y_3 )= (0,1) T_2: (x_1, y_1 )= (0,0.5),(x_2, y_2 )= (0.5,0.5),and (x_3, y_3 )= (0.25,0.75) and the shape functions for element T_1 are: N_1 (x,y) = 2-2x-2y N_2 (x,y) = 4x N_3 (x,y) = 1-2x+2y

and the shape functions for element T_2 are: N_1 (x,y) = 2-2x-2y N_2 (x,y) =1+2x-2y N_3 (x,y) = -2+4y