Location: Cardiovascular model with the feedback loops @ 2cd103df9f65 / models / cardiovascular.cellml

Author:
Weiwei Ai <wai484@aucklanduni.ac.nz>
Date:
2024-07-09 08:43:40+12:00
Desc:
make the default K_Cai 0.2; fix the units;
Permanent Source URI:
https://models.fieldml.org/workspace/b6e/rawfile/2cd103df9f6526fb723e5c019a7c406012d5a274/models/cardiovascular.cellml

<?xml version='1.0' encoding='UTF-8'?>
<model name="cardiovascular" 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">
    <!-- Units-->
    <import xlink:href="./units.cellml">
        <units name="mmHg" units_ref="mmHg"/>
        <units name="mL" units_ref="mL"/>
        <units name="per_mL" units_ref="per_mL"/>
        <units name="s_per_mL" units_ref="s_per_mL"/>
        <units name="mL_per_s" units_ref="mL_per_s"/>
        <units name="mL_per_mmHg" units_ref="mL_per_mmHg"/>
        <units name="mmHg_s_per_mL" units_ref="mmHg_s_per_mL"/>
        <units name="mmHg_per_mL" units_ref="mmHg_per_mL"/>
        <units name="mmHg_s2_per_mL" units_ref="mmHg_s2_per_mL"/>
        <units name="s2" units_ref="s2"/>
        <units name="mmHg_per_s" units_ref="mmHg_per_s"/>
    </import>
    <component name="activation">
        <variable name="t" public_interface="in" units="second"/>
        <variable name="T" public_interface="out" units="second"/>
        <variable name="T_0" public_interface="in" units="second"/>
        <variable initial_value="0.4" name="T_sys_0" units="second"/>
        <variable initial_value="0.075" name="k_sys" units="s2"/>
        <variable name="T_sys" units="second"/>
        <variable name="u" public_interface="out" units="dimensionless"/>
        <variable name="phi" public_interface="out" units="dimensionless"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>u</ci>
                <apply>
                    <minus/>
                    <apply>
                        <divide/>
                        <ci>t</ci>
                        <ci>T_0</ci>
                    </apply>
                    <apply>
                        <floor/>
                        <apply>
                            <divide/>
                            <ci>t</ci>
                            <ci>T_0</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>T</ci>
                <apply>
                    <minus/>
                    <ci>t</ci>
                    <apply>
                        <times/>
                        <ci>T_0</ci>
                        <apply>
                            <floor/>
                            <apply>
                                <divide/>
                                <ci>t</ci>
                                <ci>T_0</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>T_sys</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <minus/>
                            <ci>T_sys_0</ci>
                            <apply>
                                <divide/>
                                <ci>k_sys</ci>
                                <ci>T</ci>
                            </apply>
                        </apply>
                        <apply>
                            <gt/>
                            <ci>T</ci>
                            <cn cellml:units="second">0</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <minus/>
                            <ci>T_sys_0</ci>
                            <apply>
                                <divide/>
                                <ci>k_sys</ci>
                                <ci>T_0</ci>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>phi</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <power/>
                            <apply>
                                <sin/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <times/>
                                        <pi/>
                                        <ci>u</ci>
                                        <ci>T</ci>
                                    </apply>
                                    <ci>T_sys_0</ci>
                                </apply>
                            </apply>
                            <cn cellml:units="dimensionless">2</cn>
                        </apply>
                        <apply>
                            <and/>
                            <apply>
                                <geq/>
                                <ci>u</ci>
                                <cn cellml:units="dimensionless">0</cn>
                            </apply>
                            <apply>
                                <leq/>
                                <ci>u</ci>
                                <apply>
                                    <divide/>
                                    <ci>T_sys_0</ci>
                                    <ci>T</ci>
                                </apply>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="dimensionless">0</cn>
                    </otherwise>
                </piecewise>
            </apply>
        </math>
    </component>
    <component name="cvs">
        <variable name="t" public_interface="in" units="second"/>
        <variable name="phi" public_interface="in" units="dimensionless"/>
        <variable initial_value="4" name="q_ra" units="mL"/>
        <variable initial_value="5" name="q_rv" units="mL"/>
        <variable initial_value="4" name="q_la" units="mL"/>
        <variable initial_value="10" name="q_lv" units="mL"/>
        <variable initial_value="4" name="q_pa" units="mL"/>
        <variable initial_value="5" name="q_pc" units="mL"/>
        <variable initial_value="4" name="q_pv" units="mL"/>
        <variable initial_value="5" name="q_sa" units="mL"/>
        <variable initial_value="10" name="q_sc" units="mL"/>
        <variable name="q_sv" units="mL"/>
        <variable initial_value="5800" name="q_tot" units="mL"/>
        <variable initial_value="3500" name="q_tot_u" units="mL"/>
        <!--274.4+274.1+62.5+1121+1120+255+123+120=3500-->
        <variable name="u_ra" units="mmHg"/>
        <variable name="u_rv" units="mmHg"/>
        <variable name="u_la" units="mmHg"/>
        <variable name="u_lv" units="mmHg"/>
        <variable name="u_pa" units="mmHg"/>
        <variable name="u_pc" units="mmHg"/>
        <variable name="u_pv" public_interface="out" units="mmHg"/>
        <variable name="u_sa" public_interface="out" units="mmHg"/>
        <!--     var u_sa1: mmHg {init: 17.85714285714286, pub: out};-->
        <variable name="du_sa" public_interface="out" units="mmHg_per_s"/>
        <variable name="u_sc" units="mmHg"/>
        <variable name="u_sv" units="mmHg"/>
        <variable name="v_TV" units="mL_per_s"/>
        <variable name="v_PV" units="mL_per_s"/>
        <variable name="v_MV" units="mL_per_s"/>
        <variable name="v_AV" units="mL_per_s"/>
        <variable initial_value="5" name="v_pa" units="mL_per_s"/>
        <variable name="v_pv" units="mL_per_s"/>
        <variable name="v_la" units="mL_per_s"/>
        <variable initial_value="5" name="v_sa" units="mL_per_s"/>
        <variable name="v_sc" units="mL_per_s"/>
        <variable name="v_sv" units="mL_per_s"/>
        <variable initial_value="31.25" name="C_ra" units="mL_per_mmHg"/>
        <variable initial_value="0.76" name="C_pa" units="mL_per_mmHg"/>
        <variable initial_value="5.8" name="C_pc" units="mL_per_mmHg"/>
        <variable initial_value="25.37" name="C_pv" units="mL_per_mmHg"/>
        <variable initial_value="19.23" name="C_la" units="mL_per_mmHg"/>
        <variable initial_value="0.28" name="C_sa" units="mL_per_mmHg"/>
        <variable initial_value="3.72" name="C_sc" units="mL_per_mmHg"/>
        <!-- 2.05+1.36+0.31=3.72-->
        <variable initial_value="111.11" name="C_sv" units="mL_per_mmHg"/>
        <!--43.11+28.4+6.6+33
 var R_rv: mmHg_s_per_mL {init: 5};
 var R_lv: mmHg_s_per_mL {init: 5};-->
        <variable initial_value="2.5e-3" name="R_TV" units="mmHg_s_per_mL"/>
        <variable name="R_PV" units="mmHg_s_per_mL"/>
        <variable initial_value="2.5e-3" name="R_MV" units="mmHg_s_per_mL"/>
        <variable name="R_AV" units="mmHg_s_per_mL"/>
        <variable initial_value="0.023" name="R_pa" units="mmHg_s_per_mL"/>
        <variable initial_value="0.0894" name="R_pv" units="mmHg_s_per_mL"/>
        <!-- R_pp-->
        <variable initial_value="0.0056" name="R_la" units="mmHg_s_per_mL"/>
        <!-- R_pv-->
        <variable initial_value="0.0054" name="R_sv" units="mmHg_s_per_mL"/>
        <!--R_tv-->
        <variable initial_value="0.8895" name="R_sc" units="mmHg_s_per_mL"/>
        <!--1/( 1/R_sp+1/R_ep+1/R_mp)-->
        <variable initial_value="0.06" name="R_sa" units="mmHg_s_per_mL"/>
        <variable initial_value="1.8e-4" name="L_pa" units="mmHg_s2_per_mL"/>
        <variable initial_value="2.2e-4" name="L_sa" units="mmHg_s2_per_mL"/>
        <variable initial_value="1.4e-3" name="k_PV_R" units="s_per_mL"/>
        <variable initial_value="3.75e-4" name="k_AV_R" units="s_per_mL"/>
        <variable initial_value="0.014" name="k_lv_E" units="per_mL"/>
        <variable initial_value="0.011" name="k_rv_E" units="per_mL"/>
        <variable initial_value="16.77" name="q_lv_u" units="mL"/>
        <variable initial_value="40.8" name="q_rv_u" units="mL"/>
        <variable initial_value="1.5" name="u_lv_0" units="mmHg"/>
        <variable initial_value="1.5" name="u_rv_0" units="mmHg"/>
        <variable initial_value="1.283" name="E_lv_max" units="mmHg_per_mL"/>
        <variable initial_value="0.757" name="E_rv_max" units="mmHg_per_mL"/>
        <variable name="u_rv_max" units="mmHg"/>
        <variable name="u_lv_max" units="mmHg"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>u_lv_max</ci>
                <apply>
                    <plus/>
                    <apply>
                        <times/>
                        <ci>phi</ci>
                        <ci>E_lv_max</ci>
                        <apply>
                            <minus/>
                            <ci>q_lv</ci>
                            <ci>q_lv_u</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <apply>
                            <minus/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>phi</ci>
                        </apply>
                        <ci>u_lv_0</ci>
                        <apply>
                            <minus/>
                            <apply>
                                <exp/>
                                <apply>
                                    <times/>
                                    <ci>k_lv_E</ci>
                                    <ci>q_lv</ci>
                                </apply>
                            </apply>
                            <cn cellml:units="dimensionless">1</cn>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_rv_max</ci>
                <apply>
                    <plus/>
                    <apply>
                        <times/>
                        <ci>phi</ci>
                        <ci>E_rv_max</ci>
                        <apply>
                            <minus/>
                            <ci>q_rv</ci>
                            <ci>q_rv_u</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <apply>
                            <minus/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>phi</ci>
                        </apply>
                        <ci>u_rv_0</ci>
                        <apply>
                            <minus/>
                            <apply>
                                <exp/>
                                <apply>
                                    <times/>
                                    <ci>k_rv_E</ci>
                                    <ci>q_rv</ci>
                                </apply>
                            </apply>
                            <cn cellml:units="dimensionless">1</cn>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_ra</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_sv</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_pa</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_PV</ci>
                    <ci>v_pa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_pc</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_pa</ci>
                    <ci>v_pv</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_pv</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_pv</ci>
                    <ci>v_la</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_la</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_la</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>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_sa</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_AV</ci>
                    <ci>v_sa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_sc</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_sa</ci>
                    <ci>v_sc</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>q_sv</ci>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>q_tot</ci>
                        <ci>q_tot_u</ci>
                    </apply>
                    <apply>
                        <plus/>
                        <ci>q_ra</ci>
                        <ci>q_rv</ci>
                        <ci>q_pa</ci>
                        <ci>q_pc</ci>
                        <ci>q_pv</ci>
                        <ci>q_la</ci>
                        <ci>q_lv</ci>
                        <ci>q_sa</ci>
                        <ci>q_sc</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_ra</ci>
                <apply>
                    <divide/>
                    <ci>q_ra</ci>
                    <ci>C_ra</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_rv</ci>
                <apply>
                    <minus/>
                    <ci>u_rv_max</ci>
                    <apply>
                        <times/>
                        <ci>R_PV</ci>
                        <ci>v_PV</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_pa</ci>
                <apply>
                    <divide/>
                    <ci>q_pa</ci>
                    <ci>C_pa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_pc</ci>
                <apply>
                    <divide/>
                    <ci>q_pc</ci>
                    <ci>C_pc</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_pv</ci>
                <apply>
                    <divide/>
                    <ci>q_pv</ci>
                    <ci>C_pv</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_la</ci>
                <apply>
                    <divide/>
                    <ci>q_la</ci>
                    <ci>C_la</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_lv</ci>
                <apply>
                    <minus/>
                    <ci>u_lv_max</ci>
                    <apply>
                        <times/>
                        <ci>R_AV</ci>
                        <ci>v_AV</ci>
                    </apply>
                </apply>
            </apply>
            <!--       ode(u_sa1,t) = du_sa;-->
            <apply>
                <eq/>
                <ci>u_sa</ci>
                <apply>
                    <divide/>
                    <ci>q_sa</ci>
                    <ci>C_sa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_sc</ci>
                <apply>
                    <divide/>
                    <ci>q_sc</ci>
                    <ci>C_sc</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_sv</ci>
                <apply>
                    <divide/>
                    <ci>q_sv</ci>
                    <ci>C_sv</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>du_sa</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>v_AV</ci>
                        <ci>v_sa</ci>
                    </apply>
                    <ci>C_sa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_TV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="mL_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_ra</ci>
                            <ci>u_rv</ci>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <apply>
                                <minus/>
                                <ci>u_ra</ci>
                                <ci>u_rv</ci>
                            </apply>
                            <ci>R_TV</ci>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_PV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="mL_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_rv_max</ci>
                            <ci>u_pa</ci>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <apply>
                                <minus/>
                                <ci>u_rv_max</ci>
                                <ci>u_pa</ci>
                            </apply>
                            <ci>R_PV</ci>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>R_PV</ci>
                <apply>
                    <times/>
                    <ci>k_PV_R</ci>
                    <ci>u_rv_max</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>R_pa</ci>
                            <ci>v_pa</ci>
                        </apply>
                    </apply>
                    <ci>L_pa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_pv</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_pc</ci>
                        <ci>u_pv</ci>
                    </apply>
                    <ci>R_pv</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_la</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_pv</ci>
                        <ci>u_la</ci>
                    </apply>
                    <ci>R_la</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_MV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="mL_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_la</ci>
                            <ci>u_lv</ci>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <apply>
                                <minus/>
                                <ci>u_la</ci>
                                <ci>u_lv</ci>
                            </apply>
                            <ci>R_MV</ci>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_AV</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="mL_per_s">0</cn>
                        <apply>
                            <lt/>
                            <ci>u_lv_max</ci>
                            <ci>u_sa</ci>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <apply>
                                <minus/>
                                <ci>u_lv_max</ci>
                                <ci>u_sa</ci>
                            </apply>
                            <ci>R_AV</ci>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>R_AV</ci>
                <apply>
                    <times/>
                    <ci>k_AV_R</ci>
                    <ci>u_lv_max</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>v_sa</ci>
                </apply>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>u_sa</ci>
                            <ci>u_sc</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>R_sa</ci>
                            <ci>v_sa</ci>
                        </apply>
                    </apply>
                    <ci>L_sa</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_sc</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_sc</ci>
                        <ci>u_sv</ci>
                    </apply>
                    <ci>R_sc</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_sv</ci>
                <apply>
                    <divide/>
                    <apply>
                        <minus/>
                        <ci>u_sv</ci>
                        <ci>u_ra</ci>
                    </apply>
                    <ci>R_sv</ci>
                </apply>
            </apply>
        </math>
    </component>
</model>