{"id":1161,"date":"2014-07-08T23:02:54","date_gmt":"2014-07-08T15:02:54","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=1161"},"modified":"2014-07-08T23:02:54","modified_gmt":"2014-07-08T15:02:54","slug":"%e9%83%8e%e4%b9%8b%e4%b8%87%e9%a1%ba%e7%a3%81%e7%90%86%e8%ae%ba%e6%a8%a1%e6%8b%9f","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=1161","title":{"rendered":"\u90ce\u4e4b\u4e07\u987a\u78c1\u7406\u8bba\u6a21\u62df"},"content":{"rendered":"<p>\n\t\u90ce\u4e4b\u4e07\u987a\u78c1\u7406\u8bba\u6a21\u62df\uff0c\u5229\u7528\u9a6c\u5c14\u79d1\u592b\u94fe\uff0c\u5e76\u52a0\u4ee5\u6a21\u62df\u9000\u706b\u7684\u65b9\u6cd5\uff0c\u7ed8\u5236\u51fa\u4e86\u987a\u78c1\u4f53\u5728\u5916\u52a0\u78c1\u573a\u7684\u4f5c\u7528\u4e0b\uff0c\u611f\u5e94\u78c1\u573a\u7684\u5927\u5c0f\u3002\u7406\u8bba\u4e0a\u8be5\u6a21\u578b\u6709\u4e25\u683c\u89e3\uff0c\u4ece\u6a21\u62df\u7684\u7ed3\u679c\u6765\u770b\uff0c\u8fd8\u662f\u6bd4\u8f83\u7b26\u5408\u7406\u8bba\u7684\u3002\n<\/p>\n<p>\n\t\u57fa\u672c\u7b97\u6cd5\uff1a\uff081\uff09\u968f\u673a\u7ed9\u5b9a\u7cfb\u7edf\u521d\u6001\uff1b\uff082\uff09\u518d\u6b21\u7ed9\u5b9a\u6bcf\u4e2a\u7c92\u5b50\u6001\uff1b\uff083\uff09\u8ba1\u7b97\u6bcf\u4e2a\u7c92\u5b50\u8be5\u6b21\u4e0e\u4e0a\u6b21\u6001\u7684\u80fd\u91cf\u5deedE\uff1b\uff084\uff09dE&lt;0,\u8dc3\u8fc1\u81f3\u8be5\u6001\uff0cdE&gt;0,\u6309\u7167\u9ea6\u514b\u65af\u97e6\u5206\u5e03\u8dc3\u8fc1\uff1b\uff085\uff09\u91cd\u590d2~4\u6b65\u8db3\u591f\u591a\u7684\u6b21\u6570\uff0c\u7cfb\u7edf\u603bE\u8fbe\u5230\u4e00\u4e2a\u7a33\u5b9a\u503c\uff0c\u83b7\u5f97\u6b64\u65f6\u78c1\u7574\u65b9\u5411\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p><code lang=\"fortran\">module Conts<br \/>\n    implicit none<br \/>\n    integer,parameter   ::Num=1000<br \/>\n    integer,parameter   ::Step=1000<br \/>\n    real(8),parameter   ::pi=3.1415926d0<br \/>\n    real(8),parameter   ::miu=1.d0 !9.27d-24<br \/>\n    real(8),parameter   ::kb=1.d0   !1.38d-23<br \/>\nend<\/p>\n<p>program Main<br \/>\n    use Conts<br \/>\n    real(8)     ::T=100.d0<br \/>\n    real(8)     :: H,dH,addField,Eh,rou<br \/>\n    integer     ::i,j<br \/>\n    open(10,file=\"data.dat\")<br \/>\n    call RANDOM_SEED()<br \/>\n    dH=0.02d0*T<br \/>\n    do i=1,step<br \/>\n        H=real(i)*dH<br \/>\n        Eh=addField(H,T)\/(H*miu)<br \/>\n        rou=miu*H\/(kb*T)<br \/>\n        write(10,*)H\/T,-Eh,cosh(rou)\/sinh(rou)-1.d0\/rou<br \/>\n    enddo<br \/>\nend<\/p>\n<p>real(8) function addField(H,T)<br \/>\n    use Conts<br \/>\n    integer     ::Moves=1000<br \/>\n    integer     ::i,j<br \/>\n    real(8)     ::E(Num),r1,r2,r3,temp,dE,p<br \/>\n    real(8)     ::H,T<br \/>\n    do i=1,Num<br \/>\n        call RANDOM_NUMBER(r1)<br \/>\n        call RANDOM_NUMBER(r2)<br \/>\n        E(i)=-H*miu*cos(r1*pi)*sin(r2*pi)<br \/>\n    enddo<\/p>\n<p>    addField=0.d0<br \/>\n    do i=1,Moves<br \/>\n        do j=1,Num<br \/>\n            call Random_number(r1)<br \/>\n            call Random_number(r2)<br \/>\n            Temp=-H*miu*cos(r1*pi)*sin(r2*pi)<br \/>\n            dE=Temp-E(j)<br \/>\n            if (dE<0) then\n                E(j)=Temp\n            else\n                p=EXP(-dE\/(T*kb))\n                call Random_number(r3)\n                if (r3<=p) E(j)=Temp\n            endif\n        enddo\n        if (i>Moves\/2) addField=addField+sum(E)<br \/>\n    enddo<br \/>\n    addField=addField\/(Num*Moves\/2.)<br \/>\nend<\/code><\/p>\n<p>\n\t<a href=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/07\/Graph2.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"Graph2\" class=\"aligncenter size-medium wp-image-1166\" height=\"210\" src=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/07\/Graph2-300x210.jpg\" width=\"300\" srcset=\"https:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/07\/Graph2-300x210.jpg 300w, https:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/07\/Graph2-1024x719.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u90ce\u4e4b\u4e07\u987a\u78c1\u7406\u8bba\u6a21\u62df\uff0c\u5229\u7528\u9a6c\u5c14\u79d1\u592b\u94fe\uff0c\u5e76\u52a0\u4ee5\u6a21\u62df\u9000\u706b\u7684\u65b9\u6cd5\uff0c\u7ed8\u5236\u51fa\u4e86\u987a\u78c1\u4f53\u5728\u5916\u52a0\u78c1\u573a\u7684\u4f5c\u7528\u4e0b\uff0c\u611f\u5e94\u78c1\u573a\u7684\u5927\u5c0f\u3002\u7406 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3],"tags":[108,157,154,155,156],"class_list":["post-1161","post","type-post","status-publish","format-standard","hentry","category-3","tag-fortran","tag-157","tag-154","tag-155","tag-156"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1161"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1161\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}