⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chemkin.xmds

📁 XMDS is a code generator that integrates equations. You write them down in human readable form in a
💻 XMDS
字号:
<?xml version="1.0"?><simulation>  <!-- $Id: chemkin.xmds,v 1.1 2004/06/22 10:17:20 paultcochrane Exp $ --><!--  Copyright (C) 2000-2004                                           --><!--                                                                    --><!--  Code contributed by Greg Collecutt, Joseph Hope and Paul Cochrane --><!--                                                                    --><!--  This file is part of xmds.                                        --><!--                                                                    --><!--  This program is free software; you can redistribute it and/or     --><!--  modify it under the terms of the GNU General Public License       --><!--  as published by the Free Software Foundation; either version 2    --><!--  of the License, or (at your option) any later version.            --><!--                                                                    --><!--  This program is distributed in the hope that it will be useful,   --><!--  but WITHOUT ANY WARRANTY; without even the implied warranty of    --><!--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     --><!--  GNU General Public License for more details.                      --><!--                                                                    --><!--  You should have received a copy of the GNU General Public License --><!--  along with this program; if not, write to the Free Software       --><!--  Foundation, Inc., 59 Temple Place - Suite 330, Boston,            --><!--  MA  02111-1307, USA.                                              -->  <name> chemkin </name>      <!-- the name of the simulation -->    <author> Paul Cochrane </author>  <!-- the author of the simulation -->  <description>    <!-- a description of what the simulation is supposed to do -->    Example simulation of the chemical kinetics of a reversible    biomolecular reaction:      (the exclamation mark is so that the file parses as xml)      A + B <!----> R + S    Adapted for xmds from "Mathematica computer programs for physical    chemistry", William H. Cropper, Springer Verlag (1998)    Equations are:      d[A]_dt = -k1[A][B] + k2[R][S]      d[B]_dt = -k1[A][B] + k2[R][S]      d[R]_dt = k1[A][B] - k2[R][S]      d[S]_dt = k1[A][B] - k2[R][S]  </description>    <!-- Global system parameters and functionality -->  <prop_dim> t </prop_dim>    <!-- name of main propagation dim -->    <error_check> yes </error_check>   <!-- defaults to yes -->  <use_wisdom> yes </use_wisdom>     <!-- defaults to no -->  <benchmark> yes </benchmark>       <!-- defaults to no -->  <use_prefs> yes </use_prefs>       <!-- defaults to yes -->    <!-- Global variables for the simulation -->  <globals>  <![CDATA[    // rate constants (in L/mol/s)    const double k1 = 0.1;    const double k2 = 0.5;    // initial concentrations (in mol/L)    const double Ao = 0.1;    const double Bo = 0.2;    const double Ro = 0.3;    const double So = 0.4;  ]]>  </globals>    <!-- Field to be integrated over -->  <field>    <name> main </name>    <samples> 1 </samples>       <!-- sample 1st point of dim? -->        <vector>      <name> main </name>      <type> double </type>           <!-- data type of vector -->      <components> A B R S </components>       <!-- names of components -->      <![CDATA[        A = Ao;	B = Bo;	R = Ro;	S = So;      ]]>    </vector>  </field>    <!-- The sequence of integrations to perform -->  <sequence>    <integrate>      <algorithm> RK4IP </algorithm> <!-- RK4EX, RK4IP, SIEX, SIIP -->      <interval> 25 </interval>   <!-- how far in main dim? -->      <lattice> 10000 </lattice>     <!-- no. points in main dim -->      <samples> 1000 </samples> <!-- no. pts in output moment group -->      <![CDATA[        dA_dt = -k1*A*B + k2*R*S;	dB_dt = -k1*A*B + k2*R*S;	dR_dt = k1*A*B - k2*R*S;	dS_dt = k1*A*B - k2*R*S;      ]]>    </integrate>  </sequence>    <!-- The output to generate -->  <output format="ascii">    <group>      <sampling>        <moments> Aout Bout Rout Sout </moments>           <!-- names of moments -->        <![CDATA[          Aout = A;	  Bout = B;	  Rout = R;	  Sout = S;        ]]>      </sampling>    </group>  </output>  </simulation>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -