Impact process of a lunar landerBeijing Institute of Technology | Ming-Jian Li
The following APDL code is a companion code for the course on Artificial Intelligence and Simulation Science. Its function is to calculate the process of impact energy absorption between the honeycomb structure on the underside of a lunar lander and the lunar surface using the finite element method, utilizing a geometric source file websurf.igs (click to download). The following code needs to be executed in ANSYS, APDL is the parameteric language of ANSYS.
x
2421fini2/clear3/FILNAME,moonlander,1 4! by Ming-Jian Li 5/units,SI6/dscale,1,1.0 7! input geometric model8/AUX15 9IOPTN,IGES,SMOOTH 10IOPTN,MERGE,NO 11IOPTN,SOLID,NO 12IOPTN,SMALL,NO 13IOPTN,GTOLER,FILE 14IGESIN,'websurf','igs',' ' 15/PREP7 16hct=1 ! honeycomb thickness17rdt=0.05 ! rigid disk thickness18tch=3 ! truncated cone height19tcbr=1.98 ! truncated cone bottom radius20tctr=1.5 ! truncated cone top radius21tct=0.01 ! truncated cone shell thickness22asoil=5 !soil dims23bsoil=5 24tsoil=0.5 25gap=0.1 !gap between soil and structure 26hcsz=0.1 !mesh size27hctn=10 !mesh div28tol=1e-6 29hcex=0.3e6 !Young's modulus30hcmuxy=0.01 !Poisson's raio31hcdens=270 !eff density32soilsz=0.2 !mesh size33vz=-1 !velocity34! element35et,1,solid16436et,2,shell16337! mat1 honeycomb38MP,DENS,1,300 39MP,EX,1,0.3e640MP,NUXY,1,0.01 41TB,PLAW,1,,,1, 42TBDAT,1,1e4 43TBDAT,2,0.1e6 44TBDAT,3,45TBDAT,4,40 46TBDAT,5,5 47TBDAT,6,0.5 48TBDAT,7,49! mat2 shell50edmp,rigid,2,0,051mp,ex,2,2e552mp,prxy,2,0.353mp,dens,2,3770054R,1 55RMODIF,1,1, , ,tct ! shell thickness56! mat3 soil57mp,ex,3,12E658mp,prxy,3,0.359mp,dens,3,160060! mat4 rigid disk61edmp,rigid,4,0,062mp,ex,4,2e563mp,prxy,4,0.364mp,dens,4,2770065! mat5 rigid ground66edmp,rigid,5,7,767mp,ex,5,12E668mp,prxy,5,0.369mp,dens,5,160070! change mm into m71arscale,all, , ,0.001,0.001,0.001, ,1,172! move upward73agen,2,all, , ,0,0,hct, , 0,174! merge lines75numcmp,kp76numcmp,line77lcomb,1,278lcomb,3,479lcomb,6,780lcomb,11,1281lcomb,13,1482lcomb,16,1783lcomb,19,2084lcomb,22,2385lcomb,24,2586lcomb,30,3187lcomb,32,3388lcomb,35,3689lcomb,38,3990lcomb,41,4291lcomb,43,4492lcomb,48,4993numcmp,all94! add the rest of the surf95*get,lmx,line,,count96*get,amx,area,,count97l,15,1798al,15,16,lmx+199l,11,14100al,11,12,13,lmx+2101l,6,10102al,6,7,8,9,lmx+3103l,4,5104al,4,lmx+4105l,21,23106al,21,22,lmx+5107l,24,27108al,24,25,26,lmx+6109l,28,32110al,28,29,30,31,lmx+7111l,33,34112al,33,lmx+8113*get,kmx,kp,,count114k,kmx+1,0,0,hct115l,kmx+1,1116l,kmx+1,3117al,lmx+9,lmx+10,1,2118alls119! extrude honey comb & rigid disk120alls121lesize,all,hcsz122lesize,lmx+9,,,2123lesize,lmx+10,,,2124vext,1,,,0,0,-hct125vext,1,10,,0,0,rdt126lsel,s,loc,z,-tol,hct-tol127lesize,all,,,hctn128lsel,s,loc,z,hct+tol,hct+rdt-tol129lesize,all,,,1130! honeycomb & rigid disk mesh131alls132vsel,s,,,1133vatt,1,,1134vsweep,all135vsel,s,,,2,11136vatt,4,,1137vsweep,all138! truncated cone139alls140*get,kmx,kp,,count141*get,lmx,line,,count142lgen,2,18,19, ,0,0,tch, , 1,0143lsscale,lmx+1,lmx+2,,tctr/tcbr,tctr/tcbr,0,,1,1144k,kmx+4,0,0,hct+tch145l,kmx+1,kmx+4146l,kmx+3,kmx+4147al,lmx+1,lmx+2,lmx+4,lmx+3148rdis=0.2149lgen,2,18,19, ,0,0,tch*rdis, , 1,0150ratio=tctr/tcbr+(1-tctr/tcbr)*(1-rdis)151lsscale,lmx+5,lmx+6,,ratio,ratio,0,,1,1152rdis=0.4153lgen,2,18,19, ,0,0,tch*rdis, , 1,0154ratio=tctr/tcbr+(1-tctr/tcbr)*(1-rdis)155lsscale,lmx+7,lmx+8,,ratio,ratio,0,,1,1156l,kmx+5,87157l,kmx+6,88158l,kmx+7,89159l,kmx+5,kmx+8160l,kmx+6,kmx+9161l,kmx+7,kmx+10162l,kmx+1,kmx+8163l,kmx+2,kmx+9164l,kmx+3,kmx+10165al,130,lmx+9,lmx+5,lmx+10166al,131,lmx+10,lmx+6,lmx+11167al,lmx+5,lmx+12,lmx+7,lmx+13168al,lmx+6,lmx+13,lmx+8,lmx+14169al,lmx+7,lmx+15,lmx+1,lmx+16170al,lmx+8,lmx+16,lmx+2,lmx+17171! truncated cone mesh size172lsel,s,loc,z,hct+rdt+tol,hct+tch-tol173lesize,all,,,3174alls175lesize,lmx+5,,,4,,1176lesize,lmx+6,,,4,,1177lesize,lmx+7,,,2,,1178lesize,lmx+8,,,2,,1179lesize,lmx+1,,,2,,1180lesize,lmx+2,,,2,,1181lesize,lmx+3,,,3,,1182lesize,lmx+4,,,3,,1183! truncated cone rigid shell mesh184asel,s,loc,z,hct+rdt+tol,hct+tch+tol185aatt,2,1,2186amesh,all187! complete whole model188alls189csys,1190vgen,12,all, , ,0,30,0, , 0,0191asel,s,loc,z,hct+rdt+tol,hct+tch+tol192agen,12,all, , ,0,30,0, , 0,0193csys,0194! moon soil195alls196block,-asoil/2,asoil/2,-bsoil/2,bsoil/2,-gap,-gap-tsoil197*get,vmax,volu,,count198vsel,s,,,vmax199vatt,3,,1200allsel,below,volu201lesize,all,soilsz202vmesh,all203alls204! merge nodes205alls206nummrg,node,1e-9207alls208*get,nodnum,node,,count209*get,enum,elem,,count210!create parts211!part 1 honeycomb,2 rigid disk, 3 rigid truncated cone ,4 soil212edpart,create, 213! merge rigid bodies214edcrb,add,,2,3,215! contact216nsel,s,loc,z,-tol,tol217cm,body,node218nsel,s,loc,z,-gap-tol,-gap+tol219cm,ground,node220alls221edcgen,ESTS,1,4,222edcontact,10,0,2,0,1,1,1,4,0223nsel,s,loc,z,-tol,hct+tch+tol224cm,vehicle,node225edve,velo,vehicle,0,0,vz226*dim,time,array,2,1227*dim,accz,array,2,1228accz(1)=9.8/6229accz(2)=9.8/6230time(1)=0231time(2)=100232edload,add,ACLZ,,vehicle,time,accz,0 233/sol234nsel,s,loc,z,-gap-tsoil-tol,-gap-tsoil+tol235d,all,ux,0236d,all,uy,0237d,all,uz,0238alls239time,0.5240solveThe result is as follows.
