function out = model % % ic assignment.m % % Model exported on May 8 2011, 19:01 by COMSOL 4.1.0.88. import com.comsol.model.* import com.comsol.model.util.* model = ModelUtil.create('Model'); model.modelPath('C:\Users\bahie\Desktop'); model.modelNode.create('mod1'); model.geom.create('geom1', 3); model.mesh.create('mesh1', 'geom1'); model.physics.create('ht', 'HeatTransfer', 'geom1', {'I1' 'I2' 'I3' 'I4' 'I5' 'I6' 'I7' 'I8' 'I9' 'I10' 'I11' 'I12' 'I13' 'I14' 'I15' 'I16' 'I17' 'I18' 'I19' 'I20' 'I21' 'I22' 'I23' 'I24'}); model.physics.create('mfnc', 'MagnetostaticsNoCurrents', 'geom1'); model.study.create('std1'); model.study('std1').feature.create('stat', 'Stationary'); model.geom('geom1').run; model.geom('geom1').feature.create('cad1', 'LiveLinkInventor'); model.geom('geom1').feature('cad1').importData; model.geom('geom1').feature('cad1').set('keepfree', 'on'); model.geom('geom1').feature('cad1').importData; model.view('view1').hideObjects.clear; model.geom('geom1').run; model.view('view1').hideEntities.clear; model.physics('mfnc').feature('mfc1').set('mur_mat', 1, 'userdef'); model.physics('mfnc').feature('mfc1').set('mur_mat', 1, 'from_mat'); model.physics('mfnc').feature('mfc1').set('mur_mat', 1, 'userdef'); model.physics('mfnc').feature('mfc1').set('mur', {'1' '0' '0' '0' '1' '0' '0' '0' '1'}); model.physics('mfnc').feature('mfc1').set('mur_mat', 1, 'from_mat'); model.physics('mfnc').feature.create('fcal1', 'ForceCalculation', 3); model.physics('mfnc').feature.remove('fcal1'); model.physics('mfnc').feature.create('mflx1', 'MagneticFluxDensity', 2); model.physics('mfnc').feature('mflx1').selection.all; model.physics('mfnc').feature('mflx1').selection.set([]); model.physics('ht').feature('init1').set('T', 1, '600[K]'); model.physics('mfnc').feature('init1').set('Vm', 1, '20'); model.result.create('pg1', 'PlotGroup3D'); model.result('pg1').set('windowtitle', 'Graphics'); model.result('pg1').run; model.physics('mfnc').selection.set([]); model.selection.create('sel1'); model.selection('sel1').geom(3); model.selection('sel1').name('Selection 1'); model.selection('sel1').set([]); model.physics('mfnc').selection.named('sel1'); model.material.create('mat1'); model.material('mat1').selection.geom('geom1', 2); model.material('mat1').selection.set([32 33 56]); model.material('mat1').selection.geom('geom1', 1); model.material('mat1').selection.geom('geom1', 0); model.material('mat1').selection.geom('geom1', 1); model.material('mat1').selection.geom('geom1', 3); model.material('mat1').selection.all; model.material('mat1').materialModel.create('mod1', 'User-defined property group'); model.material.remove('mat1'); model.geom('geom1').feature('cad1').importData; model.geom('geom1').feature('cad1').setIndex('param', 'd37', 0); model.geom('geom1').feature('cad1').setIndex('paramvalue', '0', 0); model.geom('geom1').feature('cad1').setIndex('paramvalue', '32', 0); model.geom('geom1').feature('cad1').importData; out = model;