model = ModelUtil.create('Model'); model.component.create('comp1', true); model.component('comp1').geom.create('geom1', 3); model.component('comp1').geom('geom1').create('wp1', 'WorkPlane'); model.component('comp1').geom('geom1').feature('wp1').geom.create('sq1', 'Square'); model.component('comp1').physics.create('shell', 'Shell', 'geom1'); model.component('comp1').physics('shell').feature('emm1').set('E_mat', 'userdef'); model.component('comp1').physics('shell').feature('emm1').set('E', '2e11'); model.component('comp1').physics('shell').feature('emm1').set('nu_mat', 'userdef'); model.component('comp1').physics('shell').feature('emm1').set('nu', 0.3); model.component('comp1').physics('shell').feature('emm1').set('rho_mat', 'userdef'); model.component('comp1').physics('shell').feature('emm1').set('rho', 7800); model.component('comp1').mesh.create('mesh1'); model.component('comp1').mesh('mesh1').feature('size').set('hauto', 9); model.study.create('std1'); model.study('std1').create('eig', 'Eigenfrequency'); model.sol.create('sol1'); model.sol('sol1').study('std1'); model.sol('sol1').attach('std1'); model.sol('sol1').create('st1', 'StudyStep'); model.sol('sol1').create('v1', 'Variables'); model.sol('sol1').create('e1', 'Eigenvalue'); str = mphmatrix(model,'sol1','out',{'N'}); [~,col0]=find(str.N~=0); dof0=mod(col0-1,6)+1;%each node has 6 dofs