me180_hw01 - HOMEWORK 1: THE BASICS Solve the followng...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK 1: THE BASICS Solve the followng boundary value problem, with domain Ω = (0 ,L ), analytically: d dx ± A 1 du dx ² = k 2 sin ( 2 πkx L ) A 1 = given constant = 0 . 1 k = given constant L = 1 u (0) = Δ 1 = given constant = 0 u ( L ) = Δ 2 = given constant = 1 (1) Now solve this with the finite element method using linear equal-sized elements. In order to achieve e N def = || u - u N || A 1 (Ω) || u || A 1 (Ω) TOL = 0 . 05 , || u || A 1 (Ω) def = s Z Ω du dx A 1 du dx dx (2) how many finite elements ( N ) are needed for k = 1 N =? k = 2 N =? k = 4 N =? k = 8 N =? k = 16 N =? k = 32 N =? (3) You should set up a general matrix equation and solve it using Gaus- sian elimination. Later we will use other types of more efficient solvers. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Plot the numerical solutions for N = 2 , 4 , 8 , 16 ,... , for each k , along with the exact solution. Also make a plot of the e N for each k . Remarks: You should write a general one-dimensional code where you specify the number of elements. Your code should partition the domain automatically. However, if you want to make the code more general (for future assignments), you should put in the following features:
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/01/2008 for the course ME 180 taught by Professor Zohdi during the Spring '08 term at University of California, Berkeley.

Page1 / 2

me180_hw01 - HOMEWORK 1: THE BASICS Solve the followng...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online