how to solve a non linear ode equation ?
古いコメントを表示
Hello,
i have the following ODE that i want to solve
where k_r and kaq are constant values.
i am really stuck on what approach should i take to implement the equation in matalb, i have tried to linearize the equation using odetovectorfield function to solve it using ode45 or another solver but it won't work since the equation is not a quasi-linear differential equation as explained in the function description.
I would be grateful for any guidance or help
thanks in advance !
回答 (1 件)
Bjorn Gustavsson
2021 年 9 月 14 日
0 投票
You have a quadratic equation for dCAdt, solve that one as a standard quadratic equation, you will end up with two solutions for dCAdt that will be possible to solve. If you're somewhat lucky you might end up with solutions that are simple enough to solve analyticalls. Depending on your initial condition you might have to discard one of the solutions and select one to proceed with.
HTH
4 件のコメント
hamza karim
2021 年 9 月 15 日
Bjorn Gustavsson
2021 年 9 月 15 日
Are you sure about the units of your coefficients and CA? When try:
dCAdt(tspan(1),C0)
For the first case (i=1) it returns:
-1.1219e-19
Which is a very small change from an initial condition of 116.9.
My guess is that you're off by something like an elementary charge, q_e, somewhere (not that I have personal experience with exactly that goof or anything...).
hamza karim
2021 年 9 月 16 日
編集済み: hamza karim
2021 年 9 月 16 日
Bjorn Gustavsson
2021 年 9 月 16 日
Regarding units again: you might have forgotten to correct reaction-rates from cm³/s to m³/s or some such easy to forget step. That would give you something like a 6 orders of magnitude change in reaction-rates, but would be hard to capture with dimensional analysis...
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!