Question: Given the heat transfer problem ut-uxx = f(x,t), (x,t) = (0,1) x (0,1) with initial and Dirichlet boundary conditions u(x,0)=sin(x), u(0,t) = u(1,t) =

Given the heat transfer problem ut-uxx = f(x,t), (x,t) = (0,1) x 

Given the heat transfer problem ut-uxx = f(x,t), (x,t) = (0,1) x (0,1) with initial and Dirichlet boundary conditions u(x,0)=sin(x), u(0,t) = u(1,t) = 0 and function f(x,t) = ((^2)-1)*(e^ -t)*sin(x) The analytic solution to the problem is u(x,t) = (e^-t)*sin(x) Write a 1D Galerkin code to solve this problem. Use N = 11 nodes but make the number of nodes general. Use the 1D Lagrange basis functions. Keep the code general so that different f(x,t) and/or boundary conditions can be implemented. Use 2nd-order Gaussian quadrature to numerically integrate the f(x,t) (right hand side) weak integral. Build the elemental mass and stiffness matrices by mapping from the x-space to xi-space, integrating in parent space and assemble to global. 1. Derive the weak form of this equation by-hand 2. Solve first by using a forward Euler time derivative discretization with a time-step of At = 1/551. Plot the results at the final time. Increase the time-step until you find the instability. What dt does this occur at? How does the solution change as N decreases? 3. Solve the same problem with the same time-steps using an implicit backward Euler. What happens as the time-step is equal to or greater than the spatial step size? Explain why.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!