*Where C in concentration in mol/m ^{3}, t is time in s and D is the diffusion coefficient in m^{2}/s*.

I was able to graph the concentration vs distance in one and two dimensions. The boundary conditions where set as an instantaneous point source. By doing this I was able to understand how the concentration changes in time and how temperature affects the diffusion rate.

is for seeing a list of diffusion coefficients for some typical solutes in water in standard pressure at a temperature of 20 and 10 degrees Celsius [10-4 cm2/s]. The function reads the file (coefficients.csv) and makes a tree.**cvstoroot**

is for graphing in one dimension for different times. The program has pre-assigned values for**SetAndGraph**`M`and`D`but you can change them, the graph shows the solution for times`t=10`for^{n}`n=0,1,2,3,4`is for graphing in two dimensions for different times. The program has pre-assigned values for**SetAndGraph2**`M`,`Dx`,`Dy`, and`Lz`but you can change them, the graph shows the solution for times t=10n for n=0,1,2is graphing in one dimension for two different coefficients. The program has pre-assigned values for**TempGraph**`M`,`t`,`D20`, and`D10`but you can change them, the graph shows the solution with`D20`parameter en red and`D10`parameter in blue. By choosing the parameters of the same solute at different temperatures we can observe difference of concentration if the temperature changes or we can also graph two different solutes.

Click here to get the program code here

The Solutions below describes the evolution of a slug of mass,

For one dimension Fick's law is written as:

The boundary conditions, initial conditions, are mathematical written as

From Fick's law we anticipate that the concentration will be a function of

The factors

Defining

Setting the terms within the bracket to zero provides one solution, which has the solution

`f=A _{0}e^{-η2}`

Since the total mass must be conserved over time, for all time

so that

The final solution is expressed as:

Similarity for an instantaneous point source in two dimensions such that the initial concentration is

we notice the dependency of the variables and we can propose a solution as follows:

Evaluating the proposed solution in Fick's law we get:

The trivial solution

Graph 1

*Difusion for hydrogen ion at 20 degrees Celsius*

Graph 2

*Difusion for ammonia at 20 degrees Celsius*

Graph 3

*Difusion for dihydrogen phosphate at 10 degrees Celsius*

A first observation is the sharpness of the curves when changing the diffusion coefficient, the concentration is higher if the diffusion coefficient is low and the range is bigger when the diffusion coefficient is big. We can also notice the difference between the first time and last time; with a small diffusion coefficient the difference in concentration is more appreciable.

The graph in two dimensions look like concenters circles. The graphs are made with three different times in a logarithmic scale with different colors so we can appreciate how the concentration expands as time passes. We see that the red circles are closer together and don't reach as far as the white and black circles. The first image is with equal diffusion coefficients for x and y direction, i.e.

Graph 4

*Difusion for coefficients Dx=Dy=0.28*

Graph 5

*Difusion for coefficients Dx=0.28 and Dy=0.15*

Graph 6

*Difusion for coefficients Dx=0.1 and Dy=0.3*

To understand how temperature affects the concentration I chose the example of Sulfate SO4

Graph 7

*Difusion of Sulfate SO4 ^{-2} at 20 and 10 degrees Celsius with red and blue colors respectively at t=1*

Graph 8

*Difusion of Sulfate SO4 ^{-2} at 20 and 10 degrees Celsius with red and blue colors respectively at t=10*

Graph 9

*Difusion of Sulfate SO4 ^{-2} at 20 and 10 degrees Celsius with red and blue colors respectively at t=100*

Displaying the project in a HTML was a good way to learn how it works and the features it has. I had some trouble to enter formulas so the solution was to enter them as pictures.

http://web.mit.edu/1.061/www/dream/THREE/THREETHEORY.PDF

Thank you!