MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Diffusion Model using NDSolve - Advice needed

  • To: mathgroup at
  • Subject: [mg99430] Re: Diffusion Model using NDSolve - Advice needed
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Tue, 5 May 2009 06:02:14 -0400 (EDT)

you are pretty imprecise. For example, do you solve a time-dependent or stationary problem? 

In any case, the one-dimensional
heat conductivity problem is fairly simple, you should be able to solve it "by hands", since the problem admits separation
of variables in each domain. Do not be lazy and do not go to Mathematica before thinking. In a stationary case you can solve 
it analytically, so let us discuss the time-dependent case.
A straightforward and a very first approach would be to use the separation of variables (look into any textbook for details),
solve the equation in a form of series in each domain (e.g. with their own coefficients in each domain), and build a system 
of equations for the coefficients on the basis of the boundary conditions. This system will be infinite. Now your task is to
terminate each of the series on first, second etc. term, and to solve the resulting finite system. The latter can be done using

An alternative way would be to introduce phase functions fi1(x-x1), fi2(x-x2) etc. representing kinks. For example fi(x-x1)
=0.5*(Tanh[(x-x1)/r1] + 1), where x1, x2,... are the coordinates of the boundaries, r1 is the width of the transition region
you can later play with. You can then write down the temperature conductivities in the chi(x)=chi0+deltachi1*fi(x-x1)+... 
and like this model different layers by a continuous distribution of the temperature conductivity, and this will enable you 
to apply a single diffusion equation in the whole domain, and to solve it numerically.
However, here you will need to carefully think of how to chose parameters (r1, r2,....) such that this continuous approach 
would give you the same as the boundary conditions in the discrete model. And this is only your task, not mine or of anybody of the 
community, since it is only you who knows the physical origin of this problem and hence, only you may decide what assumptions 
are plausible in this case.

So, better start with the first approach.  

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??

Alexei Boulbitch, Dr., habil.
Senior Scientist

ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern

Phone: +352 2454 2566
Fax:   +352 2454 3566


This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

  • Prev by Date: Re: using FileNames[] on large, deep directories
  • Next by Date: Re: problems with DSolve
  • Previous by thread: Re: Diffusion Model using NDSolve - Advice needed
  • Next by thread: Do some definite integral calculation.