- 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/Boron-NH3.cellml
<?xml version='1.0'?>
<model name="Boron_NH3" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#">
<units name="per_s">
<unit exponent="-1" units="second"/>
</units>
<units name="per_m">
<unit exponent="-1" units="metre"/>
</units>
<units name="m_per_s">
<unit units="metre"/>
<unit exponent="-1" units="second"/>
</units>
<units name="mol_per_m3">
<unit units="mole"/>
<unit exponent="-3" units="metre"/>
</units>
<units name="mol_per_m2_s">
<unit exponent="1" units="mole"/>
<unit exponent="-2" units="metre"/>
<unit exponent="-1" units="second"/>
</units>
<units name="mol_per_m3_s">
<unit exponent="1" units="mole"/>
<unit exponent="-3" units="metre"/>
<unit exponent="-1" units="second"/>
</units>
<units name="J_per_C">
<unit units="joule"/>
<unit exponent="-1" units="coulomb"/>
</units>
<units name="C_per_mol">
<unit units="coulomb"/>
<unit exponent="-1" units="mole"/>
</units>
<units name="J_per_mol_K">
<unit units="joule"/>
<unit exponent="-1" units="mole"/>
<unit exponent="-1" units="kelvin"/>
</units>
<units name="m3_per_mol">
<unit exponent="3" units="metre"/>
<unit exponent="-1" units="mole"/>
</units>
<component name="main">
<variable name="t" units="second"/>
<variable initial_value="0.0" name="TB_i" units="mol_per_m3"/>
<variable name="NH3_i" units="mol_per_m3"/>
<variable name="NH3_o" units="mol_per_m3"/>
<variable name="NH4_i" units="mol_per_m3"/>
<variable name="NH4_o" units="mol_per_m3"/>
<variable name="TB_o" units="mol_per_m3"/>
<variable initial_value="3.981071705534970e-05" name="H_Lim" units="mol_per_m3"/>
<variable initial_value="1.995262314968879e-05" name="H_o" units="mol_per_m3"/>
<variable initial_value="4.786300923226380e-05" name="H_i" units="mol_per_m3"/>
<!-- Note: 4.7863e-05 mM (pH_i=7.32);-->
<variable name="J_H" units="mol_per_m2_s"/>
<variable name="J_NH4" units="mol_per_m2_s"/>
<variable name="J_NH3" units="mol_per_m2_s"/>
<variable name="pH_i" units="dimensionless"/>
<variable name="pH_o" units="dimensionless"/>
<variable name="pH_Lim" units="dimensionless"/>
<variable name="alpha" units="dimensionless"/>
<variable name="epsilon" units="dimensionless"/>
<variable initial_value="296.15" 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="0.00025" name="r" units="metre"/>
<variable name="rho" units="per_m"/>
<variable initial_value="9" name="beta" units="mol_per_m3"/>
<variable initial_value="6e-5" name="P_NH3" units="m_per_s"/>
<variable initial_value="1e-6" name="P_NH4" units="m_per_s"/>
<!-- Note: P_NH4 varies from 0, 10e-6, 10e-5, 10e-4-->
<variable initial_value="0.31623e-06" name="K_BH" units="mol_per_m3"/>
<variable initial_value="-0.055" name="V_m" public_interface="out" units="J_per_C"/>
<variable initial_value="0" name="k" units="per_s"/>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<ci>TB_o</ci>
<piecewise>
<piece>
<cn cellml:units="mol_per_m3">0.0</cn>
<apply>
<lt/>
<ci>t</ci>
<cn cellml:units="second">100</cn>
</apply>
</piece>
<piece>
<cn cellml:units="mol_per_m3">9.0</cn>
<apply>
<lt/>
<ci>t</ci>
<cn cellml:units="second">1500</cn>
</apply>
</piece>
<otherwise>
<cn cellml:units="mol_per_m3">0.0</cn>
</otherwise>
</piecewise>
</apply>
<apply>
<eq/>
<ci>rho</ci>
<apply>
<divide/>
<cn cellml:units="dimensionless">2</cn>
<ci>r</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>NH4_o</ci>
<apply>
<divide/>
<apply>
<times/>
<ci>H_o</ci>
<ci>TB_o</ci>
</apply>
<apply>
<plus/>
<ci>H_o</ci>
<ci>K_BH</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>NH3_o</ci>
<apply>
<minus/>
<ci>TB_o</ci>
<ci>NH4_o</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>epsilon</ci>
<apply>
<exp/>
<apply>
<divide/>
<apply>
<times/>
<ci>V_m</ci>
<ci>F</ci>
</apply>
<apply>
<times/>
<ci>R</ci>
<ci>T</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>pH_Lim</ci>
<apply>
<minus/>
<apply>
<log/>
<apply>
<times/>
<cn cellml:units="m3_per_mol" type="e-notation">1<sep/>-3</cn>
<ci>H_Lim</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>pH_i</ci>
<apply>
<minus/>
<apply>
<log/>
<apply>
<times/>
<cn cellml:units="m3_per_mol" type="e-notation">1<sep/>-3</cn>
<ci>H_i</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>pH_o</ci>
<apply>
<minus/>
<apply>
<log/>
<apply>
<times/>
<cn cellml:units="m3_per_mol" type="e-notation">1<sep/>-3</cn>
<ci>H_o</ci>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>J_NH3</ci>
<apply>
<times/>
<ci>P_NH3</ci>
<apply>
<minus/>
<ci>NH3_o</ci>
<ci>NH3_i</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>J_NH4</ci>
<apply>
<divide/>
<apply>
<times/>
<apply>
<divide/>
<apply>
<times/>
<ci>P_NH4</ci>
<ci>V_m</ci>
<ci>F</ci>
</apply>
<apply>
<times/>
<ci>R</ci>
<ci>T</ci>
</apply>
</apply>
<apply>
<minus/>
<ci>NH4_o</ci>
<apply>
<times/>
<ci>NH4_i</ci>
<ci>epsilon</ci>
</apply>
</apply>
</apply>
<apply>
<minus/>
<ci>epsilon</ci>
<cn cellml:units="dimensionless">1</cn>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>J_H</ci>
<piecewise>
<piece>
<apply>
<times/>
<apply>
<divide/>
<ci>k</ci>
<ci>rho</ci>
</apply>
<apply>
<minus/>
<ci>H_i</ci>
<ci>H_Lim</ci>
</apply>
</apply>
<apply>
<lt/>
<ci>pH_i</ci>
<ci>pH_Lim</ci>
</apply>
</piece>
<otherwise>
<cn cellml:units="mol_per_m2_s">0.0</cn>
</otherwise>
</piecewise>
</apply>
<apply>
<eq/>
<ci>alpha</ci>
<apply>
<divide/>
<ci>H_i</ci>
<apply>
<plus/>
<ci>H_i</ci>
<ci>K_BH</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>NH4_i</ci>
<apply>
<times/>
<ci>alpha</ci>
<ci>TB_i</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>NH3_i</ci>
<apply>
<times/>
<apply>
<minus/>
<cn cellml:units="dimensionless">1</cn>
<ci>alpha</ci>
</apply>
<ci>TB_i</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>TB_i</ci>
</apply>
<apply>
<times/>
<ci>rho</ci>
<apply>
<plus/>
<ci>J_NH3</ci>
<ci>J_NH4</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>H_i</ci>
</apply>
<apply>
<times/>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">2.303</cn>
<ci>H_i</ci>
</apply>
<ci>beta</ci>
</apply>
<ci>rho</ci>
<apply>
<minus/>
<apply>
<minus/>
<apply>
<times/>
<apply>
<minus/>
<cn cellml:units="dimensionless">1</cn>
<ci>alpha</ci>
</apply>
<ci>J_NH4</ci>
</apply>
<apply>
<times/>
<ci>alpha</ci>
<ci>J_NH3</ci>
</apply>
</apply>
<ci>J_H</ci>
</apply>
</apply>
</apply>
</math>
</component>
</model>