Assignment #1 Method of Finite Elements II

od of Finite Elements II Assignment #1 Method of Finite Elements II Consider a steady state heat transfer problem (i.e. πœƒ is the temperature) in a one dimensional channel (of a unit cross-­β€sectional are) as a fluid flows through it with prescribed velocity 𝑣 under a temperature gradient π‘‘πœƒ
𝑑! πœƒ
𝑣
= π‘Ž ! 0 ≀ π‘₯ ≀ 𝐿 𝑑π‘₯
𝑑π‘₯
πœƒ π‘₯ = 0 = πœƒ! πœƒ π‘₯ = 𝐿 = πœƒ! where 𝛼 is the diffusivity of the fluid. The analytical solution of the problem is given by 𝑃!
πœƒ π‘₯ βˆ’ πœƒ! 𝑒π‘₯𝑝 𝐿 π‘₯ βˆ’ 1
=
0 ≀ π‘₯ ≀ 𝐿 πœƒ! βˆ’ πœƒ!
𝑒π‘₯𝑝 𝑃! βˆ’ 1
where P! =
!"
!
is known as the Péclet number. Answer the following questions using the parameters: 𝐿 = 1, πœƒ! = 1, πœƒ! = 0. 1. Plot the behavior of the analytical solution for increasing values of P! and explain what you observe. Tip: For different values of P! , what are the insulating properties of the pipe? 2. Write the Weak form of the problem. 3a. Using Galerkin’s method, formulate the corresponding problem 𝐾𝑑 = 𝑓 and describe the properties of 𝐾 . Reminder: In Galerkin's method the same shape functions are used for the trial and weight function approximation). Extra Credit: Explain how the properties and structure of 𝐾 impact the solution process from a computational aspect. 3b. Given: 𝛼=0.01, 𝑣=1, linear shape functions, and a uniform discretization of the domain, modify the MATLAB code given, to solve this problem and obtain the nodal temperature solutions with a number of nodes 𝑁np=20. Plot the FE and the analytical solution on the same figure and comment on the quality of the solution. Extra Credit: a) Can you think of one way to obtain a better solution (other than the one in 4.). !
b) Assuming the exact shape functions are given as 𝐻 = 1
𝑒 !! , is Gaussian integration still applicable? Explain your reasoning. Note: The main routine is FEMaxialbar.m. Make sure to properly modify the number of used nodes (nnp), the essential (e_bc) and natural (n_bc) boundary conditions in input_file.m and of course the setup of the element stiffness and force matrices based on your derivation for the Galerkin method (question 3a) in elem.m) 4. Using a Petrov-­β€Galerkin method, repeat question 3a and 3b. In a Petrov-­β€Galerkin method, the shape functions used for the trial and weight functions are different and are written given by: 𝑁! 𝑒! 𝑒 π‘₯ =
𝑀 π‘₯ =
𝑀! 𝑁! + 𝛾
β„Ž! 𝑑𝑁!
, π‘“π‘œπ‘Ÿ 𝑣 > 0 2 𝑑π‘₯
where 𝛾 = π‘π‘œπ‘‘β„Ž
!!
!
!
βˆ’ ! !