Code for Irreversible Uncatalyzed Reactions

2nd Order (2 Reactants-1 Product)

JSim v1.1
import nsrunit;
unit conversion on;
math uncatB

{ // Simple uncatalyzed 2nd order irreversible chemical reaction
// model
// Solve the ordinary differential equations for the following system
//
// k
// S1 + S2 --> P1
//
// where S stands for Substrate and P for product,
// k is reaction rate parameter.
//
realDomain t sec; // time
t.min=0.0; t.max=20.0; t.delta=0.2;
real k=1 mM^(-1)*sec^(-1); // Reaction rate parameter

real S1(t) mM, S2(t) mM, P1(t) mM; // State Variables


// Initial Conditions
when(t=t.min) {S1 =100; S2 = 50; P1=0; }
// Ordinary Differential Equations:
S1:t = -k*S1*S2;
S2:t = -k*S1*S2;
P1:t = k*S1*S2;
}