Question: Change Boundary condition from Dirichlet to Neumann

April 27 2014 sarra 215

1

Hi,

Please I need help in this subject. I would like to compare the numerical solution obtained by finite difference and pdsolve/numeric.

The equation considred is  diffusion Equation using Forward-time centered-space (FTCS) stencil
The code work well with Dirichlet boundary condition, but I want to let  x=-1  Dirichlet boundary condition but on x=1, we put a Neumann condition likeeval( diff(u(t,x),x),x=1)=1. Thank you very much to put the necessary in the attached code the changment.      
Many thinks.

Change_boundary_condition_in_procedure.mw    

Please Wait...