-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_transformstagemel.mif
122 lines (104 loc) · 2.2 KB
/
test_transformstagemel.mif
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
# MIF 2.1
RandomSeed 1
# Constants
set pi [expr 4*atan(1.0)]
set mu0 [expr 4*$pi*1e-7]
Specify Oxs_BoxAtlas:atlas {
xrange {0 100e-9}
yrange {0 40e-9}
zrange {0 20e-9}
name magnet
}
Specify Oxs_RectangularMesh:mesh {
cellsize {4e-9 4e-9 4e-9}
atlas :atlas
}
# No crystalline anisotropy
Specify Oxs_Exchange6Ngbr {
default_A 0
atlas atlas
A {
magnet magnet 1e-11
}
}
# Bias field in Oe
Specify Oxs_UZeeman [subst {
multiplier [expr 0.0001/$mu0]
Hrange {
{ 5000 10 0 5000 10 0 1 }
}
}]
Specify Oxs_Demag {}
# YY_TransformStageMEL
Specify Oxs_AtlasScalarField:B {
atlas :atlas
default_value 0
values {
magnet 10.0e6
}
}
Specify YY_TransformStageMEL:MELField {
B1 :B
B2 :B
e_diag_script strain_diag
e_offdiag_script strain_offdiag
type diagonal
script transform
}
proc strain_diag { stage } {
if { $stage eq 0 } { set coef 0 } { set coef 1e-3 }
set spec Oxs_UniformVectorField
lappend spec [subst {
norm $coef
vector { 1 0.3 0.3 }
}]
return $spec
}
proc strain_offdiag { stage } {
set spec Oxs_UniformVectorField
lappend spec [subst {
vector {0 0 0}
}]
return $spec
}
proc transform { stage stagetime totaltime } {
global pi
set coef [expr sin(2*$pi*10e9*$stagetime)]
set dcoef [expr 2*$pi*10e9*cos(2*$pi*10e9*$stagetime)]
return [list $coef $coef $coef $dcoef $dcoef $dcoef]
}
# Evolver/Driver
Specify Oxs_RungeKuttaEvolve:evolver {
method rkf54
alpha 0.1
do_precess 1
min_timestep 1e-14
max_timestep 3e-12
start_dm 0.01
}
Specify Oxs_TimeDriver {
evolver :evolver
comment {1 deg/ns = 17453293 rad/sec; If Ms=8.6e5, and lambda is small,
then mxh=1e-6 translates into dm/dt = 2e5 rad/sec = 0.01 deg/ns}
stopping_dm_dt { 0.01 0.005 }
stopping_time { 0 5e-10 }
mesh :mesh
Ms { Oxs_AtlasScalarField {
atlas atlas
default_value 0
values {
magnet 860e3
}
} }
m0 { Oxs_FileVectorField {
atlas atlas
file test_initial_m.omf
norm 1
}}
}
Destination monitor_table mmDataTable
Destination monitor_graph mmGraph
Destination monitor_disp1 mmDisp
Schedule DataTable monitor_table step 1
Schedule DataTable monitor_graph step 1
Schedule YY_TransformStageMEL:MELField:Field monitor_disp1 step 1