102 lab3

Notes on Lab #3

In this lab we’ll apply some of our newly-acquired modeling techniques to a real-world situation: the spread of drugs in the body.

To get started, copy the OneCompartmentAspirin.mdl and href=”OneCompartDilantin.mdl files from the zipped folder you downloaded last time. Then read in Module 2.5 pp. 45 – 54, in which you will use these pre-built models to get familiar with the overall approach. These two models will also serve as templates for the more complicated models you will build for your turnin. These more complicated models are described in Projects 1 and 3 on p. 55. For these projects, you will turn in three model files, named appropriately. For example, my files would be levys_TwoCompartmentAspirin1a.mdl, levys_TwoCompartmentAspirin1b.mdl, and levys_OneCompartmentDilantin3.mdl. You will also turn in a single writeup in PDF format.

Project 1

To get started, build the compartment for the digestive system first. This should be like the population model from the first lab, except that

  • Instead of population you have aspirin in intestines, whose initial value is the same as the initial value of the aspirin in plasma stock variable.
  • Instead of a growth flow going into the box, you have an absorption flow coming out.
  • Instead of growth rate you have absorption rate.

Test this digest-system compartment model by itself first, looking for exponential decay in the concentration of aspirin in the intestines. Once this is working, connect the other end of the absorption flow into the aspirin in plasma stock (you may have to delete the old flow and rebuild it). Change the aspirin in plasma stock to have an initial value of zero.

Now, think about what should happen to aspirin in plasma in this simple two-compartment model. Run the model and test your predictions by plotting aspirin in plasma. In your writeup, include labeled plots for the one-compartment plot for this variable, as well as its plot under two different values of absorption rate. For each of the plots, write a brief description of how the plots characterize the differences between the successive models.

Once you’re satisfied with username_TwoCompartmentAspirin1a, save it as username_TwoCompartmentAspirin1b and make the indicated modifications:

  • Add intestinal volume as a variable and factor it into absorption (it can just replace absorption rate). For simplicity, you can normalize its range to the interval [0,1]. Test with different intestinal volumes (a slider would be nice).
  • Add an arrow from aspirin in plasma to absorption, and make absorption also be proportional to the difference in aspirin concentrations between the intestines and plasma. (You may want to make this a separate variable.)

Add a few labeled plots and comments to your writeup, showing some runs from the 1b version.

Project 3

Next, copy the Dilantin model and rename the copy appropriately. An easy way to do Project 3 is to one more flow into drug in system, and then connect into it one variable for each loading dosage and time (use a PULSE function for each varible, experimenting with the PULSE parameters to get a single spike at the correct time.) Then the new flow is just the sum of the three pulses. Before you do that, you can change the normal (entering) flow to start at 28 hours (24 hours after the final loading dose at 4 hours). Run the model, then plot drug in system to make sure this initial modification worked. Then add the new flows for the loading doses, by mimicking what’s in entering. Each of these loading-dosage flows will use a pulse at a given time (400 mg at 0 hours, 300 mg at 2 hours, 300 mg at 4 hours, but check the original dosagevariable to determine the actual magnitudes). As with the aspirin model, show a labeled plot contrasting this version with the original, and briefly comment on the effect of the loading dose. If you have time, you might want to rename the variables to distinguish between the normal and loading flows. You may also be able to reduce the three loading-dosage flows to a single flow, using a pulse train, combined with a dosage that uses an IF-THEN-ELSE that is sensitive to time. This would simplify the appearance of the model.