Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Diffusion problem

  1. Aug 1, 2009 #1
    Hi
    Im trying to solve the following diffusion problem using crank Nicholson method, but having trouble on how to proceed with the tridiagonal matrix and boundary conditions.

    dy/dt = k* d^2y/dx^2 K = increases with x

    My initial condition is y(x,0)=0;

    Boundary conditions are

    dy/dx (at y=0) = z (z changes with time step)

    d^2y/dx^2 (at y=1) = 0 (y goes from 0 to 1,n=10)

    I need to solve for y(0 to 1) for 1 timestep at a time. Y becomes nonzero everywhere after a particular time.

    any inputs in how to solve is greatly appreciated.

    thanks
     
  2. jcsd
  3. Aug 16, 2009 #2
    Can you show some more work? I have programmed the Crank-Nicholson method in C++ in the past for some problems of my own.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Diffusion problem
  1. Diffusion equations (Replies: 1)

  2. Diffusion equations (Replies: 0)

Loading...