Location: FTU Heart @ f52079255119 / main_cv7_diodeValves.cellml

Author:
Soroush <ssaf006@aucklanduni.ac.nz>
Date:
2021-09-23 17:53:12+12:00
Desc:
Upgraded the FTU model to the full version.
Permanent Source URI:
https://models.physiomeproject.org/workspace/70b/rawfile/f5207925511951ca0e7c716e2586a85f2ebc5294/main_cv7_diodeValves.cellml

<?xml version='1.0' encoding='UTF-8'?>
<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 xlink:href="Units.cellml">
        <units name="L_per_s" units_ref="L_per_s"/>
        <units name="L_per_s2" units_ref="L_per_s2"/>
        <units name="L2_per_J" units_ref="L2_per_J"/>
        <units name="J_per_L" units_ref="J_per_L"/>
        <units name="Js_per_L2" units_ref="Js_per_L2"/>
        <units name="Js2_per_L2" units_ref="Js2_per_L2"/>
        <units name="J_per_s" units_ref="J_per_s"/>
        <units name="per_s_L" units_ref="per_s_L"/>
        <units name="per_s" units_ref="per_s"/>
        <units name="per_s2" units_ref="per_s2"/>
        <units name="per_s2_p" units_ref="per_s2_p"/>
        <units name="J_per_L2" units_ref="J_per_L2"/>
        <units name="Js_per_L" units_ref="Js_per_L"/>
        <units name="UnitValve" units_ref="UnitValve"/>
    </import>
    <import xlink:href="Parameters_cv7.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>
    <component name="environment">
        <variable name="time" public_interface="out" units="second"/>
    </component>
    <!--&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; Systemic Circulation &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;//-->
    <component name="Systemic">
        <variable name="t" private_interface="out" public_interface="in" units="second"/>
        <!-- Constitutive Parameters-->
        <variable name="C_AA" private_interface="in" units="L2_per_J"/>
        <variable name="C_CB" private_interface="in" units="L2_per_J"/>
        <variable name="C_VC" private_interface="in" units="L2_per_J"/>
        <variable name="R_AA" private_interface="in" units="Js_per_L2"/>
        <variable name="R_CB" private_interface="in" units="Js_per_L2"/>
        <variable name="R_VC" private_interface="in" units="Js_per_L2"/>
        <variable name="I_AA" private_interface="in" units="Js2_per_L2"/>
        <variable name="I_CB" private_interface="in" units="Js2_per_L2"/>
        <!-- State Variables-->
        <variable name="v_AV" public_interface="in" units="L_per_s"/>
        <variable name="u_RA" public_interface="in" units="J_per_L"/>
        <variable initial_value="0" name="u_AA" public_interface="out" units="J_per_L"/>
        <variable initial_value="0" name="u_CB" units="J_per_L"/>
        <variable initial_value="0.0" name="u_VC" units="J_per_L"/>
        <variable initial_value="0.0" name="v_AA" units="L_per_s"/>
        <variable initial_value="0.0" name="v_CB" units="L_per_s"/>
        <variable name="v_VC" public_interface="out" units="L_per_s"/>
        <!-- Constitutive Relations-->
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_AA</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_AV</ci>
                        <ci>v_AA</ci>
                    </apply>
                    <ci>C_AA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_CB</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_AA</ci>
                        <ci>v_CB</ci>
                    </apply>
                    <ci>C_CB</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_VC</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_CB</ci>
                        <ci>v_VC</ci>
                    </apply>
                    <ci>C_VC</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>v_AA</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>u_AA</ci>
                            <ci>u_CB</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>v_AA</ci>
                            <ci>R_AA</ci>
                        </apply>
                    </apply>
                    <ci>I_AA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>v_CB</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>u_CB</ci>
                            <ci>u_VC</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>v_CB</ci>
                            <ci>R_CB</ci>
                        </apply>
                    </apply>
                    <ci>I_CB</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_VC</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_VC</ci>
                        <ci>u_RA</ci>
                    </apply>
                    <ci>R_VC</ci>
                </apply>
            </apply>
        </math>
    </component>
    <!--&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; Pulmonary Circulation &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;//-->
    <component name="Pulmonary">
        <variable name="t" public_interface="in" units="second"/>
        <!-- Constitutive Parameters-->
        <variable name="C_PA" private_interface="in" units="L2_per_J"/>
        <variable name="C_PC" private_interface="in" units="L2_per_J"/>
        <variable name="C_PVs" private_interface="in" units="L2_per_J"/>
        <variable name="R_PA" private_interface="in" units="Js_per_L2"/>
        <variable name="R_PC" private_interface="in" units="Js_per_L2"/>
        <variable name="R_PVs" private_interface="in" units="Js_per_L2"/>
        <variable name="I_PA" private_interface="in" units="Js2_per_L2"/>
        <variable name="I_PC" private_interface="in" units="Js2_per_L2"/>
        <!-- State Variables-->
        <variable name="v_PV" public_interface="in" units="L_per_s"/>
        <variable name="u_LA" public_interface="in" units="J_per_L"/>
        <variable initial_value="4.0" name="u_PA" public_interface="out" units="J_per_L"/>
        <variable initial_value="4.0" name="u_PC" units="J_per_L"/>
        <variable initial_value="0.0" name="u_PVs" units="J_per_L"/>
        <variable initial_value="0.0" name="v_PA" units="L_per_s"/>
        <variable initial_value="0.0" name="v_PC" units="L_per_s"/>
        <variable name="v_PVs" public_interface="out" units="L_per_s"/>
        <!-- Constitutive Relations-->
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_PA</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_PV</ci>
                        <ci>v_PA</ci>
                    </apply>
                    <ci>C_PA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_PC</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_PA</ci>
                        <ci>v_PC</ci>
                    </apply>
                    <ci>C_PC</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>u_PVs</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_PC</ci>
                        <ci>v_PVs</ci>
                    </apply>
                    <ci>C_PVs</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>v_PA</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>u_PA</ci>
                            <ci>u_PC</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>v_PA</ci>
                            <ci>R_PA</ci>
                        </apply>
                    </apply>
                    <ci>I_PA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>v_PC</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>u_PC</ci>
                            <ci>u_PVs</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>v_PC</ci>
                            <ci>R_PC</ci>
                        </apply>
                    </apply>
                    <ci>I_PC</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_PVs</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_PVs</ci>
                        <ci>u_LA</ci>
                    </apply>
                    <ci>R_PVs</ci>
                </apply>
            </apply>
        </math>
    </component>
    <!--&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; Heart &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;//-->
    <component name="Heart">
        <variable name="t" public_interface="in" units="second"/>
        <!-- Constitutive Parameters-->
        <variable name="mt" units="second"/>
        <variable name="mta" units="second"/>
        <variable name="T" private_interface="in" units="second"/>
        <variable name="CQ_TV" private_interface="in" units="UnitValve"/>
        <variable name="CQ_PV" private_interface="in" units="UnitValve"/>
        <variable name="CQ_MV" private_interface="in" units="UnitValve"/>
        <variable name="CQ_AV" private_interface="in" units="UnitValve"/>
        <variable name="q_RA_0" private_interface="in" units="litre"/>
        <variable name="q_RV_0" private_interface="in" units="litre"/>
        <variable name="q_LA_0" private_interface="in" units="litre"/>
        <variable name="q_LV_0" private_interface="in" units="litre"/>
        <variable name="E_LV_max" private_interface="in" units="J_per_L2"/>
        <variable name="E_LV_min" private_interface="in" units="J_per_L2"/>
        <variable name="E_LA_max" private_interface="in" units="J_per_L2"/>
        <variable name="E_LA_min" private_interface="in" units="J_per_L2"/>
        <variable name="E_RV_max" private_interface="in" units="J_per_L2"/>
        <variable name="E_RV_min" private_interface="in" units="J_per_L2"/>
        <variable name="E_RA_max" private_interface="in" units="J_per_L2"/>
        <variable name="E_RA_min" private_interface="in" units="J_per_L2"/>
        <variable name="tau_1_LV" private_interface="in" units="dimensionless"/>
        <variable name="tau_2_LV" private_interface="in" units="dimensionless"/>
        <variable name="tau_1_LA" private_interface="in" units="dimensionless"/>
        <variable name="tau_2_LA" private_interface="in" units="dimensionless"/>
        <variable name="tau_1_RV" private_interface="in" units="dimensionless"/>
        <variable name="tau_2_RV" private_interface="in" units="dimensionless"/>
        <variable name="tau_1_RA" private_interface="in" units="dimensionless"/>
        <variable name="tau_2_RA" private_interface="in" units="dimensionless"/>
        <variable name="m_1_LV" private_interface="in" units="dimensionless"/>
        <variable name="m_2_LV" private_interface="in" units="dimensionless"/>
        <variable name="m_1_LA" private_interface="in" units="dimensionless"/>
        <variable name="m_2_LA" private_interface="in" units="dimensionless"/>
        <variable name="m_1_RV" private_interface="in" units="dimensionless"/>
        <variable name="m_2_RV" private_interface="in" units="dimensionless"/>
        <variable name="m_1_RA" private_interface="in" units="dimensionless"/>
        <variable name="m_2_RA" private_interface="in" units="dimensionless"/>
        <variable name="g_1_LV" units="dimensionless"/>
        <variable name="g_2_LV" units="dimensionless"/>
        <variable name="g_1_LA" units="dimensionless"/>
        <variable name="g_2_LA" units="dimensionless"/>
        <variable name="g_1_RV" units="dimensionless"/>
        <variable name="g_2_RV" units="dimensionless"/>
        <variable name="g_1_RA" units="dimensionless"/>
        <variable name="g_2_RA" units="dimensionless"/>
        <variable name="t_onset_a" private_interface="in" units="dimensionless"/>
        <variable name="E_LV" units="J_per_L2"/>
        <variable name="E_LA" units="J_per_L2"/>
        <variable name="E_RV" units="J_per_L2"/>
        <variable name="E_RA" units="J_per_L2"/>
        <variable name="H_LA" units="dimensionless"/>
        <variable name="H_LV" units="dimensionless"/>
        <variable name="H_RA" units="dimensionless"/>
        <variable name="H_RV" units="dimensionless"/>
        <!-- State Variables-->
        <variable name="AR_TV" units="dimensionless"/>
        <variable name="AR_PV" units="dimensionless"/>
        <variable name="AR_MV" units="dimensionless"/>
        <variable name="AR_AV" units="dimensionless"/>
        <variable name="u_RA" public_interface="out" units="J_per_L"/>
        <variable name="u_RV" units="J_per_L"/>
        <variable name="u_LA" public_interface="out" units="J_per_L"/>
        <variable initial_value="0.0" name="u_LV" units="J_per_L"/>
        <variable name="u_AA" public_interface="in" units="J_per_L"/>
        <variable name="u_PA" public_interface="in" units="J_per_L"/>
        <variable name="v_TV" units="L_per_s"/>
        <variable name="v_PV" public_interface="out" units="L_per_s"/>
        <variable name="v_MV" units="L_per_s"/>
        <variable name="v_AV" public_interface="out" units="L_per_s"/>
        <variable name="v_VC" public_interface="in" units="L_per_s"/>
        <variable name="v_PVs" public_interface="in" units="L_per_s"/>
        <variable initial_value="0.500" name="q_LV" units="litre"/>
        <variable initial_value="0.500" name="q_RV" units="litre"/>
        <variable initial_value="0.02" name="q_LA" units="litre"/>
        <variable initial_value="0.02" name="q_RA" units="litre"/>
        <variable name="To" units="J_per_L"/>
        <variable initial_value="0.1" name="To_pk" units="dimensionless"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>H_LV</ci>
                <apply>
                    <divide/>
                    <apply>
                        <times/>
                        <apply>
                            <divide/>
                            <apply>
                                <power/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_LV</ci>
                                        <ci>tau_2_LV</ci>
                                    </apply>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_LV</ci>
                                        <ci>tau_1_LV</ci>
                                    </apply>
                                </apply>
                                <ci>m_1_LV</ci>
                            </apply>
                            <apply>
                                <plus/>
                                <apply>
                                    <power/>
                                    <apply>
                                        <divide/>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_LV</ci>
                                            <ci>tau_2_LV</ci>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_LV</ci>
                                            <ci>tau_1_LV</ci>
                                        </apply>
                                    </apply>
                                    <ci>m_1_LV</ci>
                                </apply>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                    <apply>
                        <plus/>
                        <apply>
                            <power/>
                            <apply>
                                <divide/>
                                <apply>
                                    <plus/>
                                    <ci>tau_1_LV</ci>
                                    <ci>tau_2_LV</ci>
                                </apply>
                                <apply>
                                    <plus/>
                                    <ci>tau_2_LV</ci>
                                    <ci>tau_2_LV</ci>
                                </apply>
                            </apply>
                            <ci>m_2_LV</ci>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>H_LA</ci>
                <apply>
                    <divide/>
                    <apply>
                        <times/>
                        <apply>
                            <divide/>
                            <apply>
                                <power/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_LA</ci>
                                        <ci>tau_2_LA</ci>
                                    </apply>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_LA</ci>
                                        <ci>tau_1_LA</ci>
                                    </apply>
                                </apply>
                                <ci>m_1_LA</ci>
                            </apply>
                            <apply>
                                <plus/>
                                <apply>
                                    <power/>
                                    <apply>
                                        <divide/>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_LA</ci>
                                            <ci>tau_2_LA</ci>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_LA</ci>
                                            <ci>tau_1_LA</ci>
                                        </apply>
                                    </apply>
                                    <ci>m_1_LA</ci>
                                </apply>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                    <apply>
                        <plus/>
                        <apply>
                            <power/>
                            <apply>
                                <divide/>
                                <apply>
                                    <plus/>
                                    <ci>tau_1_LA</ci>
                                    <ci>tau_2_LA</ci>
                                </apply>
                                <apply>
                                    <plus/>
                                    <ci>tau_2_LA</ci>
                                    <ci>tau_2_LA</ci>
                                </apply>
                            </apply>
                            <ci>m_2_LA</ci>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>H_RV</ci>
                <apply>
                    <divide/>
                    <apply>
                        <times/>
                        <apply>
                            <divide/>
                            <apply>
                                <power/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_RV</ci>
                                        <ci>tau_2_RV</ci>
                                    </apply>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_RV</ci>
                                        <ci>tau_1_RV</ci>
                                    </apply>
                                </apply>
                                <ci>m_1_RV</ci>
                            </apply>
                            <apply>
                                <plus/>
                                <apply>
                                    <power/>
                                    <apply>
                                        <divide/>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_RV</ci>
                                            <ci>tau_2_RV</ci>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_RV</ci>
                                            <ci>tau_1_RV</ci>
                                        </apply>
                                    </apply>
                                    <ci>m_1_RV</ci>
                                </apply>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                    <apply>
                        <plus/>
                        <apply>
                            <power/>
                            <apply>
                                <divide/>
                                <apply>
                                    <plus/>
                                    <ci>tau_1_RV</ci>
                                    <ci>tau_2_RV</ci>
                                </apply>
                                <apply>
                                    <plus/>
                                    <ci>tau_2_RV</ci>
                                    <ci>tau_2_RV</ci>
                                </apply>
                            </apply>
                            <ci>m_2_RV</ci>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>H_RA</ci>
                <apply>
                    <divide/>
                    <apply>
                        <times/>
                        <apply>
                            <divide/>
                            <apply>
                                <power/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_RA</ci>
                                        <ci>tau_2_RA</ci>
                                    </apply>
                                    <apply>
                                        <plus/>
                                        <ci>tau_1_RA</ci>
                                        <ci>tau_1_RA</ci>
                                    </apply>
                                </apply>
                                <ci>m_1_RA</ci>
                            </apply>
                            <apply>
                                <plus/>
                                <apply>
                                    <power/>
                                    <apply>
                                        <divide/>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_RA</ci>
                                            <ci>tau_2_RA</ci>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>tau_1_RA</ci>
                                            <ci>tau_1_RA</ci>
                                        </apply>
                                    </apply>
                                    <ci>m_1_RA</ci>
                                </apply>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                    <apply>
                        <plus/>
                        <apply>
                            <power/>
                            <apply>
                                <divide/>
                                <apply>
                                    <plus/>
                                    <ci>tau_1_RA</ci>
                                    <ci>tau_2_RA</ci>
                                </apply>
                                <apply>
                                    <plus/>
                                    <ci>tau_2_RA</ci>
                                    <ci>tau_2_RA</ci>
                                </apply>
                            </apply>
                            <ci>m_2_RA</ci>
                        </apply>
                        <cn cellml:units="dimensionless">1</cn>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>E_LV</ci>
                <apply>
                    <plus/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <apply>
                                <minus/>
                                <ci>E_LV_max</ci>
                                <ci>E_LV_min</ci>
                            </apply>
                            <ci>g_1_LV</ci>
                        </apply>
                        <apply>
                            <times/>
                            <apply>
                                <plus/>
                                <ci>g_1_LV</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <apply>
                                <plus/>
                                <ci>g_2_LV</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <ci>H_LV</ci>
                        </apply>
                    </apply>
                    <ci>E_LV_min</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_1_LV</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mt</ci>
                        <apply>
                            <times/>
                            <ci>tau_1_LV</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_1_LV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_2_LV</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mt</ci>
                        <apply>
                            <times/>
                            <ci>tau_2_LV</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_2_LV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>E_LA</ci>
                <apply>
                    <plus/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <apply>
                                <minus/>
                                <ci>E_LA_max</ci>
                                <ci>E_LA_min</ci>
                            </apply>
                            <ci>g_1_LA</ci>
                        </apply>
                        <apply>
                            <times/>
                            <apply>
                                <plus/>
                                <ci>g_1_LA</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <apply>
                                <plus/>
                                <ci>g_2_LA</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <ci>H_LA</ci>
                        </apply>
                    </apply>
                    <ci>E_LA_min</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_1_LA</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mta</ci>
                        <apply>
                            <times/>
                            <ci>tau_1_LA</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_1_LA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_2_LA</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mta</ci>
                        <apply>
                            <times/>
                            <ci>tau_2_LA</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_2_LA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>E_RV</ci>
                <apply>
                    <plus/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <apply>
                                <minus/>
                                <ci>E_RV_max</ci>
                                <ci>E_RV_min</ci>
                            </apply>
                            <ci>g_1_RV</ci>
                        </apply>
                        <apply>
                            <times/>
                            <apply>
                                <plus/>
                                <ci>g_1_RV</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <apply>
                                <plus/>
                                <ci>g_2_RV</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <ci>H_RV</ci>
                        </apply>
                    </apply>
                    <ci>E_RV_min</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_1_RV</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mt</ci>
                        <apply>
                            <times/>
                            <ci>tau_1_RV</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_1_RV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_2_RV</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mt</ci>
                        <apply>
                            <times/>
                            <ci>tau_2_RV</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_2_RV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>E_RA</ci>
                <apply>
                    <plus/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <apply>
                                <minus/>
                                <ci>E_RA_max</ci>
                                <ci>E_RA_min</ci>
                            </apply>
                            <ci>g_1_RA</ci>
                        </apply>
                        <apply>
                            <times/>
                            <apply>
                                <plus/>
                                <ci>g_1_RA</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <apply>
                                <plus/>
                                <ci>g_2_RA</ci>
                                <cn cellml:units="dimensionless">1</cn>
                            </apply>
                            <ci>H_RA</ci>
                        </apply>
                    </apply>
                    <ci>E_RA_min</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_1_RA</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mta</ci>
                        <apply>
                            <times/>
                            <ci>tau_1_RA</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_1_RA</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>g_2_RA</ci>
                <apply>
                    <power/>
                    <apply>
                        <divide/>
                        <ci>mta</ci>
                        <apply>
                            <times/>
                            <ci>tau_2_RA</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <ci>m_2_RA</ci>
                </apply>
            </apply>
            <!-- Elastance Functions-->
            <apply>
                <eq/>
                <ci>To</ci>
                <apply>
                    <times/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <cn cellml:units="dimensionless">100</cn>
                            <apply>
                                <exp/>
                                <cn cellml:units="dimensionless">0.5</cn>
                            </apply>
                            <ci>mt</ci>
                        </apply>
                        <ci>To_pk</ci>
                    </apply>
                    <apply>
                        <exp/>
                        <apply>
                            <times/>
                            <apply>
                                <minus/>
                                <cn cellml:units="dimensionless">0.5</cn>
                            </apply>
                            <apply>
                                <power/>
                                <apply>
                                    <divide/>
                                    <ci>mt</ci>
                                    <ci>To_pk</ci>
                                </apply>
                                <cn cellml:units="dimensionless">2</cn>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <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>mta</ci>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>t</ci>
                        <apply>
                            <times/>
                            <ci>t_onset_a</ci>
                            <ci>T</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <ci>T</ci>
                        <apply>
                            <floor/>
                            <apply>
                                <divide/>
                                <apply>
                                    <minus/>
                                    <ci>t</ci>
                                    <apply>
                                        <times/>
                                        <ci>t_onset_a</ci>
                                        <ci>T</ci>
                                    </apply>
                                </apply>
                                <ci>T</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <!-- Constitutive Relations-->
            <apply>
                <eq/>
                <ci>AR_TV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <geq/>
                            <ci>u_RA</ci>
                            <ci>u_RV</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="dimensionless">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_RA</ci>
                            <ci>u_RV</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>AR_PV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <geq/>
                            <ci>u_RV</ci>
                            <ci>u_PA</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="dimensionless">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_RV</ci>
                            <ci>u_PA</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>AR_MV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <geq/>
                            <ci>u_LA</ci>
                            <ci>u_LV</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="dimensionless">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_LA</ci>
                            <ci>u_LV</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>AR_AV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <geq/>
                            <ci>u_LV</ci>
                            <ci>u_AA</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="dimensionless">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_LV</ci>
                            <ci>u_AA</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_TV</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>CQ_TV</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="L_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_RA</ci>
                            <ci>u_RV</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_PV</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>CQ_PV</ci>
                            <apply>
                                <root/>
                                <apply>
                                    <minus/>
                                    <ci>u_RV</ci>
                                    <ci>u_PA</ci>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <geq/>
                            <ci>u_RV</ci>
                            <ci>u_PA</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="L_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_RV</ci>
                            <ci>u_PA</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_MV</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>CQ_MV</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="L_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_LA</ci>
                            <ci>u_LV</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_AV</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>CQ_AV</ci>
                            <apply>
                                <root/>
                                <apply>
                                    <minus/>
                                    <ci>u_LV</ci>
                                    <ci>u_AA</ci>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <geq/>
                            <ci>u_LV</ci>
                            <ci>u_AA</ci>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="L_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_LV</ci>
                            <ci>u_AA</ci>
                        </apply>
                    </piece>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>u_RA</ci>
                <apply>
                    <times/>
                    <ci>E_RA</ci>
                    <apply>
                        <minus/>
                        <ci>q_RA</ci>
                        <ci>q_RA_0</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_RV</ci>
                <apply>
                    <times/>
                    <ci>E_RV</ci>
                    <apply>
                        <minus/>
                        <ci>q_RV</ci>
                        <ci>q_RV_0</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_LA</ci>
                <apply>
                    <times/>
                    <ci>E_LA</ci>
                    <apply>
                        <minus/>
                        <ci>q_LA</ci>
                        <ci>q_LA_0</ci>
                    </apply>
                </apply>
            </apply>
            <!--        u_LV = E_LV*(q_LV-q_LV_0);-->
            <!-- Conservation Laws-->
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RA</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_VC</ci>
                    <ci>v_TV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RV</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_TV</ci>
                    <ci>v_PV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_LA</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_PVs</ci>
                    <ci>v_MV</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_LV</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_MV</ci>
                    <ci>v_AV</ci>
                </apply>
            </apply>
        </math>
    </component>
    <!--&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; Mapping &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;//-->
    <connection>
        <map_components component_1="Heart" component_2="Systemic"/>
        <map_variables variable_1="v_VC" variable_2="v_VC"/>
        <map_variables variable_1="u_RA" variable_2="u_RA"/>
        <map_variables variable_1="u_AA" variable_2="u_AA"/>
        <map_variables variable_1="v_AV" variable_2="v_AV"/>
    </connection>
    <connection>
        <map_components component_1="Heart" component_2="Pulmonary"/>
        <map_variables variable_1="u_PA" variable_2="u_PA"/>
        <map_variables variable_1="v_PVs" variable_2="v_PVs"/>
        <map_variables variable_1="u_LA" variable_2="u_LA"/>
        <map_variables variable_1="v_PV" variable_2="v_PV"/>
    </connection>
    <connection>
        <map_components component_1="Parameters_Systemic" component_2="Systemic"/>
        <map_variables variable_1="C_AA" variable_2="C_AA"/>
        <map_variables variable_1="C_CB" variable_2="C_CB"/>
        <map_variables variable_1="C_VC" variable_2="C_VC"/>
        <map_variables variable_1="R_AA" variable_2="R_AA"/>
        <map_variables variable_1="R_CB" variable_2="R_CB"/>
        <map_variables variable_1="R_VC" variable_2="R_VC"/>
        <map_variables variable_1="I_AA" variable_2="I_AA"/>
        <map_variables variable_1="I_CB" variable_2="I_CB"/>
    </connection>
    <connection>
        <map_components component_1="Parameters_Pulmonary" component_2="Pulmonary"/>
        <map_variables variable_1="C_PA" variable_2="C_PA"/>
        <map_variables variable_1="C_PC" variable_2="C_PC"/>
        <map_variables variable_1="C_PVs" variable_2="C_PVs"/>
        <map_variables variable_1="R_PA" variable_2="R_PA"/>
        <map_variables variable_1="R_PC" variable_2="R_PC"/>
        <map_variables variable_1="R_PVs" variable_2="R_PVs"/>
        <map_variables variable_1="I_PA" variable_2="I_PA"/>
        <map_variables variable_1="I_PC" variable_2="I_PC"/>
    </connection>
    <connection>
        <map_components component_1="Parameters_Heart" component_2="Heart"/>
        <map_variables variable_1="T" variable_2="T"/>
        <map_variables variable_1="CQ_TV" variable_2="CQ_TV"/>
        <map_variables variable_1="CQ_PV" variable_2="CQ_PV"/>
        <map_variables variable_1="CQ_MV" variable_2="CQ_MV"/>
        <map_variables variable_1="CQ_AV" variable_2="CQ_AV"/>
        <map_variables variable_1="E_LV_max" variable_2="E_LV_max"/>
        <map_variables variable_1="E_LV_min" variable_2="E_LV_min"/>
        <map_variables variable_1="E_LA_max" variable_2="E_LA_max"/>
        <map_variables variable_1="E_LA_min" variable_2="E_LA_min"/>
        <map_variables variable_1="E_RV_max" variable_2="E_RV_max"/>
        <map_variables variable_1="E_RV_min" variable_2="E_RV_min"/>
        <map_variables variable_1="E_RA_max" variable_2="E_RA_max"/>
        <map_variables variable_1="E_RA_min" variable_2="E_RA_min"/>
        <map_variables variable_1="tau_1_LV" variable_2="tau_1_LV"/>
        <map_variables variable_1="tau_2_LV" variable_2="tau_2_LV"/>
        <map_variables variable_1="tau_1_LA" variable_2="tau_1_LA"/>
        <map_variables variable_1="tau_2_LA" variable_2="tau_2_LA"/>
        <map_variables variable_1="tau_1_RV" variable_2="tau_1_RV"/>
        <map_variables variable_1="tau_2_RV" variable_2="tau_2_RV"/>
        <map_variables variable_1="tau_1_RA" variable_2="tau_1_RA"/>
        <map_variables variable_1="tau_2_RA" variable_2="tau_2_RA"/>
        <map_variables variable_1="m_1_LV" variable_2="m_1_LV"/>
        <map_variables variable_1="m_2_LV" variable_2="m_2_LV"/>
        <map_variables variable_1="m_1_LA" variable_2="m_1_LA"/>
        <map_variables variable_1="m_2_LA" variable_2="m_2_LA"/>
        <map_variables variable_1="m_1_RV" variable_2="m_1_RV"/>
        <map_variables variable_1="m_2_RV" variable_2="m_2_RV"/>
        <map_variables variable_1="m_1_RA" variable_2="m_1_RA"/>
        <map_variables variable_1="m_2_RA" variable_2="m_2_RA"/>
        <map_variables variable_1="t_onset_a" variable_2="t_onset_a"/>
        <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>
    <!--//////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////// Time Mapping /////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////-->
    <group>
        <relationship_ref relationship="encapsulation"/>
        <component_ref component="Heart">
            <component_ref component="Parameters_Heart"/>
        </component_ref>
    </group>
    <group>
        <relationship_ref relationship="encapsulation"/>
        <component_ref component="Pulmonary">
            <component_ref component="Parameters_Pulmonary"/>
        </component_ref>
    </group>
    <group>
        <relationship_ref relationship="encapsulation"/>
        <component_ref component="Systemic">
            <component_ref component="Parameters_Systemic"/>
        </component_ref>
    </group>
</model>