Path: blob/master/activities/ficks-law.ipynb
934 views
Task
This homework is an activity intended to apply the integration formulas given in class. The objective is to solve the error function and applying it to a problem of diffusion in fluids.
Error Function and Fick's Law
Error Function
The error function is a special and non-elementary function that is widely used in probability, statistics and diffussion processes. It is defined through the integral:
1. Using the substitution it is possible to use the described methods for impropers integrals in order to evaluate the error function. Create a routine called ErrorFunction that, given a value of x, return the respective value of the integral.
Fick's Law
In fluid physics and thermodynamics, Fick's law is a quantitative law that describes several diffusion processes for matter or heat. Situations in which there are gradients of concentration or heat, a flux that tends to homogenise the fluid arises as a consequence of random motion of constituent particles, as predicted by the second law of thermodynamics.
The Fick's law then says:
where is the associated flux of particles of some specie or flux of heat, is the diffusion coefficient for gradients of concentrations, or the thermal conductivity in case of gradients of heat. Finally, is the studied property, concentration or temperature.
A very simple solution of this problem is obtained when studying diffusion of a set of particles in one dimension, from a boundary located at and a concentration fixed at .
2. Using and , and the previous routine for calculating the error function, plot the resulting density number of particles as a function of the position for different times (i.e. plot several curves associated with each time).