<?xml version='1.0' encoding='UTF-8'?>
<!-- TODO read mahajan paper and find out which one this is.-->
<model name="na_channel" 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="ms" units_ref="ms"/>
        <units name="per_ms" units_ref="per_ms"/>
        <units name="mV" units_ref="mV"/>
        <units name="per_mV" units_ref="per_mV"/>
        <units name="uS_per_nF" units_ref="uS_per_nF"/>
        <units name="nA_per_nF" units_ref="nA_per_nF"/>
    </import>
    <component name="INa">
        <variable name="V" public_interface="in" units="mV"/>
        <variable name="time" public_interface="in" units="ms"/>
        <variable name="ena" public_interface="in" units="mV"/>
        <variable initial_value="0.001075453357" name="xm" units="dimensionless"/>
        <variable initial_value="0.990691306716" name="xh" units="dimensionless"/>
        <variable initial_value="0.993888937283" name="xj" units="dimensionless"/>
        <variable initial_value="12" name="gna" units="uS_per_nF"/>
        <variable name="am" units="per_ms"/>
        <variable name="bm" units="per_ms"/>
        <variable name="ah" units="per_ms"/>
        <variable name="bh" units="per_ms"/>
        <variable name="aj" units="per_ms"/>
        <variable name="bj" units="per_ms"/>
        <variable name="xina" public_interface="out" units="nA_per_nF"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>am</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <divide/>
                            <apply>
                                <times/>
                                <cn cellml:units="per_ms">0.32</cn>
                                <cn cellml:units="per_mV">1</cn>
                                <apply>
                                    <plus/>
                                    <ci>V</ci>
                                    <cn cellml:units="mV">47.13</cn>
                                </apply>
                            </apply>
                            <apply>
                                <minus/>
                                <cn cellml:units="dimensionless">1</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_mV">0.1</cn>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>V</ci>
                                            <cn cellml:units="mV">47.13</cn>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <gt/>
                            <apply>
                                <abs/>
                                <apply>
                                    <plus/>
                                    <ci>V</ci>
                                    <cn cellml:units="mV">47.13</cn>
                                </apply>
                            </apply>
                            <cn cellml:units="mV">0.001</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="per_ms">3.2</cn>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>bm</ci>
                <apply>
                    <times/>
                    <cn cellml:units="per_ms">0.08</cn>
                    <apply>
                        <exp/>
                        <apply>
                            <divide/>
                            <apply>
                                <minus/>
                                <ci>V</ci>
                            </apply>
                            <cn cellml:units="mV">11</cn>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>ah</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <cn cellml:units="per_ms">0.135</cn>
                            <apply>
                                <exp/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <plus/>
                                        <cn cellml:units="mV">80</cn>
                                        <ci>V</ci>
                                    </apply>
                                    <apply>
                                        <minus/>
                                        <cn cellml:units="mV">6.8</cn>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <lt/>
                            <ci>V</ci>
                            <apply>
                                <minus/>
                                <cn cellml:units="mV">40</cn>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="per_ms">0</cn>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>bh</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <plus/>
                            <apply>
                                <times/>
                                <cn cellml:units="per_ms">3.56</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <cn cellml:units="per_mV">0.079</cn>
                                        <ci>V</ci>
                                    </apply>
                                </apply>
                            </apply>
                            <apply>
                                <times/>
                                <cn cellml:units="per_ms">310000</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <cn cellml:units="per_mV">0.35</cn>
                                        <ci>V</ci>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <lt/>
                            <ci>V</ci>
                            <apply>
                                <minus/>
                                <cn cellml:units="mV">40</cn>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <cn cellml:units="per_ms">1</cn>
                            <apply>
                                <times/>
                                <cn cellml:units="dimensionless">0.13</cn>
                                <apply>
                                    <plus/>
                                    <cn cellml:units="dimensionless">1</cn>
                                    <apply>
                                        <exp/>
                                        <apply>
                                            <divide/>
                                            <apply>
                                                <plus/>
                                                <ci>V</ci>
                                                <cn cellml:units="mV">10.66</cn>
                                            </apply>
                                            <apply>
                                                <minus/>
                                                <cn cellml:units="mV">11.1</cn>
                                            </apply>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>aj</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <divide/>
                            <apply>
                                <times/>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_ms">127140</cn>
                                        </apply>
                                        <apply>
                                            <exp/>
                                            <apply>
                                                <times/>
                                                <cn cellml:units="per_mV">0.2444</cn>
                                                <ci>V</ci>
                                            </apply>
                                        </apply>
                                    </apply>
                                    <apply>
                                        <times/>
                                        <cn cellml:units="per_ms">0.00003474</cn>
                                        <apply>
                                            <exp/>
                                            <apply>
                                                <times/>
                                                <apply>
                                                    <minus/>
                                                    <cn cellml:units="per_mV">0.04391</cn>
                                                </apply>
                                                <ci>V</ci>
                                            </apply>
                                        </apply>
                                    </apply>
                                </apply>
                                <cn cellml:units="per_mV">1</cn>
                                <apply>
                                    <plus/>
                                    <ci>V</ci>
                                    <cn cellml:units="mV">37.78</cn>
                                </apply>
                            </apply>
                            <apply>
                                <plus/>
                                <cn cellml:units="dimensionless">1</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <cn cellml:units="per_mV">0.311</cn>
                                        <apply>
                                            <plus/>
                                            <ci>V</ci>
                                            <cn cellml:units="mV">79.23</cn>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <lt/>
                            <ci>V</ci>
                            <apply>
                                <minus/>
                                <cn cellml:units="mV">40</cn>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <cn cellml:units="per_ms">0</cn>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>bj</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <divide/>
                            <apply>
                                <times/>
                                <cn cellml:units="per_ms">0.1212</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_mV">0.01052</cn>
                                        </apply>
                                        <ci>V</ci>
                                    </apply>
                                </apply>
                            </apply>
                            <apply>
                                <plus/>
                                <cn cellml:units="dimensionless">1</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_mV">0.1378</cn>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>V</ci>
                                            <cn cellml:units="mV">40.14</cn>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <lt/>
                            <ci>V</ci>
                            <apply>
                                <minus/>
                                <cn cellml:units="mV">40</cn>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <divide/>
                            <apply>
                                <times/>
                                <cn cellml:units="per_ms">0.3</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_mV">0.0000002535</cn>
                                        </apply>
                                        <ci>V</ci>
                                    </apply>
                                </apply>
                            </apply>
                            <apply>
                                <plus/>
                                <cn cellml:units="dimensionless">1</cn>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <times/>
                                        <apply>
                                            <minus/>
                                            <cn cellml:units="per_mV">0.1</cn>
                                        </apply>
                                        <apply>
                                            <plus/>
                                            <ci>V</ci>
                                            <cn cellml:units="mV">32</cn>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>xh</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <times/>
                        <ci>ah</ci>
                        <apply>
                            <minus/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>xh</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <ci>bh</ci>
                        <ci>xh</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>xj</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <times/>
                        <ci>aj</ci>
                        <apply>
                            <minus/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>xj</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <ci>bj</ci>
                        <ci>xj</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>xm</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <times/>
                        <ci>am</ci>
                        <apply>
                            <minus/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>xm</ci>
                        </apply>
                    </apply>
                    <apply>
                        <times/>
                        <ci>bm</ci>
                        <ci>xm</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>xina</ci>
                <apply>
                    <times/>
                    <ci>gna</ci>
                    <ci>xh</ci>
                    <ci>xj</ci>
                    <ci>xm</ci>
                    <ci>xm</ci>
                    <ci>xm</ci>
                    <apply>
                        <minus/>
                        <ci>V</ci>
                        <ci>ena</ci>
                    </apply>
                </apply>
            </apply>
        </math>
    </component>
</model>
