-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfibra_Ge_Si.m
500 lines (430 loc) · 22.3 KB
/
fibra_Ge_Si.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
function out = model
%
% fibra_Ge_Si.m
%
% Model exported on Apr 26 2015, 17:05 by COMSOL 4.3.2.152.
import com.comsol.model.*
import com.comsol.model.util.*
model = ModelUtil.create('Model');
model.modelPath('/mnt/dados/Comp/Projeto_optics/novafiber/abril2015/temperatura');
model.name('fibra_Ge_Si.mph');
model.param.set('Delta', '0.003');
model.param.set('n1', '1.444', ['indice do n' native2unicode(hex2dec('00fa'), 'Cp1252') 'cleo']);
model.param.set('n0', 'n1*sqrt(1-2*Delta)', [native2unicode(hex2dec('00ed'), 'Cp1252') 'ndice da casca']);
model.param.set('q', '2');
model.param.set('micron', '1.0[um]');
model.param.set('omega0', '2*pi*c_const/lambda0');
model.param.set('f0', 'c_const/lambda0', 'frequencia');
model.param.set('a', '4[um]', 'raio do nucleo da SMF');
model.param.set('b', '30e-6[m]', ['raio do n' native2unicode(hex2dec('00fa'), 'Cp1252') 'cleo da MMF']);
model.param.set('c', '60e-6[m]');
model.param.set('m', '0[1]');
model.param.set('lambda0', '1.45e-6[m]');
model.param.set('SA1', '0.6961663');
model.param.set('SA2', '0.4079426');
model.param.set('SA3', '0.8974794');
model.param.set('SL1', '0.0684043[um]');
model.param.set('SL2', '0.1162414[um]');
model.param.set('SL3', '9.89616[um]');
model.param.set('GA1', '0.80686642');
model.param.set('GA2', '0.71815848');
model.param.set('GA3', '0.85416831');
model.param.set('GL1', '0.068972606[um]');
model.param.set('GL2', '0.15396605[um]');
model.param.set('GL3', '11.841931[um]');
model.param.set('xmolG', '0.1934', 'GeO2 concentration for a Thorlabs GRIN fiber, see GRIN_Fleming.nb');
model.param.set('xmolS', '0.033', 'GeO2 concentration for a SMF fiber.');
model.param.set('wl', 'lambda0');
model.modelNode.create('mod1');
model.func.create('an1', 'Analytic');
model.func('an1').model('mod1');
model.func('an1').set('fununit', '1');
model.func('an1').set('plotargs', {'x' '-b/2' 'b/2'; 'y' '-b/2' 'b/2'});
model.func('an1').set('funcname', 'n2');
model.func('an1').set('args', {'x' 'y'});
model.func('an1').set('argunit', 'm');
model.func('an1').set('expr', 'n1*sqrt(1-2*Delta*((x^2+y^2)^(q/2)/b^q))');
model.geom.create('geom1', 2);
model.geom('geom1').lengthUnit([native2unicode(hex2dec('00b5'), 'Cp1252') 'm']);
model.geom('geom1').feature.create('c1', 'Circle');
model.geom('geom1').feature.create('c2', 'Circle');
model.geom('geom1').feature.create('c3', 'Circle');
model.geom('geom1').feature('c1').set('r', 'a');
model.geom('geom1').feature('c1').set('pos', {'m*micron' '0'});
model.geom('geom1').feature('c2').set('r', 'b');
model.geom('geom1').feature('c3').set('r', 'c');
model.geom('geom1').run;
model.variable.create('var1');
model.variable('var1').model('mod1');
model.variable('var1').set('ncore', 'sqrt(1+(SA1+xmol*(GA1-SA1))*wl^2/(wl^2-(SL1+xmol*(GL1-SL1))^2)+(SA2+xmol*(GA2-SA2))*wl^2/(wl^2-(SL2+xmol*(GL2-SL2))^2)+(SA3+xmol*(GA3-SA3))*wl^2/(wl^2-(SL3+xmol*(GL3-SL3))^2))');
model.variable.create('var2');
model.variable('var2').model('mod1');
model.variable('var2').set('xmol', 'xmolG');
model.variable('var2').selection.geom('geom1', 2);
model.variable('var2').selection.set([2 3]);
model.variable.create('var3');
model.variable('var3').model('mod1');
model.variable('var3').set('xmol', 'xmolS');
model.variable('var3').selection.geom('geom1', 2);
model.variable('var3').selection.set([1]);
model.view.create('view2', 2);
model.view.create('view3', 2);
model.physics.create('emw', 'ElectromagneticWaves', 'geom1');
model.physics('emw').feature.create('wee2', 'WaveEquationElectric', 2);
model.physics('emw').feature('wee2').selection.set([3]);
model.physics.create('emw2', 'ElectromagneticWaves', 'geom1');
model.physics('emw2').feature.create('wee2', 'WaveEquationElectric', 2);
model.physics('emw2').feature('wee2').selection.set([2 3]);
model.mesh.create('mesh1', 'geom1');
model.mesh('mesh1').feature.create('ftri1', 'FreeTri');
model.mesh('mesh1').feature.create('ref1', 'Refine');
model.mesh('mesh1').feature.create('ref2', 'Refine');
model.mesh('mesh1').feature('ref1').selection.geom('geom1', 2);
model.mesh('mesh1').feature('ref1').selection.set([2 3]);
model.mesh('mesh1').feature('ref2').selection.geom('geom1', 2);
model.mesh('mesh1').feature('ref2').selection.set([2]);
model.result.table.create('tbl1', 'Table');
model.variable('var1').name('Variables 1a');
model.variable('var2').name('Variables 2a');
model.variable('var3').name('Variables 3a');
model.view('view1').axis.set('xmin', '-126.01386260986328');
model.view('view1').axis.set('ymin', '-76.29317474365234');
model.view('view1').axis.set('xmax', '126.01386260986328');
model.view('view1').axis.set('ymax', '76.29317474365234');
model.view('view2').axis.set('xmin', '-28.14876937866211');
model.view('view2').axis.set('ymin', '-17.04224395751953');
model.view('view2').axis.set('xmax', '28.14876937866211');
model.view('view2').axis.set('ymax', '17.04224395751953');
model.view('view3').axis.set('xmin', '-112.5950698852539');
model.view('view3').axis.set('ymin', '-66');
model.view('view3').axis.set('xmax', '112.5950698852539');
model.view('view3').axis.set('ymax', '66');
model.physics('emw').name('SMF Electromagnetic Waves, Frequency Domain');
model.physics('emw').feature('wee1').set('DisplacementFieldModel', 'RefractiveIndex');
model.physics('emw').feature('wee1').set('n_mat', 'userdef');
model.physics('emw').feature('wee1').set('n', {'n0'; '0'; '0'; '0'; 'n0'; '0'; '0'; '0'; 'n0'});
model.physics('emw').feature('wee1').set('ki_mat', 'userdef');
model.physics('emw').feature('wee2').set('DisplacementFieldModel', 'RefractiveIndex');
model.physics('emw').feature('wee2').set('n_mat', 'userdef');
model.physics('emw').feature('wee2').set('n', {'n1'; '0'; '0'; '0'; 'n1'; '0'; '0'; '0'; 'n1'});
model.physics('emw').feature('wee2').set('ki_mat', 'userdef');
model.physics('emw2').name('GrIn Electromagnetic Waves, Frequency Domain 2');
model.physics('emw2').feature('wee1').set('DisplacementFieldModel', 'RefractiveIndex');
model.physics('emw2').feature('wee1').set('n_mat', 'userdef');
model.physics('emw2').feature('wee1').set('n', {'ncore'; '0'; '0'; '0'; 'ncore'; '0'; '0'; '0'; 'ncore'});
model.physics('emw2').feature('wee1').set('ki_mat', 'userdef');
model.physics('emw2').feature('wee2').set('DisplacementFieldModel', 'RefractiveIndex');
model.physics('emw2').feature('wee2').set('n_mat', 'userdef');
model.physics('emw2').feature('wee2').set('n', {'ncore'; '0'; '0'; '0'; 'ncore'; '0'; '0'; '0'; 'ncore'});
model.physics('emw2').feature('wee2').set('ki_mat', 'userdef');
model.mesh('mesh1').feature('ref1').set('numrefine', {'2'});
model.mesh('mesh1').run;
model.result.table('tbl1').comments('Surface Integration 1 (data1(emw.normE)*data2(emw2.normE))');
model.study.create('std1');
model.study('std1').feature.create('mode', 'ModeAnalysis');
model.study.create('std2');
model.study('std2').feature.create('mode', 'ModeAnalysis');
model.sol.create('sol1');
model.sol('sol1').study('std1');
model.sol('sol1').attach('std1');
model.sol('sol1').feature.create('st1', 'StudyStep');
model.sol('sol1').feature.create('v1', 'Variables');
model.sol('sol1').feature.create('e1', 'Eigenvalue');
model.study('std1').feature('mode').set('initstudyhide', 'on');
model.study('std1').feature('mode').set('initsolhide', 'on');
model.study('std1').feature('mode').set('notstudyhide', 'on');
model.study('std1').feature('mode').set('notsolhide', 'on');
model.study('std2').feature('mode').set('initstudyhide', 'on');
model.study('std2').feature('mode').set('initsolhide', 'on');
model.study('std2').feature('mode').set('notstudyhide', 'on');
model.study('std2').feature('mode').set('notsolhide', 'on');
model.sol.create('sol2');
model.sol('sol2').study('std2');
model.sol('sol2').attach('std2');
model.sol('sol2').feature.create('st1', 'StudyStep');
model.sol('sol2').feature.create('v1', 'Variables');
model.sol('sol2').feature.create('e1', 'Eigenvalue');
model.study('std1').feature('mode').set('initstudyhide', 'on');
model.study('std1').feature('mode').set('initsolhide', 'on');
model.study('std1').feature('mode').set('notstudyhide', 'on');
model.study('std1').feature('mode').set('notsolhide', 'on');
model.study('std2').feature('mode').set('initstudyhide', 'on');
model.study('std2').feature('mode').set('initsolhide', 'on');
model.study('std2').feature('mode').set('notstudyhide', 'on');
model.study('std2').feature('mode').set('notsolhide', 'on');
model.result.dataset.create('join1', 'Join');
model.result.dataset('join1').set('data', 'dset1');
model.result.numerical.create('int1', 'IntSurface');
model.result.numerical('int1').set('probetag', 'none');
model.result.create('pg1', 'PlotGroup2D');
model.result.create('pg2', 'PlotGroup2D');
model.result.create('pg3', 'PlotGroup2D');
model.result('pg1').feature.create('surf1', 'Surface');
model.result('pg2').feature.create('surf1', 'Surface');
model.result('pg3').feature.create('surf1', 'Surface');
model.result.export.create('data1', 'Data');
model.result.export.create('data2', 'Data');
model.result.export.create('data3', 'Data');
model.study('std1').feature('mode').set('modeFreq', 'f0');
model.study('std1').feature('mode').set('activate', {'emw' 'on' 'emw2' 'off'});
model.study('std1').feature('mode').set('shift', '1.45');
model.study('std2').feature('mode').set('neigs', '20');
model.study('std2').feature('mode').set('modeFreq', 'f0');
model.study('std2').feature('mode').set('activate', {'emw' 'off' 'emw2' 'on'});
model.study('std2').feature('mode').set('shift', '1.48');
model.sol('sol1').attach('std1');
model.sol('sol1').feature('st1').name('Compile Equations: Mode Analysis');
model.sol('sol1').feature('st1').set('studystep', 'mode');
model.sol('sol1').feature('v1').set('control', 'mode');
model.sol('sol1').feature('v1').feature('mod1_E2').set('solvefor', false);
model.sol('sol1').feature('e1').set('control', 'mode');
model.sol('sol1').feature('e1').set('shift', '1.45');
model.sol('sol1').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol1').feature('e1').feature('aDef').set('complexfun', true);
model.sol('sol2').attach('std2');
model.sol('sol2').feature('st1').name('Compile Equations: Mode Analysis');
model.sol('sol2').feature('st1').set('study', 'std2');
model.sol('sol2').feature('st1').set('studystep', 'mode');
model.sol('sol2').feature('v1').set('control', 'mode');
model.sol('sol2').feature('v1').feature('mod1_E').set('solvefor', false);
model.sol('sol2').feature('e1').set('control', 'mode');
model.sol('sol2').feature('e1').set('shift', '1.48');
model.sol('sol2').feature('e1').set('neigs', '20');
model.sol('sol2').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol2').feature('e1').feature('aDef').set('complexfun', true);
model.result.dataset('join1').set('method', 'explicit');
model.result.dataset('join1').set('data2', 'dset2');
model.result.dataset('join1').set('solutions2', 'one');
model.result.dataset('join1').set('solutions', 'one');
model.result.numerical('int1').set('data', 'join1');
model.result.numerical('int1').set('solrepresentation', 'solnum');
model.result.numerical('int1').set('unit', 'm^4*kg^2/(s^6*A^2)');
model.result.numerical('int1').set('table', 'tbl1');
model.result.numerical('int1').set('dataseries', 'integral');
model.result.numerical('int1').set('descr', 'data1(emw.normE)*data2(emw2.normE)');
model.result.numerical('int1').set('expr', 'data1(emw.normE)*data2(emw2.normE)');
model.result.numerical('int1').setResult;
model.result('pg1').name('Electric Field (emw)');
model.result('pg1').set('frametype', 'spatial');
model.result('pg1').feature('surf1').name('Surface');
model.result('pg1').feature('surf1').set('data', 'dset1');
model.result('pg2').set('data', 'dset2');
model.result('pg2').feature('surf1').set('data', 'dset2');
model.result('pg2').feature('surf1').set('descr', 'emw2.normE^2');
model.result('pg2').feature('surf1').set('expr', 'emw2.normE^2');
model.result('pg2').feature('surf1').set('unit', 'm^2*kg^2/(s^6*A^2)');
model.result('pg3').set('data', 'join1');
model.result('pg3').set('solrepresentation', 'solnum');
model.result('pg3').feature('surf1').set('data', 'join1');
model.result('pg3').feature('surf1').set('descr', 'data1(emw.normE)*data2(emw2.normE)');
model.result('pg3').feature('surf1').set('expr', 'data1(emw.normE)*data2(emw2.normE)');
model.result('pg3').feature('surf1').set('unit', 'm^2*kg^2/(s^6*A^2)');
model.result('pg3').feature('surf1').set('solrepresentation', 'solnum');
model.result.export('data1').set('expr', {'emw.normE'});
model.result.export('data1').set('gridstruct', 'grid');
model.result.export('data1').set('header', false);
model.result.export('data1').set('gridx2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data1').set('unit', {'V/m'});
model.result.export('data1').set('fullprec', false);
model.result.export('data1').set('gridy2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data1').set('filename', '/Users/paulogomestl/Documents/Dropbox/Profissional/Jatai/2015/pesquisas/Simulacao/Grisoto/01janeiro/24janeiro/fibra1E1.csv');
model.result.export('data1').set('location', 'grid');
model.result.export('data1').set('descr', {'Electric field norm'});
model.result.export('data2').set('data', 'dset2');
model.result.export('data2').set('expr', {'emw2.normE'});
model.result.export('data2').set('gridstruct', 'grid');
model.result.export('data2').set('header', false);
model.result.export('data2').set('gridx2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data2').set('unit', {'V/m'});
model.result.export('data2').set('fullprec', false);
model.result.export('data2').set('gridy2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data2').set('filename', '/Users/paulogomestl/Documents/Dropbox/Profissional/Jatai/2015/pesquisas/Simulacao/Grisoto/01janeiro/24janeiro/fibra2E6.csv');
model.result.export('data2').set('location', 'grid');
model.result.export('data2').set('descr', {'Electric field norm'});
model.result.export('data3').set('data', 'dset2');
model.result.export('data3').set('expr', {'emw2.beta'});
model.result.export('data3').set('gridstruct', 'grid');
model.result.export('data3').set('header', false);
model.result.export('data3').set('gridx2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data3').set('unit', {''});
model.result.export('data3').set('fullprec', false);
model.result.export('data3').set('gridy2', 'range(-60,5,-45) range(-44,1,-41) range(-40,0.2,40) range(41,1,44) range(45,5,60)');
model.result.export('data3').set('filename', '/Users/paulogomestl/Documents/Dropbox/Profissional/Jatai/2015/pesquisas/Simulacao/Grisoto/01janeiro/24janeiro/fibra2E6.csv');
model.result.export('data3').set('location', 'grid');
model.result.export('data3').set('descr', {'Propagation constant'});
model.func('an1').set('expr', 'n1*sqrt(1-2*Delta*((x^2+y^2)^(q/2)/b^q))');
model.func.create('an2', 'Analytic');
model.func('an2').model('mod1');
model.func('an2').set('funcname', 'ntemp');
model.param.set('tau', 'n0/T');
model.param.set('T', '24');
model.param.descr('T', 'temperatura');
model.param.descr('tau', 'thermo optic coefficient');
model.name('fibra_Ge_Si.mph');
model.func('an1').name('n2');
model.func('an2').name('ntemp');
model.func('an2').set('expr', '()');
model.func('an2').set('fununit', '1');
model.func('an2').set('argunit', 'm');
model.func('an2').setIndex('plotargs', 'y', 1, 0);
model.func('an2').setIndex('plotargs', '-b/2', 0, 1);
model.func('an2').setIndex('plotargs', 'b/2', 1, 1);
model.func('an2').setIndex('plotargs', '-b/2', 0, 2);
model.func('an2').setIndex('plotargs', 'b/2', 1, 2);
model.func('an2').setIndex('plotargs', '-b/2', 1, 1);
model.func('an2').setIndex('plotargs', 'b/2', 0, 2);
model.func('an2').set('args', 'x,y');
model.func('an2').set('expr', '(n2(x,y) + tau*(t - t0) )');
model.param.remove('T');
model.param.set('t', '24', 'temperatura');
model.param.set('tau', 'n0/t');
model.param.set('t0', '24');
model.param.set('t', '1');
model.param.set('tau', 'n0/t');
model.func('an2').active(false);
model.variable.create('var4');
model.variable('var4').model('mod1');
model.variable('var4').set('ntemp', '(ncore + tau*(t - t0) )');
model.physics('emw2').feature('wee1').set('n', {'ntemp' '0' '0' '0' 'ntemp' '0' '0' '0' 'ntemp'});
model.physics('emw2').feature('wee2').set('n', {'ntemp' '0' '0' '0' 'ntemp' '0' '0' '0' 'ntemp'});
model.func.remove('an2');
model.physics('emw').feature('wee2').set('DisplacementFieldModel', 1, 'LossTangent');
model.physics('emw').feature('wee2').set('materialType', 1, 'from_mat');
model.name('fibra_Ge_Si.mph');
model.param.set('t', '24');
model.name('fibra_Ge_Si.mph');
model.physics('emw').feature('wee2').set('epsilonPrim_mat', 1, 'userdef');
model.physics('emw').feature('wee2').set('epsilonPrim', {'n1' '0' '0' '0' 'n1' '0' '0' '0' 'n1'});
model.physics('emw').feature('wee2').set('delta_mat', 1, 'userdef');
model.physics('emw').feature('wee2').set('materialType', 1, 'nonSolid');
model.physics('emw').feature('wee2').set('DisplacementFieldModel', 1, 'RefractiveIndex');
model.sol('sol1').study('std1');
model.sol('sol1').feature.remove('e1');
model.sol('sol1').feature.remove('v1');
model.sol('sol1').feature.remove('st1');
model.sol('sol1').feature.create('st1', 'StudyStep');
model.sol('sol1').feature('st1').set('study', 'std1');
model.sol('sol1').feature('st1').set('studystep', 'mode');
model.sol('sol1').feature.create('v1', 'Variables');
model.sol('sol1').feature('v1').set('control', 'mode');
model.sol('sol1').feature.create('e1', 'Eigenvalue');
model.sol('sol1').feature('e1').set('shift', '1.45');
model.sol('sol1').feature('e1').set('neigs', 6);
model.sol('sol1').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol1').feature('e1').set('control', 'mode');
model.sol('sol1').feature('e1').feature('aDef').set('complexfun', true);
model.sol('sol1').attach('std1');
model.sol('sol1').runAll;
model.result('pg1').run;
model.sol('sol2').study('std2');
model.sol('sol2').feature.remove('e1');
model.sol('sol2').feature.remove('v1');
model.sol('sol2').feature.remove('st1');
model.sol('sol2').feature.create('st1', 'StudyStep');
model.sol('sol2').feature('st1').set('study', 'std2');
model.sol('sol2').feature('st1').set('studystep', 'mode');
model.sol('sol2').feature.create('v1', 'Variables');
model.sol('sol2').feature('v1').set('control', 'mode');
model.sol('sol2').feature.create('e1', 'Eigenvalue');
model.sol('sol2').feature('e1').set('shift', '1.48');
model.sol('sol2').feature('e1').set('neigs', 20);
model.sol('sol2').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol2').feature('e1').set('control', 'mode');
model.sol('sol2').feature('e1').feature('aDef').set('complexfun', true);
model.sol('sol2').attach('std2');
model.sol('sol2').runAll;
model.result('pg2').run;
model.result('pg2').run;
model.result('pg3').run;
model.result.dataset('join1').set('solnum', '6');
model.result.dataset('join1').run;
model.view.remove('view4');
model.result('pg3').run;
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'20'});
model.result('pg2').run;
model.sol('sol1').clearSolution;
model.sol('sol2').clearSolution;
model.name('fibra_Ge_Si.mph');
model.param.set('b_bkp', '30e-6[m]');
model.param.set('b', '2.9965e-05[m]');
model.geom('geom1').run('c2');
model.geom('geom1').runAll;
model.geom('geom1').run;
model.geom('geom1').runAll;
model.param.set('b', '3e-05');
model.geom('geom1').runAll;
model.geom('geom1').runAll;
model.param.set('b', '3e-05[m]');
model.geom('geom1').runAll;
model.param.set('b', '3e-05');
model.geom('geom1').runAll;
model.param.set('metro', '1[m]');
model.param.descr('metro', 'metro');
model.geom('geom1').feature('c2').set('r', 'b*metro');
model.geom('geom1').runAll;
model.geom('geom1').run;
model.param.set('tau', 'ncore/t');
model.variable.create('var5');
model.variable('var5').model('mod1');
model.variable('var5').set('tau', 'ncore/t');
model.param.remove('tau');
model.param.set('t', '1');
model.sol('sol2').study('std2');
model.sol('sol2').feature.remove('e1');
model.sol('sol2').feature.remove('v1');
model.sol('sol2').feature.remove('st1');
model.sol('sol2').feature.create('st1', 'StudyStep');
model.sol('sol2').feature('st1').set('study', 'std2');
model.sol('sol2').feature('st1').set('studystep', 'mode');
model.sol('sol2').feature.create('v1', 'Variables');
model.sol('sol2').feature('v1').set('control', 'mode');
model.sol('sol2').feature.create('e1', 'Eigenvalue');
model.sol('sol2').feature('e1').set('shift', '1.48');
model.sol('sol2').feature('e1').set('neigs', 20);
model.sol('sol2').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol2').feature('e1').set('control', 'mode');
model.sol('sol2').feature('e1').feature('aDef').set('complexfun', true);
model.sol('sol2').attach('std2');
model.sol('sol2').runAll;
model.result('pg2').run;
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'35'});
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'37'});
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'31'});
model.result('pg2').run;
model.variable('var5').active(false);
model.param.set('tau', '13.5e-5');
model.param.descr('tau', 'thermo-optic coefficient');
model.sol('sol2').study('std2');
model.sol('sol2').feature.remove('e1');
model.sol('sol2').feature.remove('v1');
model.sol('sol2').feature.remove('st1');
model.sol('sol2').feature.create('st1', 'StudyStep');
model.sol('sol2').feature('st1').set('study', 'std2');
model.sol('sol2').feature('st1').set('studystep', 'mode');
model.sol('sol2').feature.create('v1', 'Variables');
model.sol('sol2').feature('v1').set('control', 'mode');
model.sol('sol2').feature.create('e1', 'Eigenvalue');
model.sol('sol2').feature('e1').set('shift', '1.48');
model.sol('sol2').feature('e1').set('neigs', 20);
model.sol('sol2').feature('e1').set('transform', 'effective_mode_index');
model.sol('sol2').feature('e1').set('control', 'mode');
model.sol('sol2').feature('e1').feature('aDef').set('complexfun', true);
model.sol('sol2').attach('std2');
model.sol('sol2').runAll;
model.result('pg2').run;
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'20'});
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'19'});
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'17'});
model.result('pg2').run;
model.result('pg2').feature('surf1').set('looplevel', {'15'});
model.result('pg2').run;
model.sol('sol1').clearSolution;
model.sol('sol2').clearSolution;
out = model;