Rendering of the source text

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

<!-- ========================================	DOCUMENTATION	============================================= -->
<documentation xmlns="http://cellml.org/tmp-documentation">
<article>
  <articleinfo>
  <title>Guyton Model: red_cells_and_viscosity</title>
  <author>
    <firstname>Catherine</firstname>
          <surname>Lloyd</surname>
    <affiliation>
      <shortaffil>Auckland Bioengineering Institute, University of Auckland</shortaffil>
    </affiliation>
  </author>
</articleinfo>
  <section id="sec_status">
    <title>Model Status</title>
    <para>
        This CellML model has been validated. Due to the differences between procedural code (in this case C-code) and declarative 
		languages (CellML), some aspects of the original model were not able to be encapsulated by the CellML model (such as the 
		damping of variables). This may effect the transient behaviour of the model, however the steady-state behaviour would remain
		the same. The equations in this file and the steady-state output from the model conform to the results from the MODSIM program.
	</para>
  </section>
  <sect1 id="sec_structure">
  <title>Model Structure</title>

<para>
Arthur Guyton (1919-2003) was an American physiologist who became famous for his 1950s experiments in which he studied the physiology 
of cardiac output and its relationship with the peripheral circulation.  The results of these experiments challenged the conventional 
wisdom that it was the heart itself that controlled cardiac output.  Instead Guyton demonstrated that it was the need of the body tissues 
for oxygen which was the real regulator of cardiac output.  The "Guyton Curves" describe the relationship between right atrial pressures 
and cardiac output, and they form a foundation for understanding the physiology of circulation. 
</para>

<para>
The Guyton model of fluid, electrolyte, and circulatory regulation is an extensive mathematical model of human circulatory physiology, 
capable of simulating a variety of experimental conditions, and contains a number of linked subsystems relating to circulation and its 
neuroendocrine control.
</para>

<para>
This is a CellML translation of the Guyton model of the regulation of the circulatory system.  The complete model consists of separate 
modules each of which characterise a separate physiological subsystems.  The Circulation Dynamics is the primary system, to which other 
modules/blocks are connected.  The other modules characterise the dynamics of the kidney, electrolytes and cell water, thirst and drinking, 
hormone regulation, autonomic regulation, cardiovascular system etc, and these feedback on the central circulation model.  The CellML code 
in these modules is based on the C code from the programme C-MODSIM created by Dr Jean-Pierre Montani.
</para>

<para>
This particular CellML model describes how the red blood cell volume is considered to be controlled by two principal factors that control 
the production of erythropoietin: (1) the arterial blood oxygen saturation (OSA) and renal function as determined by renal blood flow (RFN), 
and (2) the fraction (REK) of the renal mass that is functional.
</para>

<informalfigure float="0" id="full_diagram">
<mediaobject>
  <imageobject>
    <objectinfo>
      <title>model diagram</title>
    </objectinfo>
    <imagedata fileref="full_model.png"/>
  </imageobject>
</mediaobject>
<caption>A systems analysis diagram for the full Guyton model describing circulation regulation.</caption>
</informalfigure>

<informalfigure float="0" id="red_cells_and_viscosity_diagram">
<mediaobject>
  <imageobject>
    <objectinfo>
      <title>model diagram</title>
    </objectinfo>
    <imagedata fileref="red_cells.png"/>
  </imageobject>
</mediaobject>
<caption>A schematic diagram of the components and processes described in the current CellML model.</caption>
</informalfigure> 

<para>
There are several publications referring to the Guyton model. One of these papers is cited below:
</para>

<para>
Circulation: Overall Regulation,  A.C. Guyton, T.G. Coleman, and H.J. Granger, 1972, 
            <emphasis>Annual Review of Physiology</emphasis>
          , 34, 13-44.  <ulink url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&amp;cmd=Retrieve&amp;dopt=AbstractPlus&amp;list_uids=4334846&amp;query_hl=1&amp;itool=pubmed_docsum">PubMed ID: 4334846</ulink>
</para>

</sect1>
</article>
</documentation> 

<!-- =======================================================    CITATION AND KEYWORD METADATA    ================================================== -->

	<rdf:RDF
			xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
			xmlns:bqs="http://www.cellml.org/bqs/1.0#"
			xmlns:dc="http://purl.org/dc/elements/1.1/"
			xmlns:dcterms="http://purl.org/dc/terms/"
			xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#">
		<rdf:Description rdf:about="#red_cells_and_viscosity_CellML1_0_model">
			<bqs:reference rdf:parseType="Resource">
				<bqs:JournalArticle rdf:parseType="Resource">
					<dc:creator>
						<rdf:Seq>
							<rdf:li rdf:parseType="Resource">
								<rdf:type rdf:resource="http://www.cellml.org/bqs/1.0#Person" />
								<vCard:N rdf:parseType="Resource">
									<vCard:Family>Guyton</vCard:Family>
									<vCard:Given></vCard:Given>
									<vCard:Other></vCard:Other>
								</vCard:N>
							</rdf:li>
							<rdf:li rdf:parseType="Resource">
								<rdf:type rdf:resource="http://www.cellml.org/bqs/1.0#Person" />
								<vCard:N rdf:parseType="Resource">
									<vCard:Family>Red Cells and Viscosity</vCard:Family>
									<vCard:Given></vCard:Given>
									<vCard:Other></vCard:Other>
								</vCard:N>
							</rdf:li>

						</rdf:Seq>
					</dc:creator>
					<dc:title>Description of Guyton red cells and viscosity module</dc:title>
					<bqs:volume />
					<bqs:first_page />
					<bqs:last_page />
					<bqs:Journal rdf:parseType="Resource">
						<dc:title></dc:title>
					</bqs:Journal>
					<dcterms:issued rdf:parseType="Resource">
						<dcterms:W3CDTF>2008-00-00 00:00</dcterms:W3CDTF>
					</dcterms:issued>
				</bqs:JournalArticle>
			</bqs:reference>
			<bqs:reference rdf:parseType="Resource">
				<dc:subject rdf:parseType="Resource">
					<bqs:subject_type>keyword</bqs:subject_type>
					<rdf:value>
					<rdf:Bag>
						<rdf:li>physiology</rdf:li>
						<rdf:li>organ systems</rdf:li>
						<rdf:li>cardiovascular circulation</rdf:li>
						<rdf:li>red cells and viscosity</rdf:li>
						<rdf:li>Guyton</rdf:li>
					</rdf:Bag>
					</rdf:value>
				</dc:subject>
			</bqs:reference>
		</rdf:Description>
	</rdf:RDF>

    
<!-- ======================================================= 		UNITS		================================================== -->

	
   <units name="minute">
      <unit multiplier="60" units="second"/>
   </units>
   <units name="per_minute">
      <unit units="minute" exponent="-1"/>
   </units>
   <units name="mmHg">
      <unit multiplier="133.322" units="newton"/>
      <unit units="metre" exponent="-2"/>
   </units>
   <units name="monovalent_mEq">
      <unit units="mole" prefix="milli"/>
   </units>
   <units name="monovalent_mEq_per_minute">
      <unit units="mole" prefix="milli"/>
      <unit units="minute" exponent="-1"/>
   </units>
   <units name="monovalent_mEq_per_litre">
      <unit units="mole" prefix="milli"/>
      <unit units="litre" exponent="-1"/>
   </units>
   <units name="monovalent_mEq_per_litre_per_minute">
      <unit units="mole" prefix="milli"/>
      <unit units="litre" exponent="-1"/>
      <unit units="minute" exponent="-1"/>
   </units>
   <units name="litre2_per_monovalent_mEq_per_minute">
      <unit units="litre" exponent="2"/>
      <unit units="mole" prefix="milli" exponent="-1"/>
      <unit units="minute" exponent="-1"/>
   </units>
   <units name="L_per_minute">
      <unit units="litre"/>
      <unit units="minute" exponent="-1"/>
   </units>
   <units name="L_per_minute_per_mmHg">
      <unit units="litre"/>
      <unit units="minute" exponent="-1"/>
      <unit units="mmHg" exponent="-1"/>
   </units>


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

	
	<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
		<rdf:Description rdf:about="#red_cells_and_viscosity_CellML1_0_model">
			<rdf:value>
			The red cell volume is considered to be controlled by two principal factors that 
			control the production of erythropoietin:  
			(1) the arterial blood oxygen saturation (OSA) and renal function as determined by 
			renal blood flow (RFN), and 
			(2) the fraction (REK) of the renal mass that is functional.
			</rdf:value>
		</rdf:Description>
	</rdf:RDF>

<!-- ========================================	ENVIRONMENT COMPONENT	============================================= -->
   <component name="environment">
      <variable	cmeta:id="environment_time"
				name="time" units="minute" private_interface="none" public_interface="out"/>
   </component>

<!-- ========================================	RED CELLS AND VISCOSITY TOP-LEVEL COMPONENT	============================================= -->
	<component 	name="red_cells_and_viscosity" 
				cmeta:id="red_cells_and_viscosity">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#red_cells_and_viscosity">
				<rdf:value>
				Encapsulation grouping component containing all the components in the Red Cells and Viscosity Model. 
				The inputs and outputs of the Red Cells and Viscosity 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="VP"	initial_value="3.00449"	units="litre" private_interface="out" public_interface="none"/>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="red_cells_and_viscosity" component_2="environment"/>
		<map_variables variable_1="time" variable_2="time"/>
	</connection>

<!-- ========================================	BLOOD VISCOSITY CALCULATIONS	============================================= -->
	<component 	name="blood_viscosity_calculations" 
				cmeta:id="blood_viscosity_calculations">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#blood_viscosity_calculations">
				<rdf:value>
				Containment grouping component for "hematocrit_fraction", "viscosity_due_to_RBCs"
				and "blood_viscosity".
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
	</component>

<!-- ========================================	HEMATOCRIT_FRACTION	============================================= -->
	<component 	name="hematocrit_fraction" 
				cmeta:id="hematocrit_fraction">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#hematocrit_fraction">
				<rdf:value>
				RC6:  
				Calculation of blood volume (VB) by adding the volume of the red blood cells (VRC) 
				to the plasma volume (VP).

				RC7:  
				The fraction of the blood that is composed of red blood cells (HM1) is equal to 
				the volume of red blood cells (VRC) divided by the blood volume (VB).

				RC8:  
				The hematocrit (HM) equals the fraction of the blood that is red cells (HM1) 
				times 100.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC6">
				<rdf:value>
				RC6:  
				Calculation of blood volume (VB) by adding the volume of the red blood cells (VRC) 
				to the plasma volume (VP).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC7">
				<rdf:value>
				RC7:  
				The fraction of the blood that is composed of red blood cells (HM1) is equal to 
				the volume of red blood cells (VRC) divided by the blood volume (VB).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC8">
				<rdf:value>
				RC8:  
				The hematocrit (HM) equals the fraction of the blood that is red cells (HM1) 
				times 100.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="VP"		units="litre" private_interface="none" public_interface="in"/>
		<variable name="VRC"	units="litre" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable name="HM" 	units="dimensionless" private_interface="none" public_interface="out"/>
		<variable	cmeta:id="hematocrit_fraction_HM1"
					name="HM1" 	units="dimensionless" private_interface="none" public_interface="out"/>

<!-- Internal variables -->
		<variable name="VB"		units="litre" private_interface="none" public_interface="none"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC6">
				<eq/>
				<ci>VB</ci>
				<apply>
					<plus/>
					<ci>VP</ci>
					<ci>VRC</ci>
				</apply>
			</apply>
			<apply id="RC7">
				<eq/>
				<ci>HM1</ci>
				<apply>
					<divide/>
					<ci>VRC</ci>
					<ci>VB</ci>
				</apply>
			</apply>
			<apply id="RC8">
				<eq/>
				<ci>HM</ci>
				<apply>
					<times/>
					<cn cellml:units="dimensionless">100</cn>
					<ci>HM1</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="hematocrit_fraction" component_2="red_cells_and_viscosity"/>
		<map_variables variable_1="VP" variable_2="VP"/>
	</connection>
	<connection>
		<map_components component_1="hematocrit_fraction" component_2="RBC_volume"/>
		<map_variables variable_1="VRC" variable_2="VRC"/>
	</connection>

<!-- ========================================	VISCOSITY DUE TO RED BLOOD CELLS	============================================= -->
	<component 	name="viscosity_due_to_RBCs" 
				cmeta:id="viscosity_due_to_RBCs">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#viscosity_due_to_RBCs">
				<rdf:value>
				RC9, RC10, and RC11:  
				Curve-fitting blocks to calculate the portion of the viscosity of the blood that
				is caused by red blood cells (VIE).  The two variables (HMK and HKM) are 
				curve-fitting constants.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC9_to_RC11">
				<rdf:value>
				RC9, RC10, and RC11:  
				Curve-fitting blocks to calculate the portion of the viscosity of the blood that
				is caused by red blood cells (VIE).  The two variables (HMK and HKM) are 
				curve-fitting constants.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="HM"	units="dimensionless" private_interface="none" public_interface="in"/>

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

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

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC9_to_RC11">
				<eq/>
				<ci>VIE</ci>
				<apply>
					<divide/>
					<ci>HM</ci>
					<apply>
						<times/>
						<apply>
							<minus/>
							<ci>HMK</ci>
							<ci>HM</ci>
						</apply>
						<ci>HKM</ci>
					</apply>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="viscosity_due_to_RBCs" component_2="hematocrit_fraction"/>
		<map_variables variable_1="HM" variable_2="HM"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="viscosity_due_to_RBCs" component_2="parameter_values"/>
		<map_variables variable_1="HMK" variable_2="HMK"/>
		<map_variables variable_1="HKM" variable_2="HKM"/>
	</connection>

<!-- ========================================	BLOOD VISCOSITY	============================================= -->
	<component 	name="blood_viscosity" 
				cmeta:id="blood_viscosity">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#blood_viscosity">
				<rdf:value>
				RC12:  
				The viscosity of the blood (VIB) when calculated as a multiple of the viscosity 
				of water is equal to the viscosity effect caused by the red cells (VIE) plus a 
				constant determined by the viscosity of the plasma.  

				RC13:  
				Calculation of a normalized viscosity multiplier factor (VIM) that is used elsewhere 
				in the circulation to calculate the effect of changes in the viscosity from normal 
				(assumed to be 1.0) on various circulatory effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC12">
				<rdf:value>
				RC12:  
				The viscosity of the blood (VIB) when calculated as a multiple of the viscosity 
				of water is equal to the viscosity effect caused by the red cells (VIE) plus a 
				constant determined by the viscosity of the plasma.  
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC13">
				<rdf:value>
				RC13:  
				Calculation of a normalized viscosity multiplier factor (VIM) that is used elsewhere 
				in the circulation to calculate the effect of changes in the viscosity from normal 
				(assumed to be 1.0) on various circulatory effects.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="VIE"	units="dimensionless" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable	cmeta:id="blood_viscosity_VIM"
					name="VIM" 	units="dimensionless" private_interface="none" public_interface="out"/>

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

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC12">
				<eq/>
				<ci>VIB</ci>
				<apply>
					<plus/>
					<ci>VIE</ci>
					<cn cellml:units="dimensionless">1.5</cn>
				</apply>
			</apply>
			<apply id="RC13">
				<eq/>
				<ci>VIM</ci>
				<apply>
					<times/>
					<cn cellml:units="dimensionless">0.3333</cn>
					<ci>VIB</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="blood_viscosity" component_2="viscosity_due_to_RBCs"/>
		<map_variables variable_1="VIE" variable_2="VIE"/>
	</connection>

<!-- ========================================	RED_BLOOD_CELLS_FORMATION_AND_DESTRUCTION	============================================= -->
	<component 	name="RBC_formation_and_destruction" 
				cmeta:id="RBC_formation_and_destruction">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#RBC_formation_and_destruction">
				<rdf:value>
				Containment grouping component for "oxygen_stimulation", "RBC_production",
				"RBC_destruction" and "blood_viscosity".
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
	</component>

<!-- ========================================	OXYGEN_STIMULATION	============================================= -->
	<component 	name="oxygen_stimulation" 
				cmeta:id="oxygen_stimulation">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#oxygen_stimulation">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC1D">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC1A_and_RC1B">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC1">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC1C_and_RC2C">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC2">
				<rdf:value>
				RC1, RC1A, RC1B, RC1C, RC1D, RC2, RC2C, and RC2D:  
				Calculation of the effect of atmospheric O2 pressure (PO2AMB) on the 
				driving force (HM7) for production of red blood cells.  RC1A, RC1B, and RC1D 
				calculate the effect of pressures below the level of 80 mmHg, and RC1 the effect 
				of pressures above 80.  Blocks RC2, RC2C, and RC2D provide limits to the effects.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="HM"	units="dimensionless" private_interface="none" public_interface="in"/>

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

<!-- Parameters from parameter_file -->
		<variable name="PO2AMB"	units="mmHg" private_interface="none" public_interface="in"/>
		<variable name="HM6"	units="mmHg" private_interface="none" public_interface="in"/>

<!-- Internal variables -->
		<variable name="PO2AM1"	units="mmHg" private_interface="none" public_interface="none"/>
		<variable name="HM3"	units="mmHg" private_interface="none" public_interface="none"/>
		<variable name="HM4"	units="mmHg" private_interface="none" public_interface="none"/>
		<variable name="HM5"	units="mmHg" private_interface="none" public_interface="none"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC1D">
				<eq/>
				<ci>PO2AM1</ci>
				<piecewise>
					<piece>
						<cn cellml:units="mmHg">80</cn>
						<apply>
							<gt/>
							<ci>PO2AMB</ci>
							<cn cellml:units="mmHg">80</cn>
						</apply>
					</piece>
					<otherwise>
						<ci>PO2AMB</ci>
					</otherwise>
				</piecewise>
			</apply>
			<apply id="RC1A_and_RC1B">
				<eq/>
				<ci>HM3</ci>
				<apply>
					<times/>
					<apply>
						<minus/>
						<ci>PO2AM1</ci>
						<cn cellml:units="mmHg">40</cn>
					</apply>
					<ci>HM</ci>
				</apply>
			</apply>
			<apply id="RC1">
				<eq/>
				<ci>HM4</ci>
				<apply>
					<minus/>
					<ci>PO2AMB</ci>
					<cn cellml:units="mmHg">40</cn>
				</apply>
			</apply>
			<apply id="RC1C_and_RC2C">
				<eq/>
				<ci>HM5</ci>
				<piecewise>
					<piece>
						<cn cellml:units="mmHg">0</cn>
						<apply>
							<lt/>
							<apply>
								<plus/>
								<ci>HM3</ci>
								<ci>HM4</ci>
							</apply>
							<cn cellml:units="mmHg">0</cn>
						</apply>
					</piece>
					<otherwise>
						<apply>
							<plus/>
							<ci>HM3</ci>
							<ci>HM4</ci>
						</apply>
					</otherwise>
				</piecewise>
			</apply>
			<apply id="RC2">
				<eq/>
				<ci>HM7</ci>
				<apply>
					<minus/>
					<ci>HM6</ci>
					<ci>HM5</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="oxygen_stimulation" component_2="hematocrit_fraction"/>
		<map_variables variable_1="HM" variable_2="HM"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="oxygen_stimulation" component_2="parameter_values"/>
		<map_variables variable_1="PO2AMB" variable_2="PO2AMB"/>
		<map_variables variable_1="HM6" variable_2="HM6"/>
	</connection>

<!-- ========================================	RED_BLOOD_CELL_PRODUCTION	============================================= -->
	<component 	name="RBC_production" 
				cmeta:id="RBC_production">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#RBC_production">
				<rdf:value>
				RC2A, RC2B, and RC2E:  
				Calculation of the rate of red blood cell production (RC1), with a lower limit 
				of zero set by Block RC2E, and the rate of production partly determined by the 
				amount of kidney mass available (REK) to produce erythropoition.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC2A_RC2B_and_RC2E">
				<rdf:value>
				RC2A, RC2B, and RC2E:  
				Calculation of the rate of red blood cell production (RC1), with a lower limit 
				of zero set by Block RC2E, and the rate of production partly determined by the 
				amount of kidney mass available (REK) to produce erythropoition.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="HM7"	units="mmHg" private_interface="none" public_interface="in"/>

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

<!-- Parameters from parameter_file -->
		<variable name="HM8"	units="L_per_minute_per_mmHg" private_interface="none" public_interface="in"/>
		<variable name="REK"	units="dimensionless" private_interface="none" public_interface="in"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC2A_RC2B_and_RC2E">
				<eq/>
				<ci>RC1</ci>
				<piecewise>
					<piece>
						<cn cellml:units="L_per_minute">0</cn>
						<apply>
							<lt/>
							<apply>
								<plus/>
								<apply>
									<times/>
									<ci>HM7</ci>
									<ci>HM8</ci>
									<ci>REK</ci>
								</apply>
								<cn cellml:units="L_per_minute">0.000005</cn>
							</apply>
							<cn cellml:units="L_per_minute">0</cn>
						</apply>
					</piece>
					<otherwise>
						<apply>
							<plus/>
							<apply>
								<times/>
								<ci>HM7</ci>
								<ci>HM8</ci>
								<ci>REK</ci>
							</apply>
							<cn cellml:units="L_per_minute">0.000005</cn>
						</apply>
					</otherwise>
				</piecewise>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_production" component_2="oxygen_stimulation"/>
		<map_variables variable_1="HM7" variable_2="HM7"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_production" component_2="parameter_values"/>
		<map_variables variable_1="HM8" variable_2="HM8"/>
		<map_variables variable_1="REK" variable_2="REK"/>
	</connection>

<!-- ========================================	RED_BLOOD_CELL_DESTRUCTION	============================================= -->
	<component 	name="RBC_destruction" 
				cmeta:id="RBC_destruction">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#RBC_destruction">
				<rdf:value>
				RC5:  
				Calculation of the rate of red cell volume destruction (RC2) caused by the presence 
				of an already large red cell volume (VRC).  The rate factor for this effect is (RKC).  
				Also increased blood viscosity is considered to cause increased destruction.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC5">
				<rdf:value>
				RC5:  
				Calculation of the rate of red cell volume destruction (RC2) caused by the presence 
				of an already large red cell volume (VRC).  The rate factor for this effect is (RKC).  
				Also increased blood viscosity is considered to cause increased destruction.
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="VRC"	units="litre" private_interface="none" public_interface="in"/>
		<variable name="VIM"	units="dimensionless" private_interface="none" public_interface="in"/>

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

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

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC5">
				<eq/>
				<ci>RC2</ci>
				<apply>
					<times/>
					<ci>VRC</ci>
					<ci>RKC</ci>
					<ci>VIM</ci>
				</apply>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_destruction" component_2="RBC_volume"/>
		<map_variables variable_1="VRC" variable_2="VRC"/>
		<map_variables variable_1="RC2" variable_2="RC2"/>
	</connection>
	<connection>
		<map_components component_1="RBC_destruction" component_2="blood_viscosity"/>
		<map_variables variable_1="VIM" variable_2="VIM"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_destruction" component_2="parameter_values"/>
		<map_variables variable_1="RKC" variable_2="RKC"/>
	</connection>

<!-- ========================================	RED_BLOOD_CELL_VOLUME	============================================= -->
	<component 	name="RBC_volume" 
				cmeta:id="RBC_volume">
		<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			<rdf:Description rdf:about="#RBC_volume">
				<rdf:value>
				RC3:  
				Calculation of the rate of change of red blood cell volume (RCD) by adding 
				the rate of RBC production (RC1) and subtracting the rate of destruction (RC2).
				NB - Parameter TRRBC is not in diagram.

				RC4:  
				Calculation of the instantaneous volume of red blood cells by integrating the rate 
				of change in total volume of red cells (RCD).
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC3">
				<rdf:value>
				RC3:  
				Calculation of the rate of change of red blood cell volume (RCD) by adding 
				the rate of RBC production (RC1) and subtracting the rate of destruction (RC2).
				NB - Parameter TRRBC is not in diagram.
				</rdf:value>
			</rdf:Description>
			<rdf:Description rdf:about="#RC4">
				<rdf:value>
				RC4:  
				Calculation of the instantaneous volume of red blood cells by integrating the rate 
				of change in total volume of red cells (RCD).
				</rdf:value>
			</rdf:Description>
		</rdf:RDF>
		
<!-- Inputs from other components -->
		<variable name="RC1"	units="L_per_minute" private_interface="none" public_interface="in"/>
		<variable name="RC2"	units="L_per_minute" private_interface="none" public_interface="in"/>
		<variable name="time"	units="minute" private_interface="none" public_interface="in"/>

<!-- Outputs to other components -->
		<variable	cmeta:id="RBC_volume_VRC"
					name="VRC" 	initial_value="2.00439"	units="litre" private_interface="none" public_interface="out"/>

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

<!-- Internal variables -->
		<variable name="RCD"	units="L_per_minute" private_interface="none" public_interface="none"/>

		<math xmlns="http://www.w3.org/1998/Math/MathML">
			<apply id="RC3">
				<eq/>
				<ci>RCD</ci>
				<apply>
					<plus/>
					<apply>
						<minus/>
						<ci>RC1</ci>
						<ci>RC2</ci>
					</apply>
					<ci>TRRBC</ci>
				</apply>
			</apply>
			<apply id="RC4">
				<eq/>
				<apply>
					<diff/>
					<bvar>
						<ci>time</ci>
					</bvar>
					<ci>VRC</ci>
				</apply>
				<ci>RCD</ci>
			</apply>
		</math>
	</component>

<!-- INPUT CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_volume" component_2="RBC_production"/>
		<map_variables variable_1="RC1" variable_2="RC1"/>
	</connection>
	<connection>
		<map_components component_1="RBC_volume" component_2="red_cells_and_viscosity"/>
		<map_variables variable_1="time" variable_2="time"/>
	</connection>

<!-- PARAMETER CONNECTIONS -->
	<connection>
		<map_components component_1="RBC_volume" component_2="parameter_values"/>
		<map_variables variable_1="TRRBC" variable_2="TRRBC"/>
	</connection>

<!-- ==========================================================	PARAMETER VALUES	================================================================ -->
	<component 	name="parameter_values"
				cmeta:id="parameter_values">
		<variable name="HMK" 		units="dimensionless" 	initial_value="90"			private_interface="none"	public_interface="out"/>	<!-- portion of blood viscosity due to red blood cells -->
		<variable name="HKM" 		units="dimensionless" 	initial_value="0.53333"		private_interface="none"	public_interface="out"/>	<!-- blood viscosity factor caused by red blood cells -->
		<variable name="PO2AMB" 	units="mmHg" 	initial_value="150"			private_interface="none"	public_interface="out"/>	<!-- ambiant PO2 -->
		<variable name="HM6" 		units="mmHg" 	initial_value="1850"		private_interface="none"	public_interface="out"/>	<!-- erythropoietic limiter [P] -->
		<variable name="HM8" 		units="L_per_minute_per_mmHg" 	initial_value="4.714e-08"	private_interface="none"	public_interface="out"/>	<!-- sensitivity control for erythropoiesis [P] -->
		<variable name="REK" 		units="dimensionless" 	initial_value="1"			private_interface="none"	public_interface="out"/>	<!-- total functional renal mass, ratio to normal [P] -->
		<variable name="RKC" 		units="per_minute" 	initial_value="5.8e-06"		private_interface="none"	public_interface="out"/>	<!-- sensitivity for red blood cell destruction [P] -->
		<variable name="TRRBC" 		units="L_per_minute" 	initial_value="0"			private_interface="none"	public_interface="out"/>	<!-- rate of transfusion of pure RBC -->
	</component>
	
<!-- ============================================================		GROUPING		=============================================================== -->
	<group>
		<relationship_ref relationship="containment"/>
		<component_ref component="red_cells_and_viscosity">
			<component_ref component="blood_viscosity_calculations">
				<component_ref component="hematocrit_fraction"/>
				<component_ref component="viscosity_due_to_RBCs"/>
				<component_ref component="blood_viscosity"/>
			</component_ref>
			<component_ref component="RBC_formation_and_destruction">
				<component_ref component="oxygen_stimulation"/>
				<component_ref component="RBC_production"/>
				<component_ref component="RBC_destruction"/>
				<component_ref component="RBC_volume"/>
			</component_ref>
		</component_ref>
	</group>


	<group>
		<relationship_ref relationship="encapsulation"/>
		<component_ref component="red_cells_and_viscosity">
			<component_ref component="parameter_values"/>
			<component_ref component="blood_viscosity_calculations"/>
			<component_ref component="hematocrit_fraction"/>
			<component_ref component="viscosity_due_to_RBCs"/>
			<component_ref component="blood_viscosity"/>
			<component_ref component="RBC_formation_and_destruction"/>
			<component_ref component="oxygen_stimulation"/>
			<component_ref component="RBC_production"/>
			<component_ref component="RBC_destruction"/>
			<component_ref component="RBC_volume"/>
		</component_ref>
	</group>


<!-- SIMULATION METADATA -->
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="#red_cells_and_viscosity_CellML1_0_model">
    <NS1:simulation xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$QQv43"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$4SdBX3">
    <RDF:first RDF:resource="rdf:#$5SdBX3"/>
    <RDF:rest RDF:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$3SdBX3">
    <NS1:boundIntervals xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$4SdBX3"/>
  </RDF:Description>
  <RDF:Description xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:about="rdf:#$SQv43" NS1:endingValue="200000" NS1:nonstandard-pointDensity="100000"/>
  <RDF:Description RDF:about="h#red_cells_and_viscosity_CellML1_0_model#LfY7zdZ%60EYs">
    <NS1:simulation xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$b2Cb93"/>
    <NS1:simulation xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$3SdBX3"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$QQv43">
    <NS1:boundIntervals xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$RQv43"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$RQv43">
    <RDF:first RDF:resource="rdf:#$SQv43"/>
    <RDF:rest RDF:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$b2Cb93">
    <NS1:boundIntervals xmlns:NS1="http://www.cellml.org/metadata/simulation/1.0#" RDF:resource="rdf:#$c2Cb93"/>
  </RDF:Description>
  <RDF:Description RDF:about="rdf:#$c2Cb93">
    <RDF:first RDF:resource="rdf:#$d2Cb93"/>
    <RDF:rest RDF:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
  </RDF:Description>
</RDF:RDF>
   	
</model>