Loop correction of program. Zeeman Energy
5 次查看(过去 30 天)
显示 更早的评论
Attach please find the code for correction. All the details of errors are defined in the code for easy understanding. Graph result should be like black line in the attached jpg figure. Your help will be highly appreciated........
Regards
1 个评论
Walter Roberson
2015-9-13
Note for readers: the code attached does not produce any error messages, but does not produced the desired value.
回答(1 个)
Walter Roberson
2015-9-13
Your initial_magnetization can be shown to be 2.2 * mu_b * nrowscols^2 . As mu_b starts as 9.2700e-24 and nrowscol is small (3), the initial magnetization is only 1.8355e-22. To calculate the new_energy, that value is multiplied by mag_field_reverse which is maximum 2, and by cosd() of something real-valued which is between -2.5 and +2.5 degrees. The cosd is therefore between 0.9990 and 1. And the negative is taken of all of this. Your new_energy is therefore between -3.6709e-22 and -3.6672e-22. The black line in your sample plot implies you expect values approaching 1.
But what is being plotted? It is Magnetization. Which is calculated as initial_magnetization * cosd() of the angle at which new_energy was minimum or which was accepted probabilistically. So each Magnetization is going to be initial_magnetization (1.8355e-22) times something that is between 0.9990 and 1.0 . You are not going to see much on a plot, even if you multiply by 1E22.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!