File:Numerical solution rate equations.png
Numerical_solution_rate_equations.png (640 × 480 pixels, file size: 36 KB, MIME type: image/png)
Captions
Summary[edit]
DescriptionNumerical solution rate equations.png |
Deutsch: Numerische Lösung, mithilfe von scipy.integrate.odeint. Die Reaktionsraten und die Anfangskonzentrationen sind sind in diesem Beispiel beliebig gewählt. ist eine Referenzkonzentration. |
Date | |
Source | Own work |
Author | Biggerj1 |
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint
# Numerical solution using an ordinariy differential equation solver
def ode_system(initial_cs, t, k1, k2):
c1, c2, c3, c4, c5 = initial_cs
dc1_dt = -2*k1*c1**2*c2
dc2_dt = -k1*c1**2*c2
dc3_dt = k1*c1**2*c2-2*k2*c3**2
dc4_dt = k2*c3**2
dc5_dt = k2*c3**2
return dc1_dt, dc2_dt, dc3_dt, dc4_dt, dc5_dt
initial_cs = (0.2, 0.3, 0.0001, 0.0001, 0.0001)
k1 = 0.01
k2 = 1e-3
ts = np.linspace(0, 6000, num=200)
solution = odeint(ode_system, initial_cs, ts, args=(k1, k2))
concentration_names = {1: r"$H_2$", 2: r"$O_2$", 3: r"$H_2O$", 4: r"$H_3O^+$", 5: r"$OH^-$"}
for i in range(1, 6):
plt.plot(ts, solution[:, i-1], label=concentration_names[i])
plt.xlabel(r"time [$\tau$]")
plt.ylabel("cocentrations")
plt.title(r"Solution of differential equation system, $k_1=0.01 \frac{\tau^-1}{c_0^2}, k_2=10^{-3} \frac{\tau^-1}{c_0}$")
plt.legend()
plt.show()
Licensing[edit]
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 16:51, 2 September 2020 | 640 × 480 (36 KB) | Biggerj1 (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Horizontal resolution | 39.37 dpc |
---|---|
Vertical resolution | 39.37 dpc |
Software used |