function out = model % % build_fig1b_model.m % % Model exported on May 21 2014, 16:11 by COMSOL 4.4.0.248. import com.comsol.model.* import com.comsol.model.util.* model = ModelUtil.create('Model'); model.modelPath('/Users/Xiuming/Documents/Research/Bertoldi/Tianxue Ma et al/Fig 1b'); model.modelNode.create('comp1'); model.geom.create('geom1', 3); model.mesh.create('mesh1', 'geom1'); model.physics.create('emw', 'ElectromagneticWaves', 'geom1'); model.study.create('std1'); model.study('std1').feature.create('eig', 'Eigenfrequency'); model.study('std1').feature('eig').activate('emw', true); model.param.set('a', '667[nm]'); model.param.set('R', '250[nm]'); model.param.set('r', '67[nm]'); model.param.set('k', 'pi/a'); model.param.set('k1', '1'); model.param.set('k2', '1'); model.param.set('k3', '1'); model.variable.create('var1'); model.variable('var1').model('comp1'); model.geom('geom1').run; model.variable('var1').set('kx', 'k*k1'); model.variable('var1').set('ky', 'k*k2'); model.variable('var1').set('kz', 'k*k3'); model.geom('geom1').feature.create('blk1', 'Block'); model.geom('geom1').feature('blk1').set('base', 'center'); model.geom('geom1').feature('blk1').setIndex('size', 'a', 0); model.geom('geom1').feature('blk1').setIndex('size', 'a', 1); model.geom('geom1').feature('blk1').setIndex('size', 'a', 2); model.name('fig1b.mph'); model.geom('geom1').run('blk1'); model.geom('geom1').feature.create('sph1', 'Sphere'); model.geom('geom1').feature('sph1').set('r', 'R'); model.geom('geom1').feature('sph1').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('sph1').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('sph1').setIndex('pos', '-a/2', 2); model.geom('geom1').run('sph1'); model.geom('geom1').feature.create('sph2', 'Sphere'); model.geom('geom1').feature('sph2').set('r', 'R'); model.geom('geom1').feature('sph2').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('sph2').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('sph2').setIndex('pos', 'a/2', 2); model.geom('geom1').run('sph2'); model.geom('geom1').feature.create('sph3', 'Sphere'); model.geom('geom1').feature('sph3').set('r', 'R'); model.geom('geom1').feature('sph3').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('sph3').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('sph3').setIndex('pos', '-a/2', 2); model.geom('geom1').run('sph3'); model.geom('geom1').feature.create('cyl1', 'Cylinder'); model.geom('geom1').feature.remove('cyl1'); model.geom('geom1').run('sph3'); model.geom('geom1').feature.create('sph4', 'Sphere'); model.geom('geom1').feature('sph4').set('r', 'R'); model.geom('geom1').feature('sph4').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('sph4').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('sph4').setIndex('pos', '-a/2', 2); model.geom('geom1').run('sph4'); model.geom('geom1').feature.create('sph5', 'Sphere'); model.geom('geom1').feature('sph5').set('r', 'R'); model.geom('geom1').feature('sph5').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('sph5').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('sph5').setIndex('pos', '-a/2', 2); model.geom('geom1').run('sph5'); model.geom('geom1').feature.create('sph6', 'Sphere'); model.geom('geom1').feature('sph6').set('r', 'R'); model.geom('geom1').feature('sph6').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('sph6').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('sph6').setIndex('pos', 'a/2', 2); model.geom('geom1').run('sph6'); model.geom('geom1').feature.create('sph7', 'Sphere'); model.geom('geom1').feature('sph7').set('r', 'R'); model.geom('geom1').feature('sph7').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('sph7').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('sph7').setIndex('pos', 'a/2', 2); model.geom('geom1').run('sph7'); model.geom('geom1').feature.create('sph8', 'Sphere'); model.geom('geom1').feature('sph8').set('r', 'R'); model.geom('geom1').feature('sph8').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('sph8').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('sph8').setIndex('pos', 'a/2', 2); model.geom('geom1').run('sph8'); model.geom('geom1').feature.create('cyl1', 'Cylinder'); model.geom('geom1').feature('cyl1').set('r', 'r'); model.geom('geom1').feature('cyl1').set('h', 'a'); model.geom('geom1').feature('cyl1').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl1').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl1').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl1'); model.geom('geom1').feature.create('cyl2', 'Cylinder'); model.geom('geom1').feature('cyl2').set('r', 'r'); model.geom('geom1').feature('cyl2').set('h', 'a'); model.geom('geom1').feature('cyl2').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('cyl2').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl2').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl2'); model.geom('geom1').feature.create('cyl3', 'Cylinder'); model.geom('geom1').feature('cyl3').set('r', 'r'); model.geom('geom1').feature('cyl3').set('h', 'a'); model.geom('geom1').feature('cyl3').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl3').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('cyl3').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl3'); model.geom('geom1').feature.create('cyl4', 'Cylinder'); model.geom('geom1').feature('cyl4').set('r', 'r'); model.geom('geom1').feature('cyl4').set('h', 'a'); model.geom('geom1').feature('cyl4').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('cyl4').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('cyl4').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl4'); model.geom('geom1').feature.create('cyl5', 'Cylinder'); model.geom('geom1').feature('cyl5').set('r', 'r'); model.geom('geom1').feature('cyl5').set('h', 'a'); model.geom('geom1').feature('cyl5').set('axistype', 'y'); model.geom('geom1').feature('cyl5').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl5').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl5').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl5'); model.geom('geom1').feature.create('cyl6', 'Cylinder'); model.geom('geom1').feature('cyl6').set('r', 'r'); model.geom('geom1').feature('cyl6').set('h', 'a'); model.geom('geom1').feature('cyl6').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('cyl6').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl6').set('axistype', 'y'); model.geom('geom1').feature('cyl6').setIndex('pos', '-a/2', 2); model.geom('geom1').run('cyl6'); model.geom('geom1').feature.create('cyl7', 'Cylinder'); model.geom('geom1').feature('cyl7').setIndex('pos', 'a/2', 0); model.geom('geom1').feature('cyl7').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl7').setIndex('pos', 'a/2', 2); model.geom('geom1').feature('cyl7').set('r', 'r'); model.geom('geom1').feature('cyl7').set('h', 'a'); model.geom('geom1').run('cyl7'); model.geom('geom1').feature.create('cyl8', 'Cylinder'); model.geom('geom1').feature('cyl7').set('axistype', 'y'); model.geom('geom1').feature('cyl8').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl8').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl8').setIndex('pos', 'a/2', 2); model.geom('geom1').feature('cyl8').set('r', 'r'); model.geom('geom1').feature('cyl8').set('axistype', 'y'); model.geom('geom1').feature('cyl8').set('h', 'a'); model.geom('geom1').run('cyl8'); model.geom('geom1').feature.create('cyl9', 'Cylinder'); model.geom('geom1').feature('cyl9').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl9').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('cyl9').setIndex('pos', 'a/2', 2); model.geom('geom1').feature('cyl9').set('r', 'r'); model.geom('geom1').feature('cyl9').set('axistype', 'x'); model.geom('geom1').feature('cyl9').set('h', 'a'); model.geom('geom1').run('cyl9'); model.geom('geom1').feature.create('cyl10', 'Cylinder'); model.geom('geom1').feature('cyl10').set('r', 'r'); model.geom('geom1').feature('cyl10').set('h', 'a'); model.geom('geom1').feature('cyl10').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl10').setIndex('pos', 'a/2', 1); model.geom('geom1').feature('cyl10').set('axistype', 'x'); model.geom('geom1').feature('cyl10').setIndex('pos', 'a/2', 2); model.geom('geom1').run('cyl10'); model.geom('geom1').feature.create('cyl11', 'Cylinder'); model.geom('geom1').feature('cyl10').setIndex('pos', '-a/2', 2); model.geom('geom1').feature('cyl11').set('r', 'r'); model.geom('geom1').feature('cyl11').set('h', 'a'); model.geom('geom1').feature('cyl11').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl11').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl11').setIndex('pos', '-a/2', 2); model.geom('geom1').feature('cyl11').set('axistype', 'x'); model.geom('geom1').run('cyl11'); model.geom('geom1').feature.create('cyl12', 'Cylinder'); model.geom('geom1').feature('cyl12').set('r', 'r'); model.geom('geom1').feature('cyl12').set('h', 'a'); model.geom('geom1').feature('cyl12').setIndex('pos', '-a/2', 0); model.geom('geom1').feature('cyl12').setIndex('pos', '-a/2', 1); model.geom('geom1').feature('cyl12').set('axistype', 'x'); model.geom('geom1').feature('cyl12').setIndex('pos', 'a/2', 2); model.geom('geom1').run('fin'); model.geom('geom1').run('cyl12'); model.geom('geom1').feature.create('co1', 'Compose'); model.geom('geom1').feature.remove('co1'); model.geom('geom1').run('cyl12'); model.geom('geom1').feature.create('uni1', 'Union'); model.geom('geom1').feature('uni1').selection('input').set({'cyl1' 'cyl10' 'cyl11' 'cyl12' 'cyl2' 'cyl3' 'cyl4' 'cyl5' 'cyl6' 'cyl7' ... 'cyl8' 'cyl9' 'sph1' 'sph2' 'sph3' 'sph4' 'sph5' 'sph6' 'sph7' 'sph8'}); model.geom('geom1').feature('uni1').set('intbnd', 'off'); model.geom('geom1').run('uni1'); model.geom('geom1').feature.duplicate('uni2', 'uni1'); model.geom('geom1').feature('uni2').selection('input').set({'uni1'}); model.geom('geom1').feature.remove('uni2'); model.geom('geom1').run('uni1'); model.geom('geom1').feature.create('int1', 'Intersection'); model.geom('geom1').feature('int1').selection('input').set({'blk1' 'uni1'}); model.geom('geom1').feature('int1').set('intbnd', 'off'); model.geom('geom1').run('int1'); model.geom('geom1').feature.duplicate('int2', 'int1'); model.geom('geom1').feature('int2').selection('input').set({'int1'}); model.geom('geom1').feature('int2').set('keep', 'on'); model.geom('geom1').run('int2'); model.geom('geom1').feature.create('blk2', 'Block'); model.geom('geom1').feature('blk2').setIndex('size', 'a', 0); model.geom('geom1').feature('blk2').setIndex('size', 'a', 1); model.geom('geom1').feature('blk2').setIndex('size', 'a', 2); model.geom('geom1').feature('blk2').set('base', 'center'); model.geom('geom1').run('blk2'); model.geom('geom1').feature.create('dif1', 'Difference'); model.geom('geom1').feature('dif1').selection('input').set({'blk2'}); model.geom('geom1').feature('dif1').selection('input2').set({'int1'}); model.geom('geom1').run('dif1'); model.geom('geom1').run; model.material.create('mat1'); model.material('mat1').name('Air'); model.material('mat1').set('family', 'air'); model.material('mat1').propertyGroup('def').set('relpermeability', '1'); model.material('mat1').propertyGroup('def').set('relpermittivity', '1'); model.material('mat1').propertyGroup('def').set('dynamicviscosity', 'eta(T[1/K])[Pa*s]'); model.material('mat1').propertyGroup('def').set('ratioofspecificheat', '1.4'); model.material('mat1').propertyGroup('def').set('electricconductivity', '0[S/m]'); model.material('mat1').propertyGroup('def').set('heatcapacity', 'Cp(T[1/K])[J/(kg*K)]'); model.material('mat1').propertyGroup('def').set('density', 'rho(pA[1/Pa],T[1/K])[kg/m^3]'); model.material('mat1').propertyGroup('def').set('thermalconductivity', 'k(T[1/K])[W/(m*K)]'); model.material('mat1').propertyGroup('def').set('soundspeed', 'cs(T[1/K])[m/s]'); model.material('mat1').propertyGroup('def').func.create('eta', 'Piecewise'); model.material('mat1').propertyGroup('def').func('eta').set('funcname', 'eta'); model.material('mat1').propertyGroup('def').func('eta').set('arg', 'T'); model.material('mat1').propertyGroup('def').func('eta').set('extrap', 'constant'); model.material('mat1').propertyGroup('def').func('eta').set('pieces', {'200.0' '1600.0' '-8.38278E-7+8.35717342E-8*T^1-7.69429583E-11*T^2+4.6437266E-14*T^3-1.06585607E-17*T^4'}); model.material('mat1').propertyGroup('def').func.create('Cp', 'Piecewise'); model.material('mat1').propertyGroup('def').func('Cp').set('funcname', 'Cp'); model.material('mat1').propertyGroup('def').func('Cp').set('arg', 'T'); model.material('mat1').propertyGroup('def').func('Cp').set('extrap', 'constant'); model.material('mat1').propertyGroup('def').func('Cp').set('pieces', {'200.0' '1600.0' '1047.63657-0.372589265*T^1+9.45304214E-4*T^2-6.02409443E-7*T^3+1.2858961E-10*T^4'}); model.material('mat1').propertyGroup('def').func.create('rho', 'Analytic'); model.material('mat1').propertyGroup('def').func('rho').set('funcname', 'rho'); model.material('mat1').propertyGroup('def').func('rho').set('args', {'pA' 'T'}); model.material('mat1').propertyGroup('def').func('rho').set('expr', 'pA*0.02897/8.314/T'); model.material('mat1').propertyGroup('def').func('rho').set('dermethod', 'manual'); model.material('mat1').propertyGroup('def').func('rho').set('argders', {'pA' 'd(pA*0.02897/8.314/T,pA)'; 'T' 'd(pA*0.02897/8.314/T,T)'}); model.material('mat1').propertyGroup('def').func.create('k', 'Piecewise'); model.material('mat1').propertyGroup('def').func('k').set('funcname', 'k'); model.material('mat1').propertyGroup('def').func('k').set('arg', 'T'); model.material('mat1').propertyGroup('def').func('k').set('extrap', 'constant'); model.material('mat1').propertyGroup('def').func('k').set('pieces', {'200.0' '1600.0' '-0.00227583562+1.15480022E-4*T^1-7.90252856E-8*T^2+4.11702505E-11*T^3-7.43864331E-15*T^4'}); model.material('mat1').propertyGroup('def').func.create('cs', 'Analytic'); model.material('mat1').propertyGroup('def').func('cs').set('funcname', 'cs'); model.material('mat1').propertyGroup('def').func('cs').set('args', {'T'}); model.material('mat1').propertyGroup('def').func('cs').set('expr', 'sqrt(1.4*287*T)'); model.material('mat1').propertyGroup('def').func('cs').set('dermethod', 'manual'); model.material('mat1').propertyGroup('def').func('cs').set('argders', {'T' 'd(sqrt(1.4*287*T),T)'}); model.material('mat1').propertyGroup('def').addInput('temperature'); model.material('mat1').propertyGroup('def').addInput('pressure'); model.material('mat1').propertyGroup.create('RefractiveIndex', 'Refractive index'); model.material('mat1').propertyGroup('RefractiveIndex').set('n', '1'); model.material('mat1').set('family', 'air'); model.material('mat1').selection.set([2]); model.material.create('mat2'); model.material('mat2').name('Silicon'); model.material('mat2').set('family', 'custom'); model.material('mat2').set('lighting', 'cooktorrance'); model.material('mat2').set('specular', 'custom'); model.material('mat2').set('customspecular', [0.7843137254901961 1 1]); model.material('mat2').set('fresnel', 0.9); model.material('mat2').set('roughness', 0.1); model.material('mat2').set('shininess', 200); model.material('mat2').set('diffuse', 'custom'); model.material('mat2').set('customdiffuse', [0.6666666666666666 0.6666666666666666 0.7058823529411765]); model.material('mat2').set('ambient', 'custom'); model.material('mat2').set('customambient', [0.6666666666666666 0.6666666666666666 0.7058823529411765]); model.material('mat2').set('fresnel', 0.7); model.material('mat2').set('roughness', 0.5); model.material('mat2').propertyGroup('def').set('relpermeability', '1'); model.material('mat2').propertyGroup('def').set('electricconductivity', '1e-12[S/m]'); model.material('mat2').propertyGroup('def').set('thermalexpansioncoefficient', '2.6e-6[1/K]'); model.material('mat2').propertyGroup('def').set('heatcapacity', '700[J/(kg*K)]'); model.material('mat2').propertyGroup('def').set('relpermittivity', '11.7'); model.material('mat2').propertyGroup('def').set('density', '2329[kg/m^3]'); model.material('mat2').propertyGroup('def').set('thermalconductivity', '130[W/(m*K)]'); model.material('mat2').propertyGroup.create('Enu', 'Young''s modulus and Poisson''s ratio'); model.material('mat2').propertyGroup('Enu').set('poissonsratio', '0.28'); model.material('mat2').propertyGroup('Enu').set('youngsmodulus', '170e9[Pa]'); model.material('mat2').propertyGroup.create('RefractiveIndex', 'Refractive index'); model.material('mat2').propertyGroup('RefractiveIndex').set('n', '3.48'); model.material('mat2').set('family', 'custom'); model.material('mat2').set('lighting', 'cooktorrance'); model.material('mat2').set('specular', 'custom'); model.material('mat2').set('customspecular', [0.7843137254901961 1 1]); model.material('mat2').set('fresnel', 0.9); model.material('mat2').set('roughness', 0.1); model.material('mat2').set('shininess', 200); model.material('mat2').set('diffuse', 'custom'); model.material('mat2').set('customdiffuse', [0.6666666666666666 0.6666666666666666 0.7058823529411765]); model.material('mat2').set('ambient', 'custom'); model.material('mat2').set('customambient', [0.6666666666666666 0.6666666666666666 0.7058823529411765]); model.material('mat2').set('fresnel', 0.7); model.material('mat2').set('roughness', 0.5); model.material('mat2').selection.set([1]); model.physics('emw').feature.create('pc1', 'PeriodicCondition', 2); model.physics('emw').feature('pc1').selection.set([1 5 31 32]); model.physics('emw').feature('pc1').set('PeriodicType', 1, 'Floquet'); model.physics('emw').feature('pc1').set('kFloquet', {'kx' 'ky' 'kz'}); model.physics('emw').feature.create('pc2', 'PeriodicCondition', 2); model.physics('emw').feature('pc2').selection.set([3 4 16 17]); model.physics('emw').feature('pc2').set('PeriodicType', 1, 'Floquet'); model.physics('emw').feature('pc2').set('kFloquet', {'kx' 'ky' 'kz'}); model.physics('emw').feature.create('pc3', 'PeriodicCondition', 2); model.physics('emw').feature('pc3').selection.set([2 14 15 18]); model.physics('emw').feature('pc3').set('PeriodicType', 1, 'Floquet'); model.physics('emw').feature('pc3').set('kFloquet', {'kx' 'ky' 'kz'}); model.mesh('mesh1').automatic(false); model.mesh('mesh1').feature.remove('ftet1'); model.mesh('mesh1').feature.create('ftri1', 'FreeTri'); model.mesh('mesh1').feature('ftri1').selection.set([1]); model.mesh('mesh1').feature.create('cpf1', 'CopyFace'); model.mesh('mesh1').feature('cpf1').selection('source').set([1]); model.mesh('mesh1').feature('cpf1').selection('destination').set([31]); model.mesh('mesh1').feature.create('ftri2', 'FreeTri'); model.mesh('mesh1').feature('ftri2').selection.set([5]); model.mesh('mesh1').feature.create('cpf2', 'CopyFace'); model.mesh('mesh1').feature('cpf2').selection('source').set([5]); model.mesh('mesh1').feature('cpf2').selection('destination').set([32]); model.mesh('mesh1').feature.create('ftri3', 'FreeTri'); model.mesh('mesh1').feature('ftri3').selection.set([4]); model.mesh('mesh1').feature.create('cpf3', 'CopyFace'); model.mesh('mesh1').feature('cpf3').selection('source').set([4]); model.mesh('mesh1').feature('cpf3').selection('destination').set([3]); model.mesh('mesh1').feature.create('ftri4', 'FreeTri'); model.mesh('mesh1').feature('ftri4').selection.set([17]); model.mesh('mesh1').feature.create('cpf4', 'CopyFace'); model.mesh('mesh1').feature('cpf4').selection('source').set([17]); model.mesh('mesh1').feature('cpf4').selection('destination').set([16]); model.mesh('mesh1').feature.create('ftri5', 'FreeTri'); model.mesh('mesh1').feature('ftri5').selection.set([2]); model.mesh('mesh1').feature.create('cpf5', 'CopyFace'); model.mesh('mesh1').feature('cpf5').selection('source').set([2]); model.mesh('mesh1').feature('cpf5').selection('destination').set([14]); model.mesh('mesh1').feature.create('ftri6', 'FreeTri'); model.mesh('mesh1').feature('ftri6').selection.set([15]); model.mesh('mesh1').feature.create('cpf6', 'CopyFace'); model.mesh('mesh1').feature('cpf6').selection('source').set([15]); model.mesh('mesh1').feature('cpf6').selection('destination').set([18]); model.mesh('mesh1').feature.create('ftet1', 'FreeTet'); model.mesh('mesh1').feature('size').set('hauto', '6'); model.mesh('mesh1').run; model.mesh('mesh1').feature('size').set('hauto', '5'); model.mesh('mesh1').run; model.study('std1').feature('eig').set('neigs', '10'); model.study('std1').feature('eig').set('shift', '1.7e14'); model.sol.create('sol1'); model.sol('sol1').study('std1'); model.sol('sol1').feature.create('st1', 'StudyStep'); model.sol('sol1').feature('st1').set('study', 'std1'); model.sol('sol1').feature('st1').set('studystep', 'eig'); model.sol('sol1').feature.create('v1', 'Variables'); model.sol('sol1').feature('v1').set('control', 'eig'); model.sol('sol1').feature.create('e1', 'Eigenvalue'); model.sol('sol1').feature('e1').set('shift', '1.7e14'); model.sol('sol1').feature('e1').set('neigs', 10); model.sol('sol1').feature('e1').set('transform', 'eigenfrequency'); model.sol('sol1').feature('e1').set('control', 'eig'); model.sol('sol1').feature('e1').feature('aDef').set('complexfun', true); model.sol('sol1').attach('std1'); % model.result.create('pg1', 'PlotGroup3D'); % model.result('pg1').name('Electric Field (emw)'); % model.result('pg1').set('oldanalysistype', 'noneavailable'); % model.result('pg1').set('frametype', 'spatial'); % model.result('pg1').set('data', 'dset1'); % model.result('pg1').feature.create('mslc1', 'Multislice'); % model.result('pg1').feature('mslc1').set('oldanalysistype', 'noneavailable'); % model.result('pg1').feature('mslc1').set('data', 'parent'); % % model.sol('sol1').runAll; % % model.result('pg1').run; % model.result('pg1').run; model.sol('sol1').feature('e1').feature('aDef').set('nullfun', 'flnullorth'); out = model;