Location: Ikeda BMadonna QKDB @ c560868b736d / IkedaDAEML.xml

Author:
Ting Yu <ting.yu@auckland.ac.nz>
Date:
2014-05-05 11:11:02+12:00
Desc:
Change the unit from dimensionless to TODO.
Permanent Source URI:
https://models.physiomeproject.org/workspace/194/rawfile/c560868b736d95fd544954a4a3d5875175c194dc/IkedaDAEML.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE daeml SYSTEM "daeml.dtd">
<daeml>
	<!-- 23 mai 2008-->
	<!-- Modele d'Ikeda -->

	<model modelID="{we must build a unique identifier from the modelName, modelType, and version}"
		  modelName="Ikeda"
		  modelType="ODE"
          date="May 23, 2008"
          version="1.0">

		<authors> 
        		<author>
				<name>J. Fontecave</name>
				<contact>julie.fontecave@imag.fr</contact>
			</author>
		</authors>

		<bibliography>
		</bibliography>

		<description>
			Implementation of Ikeda Model (1979)
		</description>


		<implementation>
			<solution_methods>
				<solution_method name="stiff"> 
					<property name="dt" units="sec" value="0.01"/>
					<property name="t0" units="sec" value="0"/>
					<property name="tend" units="sec" value="180"/>
				</solution_method>
			</solution_methods>
		</implementation>


		<list_of_units>
		</list_of_units>


		<variables>

			<variable name="FCOI"  units="dimensionless"> 
				<type>output</type> 
				<comment> volume fraction of CO2 in dry inspired gas </comment>
				<definition><eq_code prog_lang="BMadonna">FCOI=IF time>5 AND (time)&lt;=35 THEN 0.05 ELSE 0  ;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QCO0"  units="l/min"> 
				<type>output</type> 
				<comment> cardiac output zero ?????? </comment>
				<definition><eq_code prog_lang="C">QCO0 = VB*DEN;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QCO"  units="l/min"> 
				<type>output</type> 
				<comment> cardiac output </comment>
				<definition><eq_code prog_lang="C">QCO = QCO0+1;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PAS"  units="mmHg"> 
				<type>output</type> 
				<comment> systemic arterial pressure </comment>
				<definition><eq_code prog_lang="C">PAS=20+RTOT*QCO0;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PVS"  units="mmHg"> 
				<type>output</type> 
				<comment> systemic venous pressure </comment>
				<definition><eq_code prog_lang="C">PVS=MAX(0,-10.33+QCO0/KR);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PAP"  units="mmHg"> 
				<type>output</type> 
				<comment> pulmonary arterial pressure </comment>
				<definition><eq_code prog_lang="C">PAP=8+RTOP*QCO0;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PVP"  units="mmHg"> 
				<type>output</type> 
				<comment> pulmonary venous pressure </comment>
				<definition><eq_code prog_lang="C">PVP=MAX(0,-16+QCO0/KL);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="FCOA"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> volume fraction of CO2 in dry alveolar gas </comment>
				<init_value>
					<eq_code prog_lang="c">FCOA=0.0561</eq_code>
				</init_value>
			</variable>
			<variable name="FO2A"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> volume fraction of O2 in dry alveolar gas </comment>
				<init_value>
					<eq_code prog_lang="c">FO2A=0.1473</eq_code>
				</init_value>
			</variable>
			<variable name="UCOV"  state_var="true" units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> content of CO2 in venous blood </comment>
				<init_value>
					<eq_code prog_lang="c">UCOV=0.6075</eq_code>
				</init_value>
			</variable>
			<variable name="UO2V"  state_var="true" units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> content of O2 in venous blood </comment>
				<init_value>
					<eq_code prog_lang="c">UO2V=0.1515</eq_code>
				</init_value>
			</variable>
			<variable name="UCOA"  units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> content of CO2 in arterial blood </comment>
				<definition><eq_code prog_lang="C">UCOA=6.732*10^-4*PCOA+0.02226*XCO3;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="UO2A"  units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> content of O2 in arterial blood </comment>
				<definition><eq_code prog_lang="C">UO2A=3.168*10^-5*PO2A+UHBO;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VI" state_var="true" units="l"> 
				<type>output</type> 
				<comment> ventilation </comment>
				<init_value>
					<eq_code prog_lang="c">VI=5</eq_code>
				</init_value>
			</variable>
			<variable name="k1" units="dimensionless"> 
				<type>output</type> 
				<comment> coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C">  k1=IF (PHA)&lt;=7.4 THEN 0.22 ELSE 0.0258;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="k2" units="dimensionless"> 
				<type>output</type> 
				<comment> coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C"> k2=IF (PCOA)&gt;40 THEN 1 ELSE 0.0396;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="k3" units="dimensionless"> 
				<type>output</type> 
				<comment> coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C"> k3=0.58;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="k4" units="dimensionless"> 
				<type>output</type> 
				<comment> coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C"> k4=3.496;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="k5" units="dimensionless"> 
				<type>output</type> 
				<comment>coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C"> k5=IF (PCOA)&gt;40 THEN -32.08 ELSE 160.11;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="k6" units="dimensionless"> 
				<type>output</type> 
				<comment> coeff ventilation VR</comment>
				<definition><eq_code prog_lang="C"> k6=IF (PHA)&lt;=7.4 THEN -12.734 ELSE -5.003;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VR" units="dimensionless"> 
				<type>output</type> 
				<comment> ventilation VR</comment>
				<definition><eq_code prog_lang="C"> VR=k1*(10^(9-PHA))+k2*(k3+k4/(PO2A-32))*(PCOA+k5)+k6;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="UHBO" units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> blood oxyhemoglobin </comment>
				<definition><eq_code prog_lang="C">UHBO=UHB*((1-exp(-PO2A*(0.0066815*PHA^3-0.10098*PHA^2+0.44921*PHA-0.454)))^2);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>


			<variable name="DCLA" units="mEq/l"> 
				<type>output</type> 
				<comment> chloride shift </comment>
				<definition><eq_code prog_lang="C"> DCLA=XCO3-STBC ;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="UHB" units="l(STPD)/l.blood"> 
				<type>output</type> 
				<comment> blood O2 combining power </comment>
				<definition><eq_code prog_lang="C">UHB=XHB/75;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PCOA" units="mmHg"> 
				<type>output</type> 
				<comment> CO2 tension in alveoli </comment>
				<definition><eq_code prog_lang="C">PCOA=FCOA*(PBA-47);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PO2A" units="mmHg"> 
				<type>output</type> 
				<comment> O2 tension in alveoli </comment>
				<definition><eq_code prog_lang="C">PO2A=FO2A*(PBA-47);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PHA" units="dimensionless"> 
				<type>output</type> 
				<comment> pH of arterial blood </comment>
				<definition><eq_code prog_lang="C">PHA=6.1+log10(XCO3/(0.03*PCOA));</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XCO0" units="mEq/l"> 
				<type>output</type> 
				<comment> ECF bicarbonate concentration zero</comment>
				<definition><eq_code prog_lang="C">XCO0=STBC-(0.527*XHB+3.7)*(PHA-7.4)+0.375*(UHB-UHBO)/0.02226;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XCO3" state_var="true" units="mEq/l"> 
				<type>output</type> 
				<comment> ECF bicarbonate concentration</comment>
				<init_value>
					<eq_code prog_lang="c">XCO3=24</eq_code>
				</init_value>
			</variable>
			<variable name="VB"  units="l"> 
				<type>output</type> 
				<comment> Blood Volume</comment>
				<definition><eq_code prog_lang="C">VB=VRBC+VP;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="HT"  units="%"> 
				<type>output</type> 
				<comment> hematocrit</comment>
				<definition><eq_code prog_lang="C">HT=VRBC/VB;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VEC"  units="l"> 
				<type>output</type> 
				<comment> extracellular fluid volume</comment>
				<definition><eq_code prog_lang="C">VEC=VP+VIF;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VIN"  state_var="true" units="l"> 
				<type>output</type> 
				<comment> volume of water input</comment>
				<init_value>
					<eq_code prog_lang="c">VIN=0.01</eq_code>
				</init_value>
			</variable>
			<variable name="VIF"  state_var="true" units="l"> 
				<type>output</type> 
				<comment> Interstitial fluid volume</comment>
				<init_value>
					<eq_code prog_lang="c">VIF=VIF0</eq_code>
				</init_value>
			</variable>
			<variable name="PC"  units="mmHg"> 
				<type>output</type> 
				<comment> Capillary pressure</comment>
				<definition><eq_code prog_lang="C">PC=(CRAV*PVS+PAS)/(1+CRAV);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZPP"  state_var="true" units="g"> 
				<type>output</type> 
				<comment> total plasma protein</comment>
				<init_value>
					<eq_code prog_lang="c">ZPP=154</eq_code>
				</init_value>
			</variable>
			<variable name="XPP"  units="g/l"> 
				<type>output</type> 
				<comment> plasma protein concentration</comment>
				<definition><eq_code prog_lang="C">XPP=ZPP/VP;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XPIF"  units="g/l"> 
				<type>output</type> 
				<comment> ISF protein concentration</comment>
				<definition><eq_code prog_lang="C">XPIF=ZPIF/VIF;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YPLC"  units="g/min"> 
				<type>output</type> 
				<comment> flow of protein through capillary</comment>
				<definition><eq_code prog_lang="C">YPLC=QPLC*(XPP-XPIF);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZPIF"  state_var="true" units="g"> 
				<type>output</type> 
				<comment> ISF protein content </comment>
				<init_value>
					<eq_code prog_lang="c">ZPIF=176</eq_code>
				</init_value>
			</variable>
			<variable name="ZPLG"  state_var="true" units="g"> 
				<type>output</type> 
				<comment> protein content in pulmonary fluid </comment>
				<init_value>
					<eq_code prog_lang="c">ZPLG=70</eq_code>
				</init_value>
			</variable>
			<variable name="ZPG"  state_var="true" units="g"> 
				<type>output</type> 
				<comment> protein content in interstitial gel </comment>
				<init_value>
					<eq_code prog_lang="c">ZPG=20</eq_code>
				</init_value>
			</variable>
			<variable name="YPLG"  units="g/min"> 
				<type>output</type> 
				<comment> flow of protein into pulmonary fluid</comment>
				<definition><eq_code prog_lang="C">YPLG=0.00023*(XPP-ZPLG);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YPLF"  units="g/min"> 
				<type>output</type> 
				<comment> flow of protein in lymphatic vessel</comment>
				<definition><eq_code prog_lang="C">YPLF=XPIF*QLF;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YPLV"  units="g/min"> 
				<type>output</type> 
				<comment> destruction rate of protein in liver</comment>
				<definition><eq_code prog_lang="C">YPLV=XPP*0.00047-0.0329;</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YPG"  units="g/min"> 
				<type>output</type> 
				<comment> flow of protein into interstitial gel</comment>
				<definition><eq_code prog_lang="C">YPG=0.0057*(XPIF-ZPG);</eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VP"  state_var="true" units="l"> 
				<type>output</type> 
				<comment> plasma volume </comment>
				<init_value>
					<eq_code prog_lang="c">VP=2.2</eq_code>
				</init_value>
			</variable>
			<variable name="PIF"  units="mmHg"> 
				<type>output</type> 
				<comment> interstitial fluid pressure </comment>
				<definition>
					<eq_code prog_lang="BMadonna">PIF=IF ((VIF/VIF0)&lt;=0.9) THEN (-15) ELSE IF ((VIF/VIF0)>0.9 AND (VIF/VIF0)&lt;=1) THEN (87*(VIF/VIF0)-93.3) ELSE IF ((VIF/VIF0)>1 AND (VIF/VIF0)&lt;=2) THEN (-6.3*(2-(VIF/VIF0))^10) ELSE ((VIF/VIF0)-2)</eq_code>
				</definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QCFR"  units="l/min"> 
				<type>output</type> 
				<comment> capillary filtration rate</comment>
				<definition><eq_code prog_lang="C"> QLF=QLF0*(24/(1+exp(-0.4977*PIF))); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QLF"  units="l/min"> 
				<type>output</type> 
				<comment> rate of lymph flow</comment>
				<definition><eq_code prog_lang="C"> QCFR=CFC*(PC-PPCO-PIF+PICO); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QPLC"  units="l/min"> 
				<type>output</type> 
				<comment> ??? </comment>
				<definition><eq_code prog_lang="C"> QPLC=2.768*10^-6*PC^2; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PPCO"  units="mmHg"> 
				<type>output</type> 
				<comment> plasma colloid osmotic pressure</comment>
				<definition><eq_code prog_lang="C"> PPCO=0.4*XPP; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PICO"  units="mmHg"> 
				<type>output</type> 
				<comment> interstitial colloid osmotic pressure</comment>
				<definition><eq_code prog_lang="C"> PICO=0.25*XPIF; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZNE"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ECF sodium content </comment>
				<init_value>
					<eq_code prog_lang="c">ZNE=1540</eq_code>
				</init_value>
			</variable>
			<variable name="ZKE"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ECF potassium content </comment>
				<init_value>
					<eq_code prog_lang="c">ZKE=49.5</eq_code>
				</init_value>
			</variable>
			<variable name="ZKI"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ICF potassium content </comment>
				<init_value>
					<eq_code prog_lang="c">ZKI=2800</eq_code>
				</init_value>
			</variable>
			<variable name="YGLU" units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion of glucose </comment>
				<definition><eq_code prog_lang="BMadonna"> YGLU=IF (XGLE*GFR)&lt;0.65 THEN 0 ELSE  XGLE*GFR-0.65 ;  </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XNE" units="mEq/l"> 
				<type>output</type> 
				<comment> ECF sodium concentration </comment>
				<definition><eq_code prog_lang="C"> XNE=ZNE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XKE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF potassium concentration </comment>
				<definition><eq_code prog_lang="C"> XKE=ZKE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XKI" units="mEq/l"> 
				<type>output</type> 
				<comment> ICF potassium concentration </comment>
				<definition><eq_code prog_lang="C"> XKI=ZKI/VIC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZHI"  state_var="true" units="?"> 
				<type>output</type> 
				<comment> ICF hydrogen content ??? </comment>
				<init_value>
					<eq_code prog_lang="c">ZHI=100</eq_code>
				</init_value>
			</variable>
			<variable name="PHI" units="dimensionless"> 
				<type>output</type> 
				<comment> pH of intracellular fluid </comment>
				<definition><eq_code prog_lang="C"> PHI=-log10(CBFI*ZHI); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YINT"  state_var="true" units="?/min"> 
				<type>output</type> 
				<comment> ??? </comment>
				<init_value>
					<eq_code prog_lang="c">YINT=0</eq_code>
				</init_value>
			</variable>
			<variable name="YGLS" units="unit/min"> 
				<type>output</type> 
				<comment> ????? </comment>
				<definition><eq_code prog_lang="C"> YGLS=CGL1*YINT+CGL2*YINS; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZGLE"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ECF glucose content </comment>
				<init_value>
					<eq_code prog_lang="c">ZGLE=66</eq_code>
				</init_value>
			</variable>
			<variable name="XGLE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF glucose concentration </comment>
				<definition><eq_code prog_lang="C"> XGLE=ZGLE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="OSMP"  units="mOsm/l"> 
				<type>output</type> 
				<comment> plasma osmolality </comment>
				<definition><eq_code prog_lang="C"> OSMP=(XNE+XKE)*1.86+XGLE+XURE+XMNE+9.73; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZMNE"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ECF mannitol content </comment>
				<init_value>
					<eq_code prog_lang="c">ZMNE=0</eq_code>
				</init_value>
			</variable>
			<variable name="XMNE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF mannitol concentration </comment>
				<definition><eq_code prog_lang="C"> XMNE=ZMNE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZURE"  state_var="true" units="mEq"> 
				<type>output</type> 
				<comment> ECF urea content </comment>
				<init_value>
					<eq_code prog_lang="c">ZURE=77.5</eq_code>
				</init_value>
			</variable>
			<variable name="XURE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF urea concentration </comment>
				<definition><eq_code prog_lang="C"> XURE=ZURE/VTW; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VTW"  units="l"> 
				<type>output</type> 
				<comment> total body water </comment>
				<definition><eq_code prog_lang="C"> VTW=VEC+VIC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YMNU"  units="mEq/min"> 
				<type>output</type> 
				<comment> intake rate of mannitol </comment>
				<definition><eq_code prog_lang="C"> YMNU=1*GFR*XMNE; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YURU"  units="mEq/min"> 
				<type>output</type> 
				<comment> intake rate of urea </comment>
				<definition><eq_code prog_lang="C"> YURU=XURE*GFR*0.6; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="VIC"  state_var="true" units="l"> 
				<type>output</type> 
				<comment> intracellular fluid volume </comment>
				<init_value>
					<eq_code prog_lang="c">VIC=20</eq_code>
				</init_value>
			</variable>
			<variable name="QIC"  units="l/min"> 
				<type>output</type> 
				<comment> rate of water flow into intracellular space </comment>
				<definition><eq_code prog_lang="C"> QIC=CSM*((-XNE-XKE)-XGLE+(10.5+XKI)); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YCO3"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of bicarbonate </comment>
				<definition><eq_code prog_lang="BMadonna"> YCO3=IF (XCO3*GFR*(-PCOA/120+4/3))&lt;=2 THEN 0 ELSE IF (XCO3*GFR*(-PCOA/120+4/3)>2 AND (XCO3*GFR*(-PCOA/120+4/3))&lt;=4) THEN 0.1638*( XCO3*GFR*(-PCOA/120+4/3)-2)^2.61 ELSE  XCO3*GFR*(-PCOA/120+4/3)-3; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YCA"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of calcium </comment>
				<definition><eq_code prog_lang="BMadonna"> YCA=IF (XCAE*GFR)&lt;0.493 THEN 0 ELSE  XCAE*GFR-0.493; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YMG"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of magnesium </comment>
				<definition><eq_code prog_lang="BMadonna"> YMG=IF (XMGE*GFR)&lt;0.292 THEN 0 ELSE  XMGE*GFR-0.292; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YSO4"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of sulphate </comment>
				<definition><eq_code prog_lang="BMadonna"> YSO4=IF (XSO4*GFR)&lt;0.08 THEN 0 ELSE  XSO4*GFR-0.08; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YPO4"  units="mM/min"> 
				<type>output</type> 
				<comment> renal excretion rate of phosphate </comment>
				<definition><eq_code prog_lang="BMadonna"> YPO4=IF (XPO4*GFR)&lt;=0.11 THEN 5/22*XPO4*GFR ELSE  XPO4*GFR-0.085; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YORG"  units="mM/min"> 
				<type>output</type> 
				<comment> renal excretion rate of organic acid </comment>
				<definition><eq_code prog_lang="BMadonna"> YORG=IF (XOGE*GFR)&lt;=0.6 THEN XOGE*GFR/60 ELSE  XOGE*GFR/3-0.19; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ZCAE"  state_var="true" units="mEq/min"> 
				<type>output</type> 
				<comment> ECF calcium content </comment>
				<init_value>
					<eq_code prog_lang="c">ZCAE=55</eq_code>
				</init_value>
			</variable>
			<variable name="ZMGE"  state_var="true" units="mEq/min"> 
				<type>output</type> 
				<comment> ECF magnesium content </comment>
				<init_value>
					<eq_code prog_lang="c">ZMGE=33</eq_code>
				</init_value>
			</variable>
			<variable name="ZSO4"  state_var="true" units="mEq/min"> 
				<type>output</type> 
				<comment> ECF sulphate content </comment>
				<init_value>
					<eq_code prog_lang="c">ZSO4=11</eq_code>
				</init_value>
			</variable>
			<variable name="ZPO4"  state_var="true" units="mM/min"> 
				<type>output</type> 
				<comment> ECF phosphate content </comment>
				<init_value>
					<eq_code prog_lang="c">ZPO4=12.1</eq_code>
				</init_value>
			</variable>
			<variable name="ZOGE"  state_var="true" units="mM/min"> 
				<type>output</type> 
				<comment> ECF organic acid content </comment>
				<init_value>
					<eq_code prog_lang="c">ZOGE=66</eq_code>
				</init_value>
			</variable>
			<variable name="ZCLE"  state_var="true" units="mEq/min"> 
				<type>output</type> 
				<comment> ECF chloride content </comment>
				<init_value>
					<eq_code prog_lang="c">ZCLE=1144</eq_code>
				</init_value>
			</variable>
			<variable name="XCAE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF calcium concentration </comment>
				<definition><eq_code prog_lang="C"> XCAE=ZCAE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XMGE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF magnesium concentration </comment>
				<definition><eq_code prog_lang="C"> XMGE=ZMGE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XSO4"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF sulphate concentration </comment>
				<definition><eq_code prog_lang="C"> XSO4=ZSO4/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XPO4"  units="mM/l"> 
				<type>output</type> 
				<comment> ECF phosphate concentration </comment>
				<definition><eq_code prog_lang="C"> XPO4=ZPO4/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XOGE"  units="mM/l"> 
				<type>output</type> 
				<comment> ECF organic acid concentration </comment>
				<definition><eq_code prog_lang="C"> XOGE=ZOGE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XCLE"  units="mEq/l"> 
				<type>output</type> 
				<comment> ECF chloride concentration </comment>
				<definition><eq_code prog_lang="C"> XCLE=ZCLE/VEC; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="XCLA"  units="mEq/l"> 
				<type>output</type> 
				<comment> arterial chloride concentration </comment>
				<definition><eq_code prog_lang="C"> XCLA=XCLE-DCLA; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="STBC"  units="mEq/l"> 
				<type>output</type> 
				<comment> standard bicarbonate at pH=7,4 </comment>
				<definition><eq_code prog_lang="C"> STBC=XCAE+XMGE-XSO4-1.8*XPO4-XOGE-XCLE+XNE+XKE-0.2214*XPP; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YCLU"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of chloride </comment>
				<definition><eq_code prog_lang="C"> YCLU=MAX(0,YNU+YKU-STPG+YNH4-YCO3+YCA+YMG-YSO4); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YNH4"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of ammonium </comment>
				<definition><eq_code prog_lang="C"> YNH4=YNH0*(-0.5*PHU1+4); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YTA1"  units="mEq/min?"> 
				<type>output</type> 
				<comment> ???? rate of titratable acid </comment>
				<definition><eq_code prog_lang="BMadonna"> YTA1=IF (PHU2)&lt;=4 THEN 0 ELSE IF (PHU2>4 AND (PHU2)&lt;=5) THEN (YTA0*(-2.5*PHA1+19.5))*(PHU2-4) ELSE YTA0*(-2.5*PHA1+19.5); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PHU2"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> pH of urine temp </comment>
				<init_value>
					<eq_code prog_lang="c">PHU2=6</eq_code>
				</init_value>
			</variable>
			<variable name="STPO"  units="?"> 
				<type>output</type> 
				<comment> ???? </comment>
				<definition><eq_code prog_lang="C"> STPO=YPO4*(1+1/(1+10^(6.8-PHA))); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PHU"  units="dimensionless"> 
				<type>output</type> 
				<comment> pH of urine </comment>
				<definition><eq_code prog_lang="C"> PHU=-log10((-((10^-4.3+10^-6.8)*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-10^-6.8*YPO4-10^-4.3*YORG)+(((10^-4.3+10^-6.8)*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-10^-6.8*YPO4-10^-4.3*YORG)^2-4*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)*((10^-4.3*10^-6.8)*((STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-YPO4-YORG)))^(0.5))/2/(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="STPG"  units="?"> 
				<type>output</type> 
				<comment> ???? </comment>
				<definition><eq_code prog_lang="C"> STPG=MAX(0,STPO+YORG-YTA); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YTA"  units="mEq/min"> 
				<type>output</type> 
				<comment> renal excretion rate of titratable acid </comment>
				<definition><eq_code prog_lang="C"> YTA=YTA1+0.009+ALD*0.001; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="PHA1"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> pH of arterial blood </comment>
				<init_value>
					<eq_code prog_lang="c">PHA1=7.4</eq_code>
				</init_value>
			</variable>
			<variable name="PHU1"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> pH of urine </comment>
				<init_value>
					<eq_code prog_lang="c">PHU1=6</eq_code>
				</init_value>
			</variable>
			<variable name="YNOD"  units="mEq/min"> 
				<type>output</type> 
				<comment> ???? </comment>
				<definition><eq_code prog_lang="C"> YNOD=MAX(0,YTA1+YNH4-YCO3); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YNU"  units="mEq/min"> 
				<type>output</type> 
				<comment> rate of renal loss of sodium </comment>
				<definition><eq_code prog_lang="C"> YNU=MAX(YND*0.116-YNOD,0); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YND"  units="mEq/min"> 
				<type>output</type> 
				<comment> rate of sodium excretion in distal tubule </comment>
				<definition><eq_code prog_lang="C"> YND=XNE*(THDF*GFR*CPRX)*0.5*0.9-ALD*0.09; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YKU"  units="mEq/min"> 
				<type>output</type> 
				<comment> rate of renal loss of potassium </comment>
				<definition><eq_code prog_lang="C"> YKU=0.39*YKD; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YKD"  units="mEq/min"> 
				<type>output</type> 
				<comment> rate of potassium excretion in distal tubule </comment>
				<definition><eq_code prog_lang="C"> YKD=ALD*0.018*XKE+0.9*0.5*(THDF*GFR*CPRX)*XKE; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="OSMU"  units="mOsm/l"> 
				<type>output</type> 
				<comment> urine osmolality</comment>
				<definition><eq_code prog_lang="C"> OSMU=(YGLU+YURU+YMNU+1.86*(YKU+YNU))/QWU; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QWD"  units="l/min"> 
				<type>output</type> 
				<comment> rate of urinary excretion in distal tubule </comment>
				<definition><eq_code prog_lang="C"> QWD=(YGLU+YURU+YMNU+(YND+YKD)*1.86+0.32)/OSMP; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="QWU"  units="l/min"> 
				<type>output</type> 
				<comment>rate of urinary output </comment>
				<definition><eq_code prog_lang="C"> QWU=QWD-QWD*0.9*ADH; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="YNH"  units="mEq/min"> 
				<type>output</type> 
				<comment> rate of sodium excretion in Henle loop </comment>
				<definition><eq_code prog_lang="C"> YNH=0.5*(THDF*GFR*CPRX)*XNE; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ADH"  units="dimensionless"> 
				<type>output</type> 
				<comment> effect of antidiuretic hormone (ratio to normal) </comment>
				<definition><eq_code prog_lang="C"> ADH=1.1/(1+exp(-0.5*(ADH0+4.605))); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ALD"  units="dimensionless"> 
				<type>output</type> 
				<comment> effect of aldosterone (ratio to normal) </comment>
				<definition><eq_code prog_lang="C"> ALD=10/(1+exp(-0.4394*(ALD0-5))); </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="THDF"  units="dimensionless"> 
				<type>output</type> 
				<comment> effect of third factor (ratio to normal) </comment>
				<definition><eq_code prog_lang="BMadonna"> THDF=IF (PPCO)&lt;=28 THEN -5*(PPCO/28-1)+1 ELSE 1; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="GFR1"  units="??"> 
				<type>output</type> 
				<comment> glomerular filtration rate temp </comment>
				<definition><eq_code prog_lang="BMadonna"> GFR1=IF (PAS)&lt;40 THEN 0 ELSE IF ((PAS)&gt;=40 AND (PAS)&lt;80) THEN 0.02*PAS-0.8 ELSE IF ((PAS)&gt;=80 AND (PAS)&lt;100) THEN -0.0005*(PAS-100)^2+1 ELSE 1; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="GFR"  units="l/min"> 
				<type>output</type> 
				<comment> glomerular filtration rate </comment>
				<definition><eq_code prog_lang="C"> GFR=GFR1*GFR0*VEC/VEC0; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>
			<variable name="ALD0"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> effect of aldosterone </comment>
				<init_value>
					<eq_code prog_lang="c">ALD0=0</eq_code>
				</init_value>
			</variable>
			<variable name="ADH0"  state_var="true" units="dimensionless"> 
				<type>output</type> 
				<comment> effect of antidiuretic hormone </comment>
				<init_value>
					<eq_code prog_lang="c">ADH0=0</eq_code>
				</init_value>
			</variable>
			<variable name="ALD1"  units="dimensionless"> 
				<type>output</type> 
				<comment> effect of aldosterone </comment>
				<definition><eq_code prog_lang="BMadonna"> ALD1=(ACTH-1)*1+(XKE-4.5)*CKAL-(PVP-4)*CPVL-(YNH-1.4)*CNAL-(PAS-100)*CPAL; </eq_code></definition>
				<init_value>
					<eq_code prog_lang="c"></eq_code>
				</init_value> <!-- calculate it using the definition -->
			</variable>

		</variables>


		<parameters>
				<parameter name="RTOT" units="mmHg.min/l">
					<comment> total resistance in systemic circulation </comment>
					<init_value>
						<eq_code prog_lang="c">RTOT = 20</eq_code>
					</init_value>
				</parameter>       
				<parameter name="KR" units="dimensionless">
					<comment> parameter of right heart performance </comment>
					<init_value>
						<eq_code prog_lang="c">KR = 0.3</eq_code>
					</init_value>
				</parameter>       
				<parameter name="RTOP" units="mmHg.min/l">
					<comment> total resistance in pulmonary circulation </comment>
					<init_value>
						<eq_code prog_lang="c">RTOP = 3</eq_code>
					</init_value>
				</parameter>       
				<parameter name="KL" units="dimensionless">
					<comment> parameter of left heart performance </comment>
					<init_value>
						<eq_code prog_lang="c">KL = 0.2</eq_code>
					</init_value>
				</parameter>       
				<parameter name="DEN" units="dimensionless">
					<comment> proportional constant between QCO and VB </comment>
					<init_value>
						<eq_code prog_lang="c">DEN = 1</eq_code>
					</init_value>
				</parameter>       
				<parameter name="XHB" units="g/dl">
					<comment> blood hemoglobin concentration</comment>
					<init_value>
						<eq_code prog_lang="c">XHB = 15</eq_code>
					</init_value>
				</parameter>       
				<parameter name="FO2I" units="dimensionless">
					<comment> volume fraction of O2 in dry inspired gas</comment>
					<init_value>
						<eq_code prog_lang="c">FO2I = 0.21</eq_code>
					</init_value>
				</parameter>       
				<parameter name="PBA" units="mmHg">
					<comment> barometric pressure</comment>
					<init_value>
						<eq_code prog_lang="c">PBA = 760</eq_code>
					</init_value>
				</parameter>       
				<parameter name="PBL" units="mmHg">
					<comment> PBA-vapor pressure</comment>
					<init_value>
						<eq_code prog_lang="c">PBL = PBA-47</eq_code>
					</init_value>
				</parameter>       
				<parameter name="VAL" units="l">
					<comment> total alveolar volume</comment>
					<init_value>
						<eq_code prog_lang="c">VAL=3</eq_code>
					</init_value>
				</parameter>       
				<parameter name="MRCO" units="l(STPD)/min">
					<comment> metabolic production rate of CO2</comment>
					<init_value>
						<eq_code prog_lang="c">MRCO=0.2318</eq_code>
					</init_value>
				</parameter>       
				<parameter name="MRO2" units="l(STPD)/min">
					<comment> metabolic production rate of O2</comment>
					<init_value>
						<eq_code prog_lang="c">MRO2=0.2591</eq_code>
					</init_value>
				</parameter>       
				<parameter name="VI0" units="l">
					<comment> normal value of ventilation</comment>
					<init_value>
						<eq_code prog_lang="c">VI0=5</eq_code>
					</init_value>
				</parameter>       
				<parameter name="TRSP1" units="min">
					<comment> time constant for ventilation</comment>
					<init_value>
						<eq_code prog_lang="c">TRSP1=2</eq_code>
					</init_value>
				</parameter>       
				<parameter name="TRSP" units="min">
					<comment> time constant for XCO3</comment>
					<init_value>
						<eq_code prog_lang="c">TRSP=1</eq_code>
					</init_value>
				</parameter>       
				<parameter name="QIN" units="l/min">
					<comment> rate of drinking</comment>
					<init_value>
						<eq_code prog_lang="c">QIN=0.001</eq_code>
					</init_value>
				</parameter>       
				<parameter name="QVIN" units="l/min">
					<comment> rate of intravenous water input</comment>
					<init_value>
						<eq_code prog_lang="c">QVIN=0</eq_code>
					</init_value>
				</parameter>       
				<parameter name="QIWL" units="l/min">
					<comment> ate of insensible water loss</comment>
					<init_value>
						<eq_code prog_lang="c">QIWL=0.0005</eq_code>
					</init_value>
				</parameter>       
				<parameter name="QMWP" units="l/min">
					<comment> rate of metabolic water production</comment>
					<init_value>
						<eq_code prog_lang="c">QMWP=0.0005</eq_code>
					</init_value>
				</parameter>       
				<parameter name="QLF0" units="l/min">
					<comment> rate of lymph flow zero</comment>
					<init_value>
						<eq_code prog_lang="c">QLF0=0.002</eq_code>
					</init_value>
				</parameter>       
				<parameter name="VIF0" units="l">
					<comment> Interstitial fluid volume zero</comment>
					<init_value>
						<eq_code prog_lang="c">VIF0=8.8</eq_code>
					</init_value>
				</parameter>       
				<parameter name="CFC" units="l/min/mmHg">
					<comment> capillary filtration coefficient</comment>
					<init_value>
						<eq_code prog_lang="c">CFC=0.007</eq_code>
					</init_value>
				</parameter>       
				<parameter name="VRBC" units="l">
					<comment> volume of red blood cells</comment>
					<init_value>
						<eq_code prog_lang="c">VRBC=1.8</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CRAV" units="dimensionless">
					<comment> arterial resistance/venous resistance</comment>
					<init_value>
						<eq_code prog_lang="c">CRAV=5.93</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CSM" units="l^2/mEq/min">
					<comment> transfer coefficient of water from ECF to ICF caused by osmotic gradient</comment>
					<init_value>
						<eq_code prog_lang="c">CSM = 0.0003</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YNIN" units="mEq/min">
					<comment> intake rate of sodium</comment>
					<init_value>
						<eq_code prog_lang="c">YNIN=0.12</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CKEI" units="dimensionless">
					<comment> potassium transfer coeff from ECF to ICF</comment>
					<init_value>
						<eq_code prog_lang="c">CKEI=0.001</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YKIN" units="mEq/min">
					<comment> intake rate of potassium</comment>
					<init_value>
						<eq_code prog_lang="c">YKIN=0.047</eq_code>
					</init_value>
				</parameter>   
				<parameter name="XGL0" units="mg/dl">
					<comment> reference value of ECF glucose concentration</comment>
					<init_value>
						<eq_code prog_lang="c">XGL0=108</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YINS" units="unit/min">
					<comment> intake rate of insulin</comment>
					<init_value>
						<eq_code prog_lang="c">YINS=0</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YGLI" units="g/min">
					<comment> intake rate of glucose</comment>
					<init_value>
						<eq_code prog_lang="c">YGLI=0</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YMNI" units="mEq/min">
					<comment> renal excretion rate of mannitol</comment>
					<init_value>
						<eq_code prog_lang="c">YMNI=0</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YURI" units="mEq/min">
					<comment> renal excretion rate of urea</comment>
					<init_value>
						<eq_code prog_lang="c">YURI=0.15</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CGL1" units="dimensionless">
					<comment> parameter of glucose metabolism</comment>
					<init_value>
						<eq_code prog_lang="c">CGL1=1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CGL2" units="dimensionless">
					<comment> parameter of glucose metabolism</comment>
					<init_value>
						<eq_code prog_lang="c">CGL2=1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CGL3" units="dimensionless">
					<comment> parameter of glucose metabolism</comment>
					<init_value>
						<eq_code prog_lang="c">CGL3=0.03</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CHEI" units="dimensionless">
					<comment> transfer coefficient of hydrogen</comment>
					<init_value>
						<eq_code prog_lang="c">CHEI=5</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CBFI" units="dimensionless">
					<comment> ?????</comment>
					<init_value>
						<eq_code prog_lang="c">CBFI=10^-9</eq_code>
					</init_value>
				</parameter> 
  				<parameter name="YCAI" units="mEq/min">
					<comment> intake rate of calcium</comment>
					<init_value>
						<eq_code prog_lang="c">YCAI=0.007</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YCLI" units="mEq/min">
					<comment> intake rate of chloride</comment>
					<init_value>
						<eq_code prog_lang="c">YCLI=0.1328</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YMGI" units="mEq/min">
					<comment> intake rate of magnesium</comment>
					<init_value>
						<eq_code prog_lang="c">YMGI=0.008</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YOGI" units="mM/min">
					<comment> intake rate of organic acid</comment>
					<init_value>
						<eq_code prog_lang="c">YOGI=0.01</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YPOI" units="mM/min">
					<comment> intake rate of phosphate</comment>
					<init_value>
						<eq_code prog_lang="c">YPOI=0.025</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YSOI" units="mEq/min">
					<comment> intake rate of sulphate</comment>
					<init_value>
						<eq_code prog_lang="c">YSOI=0.02</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CPRX" units="dimensionless">
					<comment> excretion ratio of filtered load after proximal tubule</comment>
					<init_value>
						<eq_code prog_lang="c">CPRX=0.2</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YNH0" units="mEq/min">
					<comment> normal excretion rate of ammonium</comment>
					<init_value>
						<eq_code prog_lang="c">YNH0=0.024</eq_code>
					</init_value>
				</parameter>   
				<parameter name="YTA0" units="mEq/min">
					<comment> intake rate of titratable acid</comment>
					<init_value>
						<eq_code prog_lang="c">YTA0=0.0068</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CKAL" units="dimensionless">
					<comment> weight of effect of XKE on aldosterone secretion</comment>
					<init_value>
						<eq_code prog_lang="c">CKAL=0.5</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CNAL" units="dimensionless">
					<comment> weight of effect of YNH on aldosterone secretion</comment>
					<init_value>
						<eq_code prog_lang="c">CNAL=0.1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="COAD" units="dimensionless">
					<comment> weight of effect of OSMP on ADH secretion</comment>
					<init_value>
						<eq_code prog_lang="c">COAD=0.5</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CPAD" units="dimensionless">
					<comment> weight of effect of PVP on ADH secretion</comment>
					<init_value>
						<eq_code prog_lang="c">CPAD=1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CPAL" units="dimensionless">
					<comment> weight of effect of PAS on aldosterone secretion</comment>
					<init_value>
						<eq_code prog_lang="c">CPAL=0.01</eq_code>
					</init_value>
				</parameter>   
				<parameter name="CPVL" units="dimensionless">
					<comment> weight of effect of PVP on aldosterone secretion</comment>
					<init_value>
						<eq_code prog_lang="c">CPVL=0.1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="GFR0" units="dimensionless">
					<comment> normal value of GFR </comment>
					<init_value>
						<eq_code prog_lang="c">GFR0=0.1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="ACTH" units="dimensionless">
					<comment> ??? </comment>
					<init_value>
						<eq_code prog_lang="c">ACTH=1</eq_code>
					</init_value>
				</parameter>   
				<parameter name="VEC0" units="l">
					<comment> normal value of VEC</comment>
					<init_value>
						<eq_code prog_lang="c">VEC0=11</eq_code>
					</init_value>
				</parameter>   
				<parameter name="TADH" units="min">
					<comment> time constant of ADH secretion</comment>
					<init_value>
						<eq_code prog_lang="c">TADH=30</eq_code>
					</init_value>
				</parameter>   
				<parameter name="TALD" units="min">
					<comment> time constant of aldosterone secretion</comment>
					<init_value>
						<eq_code prog_lang="c">TALD=30</eq_code>
					</init_value>
				</parameter>   


		</parameters>


 		<system_equations>
				<derivative_equations>

					<ode variable="FCOA">
						<eq_code prog_lang="c"> d/dt (FCOA) = (VI*(FCOI-FCOA)+863/(PBA-47)*QCO*(UCOV-UCOA))/VAL; </eq_code>		
					</ode>
					<ode variable="FO2A">
						<eq_code prog_lang="c"> d/dt (FO2A) = (VI*(FO2I-FO2A)+863/(PBA-47)*QCO*(UO2V-UO2A))/VAL; </eq_code>		
					</ode>
					<ode variable="UCOV">
						<eq_code prog_lang="c"> d/dt (UCOV) = (MRCO+QCO*(UCOA-UCOV))/VTW; </eq_code>		
					</ode>
					<ode variable="UO2V">
						<eq_code prog_lang="c"> d/dt (UO2V) = (-MRO2+QCO*(UO2A-UO2V))/VTW; </eq_code>		
					</ode>
					<ode variable="VI">
						<eq_code prog_lang="c"> d/dt (VI) = (VR*VI0-VI)/TRSP1; </eq_code>		
					</ode>
					<ode variable="XCO3">
						<eq_code prog_lang="c"> d/dt (XCO3) =  (XCO0-XCO3)/TRSP; </eq_code>		
					</ode>
					<ode variable="VIN">
						<eq_code prog_lang="c"> d/dt (VIN) = QIN-(VIN/10); </eq_code>		
					</ode>
					<ode variable="VIF">
						<eq_code prog_lang="c"> d/dt (VIF) = QCFR-QLF-QIC; </eq_code>		
					</ode>
					<ode variable="ZPP">
						<eq_code prog_lang="c"> d/dt (ZPP) = YPLF-YPLG-YPLV-YPLC; </eq_code>		
					</ode>
					<ode variable="ZPIF">
						<eq_code prog_lang="c"> d/dt (ZPIF) = YPLC-YPG-YPLF; </eq_code>		
					</ode>
					<ode variable="ZPLG">
						<eq_code prog_lang="c"> d/dt (ZPLG) = (XPP-ZPLG)/24; </eq_code>		
					</ode>
					<ode variable="ZPG">
						<eq_code prog_lang="c"> d/dt (ZPG) = (XPIF-ZPG)/150; </eq_code>		
					</ode>
					<ode variable="VP">
						<eq_code prog_lang="c"> d/dt (VP) = (VIN/10+QVIN+QMWP+QLF)-(QIWL+QWU+QCFR); </eq_code>		
					</ode>
					<ode variable="ZNE">
						<eq_code prog_lang="c"> d/dt (ZNE) = YNIN-YNU+CHEI*(0.4-PHA+PHI); </eq_code>		
					</ode>
					<ode variable="ZKE">
						<eq_code prog_lang="c"> d/dt (ZKE) = YKIN-YKU-(CGL3*YGLS+CKEI*(2800*(1+0.5*log10(XKE/(56.744-7.06*PHA)))-ZKI)); </eq_code>		
					</ode>
					<ode variable="ZKI">
						<eq_code prog_lang="c"> d/dt (ZKI) = CGL3*YGLS+CKEI*(2800*(1+0.5*log10(XKE/(56.744-7.06*PHA)))-ZKI); </eq_code>		
					</ode>
					<ode variable="ZHI">
						<eq_code prog_lang="c"> d/dt (ZHI) = CHEI*(0.4-PHA+PHI); </eq_code>		
					</ode>
					<ode variable="YINT">
						<eq_code prog_lang="c"> d/dt (YINT) = 1/1.50*(XGLE-XGL0/18-YINT); </eq_code>		
					</ode>
					<ode variable="ZGLE">
						<eq_code prog_lang="c"> d/dt (ZGLE) = YGLI/180-YGLS-YGLU; </eq_code>		
					</ode>
					<ode variable="ZMNE">
						<eq_code prog_lang="c"> d/dt (ZMNE) = YMNI-YMNU; </eq_code>		
					</ode>
					<ode variable="ZURE">
						<eq_code prog_lang="c"> d/dt (ZURE) = YURI-YURU; </eq_code>		
					</ode>
					<ode variable="VIC">
						<eq_code prog_lang="c"> d/dt (VIC) = QIC; </eq_code>		
					</ode>
					<ode variable="ZCAE">
						<eq_code prog_lang="c"> d/dt (ZCAE) = YCAI-YCA; </eq_code>		
					</ode>
					<ode variable="ZMGE">
						<eq_code prog_lang="c"> d/dt (ZMGE) = YMGI-YMG; </eq_code>		
					</ode>
					<ode variable="ZSO4">
						<eq_code prog_lang="c"> d/dt (ZSO4) = YSOI-YSO4; </eq_code>		
					</ode>
					<ode variable="ZPO4">
						<eq_code prog_lang="c"> d/dt (ZPO4) = YPOI-YPO4; </eq_code>		
					</ode>
					<ode variable="ZOGE">
						<eq_code prog_lang="c"> d/dt (ZOGE) = YOGI-YORG; </eq_code>		
					</ode>
					<ode variable="ZCLE">
						<eq_code prog_lang="c"> d/dt (ZCLE) = YCLI-YCLU; </eq_code>		
					</ode>
					<ode variable="PHU2">
						<eq_code prog_lang="c"> d/dt (PHU2) = (PHU-PHU2)/TRSP; </eq_code>		
					</ode>
					<ode variable="PHA1">
						<eq_code prog_lang="c"> d/dt (PHA1) = (PHA-PHA1)/200; </eq_code>		
					</ode>
					<ode variable="PHU1">
						<eq_code prog_lang="c"> d/dt (PHU1) = (PHU-PHU1)/300; </eq_code>		
					</ode>
					<ode variable="ALD0">
						<eq_code prog_lang="c"> d/dt (ALD0) = (ALD1-ALD0)/TALD; </eq_code>		
					</ode>
					<ode variable="ADH0">
						<eq_code prog_lang="c"> d/dt (ADH0) = (((OSMP-287)*COAD-(PVP-4)*CPAD)-ADH0)/TADH; </eq_code>		
					</ode>

				</derivative_equations>		
				<output_equations>
					<!-- these equations are solved at the end of each step -->
					<ae>
						<eq_code prog_lang="c"> QCO0 = VB*DEN; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QCO = QCO0+1; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PAS=20+RTOT*QCO0; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PVS=MAX(0,-10.33+QCO0/KR); </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PAP=8+RTOP*QCO0; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PVP=MAX(0,-16+QCO0/KL);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> UCOA=6.732*10^-4*PCOA+0.02226*XCO3;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> UO2A=3.168*10^-5*PO2A+UHBO;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> VR=k1*(10^(9-PHA))+k2*(k3+k4/(PO2A-32))*(PCOA+k5)+k6;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> UHBO=UHB*((1-exp(-PO2A*(0.0066815*PHA^3-0.10098*PHA^2+0.44921*PHA-0.454)))^2);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> DCLA=XCO3-STBC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> UHB=XHB/75;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PCOA=FCOA*(PBA-47);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PO2A=FO2A*(PBA-47);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PHA=6.1+log10(XCO3/(0.03*PCOA));  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XCO0=STBC-(0.527*XHB+3.7)*(PHA-7.4)+0.375*(UHB-UHBO)/0.02226;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> VB=VRBC+VP;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> HT=VRBC/VB;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> VEC=VP+VIF;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PC=(CRAV*PVS+PAS)/(1+CRAV);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XPP=ZPP/VP;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XPIF=ZPIF/VIF;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YPLC=QPLC*(XPP-XPIF);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YPLG=0.00023*(XPP-ZPLG);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YPLF=XPIF*QLF;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YPLV=XPP*0.00047-0.0329;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YPG=0.0057*(XPIF-ZPG);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QCFR=CFC*(PC-PPCO-PIF+PICO);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna">PIF=IF ((VIF/VIF0)&lt;=0.9) THEN (-15) ELSE IF ((VIF/VIF0)>0.9 AND (VIF/VIF0)&lt;=1) THEN (87*(VIF/VIF0)-93.3) ELSE IF ((VIF/VIF0)>1 AND (VIF/VIF0)&lt;=2) THEN (-6.3*(2-(VIF/VIF0))^10) ELSE ((VIF/VIF0)-2)</eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QLF=QLF0*(24/(1+exp(-0.4977*PIF)));  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QPLC=2.768*10^-6*PC^2;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PPCO=0.4*XPP;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PICO=0.25*XPIF;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YGLU=IF (XGLE*GFR)&lt;0.65 THEN 0 ELSE  XGLE*GFR-0.65 ;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XNE=ZNE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XKE=ZKE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XKI=ZKI/VIC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PHI=-log10(CBFI*ZHI);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YGLS=CGL1*YINT+CGL2*YINS;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XGLE=ZGLE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> (XNE+XKE)*1.86+XGLE+XURE+XMNE+9.73;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XMNE=ZMNE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XURE=ZURE/VTW;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> VTW=VEC+VIC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YMNU=1*GFR*XMNE; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YURU=XURE*GFR*0.6;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QIC=CSM*((-XNE-XKE)-XGLE+(10.5+XKI));  </eq_code>
					</ae>

					<ae>
						<eq_code prog_lang="BMadonna"> YCO3=IF (XCO3*GFR*(-PCOA/120+4/3))&lt;=2 THEN 0 ELSE IF (XCO3*GFR*(-PCOA/120+4/3)>2 AND (XCO3*GFR*(-PCOA/120+4/3))&lt;=4) THEN 0.1638*( XCO3*GFR*(-PCOA/120+4/3)-2)^2.61 ELSE  XCO3*GFR*(-PCOA/120+4/3)-3; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YCA=IF (XCAE*GFR)&lt;0.493 THEN 0 ELSE  XCAE*GFR-0.493; </eq_code>					
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YMG=IF (XMGE*GFR)&lt;0.292 THEN 0 ELSE  XMGE*GFR-0.292; </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YSO4=IF (XSO4*GFR)&lt;0.08 THEN 0 ELSE  XSO4*GFR-0.08; </eq_code>					
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YPO4=IF (XPO4*GFR)&lt;=0.11 THEN 5/22*XPO4*GFR ELSE  XPO4*GFR-0.085; </eq_code>					
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YORG=IF (XOGE*GFR)&lt;=0.6 THEN XOGE*GFR/60 ELSE  XOGE*GFR/3-0.19; </eq_code>					
					</ae>
					<ae>
						<eq_code prog_lang="c"> XCAE=ZCAE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XMGE=ZMGE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XPO4=ZPO4/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XSO4=ZSO4/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XOGE=ZOGE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XCLE=ZCLE/VEC;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> XCLA=XCLE-DCLA;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> STBC=XCAE+XMGE-XSO4-1.8*XPO4-XOGE-XCLE+XNE+XKE-0.2214*XPP;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YCLU=MAX(0,YNU+YKU-STPG+YNH4-YCO3+YCA+YMG-YSO4);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YNH4=YNH0*(-0.5*PHU1+4);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> YTA1=IF (PHU2)&lt;=4 THEN 0 ELSE IF (PHU2>4 AND (PHU2)&lt;=5) THEN (YTA0*(-2.5*PHA1+19.5))*(PHU2-4) ELSE YTA0*(-2.5*PHA1+19.5); </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> STPO=YPO4*(1+1/(1+10^(6.8-PHA)));  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> PHU=-log10((-((10^-4.3+10^-6.8)*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-10^-6.8*YPO4-10^-4.3*YORG)+(((10^-4.3+10^-6.8)*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-10^-6.8*YPO4-10^-4.3*YORG)^2-4*(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)*((10^-4.3*10^-6.8)*((STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)-YPO4-YORG)))^(0.5))/2/(STPG-YPO4-(1/(1+10^(PHA-4.3)))*YORG)); </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> STPG=MAX(0,STPO+YORG-YTA);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YTA=YTA1+0.009+ALD*0.001;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YNOD=MAX(0,YTA1+YNH4-YCO3);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YNU=MAX(YND*0.116-YNOD,0);  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YND=XNE*(THDF*GFR*CPRX)*0.5*0.9-ALD*0.09;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YKU=0.39*YKD;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YKD=ALD*0.018*XKE+0.9*0.5*(THDF*GFR*CPRX)*XKE;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> OSMU=(YGLU+YURU+YMNU+1.86*(YKU+YNU))/QWU;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QWD=(YGLU+YURU+YMNU+(YND+YKD)*1.86+0.32)/OSMP;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> QWU=QWD-QWD*0.9*ADH;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> YNH=0.5*(THDF*GFR*CPRX)*XNE;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> ADH=1.1/(1+exp(-0.5*(ADH0+4.605)));  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> ALD=10/(1+exp(-0.4394*(ALD0-5)));  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="c"> GFR=GFR1*GFR0*VEC/VEC0;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> THDF=IF (PPCO)&lt;=28 THEN -5*(PPCO/28-1)+1 ELSE 1;  </eq_code>
					</ae>
					<ae>
						<eq_code prog_lang="BMadonna"> GFR1=IF (PAS)&lt;40 THEN 0 ELSE IF ((PAS)&gt;=40 AND (PAS)&lt;80) THEN 0.02*PAS-0.8 ELSE IF ((PAS)&gt;=80 AND (PAS)&lt;100) THEN -0.0005*(PAS-100)^2+1 ELSE 1;  </eq_code>
					</ae>

				</output_equations>


		</system_equations>

	</model>
</daeml>