[Date Index] [Thread Index] [Author Index]
Diffusion Model using NDSolve - Advice needed
Hey all!! I will try and be really brief. If you think you may know how to help, but don't understand what I'm saying, please ask! I'm desperate for advice. I want to use NDSolve to solve the 1-D Diffusion Equation for a "composite slab" with THREE LAYERS, each having an arbitrary thickness and diffusivity. I can solve the problem easily using NDSolve for the case of a single layer. However I am having a lot of trouble figuring out how to specify the problem for three layers. There should be a separate solution for each layer on its respective part of the domain (the total thickness). There are six total boundary conditions. The most important are the four that appear "within" the slab at the two interfaces. They require matching of the flux (which is proportional to the gradient), and proportionality of the concentrations (therefore the solution is not necessarily continuous at the interfaces). So it kinda ends up being a piecewise solution - one part valid for a certain section of the composite slab - know what I mean??? I have tried entering all the equations (3 second order pde's, three initial conditions, six boundary conditions) in NDSolve but I immediately get the error that some of the boundary conditions specified are NOT at the edge of domain (which is obviously true since they are specified within the layer). Hence one of the three solutions is only valid within its own section of the slab. I am having an awful time trying to figure out how to pose this problem within Mathematica. I am fairly proficient with the program in general. Any thoughts??