Upload files to "ex2C_peclet_problem"

This commit is contained in:
Jakob Schratter 2025-10-23 12:08:32 +02:00
commit d506e3d2c8

View file

@ -0,0 +1,18 @@
import numpy as np
import matplotlib.pyplot as plt
def u(x,p):
return (np.exp(p*x) - 1)/(np.exp(p) - 1)
x = np.linspace(0, 1, 200)
plt.figure(figsize=(8, 5))
for p in [ -3, -1, -0.5, 0.5, 2, 4]:
plt.plot(x, u(x, p), label="p ="+ str(p))
plt.xlabel('x')
plt.ylabel('u(x)')
plt.legend()
plt.grid(True)
plt.show()