Skip to content

Instantly share code, notes, and snippets.

@linnil1
Created May 19, 2018 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linnil1/1ebeecfd8d39d03bd9bc75b053c46714 to your computer and use it in GitHub Desktop.
Save linnil1/1ebeecfd8d39d03bd9bc75b053c46714 to your computer and use it in GitHub Desktop.
Plug flow reactor HW
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0.01, 1)
vk = np.array([0.1, 1, 10])
xvk_x, xvk_vk = np.meshgrid(x, vk)
y = -xvk_vk * np.log(xvk_x)
plt.plot(xvk_x.T, y.T)
plt.legend(['$V_0 / k = ' + str(i) + '$' for i in vk])
plt.xlabel("$C_A / C_{A0}$")
plt.ylabel("V(volume)")
plt.title("V(volume) vs $C_A / C_{A0}$")
plt.savefig("PFR.png")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment