我对OOMMF模拟有一些问题

发布于 2025-01-25 21:14:13 字数 722 浏览 1 评论 0原文

   Specify Oxs_ScriptUZeeman [subst {
      script_args total_time
      script {SmoothStep $step_height [expr {$rise_time*1e-12}]}
      multiplier [expr {0.001/$mu0}]
   }]

   proc SmoothStep { Hnom risetime t } {
      set t [expr {$t/$risetime}]
      if {$t<=0.0} {
         set g 0.0
         set gp 0.0
      } elseif {$t>=1.0} {
         set g  $Hnom
         set gp 0.0
      } else {
         global pi
         set g [expr {0.5*$Hnom*(1-cos($pi*$t))}]
         set gp [expr {0.5*$Hnom*$pi*sin($pi*$t)/$risetime}]
      }
      return [list $g 0 0 $gp 0 0]
   }

我模拟了Littele位的MIF文件,该文件从包含OOMMF文件的yoyo.mif文件更改。但这现在不起作用。程序说,不能将非数字字符串用作“/'的操作数。我试图解决这个问题,但尚未解决。

   Specify Oxs_ScriptUZeeman [subst {
      script_args total_time
      script {SmoothStep $step_height [expr {$rise_time*1e-12}]}
      multiplier [expr {0.001/$mu0}]
   }]

   proc SmoothStep { Hnom risetime t } {
      set t [expr {$t/$risetime}]
      if {$t<=0.0} {
         set g 0.0
         set gp 0.0
      } elseif {$t>=1.0} {
         set g  $Hnom
         set gp 0.0
      } else {
         global pi
         set g [expr {0.5*$Hnom*(1-cos($pi*$t))}]
         set gp [expr {0.5*$Hnom*$pi*sin($pi*$t)/$risetime}]
      }
      return [list $g 0 0 $gp 0 0]
   }

I simulated mif file that is littele bit changed from yoyo.mif file which is contained with oommf file. but it's not working now. Program said that Can't use non-numeric string as operand of '/'. I tried to solve this problem, but it does not resolved yet.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文