Added plots, fixed python files

This commit is contained in:
2023-03-28 23:14:40 +04:00
parent 09885e497f
commit ad351ce927
10 changed files with 70 additions and 26 deletions

View File

@@ -14,13 +14,14 @@ sns.set()
# Intensity profile graphics
rho = np.linspace(-r_max, r_max, 500)
fig1 = plt.figure(1, figsize=(10, 6))
plt.figure(1, figsize=(10, 6))
I = gauss(rho)
I0 = np.max(I)
plt.plot(rho, I / I0)
plt.fill_between(rho, I / I0, 0, alpha=0.3)
plt.xlabel('r, m', fontsize=18)
plt.ylabel('I(r)', fontsize=18)
plt.title("Forces along Y axis")
plt.xlabel('$r, m$', fontsize=18)
plt.ylabel('$I(r)$', fontsize=18)
# Integration
def q_res_g(z, func):
@@ -47,11 +48,12 @@ axial = axial_g + axial_s
z = -z[::-1]
# Graphics
fig2 = plt.figure(2, figsize=(10, 6))
plt.figure(2, figsize=(10, 6))
plt.plot(z, axial_g, '-.', lw=1, label='$F_{g}$')
plt.plot(z, axial_s, '--', lw=1, label='$F_{s}$')
plt.plot(z, axial, lw=1, label='$F_{t}$')
plt.xlabel('r, m', fontsize=18)
plt.ylabel('F, N', fontsize=18)
plt.xlabel('$r, m$', fontsize=18)
plt.ylabel('$F, N$', fontsize=18)
plt.legend(fontsize=18)
plt.show()