Biologists are concerned with computing the metabolic power of mammals and reptiles. For example, a hibernating ground squirrel is contained in an air tight chamber. The mass of the squirrel is 30 grams. The ambient temperature inside the chamber is 5 degrees Celsius. The chamber pressure is 756 mmHG. The concentration of oxygen in ambient air is 0.2095, which is being pumped into the squirrel's chamber at the rate of 6000 mL/hr. You record the concentration of oxygen after passing through the chamber (i.e., safely assuming that the hibernating squirrel is respiring albeit very slowly and thus taking oxygen out of the system) as 0.2092.
Computing the metabolic power involves three main steps.
Step 1. Compute the volume of oxygen consumed (VOC).
VOC = VAF * (PRE - POST) / (1 - POST),
where VAF is the volume of air flowing past the animal in mL/hr, PRE is the volume concentration of oxygen in inlet air (i.e., pre-animal), and POST is the volume concentration of oxygen in outlet air (i.e., post-animal).
Step 2. Correct VOC to standard temperature and pressure (STP).
STP = VOC * (CP / 760) * (c1 / (c1 + AT)),
where CP is the chamber pressure in mmHG, AT is the ambient temperature, and c1 is the constant value 273 for correcting from VOC to STP.
Step 3. Calculate metabolic power (MP) from STP.
MP = STP / (mass * c2),
where mass is in grams, and c2 is the constant value 0.179 for calculating MP from STP.
Write a C++ program for biologists that calculates and prints metabolic power.
Include a function called GetData that takes 6 arguments and inputs the mass, ambient temperature, chamber pressure, concentration of ambient air (pre-animal), concentration of ambient air (post-animal), and the rate in which oxygen is pumped into the chamber. Include a void function called calc_VOC for calculating VOC. Include two value-returning functions called calc_STP and calc_MP for calculating STP and MP, respectively. Include a function called print for printing an appropriate concluding message on the screen. Demonstrate that your program works using the squirrel example above.