1
00:00:00,300 --> 00:00:05,670
Welcome back in the previous lecture, we ended up with this nice result of a fairer mechanism, but

2
00:00:05,670 --> 00:00:11,460
to be honest, it was pretty difficult and we had to play with the sample size, with the temperature

3
00:00:11,460 --> 00:00:12,600
with a number of steps.

4
00:00:13,080 --> 00:00:21,540
And another reason besides the local energy benchmark that leads to a problem in the convergence is

5
00:00:21,990 --> 00:00:25,380
that the energy minimum is actually not well defined.

6
00:00:26,130 --> 00:00:32,070
So here it is really a coincidence that all the magnetic moments point roughly along the out of clean

7
00:00:32,070 --> 00:00:33,180
direction along Z.

8
00:00:33,840 --> 00:00:40,710
They could point really in any direction, every so so as long as all moments point along the same direction,

9
00:00:40,710 --> 00:00:42,030
as long as they are parallel.

10
00:00:42,450 --> 00:00:45,210
This would give the same energy for the system.

11
00:00:45,210 --> 00:00:52,980
And so all of these states are equal and they are equally likely to occur as the result of the simulation.

12
00:00:53,130 --> 00:00:55,110
For example, they could all point downwards.

13
00:00:55,110 --> 00:01:00,150
They could all point along the X direction, they could all point along any direction as long as they

14
00:01:00,150 --> 00:01:00,810
are parallel.

15
00:01:01,740 --> 00:01:06,630
So this also hinders a bit the convergence and makes everything more difficult.

16
00:01:07,590 --> 00:01:14,640
So as an update, what I will do next is I will include another energy term here, and this will be

17
00:01:14,970 --> 00:01:21,330
the so-called Zeeman energy or the interaction with an external magnetic field B. So there is a prefect

18
00:01:21,450 --> 00:01:23,880
here, but we don't really care about prefectures.

19
00:01:23,880 --> 00:01:28,980
We just take the dimensionless units, dimensionless quantities.

20
00:01:29,190 --> 00:01:36,020
So I will just write mu is equal to one and then we define our magnetic fields, which is in the radio.

21
00:01:36,030 --> 00:01:39,990
So I write B is equal to and got Perry.

22
00:01:41,190 --> 00:01:43,770
And then we have here B x, y z.

23
00:01:44,430 --> 00:01:47,790
And from the beginning, let's consider a B field along the X direction.

24
00:01:48,330 --> 00:01:53,940
So, for example, like this, it has a strength one and it points along the X direction.

25
00:01:55,380 --> 00:02:01,080
So now we can define our energy terms in a very similar way, as is done here.

26
00:02:02,010 --> 00:02:06,170
So I start with the lower one, a right energy for kinetic.

27
00:02:07,860 --> 00:02:09,300
So for magnetic field.

28
00:02:09,900 --> 00:02:11,580
So you could give it really any name you want.

29
00:02:12,060 --> 00:02:21,630
And all right, energy is equal to energy plus energy, kinetic contribution and then the magnetic contribution

30
00:02:21,630 --> 00:02:33,000
it will bend will then be dysfunction here, and it will be the term as shown here on the right.

31
00:02:33,720 --> 00:02:39,510
So it will this time not be a sum over pairs of moments, but just a single moment.

32
00:02:39,780 --> 00:02:51,850
And then the scalar product with the magnetic field itself will just be minus New Times and P Dot Dot.

33
00:02:52,440 --> 00:03:03,120
And then we arrived the B comma Mac and then all three components x y zero.

34
00:03:04,350 --> 00:03:12,790
OK, so this is now our new energy and we can run this, and here I will update now.

35
00:03:13,860 --> 00:03:21,720
Also, the step change sort of metropolis step because I will now include here the new energy term.

36
00:03:22,650 --> 00:03:24,690
So he will write.

37
00:03:29,280 --> 00:03:36,870
Of the two, we include the energy corresponding to the interaction with the magnetic fields, and here

38
00:03:36,870 --> 00:03:44,310
are basically two just a copy of this cell, and we call this new step just step T. Because this will

39
00:03:44,310 --> 00:03:46,740
be an hour or final solution.

40
00:03:47,160 --> 00:03:56,070
And here I just have to add 40 energy terms to new one I right here, plus energy magnetic contribution

41
00:03:57,660 --> 00:03:59,970
and my x y is correct.

42
00:04:00,090 --> 00:04:02,370
And here I will do the same thing.

43
00:04:02,910 --> 00:04:03,840
And that's really it.

44
00:04:04,800 --> 00:04:08,610
So the thing is here we needed to two and now we don't need the two.

45
00:04:08,610 --> 00:04:13,580
And this is because we have here a sum of pairs.

46
00:04:13,590 --> 00:04:18,630
So this means AJ and GI give the same result, which is why we needed the factor of two.

47
00:04:19,170 --> 00:04:20,459
And here we don't have this.

48
00:04:20,459 --> 00:04:21,980
We just have a sum over I.

49
00:04:21,990 --> 00:04:26,760
So really every interaction is only counted once, so we don't need the two here.

50
00:04:27,750 --> 00:04:28,020
It's not.

51
00:04:28,020 --> 00:04:28,800
Let's go ahead.

52
00:04:29,250 --> 00:04:32,820
And maybe the magnetic field is a bit strong here.

53
00:04:33,030 --> 00:04:40,500
Let's make it maybe a bit larger, a bit smaller, zero point one and let's run it and takes, of course,

54
00:04:40,500 --> 00:04:43,290
a bit of time because I run it four or five million steps.

55
00:04:43,770 --> 00:04:48,630
As before, and I will get back to you with the solution.

56
00:04:48,930 --> 00:04:52,500
Just one thing I just noticed is that I did not update this cell.

57
00:04:52,980 --> 00:04:54,720
So of course, we have to do this as well.

58
00:04:55,230 --> 00:04:56,700
So let me do this real quickly.

59
00:04:59,270 --> 00:05:06,110
So this would be here what we did previously, and now we need update to.

60
00:05:07,750 --> 00:05:11,470
Ad interaction with magnetic fields.

61
00:05:12,910 --> 00:05:15,940
And here the routine is just called Step T..

62
00:05:16,930 --> 00:05:22,810
So now finally, I can see and I can rerun everything and I'll get back to you in a few seconds.

63
00:05:23,500 --> 00:05:30,340
So I've increased the magnetic field here a bit to 0.5 along the X direction, and this is what we get

64
00:05:30,510 --> 00:05:33,730
a pretty nice furrow magnet along the X direction.

65
00:05:34,690 --> 00:05:39,850
So all the moments are parallel to each other, basically due to exchange, but also due to the magnetic

66
00:05:39,850 --> 00:05:40,510
interaction.

67
00:05:40,510 --> 00:05:43,990
And they prefer now this particular orientation.

68
00:05:44,930 --> 00:05:55,690
So no, let me scroll back up and let me change this to the magnetic fields along the Z direction and

69
00:05:55,690 --> 00:05:58,150
let me rerun the code and show you what happens then.

70
00:05:58,720 --> 00:06:04,360
And this time, the result looks like a fairer magnet once again, but the moments really point along

71
00:06:04,360 --> 00:06:06,250
the out of plain z direction.

72
00:06:07,420 --> 00:06:13,480
Okay, so now with the magnetic field, we have a tool to really dictate the global orientation of all

73
00:06:13,480 --> 00:06:14,500
the magnetic moments.

74
00:06:14,860 --> 00:06:21,070
And this was just a generalization of the energy term where we have now not only the exchange interaction,

75
00:06:21,430 --> 00:06:25,750
but also the Zeeman interaction, which is the interaction with the magnetic field.

