- Author:
- Robyn-May <r.may@auckland.ac.nz>
- Date:
- 2021-05-07 14:14:31+12:00
- Desc:
- Adding initial copy of the bond graph neonatal circulation model to the workspace.
- Permanent Source URI:
- https://models.physiomeproject.org/workspace/662/rawfile/b69f6c4051fda1a7572054d3cc88f7bc5cb16944/main_baby.cellml
<?xml version='1.0' encoding='UTF-8'?>
<!-- 22/9/2020 Robyn May
Simplified closed loop model of neonatal circulatory system-->
<model name="CardiovascularSystem" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Import units-->
<import xlink:href="Units.cellml">
<units name="m3" units_ref="m3"/>
<units name="m3_per_s" units_ref="m3_per_s"/>
<units name="m6_per_J" units_ref="m6_per_J"/>
<units name="per_m" units_ref="per_m"/>
<units name="J_per_m3" units_ref="J_per_m3"/>
<units name="Js_per_m6" units_ref="Js_per_m6"/>
<units name="Js2_per_m6" units_ref="Js2_per_m6"/>
<units name="Js2_per_m5" units_ref="Js2_per_m5"/>
<units name="J_per_s" units_ref="J_per_s"/>
<units name="J_per_m6" units_ref="J_per_m6"/>
<units name="Js_per_m3" units_ref="Js_per_m3"/>
<units name="UnitValve" units_ref="UnitValve"/>
</import>
<!-- Import parameters-->
<import xlink:href="Parameters_baby.cellml">
<component component_ref="Parameters_Systemic" name="Parameters_Systemic"/>
<component component_ref="Parameters_Pulmonary" name="Parameters_Pulmonary"/>
<component component_ref="Parameters_Heart" name="Parameters_Heart"/>
</import>
<!-- Define environment component-->
<component name="environment">
<variable name="time" public_interface="out" units="second"/>
</component>
<!-- Import bond graph modules-->
<import xlink:href="BG_Modules.cellml">
<component component_ref="vv_type" name="aortic_root"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_jII_type" name="ascending_aorta"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_jII_type" name="aortic_arch_I"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_jII_type" name="aortic_arch_II"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_jII_type" name="brachiocephalic"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_type" name="descending_aorta"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="right_common_carotid"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="left_common_carotid"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_type" name="right_subclavian"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_type" name="left_subclavian"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="right_arm"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="left_arm"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pv_jII_type" name="abdominal_aorta"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="right_leg"/>
</import>
<import xlink:href="BG_Modules.cellml">
<component component_ref="pp_BC_type" name="left_leg"/>
</import>
<!-- Map time-->
<connection>
<map_components component_1="environment" component_2="aortic_root"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="ascending_aorta"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="aortic_arch_I"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="aortic_arch_II"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="brachiocephalic"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="descending_aorta"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="right_common_carotid"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="left_common_carotid"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="right_subclavian"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="left_subclavian"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="right_arm"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="left_arm"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="abdominal_aorta"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="right_leg"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="left_leg"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<!-------------- Systemic Circulation ------------//-->
<component name="Systemic">
<variable name="t" public_interface="in" units="second"/>
<!-- Constitutive Parameters-->
<variable name="C_svc" public_interface="in" units="m6_per_J"/>
<variable name="C_ivc" public_interface="in" units="m6_per_J"/>
<variable name="R_svc" public_interface="in" units="Js_per_m6"/>
<variable name="R_ivc" public_interface="in" units="Js_per_m6"/>
<variable name="I_svc" public_interface="in" units="Js2_per_m6"/>
<variable name="I_ivc" public_interface="in" units="Js2_per_m6"/>
<variable initial_value="1.3" name="alpha" public_interface="out" units="dimensionless"/>
<!-- State Variables-->
<variable name="u_ra" public_interface="in" units="J_per_m3"/>
<variable initial_value="0.0" name="u_svc" public_interface="out" units="J_per_m3"/>
<variable initial_value="0.0" name="u_ivc" public_interface="out" units="J_per_m3"/>
<variable initial_value="0.0" name="v_svc" public_interface="out" units="m3_per_s"/>
<variable initial_value="0.0" name="v_ivc" public_interface="out" units="m3_per_s"/>
<variable name="v_sup_venacava" public_interface="out" units="m3_per_s"/>
<variable name="v_inf_venacava" public_interface="out" units="m3_per_s"/>
<variable name="v_right_common_carotid" public_interface="in" units="m3_per_s"/>
<variable name="v_left_common_carotid" public_interface="in" units="m3_per_s"/>
<variable name="v_right_arm" public_interface="in" units="m3_per_s"/>
<variable name="v_left_arm" public_interface="in" units="m3_per_s"/>
<variable name="v_right_leg" public_interface="in" units="m3_per_s"/>
<variable name="v_left_leg" public_interface="in" units="m3_per_s"/>
<!-- Constitutive Relations-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>u_svc</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<ci>v_sup_venacava</ci>
<ci>v_svc</ci>
</apply>
<ci>C_svc</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>u_ivc</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<ci>v_inf_venacava</ci>
<ci>v_ivc</ci>
</apply>
<ci>C_ivc</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_svc</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_svc</ci>
<ci>u_ra</ci>
</apply>
<apply>
<times/>
<ci>v_svc</ci>
<ci>R_svc</ci>
</apply>
</apply>
<ci>I_svc</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_ivc</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_ivc</ci>
<ci>u_ra</ci>
</apply>
<apply>
<times/>
<ci>v_ivc</ci>
<ci>R_ivc</ci>
</apply>
</apply>
<ci>I_ivc</ci>
</apply>
</apply>
<!-- Conservation Laws-->
<apply>
<eq/>
<ci>v_sup_venacava</ci>
<apply>
<plus/>
<ci>v_left_arm</ci>
<ci>v_left_common_carotid</ci>
<ci>v_right_arm</ci>
<ci>v_right_common_carotid</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>v_inf_venacava</ci>
<apply>
<plus/>
<ci>v_right_leg</ci>
<ci>v_left_leg</ci>
</apply>
</apply>
</math>
</component>
<!-------------- Pulmonary Circulation ------------//-->
<component name="Pulmonary">
<variable name="t" public_interface="in" units="second"/>
<!-- Constitutive Parameters_Systemic-->
<variable name="C_pulm" public_interface="in" units="m6_per_J"/>
<variable name="R_pulm" public_interface="in" units="Js_per_m6"/>
<variable name="I_pulm" public_interface="in" units="Js2_per_m6"/>
<!-- State Variables-->
<variable initial_value="1600.0" name="u_pulm" public_interface="out" units="J_per_m3"/>
<variable name="u_la" public_interface="in" units="J_per_m3"/>
<variable initial_value="0.0" name="v_pulm" public_interface="out" units="m3_per_s"/>
<variable name="v_rv" public_interface="in" units="m3_per_s"/>
<!-- Constitutive Relations-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>u_pulm</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<ci>v_rv</ci>
<ci>v_pulm</ci>
</apply>
<ci>C_pulm</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_pulm</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_pulm</ci>
<ci>u_la</ci>
</apply>
<apply>
<times/>
<ci>v_pulm</ci>
<ci>R_pulm</ci>
</apply>
</apply>
<ci>I_pulm</ci>
</apply>
</apply>
</math>
</component>
<!-------------- Heart ------------//-->
<component name="Heart">
<variable name="t" public_interface="in" units="second"/>
<!-- Constitutive Parameters-->
<variable name="mt" units="second"/>
<variable name="e_a" units="dimensionless"/>
<variable name="e_v" units="dimensionless"/>
<variable name="T" public_interface="in" units="second"/>
<variable name="t_ac" public_interface="in" units="dimensionless"/>
<variable name="t_ar" public_interface="in" units="dimensionless"/>
<variable name="T_ac" public_interface="in" units="dimensionless"/>
<variable name="T_ar" public_interface="in" units="dimensionless"/>
<variable name="T_vc" public_interface="in" units="dimensionless"/>
<variable name="T_vr" public_interface="in" units="dimensionless"/>
<variable name="CQ_trv" public_interface="in" units="UnitValve"/>
<variable name="CQ_puv" public_interface="in" units="UnitValve"/>
<variable name="CQ_miv" public_interface="in" units="UnitValve"/>
<variable name="CQ_aov" public_interface="in" units="UnitValve"/>
<variable name="E_lv_A" public_interface="in" units="J_per_m6"/>
<variable name="E_lv_B" public_interface="in" units="J_per_m6"/>
<variable name="E_la_A" public_interface="in" units="J_per_m6"/>
<variable name="E_la_B" public_interface="in" units="J_per_m6"/>
<variable name="E_rv_A" public_interface="in" units="J_per_m6"/>
<variable name="E_rv_B" public_interface="in" units="J_per_m6"/>
<variable name="E_ra_A" public_interface="in" units="J_per_m6"/>
<variable name="E_ra_B" public_interface="in" units="J_per_m6"/>
<variable name="q_ra_0" public_interface="in" units="m3"/>
<variable name="q_rv_0" public_interface="in" units="m3"/>
<variable name="q_la_0" public_interface="in" units="m3"/>
<variable name="q_lv_0" public_interface="in" units="m3"/>
<!-- State Variables-->
<variable name="u_ra" public_interface="out" units="J_per_m3"/>
<variable name="u_rv" units="J_per_m3"/>
<variable name="u_la" public_interface="out" units="J_per_m3"/>
<variable name="u_lv" units="J_per_m3"/>
<variable name="u_root" public_interface="in" units="J_per_m3"/>
<variable name="u_pulm" public_interface="in" units="J_per_m3"/>
<variable name="v_ra" units="m3_per_s"/>
<variable name="v_rv" public_interface="out" units="m3_per_s"/>
<variable name="v_la" units="m3_per_s"/>
<variable name="v_lv" public_interface="out" units="m3_per_s"/>
<variable name="v_sup_venacava" public_interface="in" units="m3_per_s"/>
<variable name="v_inf_venacava" public_interface="in" units="m3_per_s"/>
<variable name="v_pulm" public_interface="in" units="m3_per_s"/>
<variable initial_value="5e-6" name="q_ra" units="m3"/>
<variable initial_value="10e-6" name="q_rv" units="m3"/>
<variable initial_value="5e-6" name="q_la" units="m3"/>
<variable initial_value="380e-6" name="q_lv" units="m3"/>
<variable name="E_la_out" units="J_per_m6"/>
<variable name="E_lv_out" units="J_per_m6"/>
<!-- Elastance Functions-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<ci>mt</ci>
<apply>
<minus/>
<ci>t</ci>
<apply>
<times/>
<ci>T</ci>
<apply>
<floor/>
<apply>
<divide/>
<ci>t</ci>
<ci>T</ci>
</apply>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>e_a</ci>
<piecewise>
<piece>
<apply>
<times/>
<cn cellml:units="dimensionless">0.5</cn>
<apply>
<plus/>
<cn cellml:units="dimensionless">1</cn>
<apply>
<cos/>
<apply>
<divide/>
<apply>
<times/>
<pi/>
<apply>
<minus/>
<apply>
<plus/>
<ci>mt</ci>
<ci>T</ci>
</apply>
<ci>t_ar</ci>
</apply>
</apply>
<ci>T_ar</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<and/>
<apply>
<geq/>
<ci>mt</ci>
<cn cellml:units="second">0</cn>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<apply>
<minus/>
<apply>
<plus/>
<ci>t_ar</ci>
<ci>T_ar</ci>
</apply>
<ci>T</ci>
</apply>
</apply>
</apply>
</piece>
<piece>
<cn cellml:units="dimensionless">0</cn>
<apply>
<and/>
<apply>
<gt/>
<ci>mt</ci>
<apply>
<minus/>
<apply>
<plus/>
<ci>t_ar</ci>
<ci>T_ar</ci>
</apply>
<ci>T</ci>
</apply>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<ci>t_ac</ci>
</apply>
</apply>
</piece>
<piece>
<apply>
<times/>
<cn cellml:units="dimensionless">0.5</cn>
<apply>
<minus/>
<cn cellml:units="dimensionless">1</cn>
<apply>
<cos/>
<apply>
<divide/>
<apply>
<times/>
<pi/>
<apply>
<minus/>
<ci>mt</ci>
<ci>t_ac</ci>
</apply>
</apply>
<ci>T_ac</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<and/>
<apply>
<gt/>
<ci>mt</ci>
<ci>t_ac</ci>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<apply>
<plus/>
<ci>t_ac</ci>
<ci>T_ac</ci>
</apply>
</apply>
</apply>
</piece>
<piece>
<apply>
<times/>
<cn cellml:units="dimensionless">0.5</cn>
<apply>
<plus/>
<cn cellml:units="dimensionless">1</cn>
<apply>
<cos/>
<apply>
<divide/>
<apply>
<times/>
<pi/>
<apply>
<minus/>
<ci>mt</ci>
<ci>t_ar</ci>
</apply>
</apply>
<ci>T_ar</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<and/>
<apply>
<gt/>
<ci>mt</ci>
<apply>
<plus/>
<ci>t_ac</ci>
<ci>T_ac</ci>
</apply>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<ci>T</ci>
</apply>
</apply>
</piece>
</piecewise>
</apply>
<apply>
<eq/>
<ci>e_v</ci>
<piecewise>
<piece>
<apply>
<times/>
<cn cellml:units="dimensionless">0.5</cn>
<apply>
<minus/>
<cn cellml:units="dimensionless">1</cn>
<apply>
<cos/>
<apply>
<divide/>
<apply>
<times/>
<pi/>
<ci>mt</ci>
</apply>
<ci>T_vc</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<and/>
<apply>
<geq/>
<ci>mt</ci>
<cn cellml:units="second">0</cn>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<ci>T_vc</ci>
</apply>
</apply>
</piece>
<piece>
<apply>
<times/>
<cn cellml:units="dimensionless">0.5</cn>
<apply>
<plus/>
<cn cellml:units="dimensionless">1</cn>
<apply>
<cos/>
<apply>
<divide/>
<apply>
<times/>
<pi/>
<apply>
<minus/>
<ci>mt</ci>
<ci>T_vc</ci>
</apply>
</apply>
<ci>T_vr</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<and/>
<apply>
<gt/>
<ci>mt</ci>
<ci>T_vc</ci>
</apply>
<apply>
<leq/>
<ci>mt</ci>
<apply>
<plus/>
<ci>T_vc</ci>
<ci>T_vr</ci>
</apply>
</apply>
</apply>
</piece>
<piece>
<cn cellml:units="dimensionless">0</cn>
<apply>
<and/>
<apply>
<gt/>
<ci>mt</ci>
<apply>
<plus/>
<ci>T_vc</ci>
<ci>T_vr</ci>
</apply>
</apply>
<apply>
<lt/>
<ci>mt</ci>
<ci>T</ci>
</apply>
</apply>
</piece>
</piecewise>
</apply>
<!-- Constitutive Relations-->
<apply>
<eq/>
<ci>v_ra</ci>
<piecewise>
<piece>
<apply>
<times/>
<ci>CQ_trv</ci>
<apply>
<root/>
<apply>
<minus/>
<ci>u_ra</ci>
<ci>u_rv</ci>
</apply>
</apply>
</apply>
<apply>
<geq/>
<ci>u_ra</ci>
<ci>u_rv</ci>
</apply>
</piece>
<piece>
<cn cellml:units="m3_per_s">0</cn>
<apply>
<lt/>
<ci>u_ra</ci>
<ci>u_rv</ci>
</apply>
</piece>
</piecewise>
</apply>
<apply>
<eq/>
<ci>v_rv</ci>
<piecewise>
<piece>
<apply>
<times/>
<ci>CQ_puv</ci>
<apply>
<root/>
<apply>
<minus/>
<ci>u_rv</ci>
<ci>u_pulm</ci>
</apply>
</apply>
</apply>
<apply>
<geq/>
<ci>u_rv</ci>
<ci>u_pulm</ci>
</apply>
</piece>
<piece>
<cn cellml:units="m3_per_s">0</cn>
<apply>
<lt/>
<ci>u_rv</ci>
<ci>u_pulm</ci>
</apply>
</piece>
</piecewise>
</apply>
<apply>
<eq/>
<ci>v_la</ci>
<piecewise>
<piece>
<apply>
<times/>
<ci>CQ_miv</ci>
<apply>
<root/>
<apply>
<minus/>
<ci>u_la</ci>
<ci>u_lv</ci>
</apply>
</apply>
</apply>
<apply>
<geq/>
<ci>u_la</ci>
<ci>u_lv</ci>
</apply>
</piece>
<piece>
<cn cellml:units="m3_per_s">0</cn>
<apply>
<lt/>
<ci>u_la</ci>
<ci>u_lv</ci>
</apply>
</piece>
</piecewise>
</apply>
<apply>
<eq/>
<ci>v_lv</ci>
<piecewise>
<piece>
<apply>
<times/>
<ci>CQ_aov</ci>
<apply>
<root/>
<apply>
<minus/>
<ci>u_lv</ci>
<ci>u_root</ci>
</apply>
</apply>
</apply>
<apply>
<geq/>
<ci>u_lv</ci>
<ci>u_root</ci>
</apply>
</piece>
<piece>
<cn cellml:units="m3_per_s">0</cn>
<apply>
<lt/>
<ci>u_lv</ci>
<ci>u_root</ci>
</apply>
</piece>
</piecewise>
</apply>
<apply>
<eq/>
<ci>u_ra</ci>
<apply>
<times/>
<apply>
<plus/>
<apply>
<times/>
<ci>e_a</ci>
<ci>E_ra_A</ci>
</apply>
<ci>E_ra_B</ci>
</apply>
<apply>
<minus/>
<ci>q_ra</ci>
<ci>q_ra_0</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u_rv</ci>
<apply>
<times/>
<apply>
<plus/>
<apply>
<times/>
<ci>e_v</ci>
<ci>E_rv_A</ci>
</apply>
<ci>E_rv_B</ci>
</apply>
<apply>
<minus/>
<ci>q_rv</ci>
<ci>q_rv_0</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u_la</ci>
<apply>
<times/>
<apply>
<plus/>
<apply>
<times/>
<ci>e_a</ci>
<ci>E_la_A</ci>
</apply>
<ci>E_la_B</ci>
</apply>
<apply>
<minus/>
<ci>q_la</ci>
<ci>q_la_0</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u_lv</ci>
<apply>
<times/>
<apply>
<plus/>
<apply>
<times/>
<ci>e_v</ci>
<ci>E_lv_A</ci>
</apply>
<ci>E_lv_B</ci>
</apply>
<apply>
<minus/>
<ci>q_lv</ci>
<ci>q_lv_0</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>E_la_out</ci>
<apply>
<plus/>
<apply>
<times/>
<ci>e_a</ci>
<ci>E_la_A</ci>
</apply>
<ci>E_la_B</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>E_lv_out</ci>
<apply>
<plus/>
<apply>
<times/>
<ci>e_v</ci>
<ci>E_lv_A</ci>
</apply>
<ci>E_lv_B</ci>
</apply>
</apply>
<!-- Conservation Laws-->
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_ra</ci>
</apply>
<apply>
<minus/>
<apply>
<plus/>
<ci>v_sup_venacava</ci>
<ci>v_inf_venacava</ci>
</apply>
<ci>v_ra</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_rv</ci>
</apply>
<apply>
<minus/>
<ci>v_ra</ci>
<ci>v_rv</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_la</ci>
</apply>
<apply>
<minus/>
<ci>v_pulm</ci>
<ci>v_la</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_lv</ci>
</apply>
<apply>
<minus/>
<ci>v_la</ci>
<ci>v_lv</ci>
</apply>
</apply>
</math>
</component>
<!-------------- Mapping ------------//-->
<connection>
<map_components component_1="Heart" component_2="aortic_root"/>
<map_variables variable_1="u_root" variable_2="u_C"/>
<map_variables variable_1="v_lv" variable_2="v_in"/>
</connection>
<connection>
<map_components component_1="Heart" component_2="Systemic"/>
<map_variables variable_1="v_sup_venacava" variable_2="v_sup_venacava"/>
<map_variables variable_1="v_inf_venacava" variable_2="v_inf_venacava"/>
<map_variables variable_1="u_ra" variable_2="u_ra"/>
</connection>
<connection>
<map_components component_1="Heart" component_2="Pulmonary"/>
<map_variables variable_1="u_pulm" variable_2="u_pulm"/>
<map_variables variable_1="v_pulm" variable_2="v_pulm"/>
<map_variables variable_1="u_la" variable_2="u_la"/>
<map_variables variable_1="v_rv" variable_2="v_rv"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="Systemic"/>
<map_variables variable_1="C_svc" variable_2="C_svc"/>
<map_variables variable_1="C_ivc" variable_2="C_ivc"/>
<map_variables variable_1="R_svc" variable_2="R_svc"/>
<map_variables variable_1="R_ivc" variable_2="R_ivc"/>
<map_variables variable_1="I_svc" variable_2="I_svc"/>
<map_variables variable_1="I_ivc" variable_2="I_ivc"/>
</connection>
<connection>
<map_components component_1="Parameters_Pulmonary" component_2="Pulmonary"/>
<map_variables variable_1="C_pulm" variable_2="C_pulm"/>
<map_variables variable_1="R_pulm" variable_2="R_pulm"/>
<map_variables variable_1="I_pulm" variable_2="I_pulm"/>
</connection>
<connection>
<map_components component_1="Parameters_Heart" component_2="Heart"/>
<map_variables variable_1="T" variable_2="T"/>
<map_variables variable_1="t_ac" variable_2="t_ac"/>
<map_variables variable_1="t_ar" variable_2="t_ar"/>
<map_variables variable_1="T_ac" variable_2="T_ac"/>
<map_variables variable_1="T_ar" variable_2="T_ar"/>
<map_variables variable_1="T_vc" variable_2="T_vc"/>
<map_variables variable_1="T_vr" variable_2="T_vr"/>
<map_variables variable_1="CQ_trv" variable_2="CQ_trv"/>
<map_variables variable_1="CQ_puv" variable_2="CQ_puv"/>
<map_variables variable_1="CQ_miv" variable_2="CQ_miv"/>
<map_variables variable_1="CQ_aov" variable_2="CQ_aov"/>
<map_variables variable_1="E_lv_A" variable_2="E_lv_A"/>
<map_variables variable_1="E_lv_B" variable_2="E_lv_B"/>
<map_variables variable_1="E_la_A" variable_2="E_la_A"/>
<map_variables variable_1="E_la_B" variable_2="E_la_B"/>
<map_variables variable_1="E_rv_A" variable_2="E_rv_A"/>
<map_variables variable_1="E_rv_B" variable_2="E_rv_B"/>
<map_variables variable_1="E_ra_A" variable_2="E_ra_A"/>
<map_variables variable_1="E_ra_B" variable_2="E_ra_B"/>
<map_variables variable_1="q_ra_0" variable_2="q_ra_0"/>
<map_variables variable_1="q_rv_0" variable_2="q_rv_0"/>
<map_variables variable_1="q_la_0" variable_2="q_la_0"/>
<map_variables variable_1="q_lv_0" variable_2="q_lv_0"/>
</connection>
<connection>
<map_components component_1="environment" component_2="Heart"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="Systemic"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<connection>
<map_components component_1="environment" component_2="Pulmonary"/>
<map_variables variable_1="time" variable_2="t"/>
</connection>
<!-- Terminal -->
<connection>
<map_components component_1="Systemic" component_2="right_leg"/>
<map_variables variable_1="u_ivc" variable_2="u_out"/>
<map_variables variable_1="v_right_leg" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<connection>
<map_components component_1="Systemic" component_2="left_leg"/>
<map_variables variable_1="u_ivc" variable_2="u_out"/>
<map_variables variable_1="v_left_leg" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<connection>
<map_components component_1="Systemic" component_2="right_common_carotid"/>
<map_variables variable_1="u_svc" variable_2="u_out"/>
<map_variables variable_1="v_right_common_carotid" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<connection>
<map_components component_1="Systemic" component_2="left_common_carotid"/>
<map_variables variable_1="u_svc" variable_2="u_out"/>
<map_variables variable_1="v_left_common_carotid" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<connection>
<map_components component_1="Systemic" component_2="right_arm"/>
<map_variables variable_1="u_svc" variable_2="u_out"/>
<map_variables variable_1="v_right_arm" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<connection>
<map_components component_1="Systemic" component_2="left_arm"/>
<map_variables variable_1="u_svc" variable_2="u_out"/>
<map_variables variable_1="v_left_arm" variable_2="v_T"/>
<map_variables variable_1="alpha" variable_2="alpha"/>
</connection>
<!-- Map parameters-->
<connection>
<map_components component_1="Parameters_Systemic" component_2="aortic_root"/>
<map_variables variable_1="l_aortic_root" variable_2="l"/>
<map_variables variable_1="E_aortic_root" variable_2="E"/>
<map_variables variable_1="r_aortic_root" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="ascending_aorta"/>
<map_variables variable_1="l_ascending_aorta" variable_2="l"/>
<map_variables variable_1="E_ascending_aorta" variable_2="E"/>
<map_variables variable_1="r_ascending_aorta" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="aortic_arch_I"/>
<map_variables variable_1="l_aortic_arch_I" variable_2="l"/>
<map_variables variable_1="E_aortic_arch_I" variable_2="E"/>
<map_variables variable_1="r_aortic_arch_I" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="aortic_arch_II"/>
<map_variables variable_1="l_aortic_arch_II" variable_2="l"/>
<map_variables variable_1="E_aortic_arch_II" variable_2="E"/>
<map_variables variable_1="r_aortic_arch_II" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="brachiocephalic"/>
<map_variables variable_1="l_brachiocephalic" variable_2="l"/>
<map_variables variable_1="E_brachiocephalic" variable_2="E"/>
<map_variables variable_1="r_brachiocephalic" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="descending_aorta"/>
<map_variables variable_1="l_descending_aorta" variable_2="l"/>
<map_variables variable_1="E_descending_aorta" variable_2="E"/>
<map_variables variable_1="r_descending_aorta" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="right_common_carotid"/>
<map_variables variable_1="l_right_common_carotid" variable_2="l"/>
<map_variables variable_1="E_right_common_carotid" variable_2="E"/>
<map_variables variable_1="r_right_common_carotid" variable_2="r"/>
<map_variables variable_1="R_T_head" variable_2="R_T"/>
<map_variables variable_1="C_T_head" variable_2="C_T"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="left_common_carotid"/>
<map_variables variable_1="l_left_common_carotid" variable_2="l"/>
<map_variables variable_1="E_left_common_carotid" variable_2="E"/>
<map_variables variable_1="r_left_common_carotid" variable_2="r"/>
<map_variables variable_1="R_T_head" variable_2="R_T"/>
<map_variables variable_1="C_T_head" variable_2="C_T"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="right_subclavian"/>
<map_variables variable_1="l_right_subclavian" variable_2="l"/>
<map_variables variable_1="E_right_subclavian" variable_2="E"/>
<map_variables variable_1="r_right_subclavian" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="left_subclavian"/>
<map_variables variable_1="l_left_subclavian" variable_2="l"/>
<map_variables variable_1="E_left_subclavian" variable_2="E"/>
<map_variables variable_1="r_left_subclavian" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="right_arm"/>
<map_variables variable_1="l_right_arm" variable_2="l"/>
<map_variables variable_1="E_right_arm" variable_2="E"/>
<map_variables variable_1="r_right_arm" variable_2="r"/>
<map_variables variable_1="R_T_arm" variable_2="R_T"/>
<map_variables variable_1="C_T_arm" variable_2="C_T"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="left_arm"/>
<map_variables variable_1="l_left_arm" variable_2="l"/>
<map_variables variable_1="E_left_arm" variable_2="E"/>
<map_variables variable_1="r_left_arm" variable_2="r"/>
<map_variables variable_1="R_T_arm" variable_2="R_T"/>
<map_variables variable_1="C_T_arm" variable_2="C_T"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="abdominal_aorta"/>
<map_variables variable_1="l_abdominal_aorta" variable_2="l"/>
<map_variables variable_1="E_abdominal_aorta" variable_2="E"/>
<map_variables variable_1="r_abdominal_aorta" variable_2="r"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="right_leg"/>
<map_variables variable_1="l_right_leg" variable_2="l"/>
<map_variables variable_1="E_right_leg" variable_2="E"/>
<map_variables variable_1="r_right_leg" variable_2="r"/>
<map_variables variable_1="R_T_leg" variable_2="R_T"/>
<map_variables variable_1="C_T_leg" variable_2="C_T"/>
</connection>
<connection>
<map_components component_1="Parameters_Systemic" component_2="left_leg"/>
<map_variables variable_1="l_left_leg" variable_2="l"/>
<map_variables variable_1="E_left_leg" variable_2="E"/>
<map_variables variable_1="r_left_leg" variable_2="r"/>
<map_variables variable_1="R_T_leg" variable_2="R_T"/>
<map_variables variable_1="C_T_leg" variable_2="C_T"/>
</connection>
<!-- Map modules-->
<connection>
<map_components component_1="aortic_root" component_2="ascending_aorta"/>
<map_variables variable_1="v_out" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="ascending_aorta" component_2="aortic_arch_I"/>
<map_variables variable_1="v_out_1" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="ascending_aorta" component_2="brachiocephalic"/>
<map_variables variable_1="v_out_2" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="aortic_arch_I" component_2="aortic_arch_II"/>
<map_variables variable_1="v_out_1" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="aortic_arch_I" component_2="left_common_carotid"/>
<map_variables variable_1="v_out_2" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="aortic_arch_II" component_2="descending_aorta"/>
<map_variables variable_1="v_out_1" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="aortic_arch_II" component_2="left_subclavian"/>
<map_variables variable_1="v_out_2" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="brachiocephalic" component_2="right_subclavian"/>
<map_variables variable_1="v_out_1" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="brachiocephalic" component_2="right_common_carotid"/>
<map_variables variable_1="v_out_2" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="right_subclavian" component_2="right_arm"/>
<map_variables variable_1="v_out" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="left_subclavian" component_2="left_arm"/>
<map_variables variable_1="v_out" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="descending_aorta" component_2="abdominal_aorta"/>
<map_variables variable_1="v_out" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="abdominal_aorta" component_2="right_leg"/>
<map_variables variable_1="v_out_1" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<connection>
<map_components component_1="abdominal_aorta" component_2="left_leg"/>
<map_variables variable_1="v_out_2" variable_2="v"/>
<map_variables variable_1="u" variable_2="u_in"/>
</connection>
<!-- Map module and output-->
<connection>
<map_components component_1="aortic_root_output" component_2="aortic_root"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="ascending_aorta_output" component_2="ascending_aorta"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="aortic_arch_I_output" component_2="aortic_arch_I"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="aortic_arch_II_output" component_2="aortic_arch_II"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="brachiocephalic_output" component_2="brachiocephalic"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="descending_aorta_output" component_2="descending_aorta"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="right_common_carotid_output" component_2="right_common_carotid"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="left_common_carotid_output" component_2="left_common_carotid"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="right_subclavian_output" component_2="right_subclavian"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="left_subclavian_output" component_2="left_subclavian"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="abdominal_aorta_output" component_2="abdominal_aorta"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="right_arm_output" component_2="right_arm"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="left_arm_output" component_2="left_arm"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="right_leg_output" component_2="right_leg"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<connection>
<map_components component_1="left_leg_output" component_2="left_leg"/>
<map_variables variable_1="u" variable_2="u"/>
<map_variables variable_1="v" variable_2="v"/>
</connection>
<!-- Output-->
<component name="aortic_root_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="ascending_aorta_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="aortic_arch_I_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="aortic_arch_II_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="brachiocephalic_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="descending_aorta_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="right_common_carotid_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="left_common_carotid_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="right_subclavian_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="left_subclavian_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="abdominal_aorta_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="right_arm_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="left_arm_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="right_leg_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
<component name="left_leg_output">
<variable name="u" public_interface="in" units="J_per_m3"/>
<variable name="v" public_interface="in" units="m3_per_s"/>
</component>
</model>