本文整理汇总了Python中fidimag.atomistic.Sim.save_vtk方法的典型用法代码示例。如果您正苦于以下问题:Python Sim.save_vtk方法的具体用法?Python Sim.save_vtk怎么用?Python Sim.save_vtk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fidimag.atomistic.Sim
的用法示例。
在下文中一共展示了Sim.save_vtk方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: excite_system
# 需要导入模块: from fidimag.atomistic import Sim [as 别名]
# 或者: from fidimag.atomistic.Sim import save_vtk [as 别名]
def excite_system(mesh):
sim = Sim(mesh, name='dyn', driver='sllg')
sim.set_options(dt=1e-14, gamma=const.gamma, k_B=const.k_B)
sim.driver.alpha = 0.1
sim.mu_s = const.mu_s_1
sim.T = temperature_gradient
sim.set_m(np.load("m0.npy"))
J = 50.0 * const.k_B
exch = UniformExchange(J)
sim.add(exch)
D = 0.5 * J
dmi = DMI(D)
sim.add(dmi)
Hz = 0.2 * J / const.mu_s_1
zeeman = Zeeman([0, 0, Hz])
sim.add(zeeman)
dt = 2e-14 * 50 # 1e-12
ts = np.linspace(0, 1000 * dt, 501)
for t in ts:
sim.run_until(t)
sim.save_vtk()
sim.save_m()
print 'sim t=%g' % t
示例2: relax_system_stage2
# 需要导入模块: from fidimag.atomistic import Sim [as 别名]
# 或者: from fidimag.atomistic.Sim import save_vtk [as 别名]
def relax_system_stage2():
mesh = CuboidMesh(nx=140 , ny=140, nz=1)
sim = Sim(mesh, name='dyn', driver='llg')
sim.alpha = 0.1
sim.do_precession = True
sim.gamma = const.gamma
sim.mu_s = spatial_mu
sim.set_m(np.load('skx.npy'))
J = 50 * const.k_B
exch = UniformExchange(J)
sim.add(exch)
D = 0.27 * J
dmi = DMI(D)
sim.add(dmi)
zeeman = Zeeman(spatial_H)
sim.add(zeeman)
ts = np.linspace(0, 2e-9, 201)
for t in ts:
sim.run_until(t)
sim.save_vtk()
sim.save_m()
print(t)
示例3: dynamic
# 需要导入模块: from fidimag.atomistic import Sim [as 别名]
# 或者: from fidimag.atomistic.Sim import save_vtk [as 别名]
def dynamic(mesh):
sim = Sim(mesh, name='dyn', driver='slonczewski')
# sim.set_options(rtol=1e-10,atol=1e-14)
sim.gamma = 1.0
sim.mu_s = 1.0
sim.set_m(np.load('m0.npy'))
J = 1.0
exch = UniformExchange(J)
sim.add(exch)
Kx = Anisotropy(Ku=0.005, axis=(1, 0, 0), name='Kx')
sim.add(Kx)
sim.p = (0,0,1)
sim.u0 = 0.03
sim.alpha = 0.1
ts = np.linspace(0, 1e3, 101)
for t in ts:
sim.run_until(t)
sim.save_vtk()
print t
示例4: relax_system
# 需要导入模块: from fidimag.atomistic import Sim [as 别名]
# 或者: from fidimag.atomistic.Sim import save_vtk [as 别名]
def relax_system(mesh):
sim = Sim(mesh, name='relax')
sim.alpha = 0.1
sim.set_m(init_m)
J = 1
exch = UniformExchange(J)
sim.add(exch)
dmi = DMI(0.05 * J)
sim.add(dmi)
ts = np.linspace(0, 1, 11)
for t in ts:
print t, sim.spin_length() - 1
sim.run_until(t)
sim.save_vtk()
return sim.spin