Back
ExamFull examExam paper only

es MNIBIO 6Feb25 part II III correzione

Full exam for Mathematical and Numerical Methods in Engineering in the Biomedical Engineering degree programme at Politecnico di Milano. The document covers: 12 points Exercise 1. Take Ω = ( −L,L), L = 0 .5, µ = 0 .1, the initial time t0 = 0, the final time T = 0 .5, boundary conditions u = 0 at x = ±L, and the following initial condition u0 = 1 − cos(2πx/L). (a) (2 points) Describe in the box below the Forward Euler/Centered method

Mathematical and Numerical Methods in EngineeringFull exam

Document information

What's included in this study material

Full exam for Mathematical and Numerical Methods in Engineering in the Biomedical Engineering degree programme at Politecnico di Milano. The document covers: 12 points Exercise 1. Take Ω = ( −L,L), L = 0 .5, µ = 0 .1, the initial time t0 = 0, the final time T = 0 .5, boundary conditions u = 0 at x = ±L, and the following initial condition u0 = 1 − cos(2πx/L). (a) (2 points) Describe in the box below the Forward Euler/Centered method

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

12 points Exercise 1. Take Ω = ( −L,L), L = 0 .5, µ = 0 .1, the initial time t0 = 0, the final time T = 0 .5, boundary conditions u = 0 at x = ±L, and the following initial condition u0 = 1 − cos(2πx/L). (a) (2 points) Describe in the box below the Forward Euler/Centered method applied to the problem introduced above, specifying also the continuous formulation of the latter. Report also the ma- trix/vector representation. Use the notation U^n_j to represent U n j , U^n+1_j to represent U n+1 j , etc, (explaining the meaning of U n j , .... ). Solution: The continuous problem is the following heat equation: ∂u ∂t − 0.1 ∂2u ∂x2 = 0, t ∈ (0,0,5], x ∈ (−0.5,0.5), u(0,x) = 1 − cos(2πx/0.5), u(t, − 0.5) = u(t,0.5) = 0. The Forward Euler/Centered method reads as follows: U n+1 j − U n j ∆t − 0.1 U n j+1 − 2U n j + U n j−1 h2 = 0, n = 0,1, . . . ,N − 1, j = 1, . . . ,M − 1, where U n j ≃ u(tn,xj) is the numerical approximation at instant tn and node xj, with tn = n∆t, n = 0,1, . . . ,N, xj = −0.5 +j h, j = 0,1, . . . ,M, ∆t and h being the time and space discretization param- eters. Introducing matrix A such that Aii = 2, Ai,i−1 = Ai,i+1 = −1, zero elsewhere, we have the following matrix/vector representation of the FE/C method: U n+1 =  I − 0.1 ∆t h2 A  U n, where vectors U n collect componets U n j . (b) (2 points) Run the proposed code for the Forward Euler/Centered method with ∆ t = 0.01 over 50 space intervals, writing in the box below all the instructions used to call the function. Solution: The Matlab commands are as follows. Note the value of the theta variable set equal to zero in the last argument, in accordance with the FE/C method: L = 0.5; t0 = 0.0; T = 0.5; mu = 0.1; u0 = @(x) 1 - cos(2*pi*x/L); M = 50; h = 2*L/M; dt = 0.01; [x,t,u] =…

Preview

First page of the document.

First page: es MNIBIO 6Feb25 part II III correzione