Assist. Prof. Dr. Ersin Emre ÖREN
______________________________________________________________________________
is an example of
is an example of
is an example of
Diffusion describes the spread of particles as a result of their random motion from regions of higher concentration to regions of lower concentration. The time dependence of the statistical distribution in space is given by the diffusion equation.
Continuity equation (Conservation of Mass): A change in density in any part of the system is due to inflow and outflow of material into and out of that part of the system.
Effectively, no material is created or destroyed:
Flux J: is the amount of substance per unit area per unit time.
(Eq. 1)
where C is the concentration (amount of substance per volume)
Historical origin: The particle diffusion equation was originally derived by Adolf Fick in 1855.
Fick's first law: The flux goes from regions of high concentration to regions of low concentration, with a magnitude that is proportional to the concentration gradient (spatial derivative). In one (spatial) dimension, this is
J is the "diffusion flux" [(amount of substance) per unit area per unit time]
D is the diffusion coefficient or diffusivity in dimensions of [length2 time−1]
C is the concentration in dimensions of [(amount of substance) length−3]
(Eq. 2)
Fick's second law predicts how diffusion causes the concentration to change with time:
Combining Eq. 1 and 2:
in 1 D.
One dimensional diffusion equation without sources on a finite interval 0<x<L.
k is the thermal diffusivity.
boundary conditions
initial condition
==>
One dimensional diffusion equation without sources on a finite interval 0<x<L.
k is the thermal diffusivity.
initial condition
boundary conditions
Then the diffusion equation at any point x=x0 and t=to, becomes:
+ error
(*)
This equation involves points seperated a distance d
Similarly
The exact concentration at the mesh point Cexact(ti,xj) is approximately C(ti,xj) wich satisfies above equation (*).
In MathCad let us introduce the following notation:
Diffusion Equation
then (*) becomes
In addition, we insist that Cj,m satisfies the initial condition at t=0 and the boundary conditions (at each time step).
initial condition
boundary conditions
Let us obtain Ci+1,j from the diffusion equation given above:
We begin our computation using the initial condition uj,0=f(xj) for j:=1..N-1. Then specifies the solution uj,1 at time d
Now let us write a computer program in order to solve this problem numerically:
initial condition
boundary conditions
Boundary conditions, L: Left; R: Right
Initial Conditions:
Try some functions such as:
This is the concentration distribution along the length of the bar at time t=0.
This is the concentration distribution along the length of the bar at time
To be able to make a movie we need to take a picture of each frame. Here in fact we do have n frames since we have divided to time into n intervals.
But it will take very long to make a movie of each frame so instead let us take a picture for every 50 frame so time will be
A new window will show up
Choose an animation window which should be the graphical area on the left.
Then set up to FRAME FROM: 0 TO: 100