Таблица лидеров


Популярный контент

Наибольшее число лайков, начиная с 27.06.2017 в Комментарии в профилях

  1. 1 лайк
    Показать содержимое практика !тест, два торца балки из твёрдотельных/оболочек finish /clear,nostart !константы use_solid=0 !0 - shell, 1 - solid use_solid73=0 !1 - solid185 mainname='test6' numpoints=200 !точек интерполяции library_name='macroslib' $ *ULIB,macroslib,lib *IF,use_solid,EQ,1,THEN name_sol='%mainname%_solid_submodel' *ELSE name_sol='%mainname%_shell_submodel' *ENDIF beam_length=1 $ beam_heigth=0.1 $ beam_width=0.1 $ tolsh=4e-3 x0=0.05 $ x1=0.6 Young=2.1e11 $ Puasson=0.3 $ Plotnost=7800 solid_esize=beam_heigth/20 *IF,submodel_esize,LT,5e-3,THEN submodel_esize=tolsh/1.5 *ELSE submodel_esize=tolsh/3 *ENDIF *IF,use_solid,EQ,1,THEN solid_pressure=-1e6 *ELSE solid_pressure=-1e3 *ENDIF t=beam_heigth/10 t1=beam_length/100 newtolerance=1e-7 *DIM,paths,string,248,6 *DIM,paths2,string,248,2 filename_coords_stress_to_Sc_1='%mainname%_data_1' filename_coords_stress_to_Sc_2='%mainname%_data_2' paths(1,1)='C:\CAD\scilab-6.0.0\bin\scilex' paths(1,2)=' -f ' paths(1,3)='C:\Users\medvedev-nl\Documents\praktika_2017_Kazancev' $ paths2(1,1)='C:\Users\medvedev-nl\Documents\praktika_2017_Kazancev' paths(1,4)='\%mainname%' $ paths2(1,2)='\%mainname%' paths(1,5)='_1.sce -args ' !paths(1,3) paths(1,6)='\%filename_coords_stress_to_Sc_1%.txt' *CREATE,ansuitmp *CFOPEN,'run1','bat','' *VWRITE,paths(1,1),paths(1,2),paths(1,3),paths(1,4),paths(1,5),paths(1,3),paths(1,6), , , %s%s %s%s%s %s%s *CFCLOS *END /INPUT,ansuitmp paths(1,6)='\%filename_coords_stress_to_Sc_2%.txt' *CREATE,ansuitmp *CFOPEN,'run2','bat','' *VWRITE,paths(1,1),paths(1,2),paths(1,3),paths(1,4),paths(1,5),paths(1,3),paths(1,6), , , %s%s %s%s%s %s%s *CFCLOS *END /INPUT,ansuitmp !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ ! 1-й этап - задача с твёрдотельными !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ /filname,%name_sol% /prep7 MPTEMP $ MPTEMP,1,0 MPDATA,EX,1,,Young MPDATA,PRXY,1,,Puasson MPDATA,dens,1,,Plotnost *IF,use_solid,EQ,1,THEN *IF,use_solid73,EQ,1,THEN ET,1,solid73 *ELSE ET,1,solid185 *ENDIF *ELSE ET,1,SHELL181 $ KEYOPT,1,1,0 $ KEYOPT,1,3,0 $ KEYOPT,1,8,0 $ KEYOPT,1,9,0 sect,1,shell $ secdata, tolsh,1,0.0,3 $ secoffset,MID $ seccontrol *ENDIF *IF,use_solid,EQ,1,THEN !BLOCK,0,beam_length,0,beam_heigth,0,beam_width, BLOCK,0,x0,0,beam_heigth,0,beam_width, BLOCK,x0,x1,0,beam_heigth,0,beam_width, BLOCK,x1,beam_length,0,beam_heigth,0,beam_width, allsel,all ESIZE,solid_esize vsel,s,,,1 $ vsweep,all $ vsel,s,,,2 $ vsweep,all $ vsel,s,,,3 $ vsweep,all *ELSE BLOCK,0,beam_length,0,beam_heigth,0,beam_width, allsel,all $ vdele,all asel,s,loc,x,0 $ asel,a,loc,x,beam_length $ adele,all allsel,all $ ESIZE,solid_esize $ amesh,all *ENDIF /pnum,area,on $ aplot $ /PBC,all,0 !/PBC,ALL, ,1 asel,s,loc,y,beam_heigth SFA,all,,PRES,solid_pressure ! APPLY TENSION ON PLATE !контакты, 2 группы *IF,use_solid,EQ,1,THEN ET,2,CONTA173 ! 171 // Verification Manual :: 0 // A. Verification Test Case Input Listings // A.272. VM272 Input Listing ET,3,TARGE170 KEYOPT,2,5,1 !KEYOPT,2,4, 3 !0 !DETECTION BY MORTAR KEYOPT,2,10,2 !0 !CONTACT STIFFNESS BY STRESS KEYOPT,2,12,3 !bonded KEYOPT,3,1,1 !KEYOPT,3,5,1 ASEL,S,,,6 $ NSLA,S,6 $ ESLN,S TYPE,2 $ REAL,3 $ ESURF !MESH WITH CONTACT ELEMENTS TYPE,3 $ ASEL,S,,,11 $ NSLA,S,11 $ ESLN,S $ ESURF !CHOOSE LOCATION FOR TARGET ASEL,S,,,12 $ NSLA,S,12 $ ESLN,S TYPE,2 $ REAL,3 $ ESURF !MESH WITH CONTACT ELEMENTS TYPE,3 $ ASEL,S,,,17 $ NSLA,S,17 $ ESLN,S $ ESURF !CHOOSE LOCATION FOR TARGET *ENDIF nsel,s,loc,x,0 d,all,all allsel,all /solu EQSLV,PCG,1E-4 solve /post1 set,last plnsol,s,eqv allsel,all force,total FINISH $ SAVE ! SAVE FILE AS %name_sol%.DB PARSAV,all,test_submodel_params,txt !save all parameters finish !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ ! 2-й этап - твёрдотельная подмодель ! 3,4 см. в макросах !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ *IF,use_solid,EQ,0,THEN !зададим две плоскости, на которых поместим !два твёрдотельных блока *use,mymacro1_6,1,filename_coords_stress_to_Sc_1 *use,mymacro1_6,2,filename_coords_stress_to_Sc_2 *IF,0,EQ,1,THEN /CLEAR, NOSTART ! CLEAR THE DATABASE /FILNAM,SUBMODEL ! DEFINE JOBNAME FOR THE SUBMODEL /PREP7 PARRES,new,test_submodel_params,txt *ULIB,macroslib,lib /TITLE,%name_sol% *USE,mymacro1_1,1,filename_coords_stress_to_Sc_1 RESUME,%name_sol%,db ! RESUME FROM FILE VM142.DB *USE,mymacro1_2,1,filename_coords_stress_to_Sc_1 RESUME ! RESUME SUBMODEL FROM FILE SUBMODEL.DB *USE,mymacro1_3,1,filename_coords_stress_to_Sc_1 finish /CLEAR, NOSTART ! CLEAR THE DATABASE /FILNAM,SUBMODEL ! DEFINE JOBNAME FOR THE SUBMODEL /PREP7 PARRES,new,test_submodel_params,txt *ULIB,macroslib,lib /TITLE,%name_sol% *USE,mymacro1_1,2,filename_coords_stress_to_Sc_2 RESUME,%name_sol%,db ! RESUME FROM FILE VM142.DB *USE,mymacro1_2,2,filename_coords_stress_to_Sc_2 RESUME ! RESUME SUBMODEL FROM FILE SUBMODEL.DB *USE,mymacro1_3,2,filename_coords_stress_to_Sc_2 *ENDIF *ELSE seltol,newtolerance /post1 $ set,last $ plnsol,s,eqv *use,mymacro1_5,1,filename_coords_stress_to_Sc_1,2 ! /post1 set,last $ plnsol,s,eqv *use,mymacro1_5,2,filename_coords_stress_to_Sc_2,2 *ENDIF !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ ! 5-й этап - создаём произвольный solid, ! выбираем требуемую поверхность, ! забираем из файла силы и прикладываем к узлам новой геометрии !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ FINISH /PREP7 RESUME ! RESUME SUBMODEL FROM FILE SUBMODEL.DB ! *Sread,Scilab_exe(1,1),test_submodel_params2 PARRES,new,test_submodel_params,txt /syp,run1.bat *use,mymacro2_7,1 !,test6_xyz_data_1 !чтение созданных файлов /syp,run2.bat *use,mymacro2_7,2 !,test6_xyz_data_1 !чтение созданных файлов !/uis,msgpop,3 t0=tolsh /prep7 allsel,all lsclear,all VCLEAR,all vdele,all $ adele,all $ ldele,all $ kdele,all CWZDELE,3,1,'' t=t0 *IF,use_solid,EQ,1,THEN BLOCK,x0 ,x1 ,-0,beam_heigth,-0,beam_width+0, !BLOCK,0-t,10+5*t+t,0+t,1-t,0+t,1-t !vsbv,1,2 $ !vsbv,1,3,,,KEEP $ !vsbv,2,3 *ELSE BLOCK,x0 ,x1 ,-0,beam_heigth+0,-0,beam_width+0, BLOCK,0-t,beam_length+5*t+t,t0,beam_heigth-t0,t0,beam_width-t0 vsbv,1,2 !vsbv,1,3,,,KEEP $ !vsbv,2,3 *ENDIF vsel,all *IF,use_solid,EQ,1,THEN esize,solid_esize VSWEEP,all *ELSE MSHAPE,1,3D $ MSHKEY,0 esize,solid_esize !submodel_esize !solid_esize/5 allsel,all $ vmesh,all asel,s,loc,x,x0 $ asel,a,loc,x,x1 AREFINE,all, , ,1,3,1,1 *ENDIF nsel,s,loc,X,x0 $ nsle,r,corner !выделить узлы кроме центральных !/uis,msgpop,0 F,all,FX, %FX1_IN% $ F,all,FY, %FY1_IN% $ F,all,FZ, %FZ1_IN% ! F,all,MX, %MY1_IN% $ F,all,MY, %MX1_IN% $ F,all,MZ, %MZ1_IN% nsel,s,loc,X,x1 $ nsle,r,corner !выделить узлы кроме центральных !/uis,msgpop,0 F,all,FX, %FX2_IN% $ F,all,FY, %FY2_IN% $ F,all,FZ, %FZ2_IN% ! F,all,MX, %MX2_IN% $ F,all,MY, %MY2_IN% $ F,all,MZ, %MZ2_IN% ! d,all,all asel,s,loc,y,beam_heigth SFA,all,,PRES,solid_pressure ! APPLY TENSION ON PLATE allsel,all gplot irlf,1 !nsel,s,loc,x,x0 !nsel,r,loc,y,0 !nsel,r,loc,z,0 !d,all,ux,0 $ d,all,uy,0 $ d,all,uz,0 !allsel,all ANTYPE,0 !NLGEOM,1 EQSLV,PCG,1E-4,1 !EQSLV,JCG,1E-4,1 !nlgeom,on /solu solve /post1 allsel,all plnsol,s,eqv mymacro1_1 !ARG1=x0|x1 => 1|2 !ARG2=filename_coords_stress_to_Scilab_1|2 *IF,ARG1,EQ,1,THEN parx=x0 *ELSE parx=x1 *ENDIF MPTEMP $ MPTEMP,1,0 MPDATA,EX,1,,Young MPDATA,PRXY,1,,Puasson MPDATA,DENS,1,,Plotnost !fake material MPTEMP $ MPTEMP,1,0 MPDATA,EX,2,,Young/1000e6 MPDATA,PRXY,2,,Puasson MPDATA,DENS,2,,Plotnost/1e6 ET,1,SOLID185 *IF,ARG1,EQ,1,THEN BLOCK,x0,x0+10*submodel_esize,0-tolsh/2,beam_heigth+tolsh/2,0-tolsh/2,beam_width+tolsh/2 BLOCK,x0-t,x0+2*t+t,0+tolsh/2,beam_heigth-tolsh/2,0+tolsh/2,beam_width-tolsh/2 ! BLOCK,x0,x0+2*t,0-tolsh/2,beam_heigth+tolsh/2,0-tolsh/2,beam_width+tolsh/2 ! BLOCK,x0-t,x0+2*t+t,0+tolsh/2,beam_heigth-tolsh/2,0+tolsh/2,beam_width-tolsh/2 *ELSE BLOCK,x1,x1+10*submodel_esize,0-tolsh/2,beam_heigth+tolsh/2,0-tolsh/2,beam_width+tolsh/2 BLOCK,x1-t,x1+11*submodel_esize,0+tolsh/2,beam_heigth-tolsh/2,0+tolsh/2,beam_width-tolsh/2 ! BLOCK,x1,x1-2*t,0-tolsh/2,beam_heigth+tolsh/2,0-tolsh/2,beam_width+tolsh/2 ! BLOCK,x1+t,x1-2*t-t,0+tolsh/2,beam_heigth-tolsh/2,0+tolsh/2,beam_width-tolsh/2 *ENDIF allsel,all VOVLAP,all vdele,3 $ vdele,4 vsel,s,,,5 $ vatt,2,,1 vsel,s,,,6 $ vatt,1,,1 vsel,all esize,submodel_esize VSWEEP,all esel,s,mat,,1 NSLE,S !nsel,s,loc,x,parx ! SELECT NODES OF CUT BOUNDARY NWRITE ! WRITE GEOMETRY TO SUBMODEL.NODE allsel,all FINISH SAVE ! SAVE SUBMODEL DATA IN FILE SUBMODEL.DB /POST1 /EOF mymacro1_2 !ARG1=x0|x1 => 1|2 !ARG2=filename_coords_stress_to_Scilab_1|2 !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ ! 3-й этап - перенос перемещений с shell на solid !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ /uis,msgpop,3 /nerr,1e6,1e6,,OFF /PBC,all,0 /OUTPUT,%mainname%_screen_out,txt,,APPEND *IF,use_solid,EQ,1,THEN CBDOF,,,,,,,0,,0 ! ACTIVATE CUT BOUNDARY INTERPOLATION *ELSE !CBDOF, Fname1, Ext1, --, Fname2, Ext2, --, KPOS, Clab, KSHS, TOLOUT, TOLHGT, TOLTHK CBDOF,,,,,,,0,,1,1,,1 !shell to solid, displacement only *ENDIF !BFINT, Fname1, Ext1, --, Fname2, Ext2, --, KPOS, Clab, KSHS, TOLOUT, TOLHGT !BFINT,,,,,,,1,,0 !shell to solid !BFINT,,,,,,,0,,1 !температурные нагрузки /OUTPUT FINISH /PREP7 smrt,off /EOF mymacro1_3 !ARG1=x0|x1 => 1|2 !ARG2=filename_coords_stress_to_Scilab_1|2 p0=ARG1 /OUTPUT,%mainname%_screen_out,txt,,APPEND /NOPR /INPUT,,cbdo,,:cb1 ! READ IN INTERPOLATED B.C.'S FROM SUBMODEL.CBDO /GOPR /OUTPUT allsel,all FINISH /SOLU EQSLV,PCG,1E-4 SOLVE FINISH /post1 set,last plnsol,s,eqv /uis,msgpop,0 /DSCALE,ALL,1.0 /EFACET,1 PLNSOL, U,SUM, 0,1.0 *use,mymacro1_5,p0,ARG2 /EOF mymacro1_5 !ARG1=x0|x1 => 1|2 !ARG2=filename_coords_stress_to_Scilab_1|2 !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ ! 4-й этап - скидываем в файл граничные узлы и напряжения в них !№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ *IF,ARG1,EQ,1,THEN parx=x0 *ELSE parx=x1 *ENDIF /post1 *IF,use_solid,EQ,0,THEN seltol,newtolerance nsel,s,loc,x,parx,parx !nsle,r,corner !выделить узлы кроме центральных *ELSE *IF,ARG1,EQ,1,THEN vsel,s,,,2 $ ESLV,S $ eplot asel,s,loc,x,parx aslv,r $ NSLA,S,all ESLN,S $ ESEL,U,TYPE,,3,5 NSLE,S $ nsel,r,loc,x,parx !nsel,s,loc,x,parx *ELSE vsel,s,,,2 $ ESLV,S $ eplot asel,s,loc,x,parx aslv,r $ NSLA,S,all ESLN,S $ ESEL,U,TYPE,,3,5 NSLE,S $ nsel,r,loc,x,parx !nsel,s,loc,x,parx *ENDIF *ENDIF !nsel,s,loc,x,0 !nsle,r,corner !выделить узлы кроме центральных gplot *get,maxnode,node,,num,max !массив под узловые координаты и компоненты напряжений *get,minnode,node,,num,min !массив под узловые координаты и компоненты напряжений *get,numnodes,node,,count !счётчик выделенных узлов *del,nf,,nopr *del,nc,,nopr *del,mymask,,nopr *dim,nc,array,maxnode,3 !узловые координаты *dim,nf,array,maxnode,6 !компоненты сил /OUTPUT,%mainname%_screen_out,txt,,APPEND *dim,mymask,array,maxnode ! *vget,mymask(1),node,1,nsel mx=0 $ my=0 $ mz=0 !*IF,use_solid,EQ,1,THEN *DO,i,minnode,maxnode *IF,mymask(i),EQ,1,THEN nsel,s,,,i *get,locx,NODE,i,LOC,X *get,locy,NODE,i,LOC,Y *get,locz,NODE,i,LOC,Z esln,s ! nforce fsum *get,fx,FSUM,,ITEM,FX *get,fy,FSUM,,ITEM,FY *get,fz,FSUM,,ITEM,FZ *IF,use_solid73,EQ,1,THEN *get,mx,FSUM,,ITEM,MX *get,my,FSUM,,ITEM,MY *get,mz,FSUM,,ITEM,MZ *ENDIF nf(i,1)=fx $ nf(i,2)=fy $ nf(i,3)=fz $ nf(i,4)=mx $ nf(i,5)=my $ nf(i,6)=mz nc(i,1)=locx $ nc(i,2)=locy $ nc(i,3)=locz *ENDIF *ENDDO !*ELSE ! *vmask,mymask(1) $ *vget,nc(1,1),node,1,loc,x ! *vmask,mymask(1) $ *vget,nc(1,2),node,1,loc,y ! *vmask,mymask(1) $ *vget,nc(1,3),node,1,loc,z ! !получим компоненты напряжений ! *vmask,mymask(1) $ *vget,ns(1,1),node,1,s,x ! *vmask,mymask(1) $ *vget,ns(1,2),node,1,s,y ! *vmask,mymask(1) $ *vget,ns(1,3),node,1,s,z ! *vmask,mymask(1) $ *vget,ns(1,4),node,1,s,xy ! *vmask,mymask(1) $ *vget,ns(1,5),node,1,s,yz ! *vmask,mymask(1) $ *vget,ns(1,6),node,1,s,xz !*ENDIF /OUTPUT *del,nc2,,nopr *del,nf2,,nopr *dim,nc2,array,numnodes,3 *dim,nf2,array,numnodes,6 *do,ii,1,3 *vmask,mymask(1) *vfun,nc2(1,ii),COMP,nc(1,ii) !сжимаем файл координат *enddo *do,ii,1,6 *vmask,mymask(1) *vfun,nf2(1,ii),COMP,nf(1,ii) !сжимаем файл компонентов сил *enddo *CREATE,ansuitmp *CFOPEN,ARG2,'txt',' ' *VWRITE,numnodes,ARG1,use_solid73,paths2(1,1),paths2(1,2),numpoints %i %/%i %/%i %/%s%s%/%i %/ *DO,i,1,numnodes p101=nc2(i,1) ! p102=nc2(i,2) ! p103=nc2(i,3) ! p104=nf2(i,1) ! p105=nf2(i,2) ! p106=nf2(i,3) ! p107=nf2(i,4) ! p108=nf2(i,5) ! p109=nf2(i,6) ! *VWRITE,p101,p102,p103,p104,p105,p106,p107,p108,p109 %28.15e %28.15e %28.15e %28.15e %28.15e %28.15e %28.15e %28.15e %28.15e %/ !9-ть значений с 14 знаками после запятой !(9E23.14) *ENDDO *CFCLOS *END /INPUT,ansuitmp /EOF mymacro1_6 !arg1 = 0|1 !arg2 = filename_coords_stress_to_Sc_1|2 !/CLEAR, NOSTART ! CLEAR THE DATABASE finish /FILNAM,SUBMODEL ! DEFINE JOBNAME FOR THE SUBMODEL /PREP7 PARRES,new,test_submodel_params,txt !*ULIB,macroslib,lib /TITLE,%name_sol% allsel,all lsclear,all VCLEAR,all $ aclear,all $ nsel,all $ ndele,all vdele,all $ adele,all $ ldele,all $ kdele,all CWZDELE,3,1,'' *USE,mymacro1_1,ARG1,ARG2 !*USE,mymacro1_1,1,filename_coords_stress_to_Sc_1 RESUME,%name_sol%,db ! RESUME FROM FILE VM142.DB *USE,mymacro1_2,ARG1,ARG2 RESUME ! RESUME SUBMODEL FROM FILE SUBMODEL.DB *USE,mymacro1_3,ARG1,ARG2 /EOF mymacro2_0 !*vread,xyz_data_in(1,1),test4_xyz_data_%ARG1%,txt,,JIK,2,numlines !(E14.2,E14.2) ! ! *do,i,1,numlines ! p0=xyz_data_in(i,1) ! fx%ARG1%_in(i,0)=p0 $ fy%ARG1%_in(i,0)=p0 $ fz%ARG1%_in(i,0)=p0 ! p0=xyz_data_in(i,2) ! fx%ARG1%_in(0,i)=p0 $ fy%ARG1%_in(0,i)=p0 $ fz%ARG1%_in(0,i)=p0 ! *enddo ! ! *vread,fx%ARG1%_in(1,1),test4_fx_data_%ARG1%,txt,,JIK,numlines,numlines ! (E14.2) ! *vread,fy%ARG1%_in(1,1),test4_fy_data_%ARG1%,txt,,JIK,numlines,numlines ! (E14.2) ! *vread,fz%ARG1%_in(1,1),test4_fz_data_%ARG1%,txt,,JIK,numlines,numlines ! (E14.2) *vread,xyz_data_in(1,1),test4_xyz_data_%plnum%,txt,,JIK,2,numlines (E14.2,E14.2) *do,i,1,numlines p0=xyz_data_in(i,1) fx%plnum%_in(i,0)=p0 $ fy%plnum%_in(i,0)=p0 $ fz%plnum%_in(i,0)=p0 p0=xyz_data_in(i,2) fx%plnum%_in(0,i)=p0 $ fy%plnum%_in(0,i)=p0 $ fz%plnum%_in(0,i)=p0 *enddo *vread,fx%plnum%_in(1,1),test4_fx_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,fy%plnum%_in(1,1),test4_fy_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,fz%plnum%_in(1,1),test4_fz_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) /EOF mymacro2_7 !ARG1=plnum !ARG2=test6_xyz_data_1 plnum=ARG1 /INQUIRE,numlines,LINES,%mainname%_xyz_data_%plnum%,txt !чтение созданных файлов *del,xyz_data_in,,nopr *dim,xyz_data_in,array,numlines,2 *dim,fx%plnum%_in,table,numlines,numlines,X,Y,Z *dim,fy%plnum%_in,table,numlines,numlines,X,Y,Z *dim,fz%plnum%_in,table,numlines,numlines,X,Y,Z *IF,use_solid73,EQ,1,THEN *dim,mx%plnum%_in,table,numlines,numlines,X,Y,Z *dim,my%plnum%_in,table,numlines,numlines,X,Y,Z *dim,mz%plnum%_in,table,numlines,numlines,X,Y,Z *ENDIF *use,mymacro2_6,plnum /EOF mymacro2_6 !ARG1 = plnum plnum=ARG1 *vread,xyz_data_in(1,1),%mainname%_xyz_data_%plnum%,txt,,JIK,2,numlines (E14.2,E14.2) *do,i,1,numlines p0=xyz_data_in(i,1) fx%plnum%_in(i,0)=p0 $ fy%plnum%_in(i,0)=p0 $ fz%plnum%_in(i,0)=p0 *IF,use_solid73,EQ,1,THEN mx%plnum%_in(i,0)=p0 $ my%plnum%_in(i,0)=p0 $ mz%plnum%_in(i,0)=p0 *ENDIF p0=xyz_data_in(i,2) fx%plnum%_in(0,i)=p0 $ fy%plnum%_in(0,i)=p0 $ fz%plnum%_in(0,i)=p0 *IF,use_solid73,EQ,1,THEN mx%plnum%_in(0,i)=p0 $ my%plnum%_in(0,i)=p0 $ mz%plnum%_in(0,i)=p0 *ENDIF *enddo *vread,fx%plnum%_in(1,1),%mainname%_fx_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,fy%plnum%_in(1,1),%mainname%_fy_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,fz%plnum%_in(1,1),%mainname%_fz_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *IF,use_solid73,EQ,1,THEN *vread,mx%plnum%_in(1,1),%mainname%_mx_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,my%plnum%_in(1,1),%mainname%_my_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *vread,mz%plnum%_in(1,1),%mainname%_mz_data_%plnum%,txt,,JIK,numlines,numlines (E14.2) *ENDIF /EOF //clc; clear all; clear; //namefile=c:\Users\strom\Documents\praktika_2017_Kazancev\test6_shell_submodel_2_data_ function [x,numnodes,numpoints,numfile,usemoment,namefile,tXYZ,tS]=gettables(path) file1=path;//+'sx.txt' fd1 = mopen(file1,'rb'); x=mgetl(fd1); mclose(fd1); //disp(mgestr(fd1)) numnodes=msscanf(x(1),'%i'); numfile=msscanf(x(2),'%i'); usemoment=msscanf(x(3),'%i'); namefile=msscanf(x(4),'%s'); numpoints=msscanf(x(5),'%i'); // x(6)="" tXYZ=zeros(numnodes,3); tS=zeros(numnodes,6); //+ eqv for i=4:(max(size(x)-2))/2+1 par=msscanf(x(i*2-1),'%e %e %e %e %e %e %e %e %e') ; //disp(par); tXYZ(i-3,:)=par(1:3); tS(i-3,:)=[par(4:9)];//, 1/sqrt(2)*sqrt( (par(4)-par(5))^2+(par(4)-par(6))^2+(par(6)-par(5))^2+6*(par(7)^2+par(8)^2+par(9)^2))] end endfunction disp('# #'); disp('SCILAB HAS STARTED'); disp('# #'); a = sciargs(); path=a(find(a=="-args")+1); //path='c:\Users\strom\Documents\praktika_2017_Kazancev\test6_shell_submodel_2_data_2.txt'; disp('path ='+path); [x,numnodes,numpoints,numfile,usemoment,namefile,tXYZ,tS]=gettables(path); disp('namefile = '+namefile); disp('numfile = '+string(numfile)); disp('Numnodes = '+string(numnodes)); m = numpoints; //200; xx = linspace(min(tXYZ(:,2)),max(tXYZ(:,2)),m); yy = linspace(min(tXYZ(:,3)),max(tXYZ(:,3)),m); [X,Y] = ndgrid(xx,yy); x=X(:,1); dy=(max(tXYZ(:,2))-min(tXYZ(:,2)))/m; dz=(max(tXYZ(:,3))-min(tXYZ(:,3)))/m; dtS=zeros(m,m,9); Force=zeros(m,m,6); //1 xx,x 2 xy,y 3 xz,z //4 yx,x 5 yy,y 6 yz,z //7 zx,x 8 zy,y 9 zz,z min_xyz1=min((tXYZ(:,2))); min_xyz2=min((tXYZ(:,3))); //xyz2=[(-min_xyz1+tXYZ(:,2))/abs(min(xyz1)), (-min_xyz2+tXYZ(:,3))/abs(min(xyz2)), tS(:,curstress)]; //xyz = [xy z]; xyz2=[tXYZ(:,2) tXYZ(:,3) tS(:,1)]; //xyz = [xy z]; tl_coef2 = cshep2d(xyz2*3); dx=1; dz=1; dy=1; //for forces stepenei_svobody=3 if usemoment==1 then stepenei_svobody=stepenei_svobody*2 end for j=1:stepenei_svobody curstress=j xyz=[tXYZ(:,2) tXYZ(:,3) tS(:,curstress)]; //xyz = [xy z]; tl_coef = cshep2d(xyz); Z = eval_cshep2d(X,Y, tl_coef); if j==1 then dtS(:,:,j)=Z*dy*dz; elseif j==4 then // for i=1:m // dtS(:,i,4)=splin(x,Z(:,i),"not_a_knot"); //xy,x // dtS(:,i,2)=splin(x',Z(i,:),"not_a_knot"); //xy,y // end; dtS(:,:,4)=Z*dy*dz; //dtS(:,:,2)=Z*dy*dz; elseif j==6 then // for i=1:m // dtS(:,i,7)=splin(x,Z(:,i),"not_a_knot"); // dtS(:,i,3)=splin(x',Z(i,:),"not_a_knot"); // end; //dtS(:,:,7)=Z*dy*dz; //dtS(:,:,3)=Z*dy*dz; dtS(:,:,6)=Z*dy*dz; elseif j==5 then // for i=1:m // dtS(:,i,8)=splin(x,Z(:,i),"not_a_knot"); // dtS(:,i,6)=splin(x',Z(i,:),"not_a_knot"); // end; //dtS(:,:,8)=Z*dy*dz; //dtS(:,:,6)=Z*dy*dz; dtS(:,:,4)=Z*dy*dz; elseif j==2 then dtS(:,:,5)=Z*dy*dz; elseif j==3 then dtS(:,:,9)=Z*dy*dz; end end //for i=1:9 // subplot(5,2,i);// plot2d(x1,F) // Z=dtS(:,:,i); // mesh(xx,xx,Z); //end //Force(:,:,1)=dtS(:,:,1)+dtS(:,:,3)+dtS(:,:,3); //Force(:,:,2)=dtS(:,:,4)+dtS(:,:,5)+dtS(:,:,6); //Force(:,:,3)=dtS(:,:,7)+dtS(:,:,8)+dtS(:,:,9); for i=1:stepenei_svobody Force(:,:,i)=dtS(:,:,i); end //for i=1:3 // //subplot(2,2,i);// plot2d(x1,F) // Z=Force(:,:,i); // //mesh(xx,yy,Z); //end //path='c:\Users\strom\Documents\praktika_2017_Kazancev\test6_xyz_data_2.txt'; path=namefile+'_xyz_data_'+string(numfile)+'.txt'; //'c:\Users\strom\Documents\praktika_2017_Kazancev\test6_xyz_data_2.txt'; disp('reading from path ='+path); fd = mopen(string(path),'wt'); for i=1:max(size(xx)) mfprintf(fd,'%e,%e\n',xx(i),yy(i)); end; mclose(fd); //path1='c:\Users\strom\Documents\praktika_2017_Kazancev\test6_fx_data_2.txt'; //path2='c:\Users\strom\Documents\praktika_2017_Kazancev\test6_fy_data_2.txt'; //path3='c:\Users\strom\Documents\praktika_2017_Kazancev\test6_fz_data_2.txt'; path=[namefile+'_fx_data_'+string(numfile)+'.txt'; namefile+'_fy_data_'+string(numfile)+'.txt'; namefile+'_fz_data_'+string(numfile)+'.txt'; namefile+'_mx_data_'+string(numfile)+'.txt'; namefile+'_my_data_'+string(numfile)+'.txt'; namefile+'_mz_data_'+string(numfile)+'.txt']; disp('writing to path ='+path); for i=1:6 fd(i) = mopen(string(path(i)),'wt'); end coefficient=-1;//200/0.1/15 //0.1 if numfile==2 then //coefficient=1;//200/0.1/15 //0.1 end for i=1:max(size(xx)) for j=1:max(size(xx)) for k=1:stepenei_svobody mfprintf(fd(k),'%e\n',Force(i,j,k)*coefficient); end; end end; for i=1:6 mclose(fd(i)); end exit //path2='c:\Users\strom\Documents\praktika_2017_Kazancev\test3_shell_submodel_2_data2.txt'; // [x2,numnodes2,tXYZ2]=gettables2(path2) //узел i // plot(tSX);plot(tSY);plot(tSZ); //узел j //path='c:\Users\strom\Documents\praktika_2017_Kazancev\test1_tab1jdata_'; //[tSX,tSY,tSZ]=getStressBEAM189(path); plot(tSX);plot(tSY);plot(tSZ); // nb of interpolation points //xy = grand(n,2,"unf",0,2*%pi); //z = cos(xy(:,1)).*cos(xy(:,2)); //curstress=7 //xyz=[tXYZ(:,2) tXYZ(:,3) tS(:,curstress)]; //xyz = [xy z]; //tl_coef = cshep2d(xyz); // evaluation on a grid //Z = eval_cshep2d(X,Y, tl_coef); //clf() //plot3d(xx,xx,Z);//,flag=[2 6 4]) ///subplot(2,2,4);// plot2d(x1,F) //mesh(xx,yy,Z); //param3d1(tXYZ(:,2),tXYZ(:,3),list(z,-9), flag=[0 0]) //xtitle("Cubic Shepard Interpolation of cos(x)cos(y) with randomly chosen interpolation points") //legends("interpolation points",-9,1) //show_window() ////////F=Z(1,:); //x=X(:,1); //////////J = numderivative(F, x); //////////d = splin(x',F,splin(x', F,"not_a_knot")); //////////J = numderivative(F, x); //////// ////////a = min(tXYZ(:,1)); b = max(tXYZ(:,2)); // interval of interpolation ////////n = 200; // nb of interpolation points ////////m1 = 800; // discretization for evaluation ////////x1 = linspace(a,b,n)'; // abscissae of interpolation points ////////y = F; // ordinates of interpolation points ////////xx = linspace(a,b,m1)'; ////////yk = interp(xx, x1', y, splin(x1',y,"not_a_knot")); ////////yf = interp(xx, x1', y, splin(x1',y,"fast")); ////////ym = interp(xx, x1', y, splin(x1',y,"monotone")); //////// ////////subplot(3,2,2); plot2d(x1,F) ////////subplot(3,2,6); plot2d(xx, [yf ym yk], style=[5 2 3], strf="121") ////////subplot(3,2,4); plot2d(x1,splin(x1',y,"not_a_knot")) Hide