Question: Heat equation understanding

Okay what am I doing wrong here?  It's an examination of the simple 1-d heat diffusion equation in a rod with homogenous boundary conditions.  I'm looking for the temperature distribution over a thin rod with unit length 1.  Both ends are held at 0.  And the initial temperature distribution across the rod I have set equal to x, with the diffusivity k=1/10.

So first set up the 1-d homogeneous heat equation
he:=diff(u(x,t),t)=k*diff(u(x,t),t,t):

Set the boundary conditions u(0,t)=0, u(1,t)=0 and the temperature distribution condition u(0,t)=x
ibc:=u(0,t)=0 , u(1,t)=0, u(0,t)=x:

find a solution
sol:=pdsolve({he},{ibc},numeric):

plot the temperature profile at x=0.5 from time 0 to some later time say t=2.
p1:=sol:-plot(u,x=0.5,t=0..2)

plot the temperature profile at time 0 across the length of the rod.
p2:=sol:-plot(u,t=0,x=0..1)

show the profiles
display(p1,p2)

What I'm not understanding is the temperature profile (p2) at time 0.  I specified the boundary condition u(1,t)=0 but it takes the condition u(1,0)=x instead as it should but I'm not fully understanding. Can someone explain? 

And how do I modify it so that x=1 stays fixed at 0?

 

Please Wait...