Location: Acid-Base Physiology @ 5c6d2c520a9f / BG / pH-BG.cellml

Author:
Soroush <ssaf006@aucklanduni.ac.nz>
Date:
2020-05-10 21:27:00+12:00
Desc:
added new sedml
Permanent Source URI:
https://models.fieldml.org/workspace/297/rawfile/5c6d2c520a9faad399fd954401d658362d25ef03/BG/pH-BG.cellml

<?xml version='1.0'?>
<model name="Boron" 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="mM" units_ref="mol_per_m3"/>
        <units name="mM_per_s" units_ref="mol_per_m3_s"/>
        <units name="per_m" units_ref="per_m"/>
        <units name="per_s" units_ref="per_s"/>
        <units name="m_per_s" units_ref="m_per_s"/>
        <units name="per_mM" units_ref="m3_per_mol"/>
        <units name="J_per_mol_K" units_ref="J_per_mol_K"/>
        <units name="J_per_C" units_ref="J_per_C"/>
        <units name="C_per_mol" units_ref="C_per_mol"/>
    </import>
    <component name="main">
        <variable name="t" units="second"/>
        <variable initial_value="-0.057" name="mu_E" units="J_per_C"/>
        <variable name="q_CO2_o" units="mM"/>
        <variable initial_value="0.0" name="q_CO2_i" units="mM"/>
        <variable initial_value="0.0" name="q_HCO3_i" units="mM"/>
        <variable initial_value="0.0" name="q_HCO3_o" units="mM"/>
        <variable initial_value="3.981071705534970e-05" name="q_H_i" units="mM"/>
        <variable initial_value="1.995262314968879e-05" name="q_H_o" units="mM"/>
        <variable initial_value="5.011872336272725e-05" name="q_H_Lim" units="mM"/>
        <variable name="pH_i" units="dimensionless"/>
        <variable name="pH_o" units="dimensionless"/>
        <variable name="pH_Lim" units="dimensionless"/>
        <variable name="v_Re_1" units="mM_per_s"/>
        <variable name="v_Re_2" units="mM_per_s"/>
        <variable name="v_Re_3" units="mM_per_s"/>
        <variable name="v_Re_4" units="mM_per_s"/>
        <variable name="v_Re_5" units="mM_per_s"/>
        <variable initial_value="0.00001" name="K_CO2_o" public_interface="out" units="per_mM"/>
        <variable initial_value="0.00001" name="K_CO2_i" public_interface="out" units="per_mM"/>
        <variable initial_value="0.1" name="K_HCO3_o" public_interface="out" units="per_mM"/>
        <variable initial_value="0.1" name="K_HCO3_i" public_interface="out" units="per_mM"/>
        <variable initial_value="0.1" name="K_H_o" public_interface="out" units="per_mM"/>
        <variable initial_value="0.1" name="K_H_i" public_interface="out" units="per_mM"/>
        <variable initial_value="1e6" name="k_Re_1" public_interface="out" units="mM_per_s"/>
        <variable initial_value="1e6" name="k_Re_2" public_interface="out" units="mM_per_s"/>
        <variable initial_value="0.48" name="k_Re_3" public_interface="out" units="per_s"/>
        <variable initial_value="300" name="k_Re_4" public_interface="out" units="per_s"/>
        <variable initial_value="4e-5" name="k_Re_5" public_interface="out" units="mM_per_s"/>
        <variable initial_value="296" name="T" units="kelvin"/>
        <variable initial_value="8.314" name="R" units="J_per_mol_K"/>
        <variable initial_value="96485" name="F" units="C_per_mol"/>
        <variable initial_value="-1" name="z" units="dimensionless"/>
        <variable initial_value="8000" name="rho" units="per_m"/>
        <variable initial_value="26" name="beta" units="mM"/>
        <variable initial_value="6e-5" name="P_CO2" units="m_per_s"/>
        <variable initial_value="5e-9" name="P_HCO3" units="m_per_s"/>
        <variable initial_value="1e-3" name="K_A" units="mM"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>pH_Lim</ci>
                <apply>
                    <minus/>
                    <apply>
                        <log/>
                        <apply>
                            <times/>
                            <cn cellml:units="per_mM" type="e-notation">1<sep/>-3</cn>
                            <ci>q_H_Lim</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>pH_i</ci>
                <apply>
                    <minus/>
                    <apply>
                        <log/>
                        <apply>
                            <times/>
                            <cn cellml:units="per_mM" type="e-notation">1<sep/>-3</cn>
                            <ci>q_H_i</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>pH_o</ci>
                <apply>
                    <minus/>
                    <apply>
                        <log/>
                        <apply>
                            <times/>
                            <cn cellml:units="per_mM" type="e-notation">1<sep/>-3</cn>
                            <ci>q_H_o</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <!-- quantity equations-->
            <apply>
                <eq/>
                <ci>q_CO2_o</ci>
                <piecewise>
                    <piece>
                        <cn cellml:units="mM">0.0</cn>
                        <apply>
                            <lt/>
                            <ci>t</ci>
                            <cn cellml:units="second">100</cn>
                        </apply>
                    </piece>
                    <piece>
                        <cn cellml:units="mM">1.1877</cn>
                        <apply>
                            <lt/>
                            <ci>t</ci>
                            <cn cellml:units="second">2800</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="mM">0.0</cn>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_CO2_i</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_Re_3</ci>
                    <ci>v_Re_2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_HCO3_o</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_Re_1</ci>
                    <ci>v_Re_5</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_HCO3_i</ci>
                </apply>
                <apply>
                    <plus/>
                    <ci>v_Re_2</ci>
                    <ci>v_Re_5</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_H_i</ci>
                </apply>
                <apply>
                    <times/>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <cn cellml:units="dimensionless">2.303</cn>
                            <ci>q_H_i</ci>
                        </apply>
                        <ci>beta</ci>
                    </apply>
                    <apply>
                        <minus/>
                        <ci>v_Re_2</ci>
                        <ci>v_Re_4</ci>
                    </apply>
                </apply>
            </apply>
            <!-- flow equations-->
            <apply>
                <eq/>
                <ci>v_Re_1</ci>
                <apply>
                    <times/>
                    <ci>k_Re_1</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <times/>
                            <ci>K_CO2_o</ci>
                            <ci>q_CO2_o</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>K_HCO3_o</ci>
                            <ci>q_HCO3_o</ci>
                            <ci>K_H_o</ci>
                            <ci>q_H_o</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_Re_2</ci>
                <apply>
                    <times/>
                    <ci>k_Re_2</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <times/>
                            <ci>K_CO2_i</ci>
                            <ci>q_CO2_i</ci>
                        </apply>
                        <apply>
                            <times/>
                            <ci>K_HCO3_i</ci>
                            <ci>q_HCO3_i</ci>
                            <ci>K_H_i</ci>
                            <ci>q_H_i</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_Re_3</ci>
                <apply>
                    <times/>
                    <ci>k_Re_3</ci>
                    <apply>
                        <minus/>
                        <ci>q_CO2_o</ci>
                        <ci>q_CO2_i</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_Re_4</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>k_Re_4</ci>
                            <apply>
                                <minus/>
                                <ci>q_H_i</ci>
                                <ci>q_H_Lim</ci>
                            </apply>
                        </apply>
                        <apply>
                            <lt/>
                            <ci>pH_i</ci>
                            <ci>pH_Lim</ci>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="mM_per_s">0.0</cn>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>v_Re_5</ci>
                <apply>
                    <times/>
                    <ci>k_Re_5</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <times/>
                            <ci>K_HCO3_o</ci>
                            <ci>q_HCO3_o</ci>
                            <apply>
                                <exp/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <times/>
                                        <ci>z</ci>
                                        <ci>F</ci>
                                        <ci>mu_E</ci>
                                    </apply>
                                    <apply>
                                        <times/>
                                        <ci>R</ci>
                                        <ci>T</ci>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <times/>
                            <ci>K_HCO3_i</ci>
                            <ci>q_HCO3_i</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
        </math>
    </component>
</model>