! This program is a test programm to test the workflow of calculating the ! resulting load force from discrete loads and surface loads ! (incl. force application point). ! While programming the feature to calculate the resulting load a test was made ! which analysed the error, when assuming a constant SF instead of a triangular ! SF. It shows a linear relation between the resulting load that depends on ! element size. For a size of 0.2m an error of 3.4% is made. For a size of 0.02m ! the error takes 0.36%. ! While assuming an trapeze-like allocation the error reduces linear to the ! relation of pressure at the start-node and pressure at the end-node. Therefore ! the use of a constant SF for small elements at a force application point at ! the centroid is an appropriate simplification for the calculation of the ! resulting pressure load. ! A further advantage in this case is the possibility to built the calculation- ! tool in an own modular macro. There is no need to connect it directly to the ! code where SF is created, to get the exact pressures (force per length). ! 20.09.2012 11:05:08 !_______________________________________________________________________________ FINISH /CLEAR /UNIT,SI /TITLE,TESTING-ARENA: LOAD-calculations /PREP7 ! Parameters !=================================== length=2 ! beam lenght e_modul=2.1e11 ! e-module pioss=0.3 ! piosson ratio rho=1 ! materials density parts=20 ! number of elements per line gravity=9.81 ! gravity acceleration ! Geometry !=================================== K,1,0,0 ! KPs K,2,length,0 K,3,0,1,0 ! orientiation KP L,1,2 ! LINE ! Elementdata !=================================== ET,10,BEAM188 ! BEAM element SECTYPE,10,BEAM,RECT,rect2 ! rectanguar beam SECDATA,width2,height2,elemh,elemv ! cross section MP, EX, 10, e_modul ! elastic module MP, PRXY, 10, 0.3 ! poisson ratio MP, DENS, 10, rho ! mass density ! MESHING !=================================== LATT,10,,10,,3,,10 LESIZE,ALL,,,parts,1,1 LMESH,ALL FINISH /SOLU ! SOLUTION !=================================== ANTYPE,0 ! analyse type modal NLGEOM,OFF ! linear solution ACEL,,-gravity ! apply gravity acceleration D,1,ALL,0, ! support start F,2,FY,-10000 ! apply Force F,5,FY,-10000 a=10000 ! SF at starting node b=0 ! SF at ending node SFBEAM,ALL,1,PRESS,a,b ! resulting LOAD from F !=================================== NSEL,ALL *GET,nodenum,NODE,,COUNT *DIM,res,ARRAY,nodenum,5 ! FY,LOCx,LOCz,FLOCx,FLOCz *DO,i,1,nodenum *GET,res(i,1),NODE,i,F,FY ! Force at node *IF,res(i,1),NE,0,THEN *GET,res(i,2),NODE,i,LOC,X ! X-loc *GET,res(i,3),NODE,i,LOC,Z ! Z-loc res(i,4)=res(i,1)*res(i,2) ! F*XLOC res(i,5)=res(i,1)*res(i,3) ! F*ZLOC *ENDIF *ENDDO *VSCFUN,FYsum,SUM,res(1,1) ! sum of loads = F_res *VSCFUN,FYsumX,SUM,res(1,4) ! sum of F*XLOC *VSCFUN,FYsumZ,SUM,res(1,5) ! sum of F*XLOC *IF,FYsum,NE,0,THEN Xs=FYsumx/FYsum ! XLOC of F_res Zs=FYsumz/FYsum ! ZLOC of F_res *ELSE Xs=0 ! IF no Loads are applied Zs=0 *ENDIF ! resulting LOAD from SFBEAM !=================================== ESEL,ALL *GET,elemnum,ELEM,,COUNT *DIM,respr,ARRAY,elemnum,14 ! Press,A,LOCx,LOCz,PALOCx,PALOCz *DO,i,1,elemnum *GET,respr(i,1),ELEM,i,PRESS,1 ! Force per Length a *IF,a,NE,0,OR,b,NE,0,THEN *GET,respr(i,2),ELEM,i,LENG ! length of element *IF,a,NE,b,THEN respr(i,1)=0.5*respr(i,2)*(b+a) ! resulting load respr(i,3)=2/3*respr(i,2)*(b+.5*a)/(b+a) ! local force application point *ELSEIF,a,EQ,b,THEN respr(i,1)=respr(i,1)*respr(i,2) respr(i,3)=.5*respr(i,2) *ENDIF *GET,respr(i,4),ELEM,i,NODE,1 ! number of first element node *GET,x1,NODE,respr(i,4),LOC,X ! location of first element node *GET,y1,NODE,respr(i,4),LOC,Y *GET,z1,NODE,respr(i,4),LOC,Z *GET,respr(i,5),ELEM,i,NODE,2 ! number of second element node *GET,x2,NODE,respr(i,5),LOC,X ! location of second element node *GET,y2,NODE,respr(i,5),LOC,Y *GET,z2,NODE,respr(i,5),LOC,Z Vx=x2-x1 ! direction vector of element Vy=y2-y1 Vz=z2-z1 respr(i,6)=x1+Vx*(respr(i,3)/respr(i,2)) ! force application point X respr(i,7)=y1+Vy*(respr(i,3)/respr(i,2)) ! Y respr(i,8)=z1+Vz*(respr(i,3)/respr(i,2)) ! Z !respr(i,9)=acos(Vx/respr(i,2)) ! rotX-ang of element respr(i,10)=acos(Vy/respr(i,2)) ! rotY-ang of element !respr(i,11)=acos(Vz/respr(i,2)) ! rotZ-ang of element respr(i,12)=respr(i,1)*cos(respr(i,10)) ! ForceY respr(i,13)=respr(i,6)*respr(i,12) ! Xs*ForceY respr(i,14)=respr(i,8)*respr(i,12) ! Zy*ForceY *ENDIF *ENDDO *VSCFUN,PYsum,SUM,respr(1,12) *VSCFUN,PYsumX,SUM,respr(1,13) *VSCFUN,PYsumZ,SUM,respr(1,14) PXs=PYsumx/PYsum PZs=PYsumz/PYsum TOTx=(Xs*FYsum+PXs*PYsum)/(FYsum+PYsum) TOTz=(Zs*FYsum+PZs*PYsum)/(FYsum+PYsum) ! resulting LOAD from SFBEAM -TEST !=================================== *DIM,respr1,ARRAY,elemnum,12 ! Press,A,LOCx,LOCz,PALOCx,PALOCz *DO,i,1,elemnum *GET,respr1(i,1),ELEM,i,PRESS,1 ! Force per Length a *IF,respr1(i,1),NE,0,THEN *GET,respr1(i,2),ELEM,i,LENG ! length of element respr1(i,1)=respr1(i,1)*respr1(i,2) ! Force *GET,respr1(i,3),ELEM,i,CENT,X ! force application point *GET,respr1(i,4),ELEM,i,CENT,Y *GET,respr1(i,5),ELEM,i,CENT,Z *GET,respr1(i,6),ELEM,i,NODE,1 ! number of first element node *GET,x1,NODE,respr1(i,6),LOC,X ! location of first element node *GET,y1,NODE,respr1(i,6),LOC,Y *GET,z1,NODE,respr1(i,6),LOC,Z Vx=respr1(i,3)-x1 ! direction vector of element Vy=respr1(i,4)-y1 Vz=respr1(i,5)-z1 respr1(i,7)=acos(Vx/respr1(i,2)) ! rotX-ang of element respr1(i,8)=acos(Vy/respr1(i,2)) ! rotY-ang of element respr1(i,9)=acos(Vz/respr1(i,2)) ! rotZ-ang of element respr1(i,10)=respr1(i,1)*cos(respr1(i,8)) ! ForceY respr1(i,11)=respr1(i,3)*respr1(i,10) ! Xs*ForceY respr1(i,12)=respr1(i,5)*respr1(i,10) ! Zy*ForceY *ENDIF *ENDDO *VSCFUN,PYsum1,SUM,respr1(1,10) *VSCFUN,PYsumX1,SUM,respr1(1,11) *VSCFUN,PYsumZ1,SUM,respr1(1,12) PXs1=PYsumx1/PYsum1 PZs1=PYsumz1/PYsum1 SOLVE FINISH /POST1 ! POSTPROCESSING !=================================== ! colorsetting of Output=> white background ! ->PlotCtrls / Style / Color / Reverse Video /RGB,INDEX,100,100,100, 0 /RGB,INDEX, 80, 80, 80,13 /RGB,INDEX, 60, 60, 60,14 /RGB,INDEX, 0, 0, 0,15 /ESHAPE,1.0 !PLNSOL, u,z, 0, 2 ! display displacement PLNSOL, S, EQV, 0, 1 ! display equivalent stress (MISES)