Location: cellLib @ 7a0891202d18 / BG / C_BG.cellml

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-08-17 11:26:32+12:00
Desc:
Add readMatrices and writeBGparas; modify whichComp to be string array; update readme
Permanent Source URI:
https://models.fieldml.org/workspace/6bc/rawfile/7a0891202d18fe6d01956b6768e3f10c3dc802c6/BG/C_BG.cellml

<?xml version='1.0' encoding='UTF-8'?>
<!-- The BG of a capacitor-->
<model name="C_BG" 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_BG.cellml">
        <units name="fA" units_ref="fA"/>
        <units name="fF" units_ref="fF"/>
        <units name="fC" units_ref="fC"/>
    </import>
    <import xlink:href="constants_BG.cellml">
        <component component_ref="constants_BG" name="constants_BG"/>
    </import>
    <component name="C_BG">
        <!--Parameters-->
        <variable name="C_m" public_interface="in" units="fF"/>
        <variable name="q_m_init" public_interface="in" units="fC"/>
        <!--Inputs-->
        <variable name="t" public_interface="in" units="second"/>
        <variable name="I_i" public_interface="in" units="fA"/>
        <!--Outputs-->
        <variable name="V_m" public_interface="out" units="volt"/>
        <variable initial_value="q_m_init" name="q_m" public_interface="out" units="fC"/>
        <!-- Constitutive relation of the C:mem-->
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>V_m</ci>
                <apply>
                    <divide/>
                    <ci>q_m</ci>
                    <ci>C_m</ci>
                </apply>
            </apply>
            <!--Conservation laws-->
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_m</ci>
                </apply>
                <ci>I_i</ci>
            </apply>
        </math>
    </component>
    <group>
        <relationship_ref relationship="encapsulation"/>
        <component_ref component="C_BG">
            <component_ref component="constants_BG"/>
        </component_ref>
    </group>
</model>