1234567891011121314151617181920212223242526272829303132333435363738 |
- from interactions import charged_shell_energy
- import expansion
- from parameters import ModelParams
- import numpy as np
- import matplotlib.pyplot as plt
- def v22_distance_test():
- params = ModelParams(R=10, kappaR=3.29)
- ex0 = expansion.Expansion24(1, 0, 0)
- ex1 = ex0.clone()
- ex0.rotate_euler(0, np.array([0, 0, np.pi / 2]), 0)
- ex1.rotate_euler(0, np.array([0, np.pi / 2, np.pi / 2]), 0)
- dist = np.linspace(2, 3.2, 100)
- energy_array = np.zeros((dist.shape[0], 3))
- for i, d in enumerate(dist):
- energy_array[i, ...] = charged_shell_energy(ex0, ex1, d, params)
- print(charged_shell_energy(ex0, ex1, 2., params))
- plt.plot(dist, energy_array)
- plt.show()
- if __name__ == '__main__':
- v22_distance_test()
|