投稿

5月, 2022の投稿を表示しています

Coil simulator (mono coil)

モノコイルのシミュレーター ### Pulse magnet simulator v0.1 ### by A. Ikeda (UEC-Tokyo, 30 April 2022) ### references ### 1. Example program (3) in https://qiita.com/sci_Haru/items/b8d5c9cfe64c4366630a ### 2. A program for iGor pro, Master thesis, Takeshi Nakamura, Y. H. Matsuda lab., Univ. of Tokyo (2010) ### 3. Pulse magnet for high field generation, N. Miura (2008) # # # # # # # # # # # # # # # # # # # # # # # # # # # Imports # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy as np import matplotlib.pyplot as plt # %matplotlib inline # plt.style.use('./ai.mplstyle') # %matplotlib tk res_x = [] res_y = [] reserve_v = [] reserve_i = [] reserve_tp = [] reserve_t = [] reserve_bf = [] # # # # # # # # # # # # # # # # # # # # # # # # # # # Input parameter # # ...

パルス!

イメージ
BeamPulse In [ ]: import numpy as np import matplotlib.pyplot as plt In [26]: lim = 60 div = 0.1 x = np . arange ( - lim , lim , div ) y = np . sin ( x ) z = np . exp ( - ( x / 10 ) ** 2 ) In [27]: plt . plot ( x , y , color = "red" ) plt . plot ( x , z , color = "blue" ) Out[27]: [<matplotlib.lines.Line2D at 0x7fa341d78850>] In [33]: plt . plot ( x , y * z + x / 150 , color = "blue" ) plt . savefig ( "pulse1.pdf" , transparent = True ) In [34]: plt . plot ( x , y * z - x / 150 , color = "red" ) plt . savefig ( "pulse2.pdf" , transparent = True ) In [ ]: ...