Location: Guyton, Muscle, Oxygen, Delivery, 2008 @ c85299b77480 / M_O2_delivery.cellml

Author:
Tommy Yu <tommy.yu@auckland.ac.nz>
Date:
2010-08-25 18:19:01+12:00
Desc:
xml:base fix
Permanent Source URI:
https://models.physiomeproject.org/workspace/guyton_muscle_oxygen_delivery_2008/rawfile/c85299b77480f3164636238951d7651e41890e2c/M_O2_delivery.cellml

<?xml version="1.0" encoding="utf-8"?>
<model 
	name="muscle_O2_delivery_model"
	cmeta:id="muscle_O2_delivery_model"
	
	xmlns="http://www.cellml.org/cellml/1.1#"
	xmlns:cellml="http://www.cellml.org/cellml/1.1#"
	xmlns:cmeta="http://www.cellml.org/metadata/1.0#"
	xmlns:xlink="http://www.w3.org/1999/xlink">

	<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
		<rdf:Description rdf:about="#muscle_O2_delivery_model">
			<rdf:value>
			The tissues of the body are divided into non-muscle tissues and muscle tissues, 
			and the delivery of oxygen to each one of these is calculated separately.  The 
			principal reason for this separation is that during muscle activity, the delivery 
			of oxygen to the muscles increases tremendously and correspondingly affects the 
			blood flow through the muscles.  Several aspects of local cellular usage of oxygen 
			are also calculated.
			</rdf:value>
		</rdf:Description>
	</rdf:RDF>

<!-- =============================================	Import the required units from the Units file	==================================================== -->
	<import xlink:href="units.cellml">
		<units name="minute" units_ref="minute"/>
		<units name="per_minute" units_ref="per_minute"/>
		<units name="beats_per_minute" units_ref="beats_per_minute"/>
		<units name="beats_per_minute_per_mmHg" units_ref="beats_per_minute_per_mmHg"/>
		<units name="minute_per_L" units_ref="minute_per_L"/>
		<units name="mmHg" units_ref="mmHg"/>
		<units name="per_mmHg" units_ref="per_mmHg"/>
		<units name="mmHg_per_mL" units_ref="mmHg_per_mL"/>
		<units name="mmHg_L" units_ref="mmHg_L"/>
		<units name="per_mmHg2" units_ref="per_mmHg2"/>
		<units name="mmHg3" units_ref="mmHg3"/>
		<units name="monovalent_mEq" units_ref="monovalent_mEq"/>
		<units name="monovalent_mEq_per_minute" units_ref="monovalent_mEq_per_minute"/>
		<units name="monovalent_mEq_per_litre" units_ref="monovalent_mEq_per_litre"/>
		<units name="mOsm" units_ref="mOsm"/>
		<units name="mOsm_per_litre" units_ref="mOsm_per_litre"/>
		<units name="mOsm_per_minute" units_ref="mOsm_per_minute"/>
		<units name="monovalent_mEq_per_litre_per_minute" units_ref="monovalent_mEq_per_litre_per_minute"/>
		<units name="litre2_per_monovalent_mEq_per_minute" units_ref="litre2_per_monovalent_mEq_per_minute"/>
		<units name="L_per_minute" units_ref="L_per_minute"/>
		<units name="per_mmHg_per_minute" units_ref="per_mmHg_per_minute"/>
		<units name="mL" units_ref="mL"/>
		<units name="gram_per_L" units_ref="gram_per_L"/>
		<units name="L_mmHg_per_gram" units_ref="L_mmHg_per_gram"/>
		<units name="L2_mmHg_per_gram2" units_ref="L2_mmHg_per_gram2"/>
		<units name="mmHg_minute_per_L" units_ref="mmHg_minute_per_L"/>
		<units name="mmHg_L_per_minute" units_ref="mmHg_L_per_minute"/>
		<units name="gram_per_minute" units_ref="gram_per_minute"/>
		<units name="mL_per_L" units_ref="mL_per_L"/>
		<units name="mL_per_L_per_mmHg" units_ref="mL_per_L_per_mmHg"/>
		<units name="mL_per_L_per_minute" units_ref="mL_per_L_per_minute"/>
		<units name="mL_per_minute_per_mmHg" units_ref="mL_per_minute_per_mmHg"/>
		<units name="L_mL_per_minute_per_mmHg" units_ref="L_mL_per_minute_per_mmHg"/>
		<units name="L_per_mL" units_ref="L_per_mL"/>
		<units name="L_per_mmHg" units_ref="L_per_mmHg"/>
		<units name="mL_per_minute" units_ref="mL_per_minute"/>
		<units name="L_per_minute_per_mmHg" units_ref="L_per_minute_per_mmHg"/>
		<units name="L_per_minute_per_mmHg2" units_ref="L_per_minute_per_mmHg2"/>
	</import>

<!-- =====================================	Import all Parameters and State Variables from the Parameter file	============================================== -->
	<import xlink:href="parameters.cellml">
		<component component_ref="parameter_values" name="parameter_values"/>
		<component component_ref="state_variables" name="state_variables"/>
	</import>


<!-- ========================================	MUSCLE O2 DELIVERY TOP-LEVEL COMPONENT	============================================= -->
	<component 	name="muscle_O2_delivery" 
				cmeta:id="muscle_O2_delivery">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#muscle_O2_delivery">
				<rdf:value>
				Encapsulation grouping component containing all the components in the Muscle Oxygen Delivery Model. 
				The inputs and outputs of the Muscle Oxygen Delivery Model must be passed by this component.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>

      <variable	name="time"	units="minute"	private_interface="out" public_interface="in"/>

<!-- Inputs from components in other models -->
		<variable name="BFM"	units="L_per_minute" private_interface="out" public_interface="in"/>
		<variable name="OVA"	units="mL_per_L" private_interface="out" public_interface="in"/>
		<variable name="HM"		units="dimensionless" private_interface="out" public_interface="in"/>
		<variable name="AOM"	units="dimensionless" private_interface="out" public_interface="in"/>

<!-- Outputs to components in other models -->
		<variable name="PMO" 	units="mmHg" private_interface="in" public_interface="out"/>
		<variable name="RMO" 	units="mL_per_minute" private_interface="in" public_interface="out"/>
	</component>

<!-- OUTPUT CONNECTIONS -->
	<connection>
		<map_components component_1="muscle_O2_delivery" component_2="pressure_of_O2_in_M_tissue_cells"/>
		<map_variables variable_1="PMO" variable_2="PMO"/>
	</connection>
<!--	<connection>
		<map_components component_1="muscle_O2_delivery" component_2="delivery_of_O2_to_M_tissues"/>
		<map_variables variable_1="RMO" variable_2="RMO"/>
	</connection> -->

<!-- ====================================================	MUSCLE O2 BLOOD SUPPLY	========================================================= -->
	<component 	name="M_O2_blood_supply" 
				cmeta:id="M_O2_blood_supply">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#M_O2_blood_supply">
				<rdf:value>
				OM1:  
				The volume of oxygen in the arterial blood flowing to the muscles each minute (02ARTM) 
				is equal to the volume of oxygen in each liter of arterial blood (OVA) times the muscle 
				blood flow (BFM).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM1">
				<rdf:value>
				OM1:  
				The volume of oxygen in the arterial blood flowing to the muscles each minute (02ARTM) 
				is equal to the volume of oxygen in each liter of arterial blood (OVA) times the muscle 
				blood flow (BFM).
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="OVA"	units="mL_per_L" private_interface="none" public_interface="in"/>
		<variable name="BFM"	units="L_per_minute" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable name="O2ARTM" 	units="mL_per_minute" private_interface="none" public_interface="out"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM1">
				<eq/>
				<ci>O2ARTM</ci>
				<apply>
					<times/>
					<ci>OVA</ci>
					<ci>BFM</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="M_O2_blood_supply" component_2="muscle_O2_delivery"/>
		<map_variables variable_1="OVA" variable_2="OVA"/>
		<map_variables variable_1="BFM" variable_2="BFM"/>
	</connection>

<!-- ========================================	MUSCLE VENOUS O2 CONTENT	============================================= -->
	<component 	name="M_venous_O2_content" 
				cmeta:id="M_venous_O2_content">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#M_venous_O2_content">
				<rdf:value>
				OM2:  
				The volume of oxygen in the venous blood flowing away from the muscles 
				each minute (O2VENM) is equal to the volume of blood flowing into the muscles 
				from the arteries (O2ARTM) minus the rate of uptake of oxygen by the muscles 
				per minute (RMO).

				OM3 and OM4:  
				The venous oxygen saturation in the muscles (OVS) is equal to the volume of oxygen 
				transported to the muscle veins each minute (O2VENM) divided by the blood flow 
				through the muscles per minute (BFM), divided by the hematocrit of the blood (HM), 
				and divided by a constant that relates volume of oxygen in the blood to hematocrit.  
				Damping of the oxygen venous saturation (OVS) is provided by Block OM4 and is controlled 
				by the damping constant (Z6).

				OM5 and OM5A:  
				The pressure of the oxygen in the venous blood of the muscles (PVO) is equal to the 
				saturation of the oxygen in the venous blood of the muscles (OVS) times a constant 
				and times a factor related exponentially (EXCXP2) to the level of exercise (EXC) 
				caused by changes in tissue fluid products that affect oxygen combination with 
				hemoglobin.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM2_to_OM4">
				<rdf:value>
				OM2:  
				The volume of oxygen in the venous blood flowing away from the muscles 
				each minute (O2VENM) is equal to the volume of blood flowing into the muscles 
				from the arteries (O2ARTM) minus the rate of uptake of oxygen by the muscles 
				per minute (RMO).

				OM3 and OM4:  
				The venous oxygen saturation in the muscles (OVS) is equal to the volume of oxygen 
				transported to the muscle veins each minute (O2VENM) divided by the blood flow 
				through the muscles per minute (BFM), divided by the hematocrit of the blood (HM), 
				and divided by a constant that relates volume of oxygen in the blood to hematocrit.  
				Damping of the oxygen venous saturation (OVS) is provided by Block OM4 and is controlled 
				by the damping constant (Z6).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM5_and_OM5A">
				<rdf:value>
				OM5 and OM5A:  
				The pressure of the oxygen in the venous blood of the muscles (PVO) is equal to the 
				saturation of the oxygen in the venous blood of the muscles (OVS) times a constant 
				and times a factor related exponentially (EXCXP2) to the level of exercise (EXC) 
				caused by changes in tissue fluid products that affect oxygen combination with 
				hemoglobin.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="O2ARTM"	units="mL_per_minute" private_interface="none" public_interface="in"/>
		<variable name="RMO"	units="mL_per_minute" private_interface="none" public_interface="in"/>
		<variable name="BFM"	units="L_per_minute" private_interface="none" public_interface="in"/>
		<variable name="HM"	units="dimensionless" private_interface="none" public_interface="in"/>
		<variable name="time"	units="minute" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable name="PVO" 	units="mmHg" private_interface="none" public_interface="out"/>

<!-- Parameters from parameter_file -->
		<variable name="EXC"	units="dimensionless" private_interface="none" public_interface="in"/>
		<variable name="EXCXP2"	units="dimensionless" private_interface="none" public_interface="in"/>

<!-- Internal variables -->
		<variable name="OVS"	units="dimensionless" private_interface="none" public_interface="none"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM2_to_OM4">
                <eq/>
                <ci>OVS</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>O2ARTM</ci>
                        <ci>RMO</ci>
                    </apply>
                    <apply>
                        <times/>
                        <ci>HM</ci>
                        <cn cellml:units="dimensionless">5.25</cn>
                        <ci>BFM</ci>
                    </apply>
				</apply>
			</apply>
			<apply id="OM5_and_OM5A">
				<eq/>
				<ci>PVO</ci>
				<apply>
					<times/>
					<cn cellml:units="mmHg">57.14</cn>
					<ci>OVS</ci>
					<apply>
						<power/>
						<ci>EXC</ci>
						<ci>EXCXP2</ci>
					</apply>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="M_venous_O2_content" component_2="M_O2_blood_supply"/>
		<map_variables variable_1="O2ARTM" variable_2="O2ARTM"/>
	</connection>
	<connection>
		<map_components component_1="M_venous_O2_content" component_2="delivery_of_O2_to_M_tissues"/>
		<map_variables variable_1="RMO" variable_2="RMO"/>
		<map_variables variable_1="PVO" variable_2="PVO"/>
	</connection>
	<connection>
		<map_components component_1="M_venous_O2_content" component_2="muscle_O2_delivery"/>
		<map_variables variable_1="BFM" variable_2="BFM"/>
		<map_variables variable_1="HM" variable_2="HM"/>
		<map_variables variable_1="time" variable_2="time"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="M_venous_O2_content" component_2="parameter_values"/>
		<map_variables variable_1="EXC" variable_2="EXC"/>
		<map_variables variable_1="EXCXP2" variable_2="EXCXP2"/>
	</connection>

<!-- ========================================	AUTONOMIC EFFECT ON MUSCLE O2 CONSUMPTION	============================================= -->
<!-- THIS COMPONENT IS THE SAME AS THE AUTONOMICS EQUATIONS NUMBERS 47 AND 48!!! 
	<component 	name="autonomic_effect_on_M_O2_consumption" 
				cmeta:id="autonomic_effect_on_M_O2_consumption">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#autonomic_effect_on_M_O2_consumption">
				<rdf:value>
				OM24 and OM25:  
				Calculation of autonomic stimulation of muscle usage of oxygen (AOM) based 
				on the current level of whole-body autonomic stimulation (AUO) times a 
				proportionality factor (O2A).
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
	</component>
-->
	
<!-- ========================================	METABOLIC O2 CONSUMPTION BY MUSCLE TISSUE CELLS	============================================= -->
	<component 	name="metabolic_O2_consumption_by_M_tissue" 
				cmeta:id="metabolic_O2_consumption_by_M_tissue">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#metabolic_O2_consumption_by_M_tissue">
				<rdf:value>
				OM17, OM18, OM19, OM20, OM21, OM22, and OM23:  
				Calculation of the rate of metabolic usage of oxygen by the muscle cells (MMO) 
				from several factors:  the oxygen pressure in the muscle cells (PMO), the basal 
				level of oxygen utilization by the muscle cells (OMM), the effect of autonomic 
				stimulation on muscle usage of oxygen (AOM), and the effect of exercise on the 
				metabolic usage of oxygen by the muscles (EXC).  Blocks OM17 and OM18 cause the 
				metabolic usage of oxygen to reach a maximum at any time that the average muscle 
				cellular oxygen level is above the value of 38 mmHg pressure.  The constants in 
				the various blocks are curve-shaping constants to relate cellular oxygen 
				pressure (PMO) to the metabolic usage of oxygen.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM17_and_OM18">
				<rdf:value>
				OM17, OM18, OM19, OM20, OM21, OM22, and OM23:  
				Calculation of the rate of metabolic usage of oxygen by the muscle cells (MMO) 
				from several factors:  the oxygen pressure in the muscle cells (PMO), the basal 
				level of oxygen utilization by the muscle cells (OMM), the effect of autonomic 
				stimulation on muscle usage of oxygen (AOM), and the effect of exercise on the 
				metabolic usage of oxygen by the muscles (EXC).  Blocks OM17 and OM18 cause the 
				metabolic usage of oxygen to reach a maximum at any time that the average muscle 
				cellular oxygen level is above the value of 38 mmHg pressure.  The constants in 
				the various blocks are curve-shaping constants to relate cellular oxygen 
				pressure (PMO) to the metabolic usage of oxygen.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM19_to_OM23">
				<rdf:value>
				OM17, OM18, OM19, OM20, OM21, OM22, and OM23:  
				Calculation of the rate of metabolic usage of oxygen by the muscle cells (MMO) 
				from several factors:  the oxygen pressure in the muscle cells (PMO), the basal 
				level of oxygen utilization by the muscle cells (OMM), the effect of autonomic 
				stimulation on muscle usage of oxygen (AOM), and the effect of exercise on the 
				metabolic usage of oxygen by the muscles (EXC).  Blocks OM17 and OM18 cause the 
				metabolic usage of oxygen to reach a maximum at any time that the average muscle 
				cellular oxygen level is above the value of 38 mmHg pressure.  The constants in 
				the various blocks are curve-shaping constants to relate cellular oxygen 
				pressure (PMO) to the metabolic usage of oxygen.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>

<!-- Inputs from other components -->
		<variable name="PMO"	units="mmHg" private_interface="none" public_interface="in"/>
		<variable name="AOM"	units="dimensionless" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable name="MMO" 	units="mL_per_minute" private_interface="none" public_interface="out"/>
		<variable 	cmeta:id="metabolic_O2_consumption_by_M_tissue_P2O"
					name="P2O" 	units="mmHg" private_interface="none" public_interface="out"/>

<!-- Parameters from parameter_file -->
		<variable name="OMM"	units="mL_per_minute" private_interface="none" public_interface="in"/>
		<variable name="EXC"	units="dimensionless" private_interface="none" public_interface="in"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM17_and_OM18">
				<eq/>
				<ci>P2O</ci>
				<piecewise>
					<piece>
						<cn cellml:units="mmHg">38</cn>
						<apply>
							<gt/>
							<ci>PMO</ci>
							<cn cellml:units="mmHg">38</cn>
						</apply>
					</piece>
					<otherwise>
						<ci>PMO</ci>
					</otherwise>
				</piecewise>
			</apply>
			<apply id="OM19_to_OM23">
				<eq/>
				<ci>MMO</ci>
				<apply>
					<times/>
					<ci>AOM</ci>
					<ci>OMM</ci>
					<ci>EXC</ci>
					<apply>
						<minus/>
						<cn cellml:units="dimensionless">1</cn>
						<apply>
							<divide/>
							<apply>
								<power/>
								<apply>
									<minus/>
									<cn cellml:units="mmHg">38.0001</cn>
									<ci>P2O</ci>
								</apply>
								<cn cellml:units="dimensionless">3</cn>
							</apply>
							<cn cellml:units="mmHg3">54872</cn>
						</apply>
					</apply>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="metabolic_O2_consumption_by_M_tissue" component_2="pressure_of_O2_in_M_tissue_cells"/>
		<map_variables variable_1="PMO" variable_2="PMO"/>
	</connection>
	<connection>
		<map_components component_1="metabolic_O2_consumption_by_M_tissue" component_2="muscle_O2_delivery"/>
		<map_variables variable_1="AOM" variable_2="AOM"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="metabolic_O2_consumption_by_M_tissue" component_2="parameter_values"/>
		<map_variables variable_1="OMM" variable_2="OMM"/>
		<map_variables variable_1="EXC" variable_2="EXC"/>
	</connection>

<!-- ========================================	DELIVERY OF O2 TO MUSCLE TISSUES	============================================= -->
	<component 	name="delivery_of_O2_to_M_tissues" 
				cmeta:id="delivery_of_O2_to_M_tissues">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#delivery_of_O2_to_M_tissues">
				<rdf:value>
				OM6:  
				The pressure gradient for delivery of oxygen from the muscle capillaries to the 
				muscle cells (PGRM) is equal to the pressure of the oxygen remaining in the 
				muscle venous blood (PVO) minus the pressure of the oxygen in the muscle cells (PMO).

				OM8:  
				Rate of delivery of oxygen to the muscles (RMO) is equal to the blood flow to 
				the muscles (BFM) times the pressure gradient between the muscle capillary blood 
				and the muscle cells (PGRM) times a constant (PM5) that can be varied to represent 
				such factors as changes in muscle capillarity or so forth.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM6_and_OM8">
				<rdf:value>
				OM6:  
				The pressure gradient for delivery of oxygen from the muscle capillaries to the 
				muscle cells (PGRM) is equal to the pressure of the oxygen remaining in the 
				muscle venous blood (PVO) minus the pressure of the oxygen in the muscle cells (PMO).

				OM8:  
				Rate of delivery of oxygen to the muscles (RMO) is equal to the blood flow to 
				the muscles (BFM) times the pressure gradient between the muscle capillary blood 
				and the muscle cells (PGRM) times a constant (PM5) that can be varied to represent 
				such factors as changes in muscle capillarity or so forth.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="PMO"	units="mmHg" private_interface="none" public_interface="in"/>
		<variable name="PVO"	units="mmHg" private_interface="none" public_interface="in"/>
		<variable name="BFM"	units="L_per_minute" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable 	cmeta:id="delivery_of_O2_to_M_tissues_RMO"
					name="RMO" 	units="mL_per_minute" private_interface="none" public_interface="out"/>

<!-- Parameters from parameter_file -->
		<variable name="PM5"	units="per_mmHg" private_interface="none" public_interface="in"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM6_and_OM8">
				<eq/>
				<ci>RMO</ci>
				<apply>
					<times/>
					<apply>
						<minus/>
						<ci>PVO</ci>
						<ci>PMO</ci>
					</apply>
					<ci>PM5</ci>
					<ci>BFM</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="delivery_of_O2_to_M_tissues" component_2="pressure_of_O2_in_M_tissue_cells"/>
		<map_variables variable_1="PMO" variable_2="PMO"/>
	</connection>
	<connection>
		<map_components component_1="delivery_of_O2_to_M_tissues" component_2="muscle_O2_delivery"/>
		<map_variables variable_1="BFM" variable_2="BFM"/>
		<map_variables variable_1="RMO" variable_2="RMO"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="delivery_of_O2_to_M_tissues" component_2="parameter_values"/>
		<map_variables variable_1="PM5" variable_2="PM5"/>
	</connection>
	
<!-- ========================================	VOLUME OF O2 IN MUSCLE TISSUE	============================================= -->
	<component 	name="volume_of_O2_in_M_tissue" 
				cmeta:id="volume_of_O2_in_M_tissue">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#volume_of_O2_in_M_tissue">
				<rdf:value>
				OM9:  
				The rate of change of stored oxygen in the muscle (DO2M) is equal to the 
				rate of delivery of oxygen to the muscles by the blood (RMO) minus the rate 
				of metabolic usage of oxygen by the muscle cells (MMO).

				OM10:  
				The instantaneous volume of oxygen dissolved in all of the muscles (QOM) is 
				calculated by integrating with respect to time the rate of change of oxygen 
				in the muscles (DO2M).

				OM11:  
				This sets a lower limit for QOM in the muscle tissue.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM9">
				<rdf:value>
				OM9:  
				The rate of change of stored oxygen in the muscle (DO2M) is equal to the 
				rate of delivery of oxygen to the muscles by the blood (RMO) minus the rate 
				of metabolic usage of oxygen by the muscle cells (MMO).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM10">
				<rdf:value>
				OM10:  
				The instantaneous volume of oxygen dissolved in all of the muscles (QOM) is 
				calculated by integrating with respect to time the rate of change of oxygen 
				in the muscles (DO2M).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM11">
				<rdf:value>
				OM11:  
				This sets a lower limit for QOM in the muscle tissue.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="RMO"	units="mL_per_minute" private_interface="none" public_interface="in"/>
		<variable name="MMO"	units="mL_per_minute" private_interface="none" public_interface="in"/>
		<variable name="QOM1_init"	units="mL" private_interface="none" public_interface="in"/>
		<variable name="time"	units="minute" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable name="QOM" 	units="mL" private_interface="none" public_interface="out"/>

<!-- Internal variables -->
		<variable name="DO2M"	units="mL_per_minute" private_interface="none" public_interface="none"/>
		<variable name="QOM1" 	initial_value="QOM1_init"	units="mL" private_interface="none" public_interface="none"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM9">
				<eq/>
				<ci>DO2M</ci>
				<apply>
					<minus/>
					<ci>RMO</ci>
					<ci>MMO</ci>
				</apply>
			</apply>
			<apply id="OM10">
				<eq/>
				<apply>
					<diff/>
					<bvar>
						<ci>time</ci>
					</bvar>
					<ci>QOM1</ci>
				</apply>
				<ci>DO2M</ci>
			</apply>
			<apply id="OM11">
				<eq/>
				<ci>QOM</ci>
				<piecewise>
					<piece>
						<cn cellml:units="mL">0.0001</cn>
						<apply>
							<lt/>
							<ci>QOM1</ci>
							<cn cellml:units="mL">0.0001</cn>
						</apply>
					</piece>
					<otherwise>
						<ci>QOM1</ci>
					</otherwise>
				</piecewise>
			</apply>
		</math>
	</component>

<!-- STATE VARIABLES INITIAL VALUE -->
	<connection>
		<map_components component_1="volume_of_O2_in_M_tissue" component_2="state_variables"/>
		<map_variables variable_1="QOM1_init" variable_2="QOM1_init"/> 
	</connection>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="volume_of_O2_in_M_tissue" component_2="delivery_of_O2_to_M_tissues"/>
		<map_variables variable_1="RMO" variable_2="RMO"/>
	</connection>
	<connection>
		<map_components component_1="volume_of_O2_in_M_tissue" component_2="metabolic_O2_consumption_by_M_tissue"/>
		<map_variables variable_1="MMO" variable_2="MMO"/>
	</connection>
	<connection>
		<map_components component_1="volume_of_O2_in_M_tissue" component_2="muscle_O2_delivery"/>
		<map_variables variable_1="time" variable_2="time"/>
	</connection>

<!-- ========================================	PRESSURE OF O2 IN MUSCLE TISSUE CELLS	============================================= -->
	<component 	name="pressure_of_O2_in_M_tissue_cells" 
				cmeta:id="pressure_of_O2_in_M_tissue_cells">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#pressure_of_O2_in_M_tissue_cells">
				<rdf:value>
				OM12:  
				Calculation of the pressure of oxygen in the muscle cells (PMO) from the 
				volume of oxygen in the muscles (QOM).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#OM12">
				<rdf:value>
				OM12:  
				Calculation of the pressure of oxygen in the muscle cells (PMO) from the 
				volume of oxygen in the muscles (QOM).
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="QOM"	units="mL" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable 	cmeta:id="pressure_of_O2_in_M_tissue_cells_PMO"
					name="PMO" 	units="mmHg" private_interface="none" public_interface="out"/>

<!-- Parameters from parameter_file -->
		<variable name="PK2"	units="mmHg_per_mL" private_interface="none" public_interface="in"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="OM12">
				<eq/>
				<ci>PMO</ci>
				<apply>
					<times/>
					<ci>PK2</ci>
					<ci>QOM</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="pressure_of_O2_in_M_tissue_cells" component_2="volume_of_O2_in_M_tissue"/>
		<map_variables variable_1="QOM" variable_2="QOM"/>
	</connection>
	
<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="pressure_of_O2_in_M_tissue_cells" component_2="parameter_values"/>
		<map_variables variable_1="PK2" variable_2="PK2"/>
	</connection>

<!-- ============================================================		GROUPING		=============================================================== -->

	<group>
		<relationship_ref relationship="containment"/>
		<component_ref component="muscle_O2_delivery">
			<component_ref component="M_O2_blood_supply"/>
			<component_ref component="M_venous_O2_content"/>
			<component_ref component="metabolic_O2_consumption_by_M_tissue"/>
			<component_ref component="delivery_of_O2_to_M_tissues"/>
			<component_ref component="volume_of_O2_in_M_tissue"/>
			<component_ref component="pressure_of_O2_in_M_tissue_cells"/>
		</component_ref>
	</group>
      
	<group>
		<relationship_ref relationship="encapsulation"/>
		<component_ref component="muscle_O2_delivery">
			<component_ref component="parameter_values"/>
			<component_ref component="state_variables"/>
			<component_ref component="M_O2_blood_supply"/>
			<component_ref component="M_venous_O2_content"/>
			<component_ref component="metabolic_O2_consumption_by_M_tissue"/>
			<component_ref component="delivery_of_O2_to_M_tissues"/>
			<component_ref component="volume_of_O2_in_M_tissue"/>
			<component_ref component="pressure_of_O2_in_M_tissue_cells"/>
		</component_ref>
	</group>

   
</model>