Computer simulation of diffusion processes as a teaching aid

Computer simulation of diffusion processes as a teaching aid

Computer Methods and Programs in Biomedicine 27 (1988) 1-5 Elsevier 1 CPB 00913 Section I. Methodology Computer simulation of diffusion processes ...

260KB Sizes 0 Downloads 97 Views

Computer Methods and Programs in Biomedicine 27 (1988) 1-5 Elsevier

1

CPB 00913

Section I. Methodology

Computer simulation of diffusion processes as a teaching aid Miguel H o l m g r e n 1, R u b e n Budelli 1 a n d O s c a r D i e z - M a r t i n e z 2 I Departamento de Ciencias Fisiolbgicas, Instituto de Ciencias, Unioersidad A utbnoma de Puebla, Puebla, Mexico and 2 Departemento de Fisiologla, Facultad de Medieina, Unioersidad Nacional Autbnoma de M~xico, Mexico

A computer program for the simulation of diffusion processes has been developed. It displays the trajectories of single molecules under Brownian motion. Diffusion of 40 to 100 molecules in a box with or without barriers can be simulated, and concentration-time and concentration-distance functions can be plotted. This program may be useful, when complemented with experimental work and theoretical study, for teaching diffusion and membrane permeability processes. Diffusion; Teaching aid; Simulation; Membrane permeability

1. Introduction Most basic physiology courses discus s topics related with diffusion processes. Commonly, classical experiments are performed in the laboratory to facilitate the comprehension of these processes by the student. The main purpose of these experiments is to illustrate the different factors participating in diffusion. However, the fact that diffusion phenomena are quite slow when occurring over long distances usually hinders their quantification. Furthermore, the overall conditions generally prevailing in many teaching laboratories, make it difficult to measure diffusion velocities across short distances. In view of this, we have devised a computer program which simulates these processes to serve as a teaching aid in a graduate physiology course. This program allows the user to simulate the influence of the temperature in diffusion and permeability phenomena, as well as the role of the number, position and thickness of membranes in Correspondence: M. Holmgren, Departamento de Ciencias Fisiol6gicas, Instituto de Ciencias, Universidad Aut6noma de Puebla, Apdo. Postal 406, Puebla, Pue., Mexico.

different systems. Although this program has not been employed in college or high-school courses, we think that it might also be helpful at these levels. The use of this program is not intended as a substitute for experiments commonly performed in the laboratory to study diffusion processes. Rather, we see its use as a complement to them. We believe that our computer simulation, used in conjunction with experiments, will significantly help students deepen their understanding of diffusion and permeability phenomena.

2. System and design The simulation program was made on an IBMPC-compatible computer (Printaform 5207) equipped with 256 kBytes RAM. The program was written in Turbo-Pascal language. The considerations in the design of the program are: (1) The movement of the molecules in solution is simulated as Brownian motion. We have considered it as a movement in only four directions:

0169-2607/88/$03.50 © 1988 Elsevier Science Publishers B,V. (Biomedical Division)

2

(a)

upwards, downwards, to the left or to the right, depending on the value of a random number between zero and one. Although this situation is not really Brownian, it is a good approximation when the number of movements is large. We have selected this alternative to widen the scope of the program since it does not require that the microcomputer have a mathematical co-processor (8087) installed. Otherwise, the use of the trigonometrical functions necessary for calculating the range of possible angles the molecule might follow when moving, would make the simulation considerably slower. This would tend to reduce its educational advantages. (2) When a molecule is diffusing freely, the probability of moving in any direction is the same (P(left) = P(right) = P(up) = e(down) = 0.25). (3) When a molecule is located so near a vertical semi-permeable membrane that with its next movement it might cross the barrier, the probability of moving toward the membrane is less than for the other directions. (4) The motion of the molecules across membranes of increasing thickness is simulated by reducing their probability of movement. Thus, the diffusion velocities are reduced. (5) The temperature-dependency of the diffusion velocity is simulated by introducing a delay in the motion of the molecules that increases with decreasing temperature.

(b}

3. Description of the simulation {c) ~ ' ~ L 1

The program was structured with the intention of using computer graphics as much as possible, in order to provide the user with a particulary effective tool in the analysis [3] of the diffusion and permeability processes. The different options for simulation are: 3.1. Brownian motion with trajectory. This is a

Fig. 1. Trajectories during Brownian motion. The movements of a single molecule, which starts at the center of the box. Three video screens are presented, each showing the position of the molecule at different times (in arbitrary units). The simulation was stopped at times 15, 50 and 100 in (a), (b), and (c), respectively.

3

(a)

(a) 1

2 i

3 .j

.

4 i

5

1

2

i

(b) 1

2

3

I<

-.,

Z ILl

I--

"^

LI.I

.;." ,f

T IME (c}

T

I M E

(c)

O I STANCE Fi 8. 2. Free diffusion in a box. Initially the program shows the box with the molecu]es concentrated at a point located in the left side of c o m p a r t m e n t 1. The box, with the position of its molecules at time 100 (arbitrary units), is shown in (a). At this time, the simulation was stopped and the concentration in each compartment was plotted as a function of time. This is shown in (b). It is worthwhile to note the exponential-like shape of the concentration versus time graph which corresponds to cornpartment 1. Observe the decreasing positive slopes of the graphs in 2, 3, 4 and 5, and the m a x i m u m concentration achieved at an intermediate time in c o m p a r t m e n t 2. In (c), the concentrations as a function of distance for different times are plotted. These curves tend to the horizontal as time increases (to a value of approximately 20% of the total n u m b e r of molecules); the straight arrow indicates the curve obtained at time 15 and the curved arrow that plotted at time 90.

u Z 0 (j

D I STANCE Fig. 3. Diffusion across one barrier. In (a), the position of the molecules in the box at time 190 is shown. The concentration in each compartment is plotted versus time in (b). Notice the delay in the change of concentration due to the time required for the diffusion from the left side of compartment 1 to the membrane. Observe also the exponential-like shape of both curves, and their similar asymptotic values. In (c), the concentrations as a function of distance at different times are shown. As time increases, the curves tend to an horizontal straight line placed approximately at a concentration equal to 50% of the total number of molecules. The straight arrow indicates the curve obtained at time 15 and the curved arrow that plotted at time 90.

4

i : i

... ":

"

'

(b) 1

2 '~'~"~%""~

i 3 II,s'/~"4~"

~"'~,,e~,. : "

z o_ ~< ,,z w

Z

~

4

5

o t~ _,.,~" T I M E (c)

z~

D I STANCE Fig. 4. Diffusion across several barriers. In this case, several membranes can be placed between the compartments of Fig. 2. In this example, two barriers were placed, one between compartments 2 and 3, and the other between compartments 3 and 4. In (a), the diffusion box is shown with the position of its molecules at time 100. The same time as that selected in Fig. 2 was employed to facilitate visual comparison. In (b), the graphs of concentration versus time in each of the compartments are shown. Notice that the behavior of the curves is quite different, During a brief initial period, the concentrations in compartments 1 and 2 are similar, achieving approximately half of the original concentration observed in the first compartment, Afterwards, concentrations in these compartments fall but with a slower time constant than those observed in Fig. 2, reaching a concentration about one fifth of the original. Concentrations in the other compartments start increasing with longer delays and slower slopes. In (c), the concentration is presented as a function of distance. Here, the tendency towards the horizontal is not clear because of the delay caused by the presence of the membranes; the straight arrow indicates the curve obtained at time 15 and the curved arrow that plotted at time 90.

and of how the temperature affects their speed. If sufficient time elapses, it is evident that the probability of finding a molecule at any point in the diffusion space is equally distributed since the monitor screen is filled with trajectories (Fig. 1). 3.2. Free diffusion in a box. This is a procedure that simulates the diffusion of 40 to 100 molecules in a box at different temperatures. The box is divided into compartments, in order to have a measure of distance along the box. At any time, the user can momentarily stop the simulation to observe the graphs of concentration versus time for each compartment and a graph of concentration versus distance along the box (Fig. 2). 3.3. Diffusion across one or more barriers. This procedure simulates diffusion when one or more barriers are present in the box. Simulation of diffusion occurring at different temperatures is also allowed. In this case, it is possible to select a box with 2 or 5 compartments. If 2 is chosen, the user can simulate what happens to diffusion through membranes of different thicknesses (Fig. 3). If 5 is selected, the number and position of 1 to 4 membranes can be controlled (Fig.4). The various graphs described previously can be visualized if so desired.

4. Conclusion The aim of this program is to provide a tool with which students can play a much more active role in the learning process [1] a n d w i l l gain a deeper insight i n t o t h e b a s i c principles and concepts [2] diffusion and permeability phenomena. The program has been designed a s a n auxiliary method for the study of these processes. The use of this simulation program was tested in a master's physiology course. The course was structured to encourof

age students to hold a theoretical discussion about a specific problem arising from lecture material. Students would then propose an experimental plan designed to solve it. The simulation of this ' h y p o thetical experiment' allowed them t o t e s t their ideas, and to plan the research steps which would then be carried o u t .

5 After incorporating the computer simulation in this learning process, both teachers and students commented on the results. Their reactions were positive. Teachers felt the program helped students make connections between concepts taught in lectures and results obtained in the laboratory, Most students said that working with the program helped them understand more clearly the basic concepts underlying diffusion and permeability processes.

5. Mode of availability The program listing is available from M. Holmgren at no charge.

Acknowledgments This work was supported in part by a grant from the Consejo Nacional de Ciencia y Tecnologia

(CONACyT, PCEXCNA-040539). M. Holmgren was supported by a fellowship from the Universidad Aut6noma de Puebla. We are indebted to Drs. B. Holmgren and E. Soto for their advice and criticism. The authors thank Dr. L. Riboni for her help in the preparation of the manuscript.

References [1] P.W. Hewson, Microcomputers, conceptual change and the design of science instruction: examples from kinematics and dynamics, S. Afr. J. Sci. 80 (1984) 15-20. [21 J.D. Spain, The introduction of biological measuration techniques through simulation, Conf. Comput. Undergrad. Curr. Proc. 3 (1973) 80-84. [3] P. Wong, A computer-assisted course in biomathematics, in: Proc. Natl. Educ. Comput. Conf. Univ. Iowa pp. 184-193 (1980).