-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRuCl3_buckled.m
124 lines (86 loc) · 4.09 KB
/
RuCl3_buckled.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
classdef RuCl3_buckled < TmHl3
%https://materials.springer.com/isp/crystallographic/docs/sd_1300000
properties (SetAccess = public, GetAccess = public)
dRu = [0.174, -0.137];
dClt = [0.1, -0.062, 0.106];
dClb = [0.126, 0.136, 0.153];
end
methods
function obj = RuCl3_buckled()
obj = obj@TmHl3(5.97900);
obj.setLambda(5.86);
obj.setLambda_tmhl(2.657/2);
obj.lambda = 5.7233;
obj.setTm(44);
obj.setHl(17);
obj.numLayer = 1;
end
function [pos, mag] = calculate(self)
[~,hs,ks] = recip2DMeshGrid(self);
[pos, mag] = calculateHK(self,hs,ks);
mag = 4*pi^2/self.area*mag;
self.lambda = 17.17000/3;
end
function [pos, mag] = calculateHK_1L(self,hs,ks)
pos = hs*self.b1' + ks*self.b2';
kz = self.kzProvider(pos(:,1),pos(:,2));
pos(:,3) = kz;
magRu = exp(-1i*kz*self.dRu(1) ) + ...
exp(-2i*pi/3*(hs+2*ks)).*exp(-1i*kz.*self.dRu(2) );
magCl = exp(-2i*pi*hs/3).* exp(- 1i*kz.*(self.lambda_tmhl+self.dClt(1)) ) + ...
exp(-2i*pi*ks/3).* exp(- 1i*kz.*(self.lambda_tmhl+self.dClt(2)) ) + ...
exp(-4i*pi*(hs+ks)/3).*exp( - 1i*kz.*(self.lambda_tmhl+self.dClt(3)) ) + ...
exp(-4i*pi*hs/3).* exp(- 1i*kz.*(-self.lambda_tmhl+self.dClb(1)) ) + ...
exp(-4i*pi*ks/3).* exp(- 1i*kz.*(-self.lambda_tmhl+self.dClb(2)) ) + ...
exp(-2i*pi*(hs+ks)/3).*exp( - 1i*kz.*(-self.lambda_tmhl+self.dClb(3)) );
magRu = (1+exp(-2i*pi/3*(2*hs+ks)));
%
magCl = exp(-1i*pi*hs).*( 2*cos(pi*hs/3-kz*self.lambda_tmhl)) + ...
exp(-1i*pi*ks).*( 2*cos(pi*ks/3-kz*self.lambda_tmhl)) + ...
exp(-1i*pi*(hs+ks)).*( 2*cos(pi*(hs+ks)/3+kz*self.lambda_tmhl));
mag = self.applyScat(pos,magRu,self.tm) + ...
self.applyScat(pos,magCl,self.hl);
mag = self.applyScat(pos,magRu,self.tm) + ...
self.applyScat(pos,magCl,self.hl);
end
function [pos, mag] = calculateHK_nL(self,hs,ks)
[pos,mag1L] = self.calculateHK_1L(hs,ks);
mag = zeros(size( mag1L ));
kz = pos(:,3);
for indLayer = 1:self.numLayer
if rem(indLayer,3) == 1
mag = mag+mag1L.*exp(-1i*kz*self.lambda*indLayer);
elseif rem(indLayer,3) == 2
mag = mag+...
mag1L.*exp(-1i*(2*pi/3*(2*hs+ks)+kz*self.lambda*indLayer));
elseif rem(indLayer,3) == 0
mag = mag+...
mag1L.*exp(-1i*(2*pi/3*(hs+2*ks)+kz*self.lambda*indLayer));
end
end
mag = mag.*exp(1i*kz*self.lambda*(self.numLayer+1)/2);
end
function [pos, mag] = calculateHK(self,hs,ks)
[pos, mag] = calculateHK_nL(self,hs,ks);
end
% setters
function setTm(self,val)
self.tm.Z = val;
self.tm.fparams = parseElements(val);
end
function setHl(self,val)
self.hl.Z = val;
self.hl.fparams = parseElements(val);
end
function setNumLayer(self,val)
self.numLayer = val;
end
%
function setLambda_tmhl(self, val)
self.lambda_tmhl = val;
end
function setName(self, val)
self.name = val;
end
end
end