HW06 - Timothy Lin HW06 Modeling Insulin Loading with...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Timothy Lin HW06 Modeling Insulin Loading with Differential Equations BEE 1510: Introduction to Computer Programming Homework Exercise 06 Timothy Lin Cornell University due: December 05, 2008 Executive Summary This exercise was meant to model the concentrations of insulin in different organs or areas of the body taking into account the different rates of movement of insulin between the different areas. In addition, the different volumes of each compartment are taken into account when there is an initial injection of insulin into one compartment. The assumption is made that when that injection is made at time t = 0, there is no other insulin in any other compartment. Problem The problem is how to graphically represent where insulin is and in what concentration in each body compartment over a certain given time with the inputs of the initial concentrations at each compartment and the span of time. Objective The objective of this homework exercise was to combine the use of differential equations in Matlab with the ODE solver. A function file mapping out the paths of insulin movement throughout the blood, kidneys, pancreas and abdomen is created using the compartment model. The rates of movement are designated by the compartment model and are used in the function file. Two similar function files with the same exact equations were also created, but one with halved k- rates and the other with doubled rates. In addition, for a more user-friendly use of these function files and the ODE solver, a GUI (Graphical User Interface) was created. This GUI took user inputs of the initial concentrations of insulin in the blood, kidneys, pancreas and the abdomen as well as the starting and ending times, ran it through the function files and returned graphical displays for the user. Materials and Methods There are four different equations used in the insulin function files (insulin w/ given rates, halved rates and doubled rates) that calculate how much insulin moves into each compartment and how much there is at designated times. The first equation describes how much insulin moves through blood, which in this compartment model, receives inputs from the abdomen, pancreas and kidneys and outputs to the kidneys and pancreas. The second equation describes how much insulin enters and leaves the kidneys, which just exchanges insulin (input and output) with the blood. The third equation describes how much insulin enters and leaves the pancreas, which also just exchanges insulin (input and output) with the blood. Finally, the last equation describes how much insulin leaves the abdomen, which outputs insulin only to the blood. Materials and Methods Algorithm for the insulin function (same for insulindouble and insulinhalf) 1. Enter Comments INSULIN is a function that uses a compartment model to view the concentration of insulin in the blood, kidneys, pancreas, and abdomen after it is injected into the abdomen. This function is utilized by an ODE45 solver in the Command Window, with inputs of the time steps (0,15) and...
View Full Document

Page1 / 16

HW06 - Timothy Lin HW06 Modeling Insulin Loading with...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online