How Can I Code the Rate of Reaction in MATLAB?

  • Context: MATLAB 
  • Thread starter Thread starter sameer990
  • Start date Start date
  • Tags Tags
    Matlab Rate Reaction
Click For Summary

Discussion Overview

The discussion revolves around coding the rate of reaction in MATLAB, specifically focusing on the reaction dynamics between a substrate (A) and a product (B). Participants explore how to implement the mathematical model of the reaction using MATLAB functions and commands.

Discussion Character

  • Technical explanation, Mathematical reasoning, Homework-related

Main Points Raised

  • One participant requests assistance in coding a reaction model in MATLAB, outlining the reaction dynamics and equations involved.
  • Another participant suggests looking up the RK45 method, implying it may be relevant to solving the differential equations involved.
  • A different participant mentions the MATLAB command ode45, indicating it is related to an RK4-type algorithm for numerical integration.

Areas of Agreement / Disagreement

There is no consensus on the best approach to coding the reaction model, as participants have different suggestions regarding numerical methods.

Contextual Notes

Participants have not fully clarified the assumptions behind the reaction model or the specific definitions of variables used in the equations.

Who May Find This Useful

Individuals interested in computational chemistry, reaction kinetics, or MATLAB programming may find this discussion relevant.

sameer990
Messages
2
Reaction score
0
Can Anybody help to code this in matlab

A->B --- A is Sbbstrate here and B is Product
Y[/a]=stiochimetric
Initial values are A[0] and B[0]
Q= reaction quotient

R=active if Q<k ----- R is reaction
R=Stops if Q=k
t=? ------ t is the time

d[A][/dt]= -kA Conc_A(t,A[0],K) and it return A
A=A[0] e[-k][t-t[0]]

And for B
ΔB = YΔA
ΔB=B-B[0] = (A[0]-A)Y Conc_B (B[0],Y,A[0],A) gets A and Return B
B=B[0] + (A[0]-A)Y

t=[0.001 0.002 0.003... 1ms ]

A=Conc_A(t)
B=Conc_B(t)

Plot(t,A,B)
 
Physics news on Phys.org
Please do reply ?
 
look up RK45
 
I think the Matlab command is ode45 for an RK4-type algorithm.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K