Solving ODEs for chemical rate equations
Afficher commentaires plus anciens
I am trying to model a chemical equation of the form rate = k [a]^1 *[b]^-1. I have managed witht the help of some you tube resources to model a an equation for one reactant but am unsure of how to include the second. Here is the code i have got so far and any help would be appreciated.
clear all
close all
clc
K = 0.06;
timespan = [0 30]';
A0 = 0.5;
first = @(t,A) -K*A
[t,A_calc] = ode45(first,timespan,A0)
plot(t,A_calc, 'o','Linewidth',1,'Markersize',10)
2 commentaires
Torsten
le 15 Nov 2022
Isn't your equation
dC_A/dt = -k*A
the equation for
rate = k*[A]
?
Oliver Wilson
le 15 Nov 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Chemistry dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
