Re: Conditions in chemical rate equations

Hi Hannah,

I've been involved in developing simulation modelling software that 
supports conditionals.   I've used the <piecewise> element for this 
problem - it seems to be just what it's intended for.

The basic syntax is:
<piecewise>
   <piece> VALUE1 CONDITION1 </piece>
   <piece> VALUE2 CONDITION2 </piece>
   .........
   <piece> VALUEn CONDITIONn </piece>
   </otherwise> VALUE </otherwise>
</piecewise>

where VALUE and CONDITION may be, for example, <apply> elements.

Hope this helps.

Cheers,
Robert


Hannah Barjat wrote:
> 
> Please accept my apologies if this query is too trivial for this email 
> list but I have been unable to find a suitable example to follow on the 
> Internet. I wish to put a compliation of chemical rate expressions into 
> content mathML, the reactions themselves will be expressed in CML. One of
> the simplest examples is where the reaction follows the Arrhenius 
> expression
> k=Aexp(-B/T). I have shown an example of this (below), in mathML, 
> (ignoring units for the time being) where A=1.9E-12 and B=270 with an 
> associated error of plus/minus 500. The equation, in this case, is valid
> where the temperature is between 240 and 340 K. It is this condition 
> that I do not know how to write correctly. It does not appear to be 
> correct just to place the condition directly after the equation (as 
> below). Would I be better to use the domain of application element?
> 
> Thanks for your time, Hannah
> 
> 
> <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-
> instance"
>                     xsi:schemaLocation="http://www.w3.
> org/1998/Math/MathML
>                     http://www.w3.org/Math/XMLSchema/mathml2/mathml2.
> xsd">
>    <!--Arrhenius -->
> 
>    <mml:apply>
>        <mml:eq/>
>        <mml:csymbol
>            definitionURL="http://www.iupac-
> kinetic.ch.cam.ac.uk/mathml/ratecoefficient">
>            <mml:ci>k</mml:ci>
>        </mml:csymbol>
>        <mml:apply>
>            <mml:times />
>            <mml:cn type="e-notation"> 1.9 <mml:sep /> -12 </mml:cn>
>            <mml:apply>
>                <mml:exp />
>                <mml:apply>
>                    <mml:divide />
>                    <mml:apply>
>                        <mml:mo>&#177;</mml:mo>
>      <!--According to the mathML spec this should be: 
> <mml:csymbol>&PlusMinus;</mml:csymbol> but to get it to render in my 
> browser I use the presentation markup - in either case it will not 
> render inline using the mathML style sheet-->
>                        <mml:cn> 270 </mml:cn>
>                        <mml:cn> 500 </mml:cn>
>                    </mml:apply>
>                    <mml:csymbol
>   definitionURL="http://www.iupac-kinetic.ch.cam.ac.uk/mathml/temperature">
>                        <mml:ci>T</mml:ci>
>                    </mml:csymbol>
>                </mml:apply>
>            </mml:apply>
>        </mml:apply>
>    </mml:apply>
> 
>    <mml:condition>
> <!-- I'm not sure that I should really tag the condition onto the end of 
> the reaction; perhaps I should use <domain of application> directly 
> within the equation ? -->
>        <mml:apply>
>            <mml:lt/>
>            <mml:cn> 240 </mml:cn>
>            <mml:csymbol
>               definitionURL="http://www.iupac-kinetic.ch.cam.ac.uk/mathml
>               /temperature"
>                <mml:ci>T</mml:ci>
>            </mml:csymbol>
>            <mml:cn> 340 </mml:cn>
>        </mml:apply>
>    </mml:condition>
> </mml:math>
> 
> 
> 
> 

Received on Monday, 19 November 2007 17:25:46 UTC