Question: How to use an array/matrix as bcs for a pde equation?

First: Is it possible to solve an pde equation/system where bcs are an array or matrix?

Second: Is it possible to get a discrete response in an array/matrix for this pde equation/system?

As an example I applied the heat conduction equation to a bar of 50 cm in length. Initially the bar has a uniform temperature field of 20ºC. The ends are maintained at a temperature of 0°C over time. I fixed a unitary thermal diffusivity.

restart:
k:=1:
pde:=k*diff(v(x,t),x$2)=diff(v(x,t),t):
bc:={v(x,0)=20,v(0,t)=0,v(50,t)=0}:
sol:=pdsolve(pde,bc,numeric,time=t,range=0..50):
p1:=sol:-plot(t=0,numpoints=50,color=red):
p2:=sol:-plot(t=20,numpoints=50,color=blue):
p3:=sol:-plot(t=50,numpoints=50,color=red):
p4:=sol:-plot(t=150,numpoints=50,color=blue):
p5:=sol:-plot(t=300,numpoints=50,color=red):
plots[display]({p1,p2,p3,p4,p5});

I will put the two questions in another way:
I would like to insert the boundary conditions not as algebraic functions, but rather as array/matrix. It is possible?
I would like to result in not a procedure, but rather as array/matrix. It is possible?

Thank you for your help.

Please Wait...