Explore BrainMass

MATLAB Problem: Make a plot

See attached files.

This problem has three parts to it. Parts A and B can be solved on paper. Part C requires a MATLAB scripting. I have attached the necessary three documents.

*** For Part [A & B]: the solution is
T(x,t) = Sum T_G(x - (nL+(-1)^n x_o), t)

For Part [C]: Please make a plot of T(x,t) vs x vs t and a plot of
x vs t using N=61 and tau=1.0e-4 s.


Solution Preview

The attached pdf file explains the answers to questions A and B, and the attached Matlab script is the dftcs script modified as requested.

The spacial discretization x_i = (i-3/2)h - L/2, with h = L/(N-2) is chosen so that the first two points are at x_1 = -L/2-h/2 and x-2 = -L/2 + h/2, symmetric with respect to the boundary at which the MIRROR boundary condition is imposed (Neumann condition with 0 derivative), and the same goes for the last two points at x_(N-1) = L/2-h/2 and x_N = L/2+h/2.


centerline{bf Diffusion with Neumann boundary conditions}

Given diffusion equation
{p Tover p t} = kappa{p^2Toverp x^2},
the solution for intitial condition
T(x,0) = delta(x-x_o)
on boundless X-axis, $-infty<x<infty$ is the Green function
T_G(x-x_o,t) = {1oversqrt{2pikappa t}}e^{-{(x-x_o)^2over 4kappa t}}.
If the solution is limited to ...

Solution Summary

With good explanations and calculations, the problems have been solved.