Location: pH control @ 2320d7dee569 / PressureConversion.cellml

Author:
Randall Britten <r.britten@auckland.ac.nz>
Date:
2013-09-11 13:49:25+12:00
Desc:
First attempt at introducing partial pressure as units for CO2 concentration. Still seem to be some problems with units and scaling, and a minor problem with encapsulation that should be easy to fix.
Permanent Source URI:
https://models.physiomeproject.org/workspace/178/rawfile/2320d7dee569a63f5be4e47ea0b81fe1eaa0c151/PressureConversion.cellml

<?xml version="1.0"?>
<model xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cmeta="http://www.cellml.org/metadata/1.0#" cmeta:id="PressureConversion" name="PressureConversion">
  <component name="ConcToPPres">
    <math xmlns="http://www.w3.org/1998/Math/MathML" id="ConcToPPres">
      <apply id="ConcToPPres">
        <eq/>
        <ci>Px
        </ci>
        <apply>
          <times/>
          <ci>R
          </ci>
          <ci>T
          </ci>
          <ci>Cx
          </ci>
        </apply>
      </apply>
    </math>
    <variable name="Px" public_interface="out" units="pascal"/>
    <variable name="R" private_interface="in" units="GasConstantUnits"/>
    <variable name="T" public_interface="in" units="kelvin"/>
    <variable name="Cx" public_interface="in" units="M"/>
  </component>
  <units name="mmHg">
    <unit multiplier="133.322" units="pascal"/>
  </units>
  <units name="M">
    <unit units="mole"/>
    <unit exponent="-1" units="litre"/>
  </units>
  <units name="GasConstantUnits">
    <unit exponent="-1" units="kelvin"/>
    <unit exponent="-1" units="mole"/>
    <unit units="litre"/>
    <unit units="pascal"/>
  </units>
  <component name="PPresToConc">
    <math xmlns="http://www.w3.org/1998/Math/MathML" id="PPresToConc">
      <apply id="PPresToConc">
        <eq/>
        <ci>Cx
        </ci>
        <apply>
          <divide/>
          <ci>Px
          </ci>
          <apply>
            <times/>
            <ci>R
            </ci>
            <ci>T
            </ci>
          </apply>
        </apply>
      </apply>
    </math>
    <variable name="Cx" public_interface="out" units="M"/>
    <variable name="Px" public_interface="in" units="pascal"/>
    <variable name="R" private_interface="in" units="GasConstantUnits"/>
    <variable name="T" public_interface="in" units="kelvin"/>
  </component>
  <component name="PhysicalConstants">
    <variable name="GasConstant" public_interface="out" units="GasConstantUnits"/>
    <math xmlns="http://www.w3.org/1998/Math/MathML" id="GasConstant">
      <apply>
        <eq/>
        <ci>GasConstant
        </ci>
        <cn xmlns:cellml="http://www.cellml.org/cellml/1.1#" cellml:units="GasConstantUnits">8.3144621
        </cn>
      </apply>
    </math>
  </component>
  <connection>
    <map_components component_1="PhysicalConstants" component_2="ConcToPPres"/>
    <map_variables variable_1="GasConstant" variable_2="R"/>
  </connection>
  <connection>
    <map_components component_1="PhysicalConstants" component_2="PPresToConc"/>
    <map_variables variable_1="GasConstant" variable_2="R"/>
  </connection>
  <group>
    <relationship_ref relationship="encapsulation"/>
    <component_ref component="ConcToPPres">
      <component_ref component="PhysicalConstants"/>
    </component_ref>
  </group>
</model>