Page 6 - Demo
P. 6


                                    Planar Truss Examplefor ComrelAdd-onRCPConsult, 2023-2025Page 6! Value of vertical deflection in node N04write(buffer,\*\ m'' at ',f5.1,',',f5.1,' font ''Arial,8''')\*ac(8),XY(1,4),XY(2,4)+ac(8)*5.d0callGnuplotPut(nf,trim(buffer)//c_)case(2)!! plot set #2! Set a main subtitle of plotcallGnuplotPut(nf,\*\ [N]' at 12.,8. center font 'Arial,16'\_)! Plot internal member force Ndon=1,nfel1=leng(n)/2.d0! length of rectanglel2=dabs(NN(n))*0.0000005d0! height of rectangleX(1)=l1;X(2)=l1;X(3)=l1;X(4)=l1Y(1)=-l2;Y(2)=-l2;Y(3)=l2;Y(4)=l2rad=theta(n)*PI/180.d0c=dcos(rad)s=dsin(rad)xc=(XY(1,IEN(1,n))+XY(1,IEN(2,n)))/2yc=(XY(2,IEN(1,n))+XY(2,IEN(2,n)))/2doi=1,nbdXYrot(1,i)=X(i)*c-Y(i)*s+xcXYrot(2,i)=X(i)*s+Y(i)*c+ycenddo! Need to be closedXYrot(1,nbd+1)=XYrot(1,1)XYrot(2,nbd+1)=XYrot(2,1)! Color of polygonif(NN(n).gt.0.d0)thenco=\elseco=\endifwrite(buffer,*\ filledcurves linecolor rgb ''',a,''' lw 1 \*\ transparent solid 0.6 border lt 1 notitle')\callGnuplotPlotData(nf,trim(buffer)//c_,*XYrot,ned,nbd+1)write(buffer,\*\ N'' at ',f5.1,',',f5.1,' center font ''Arial,8''')\*NN(n),xc,yccallGnuplotPut(nf,trim(buffer)//c_)enddocase(3)!! plot set #3! Set a main subtitle of plotcallGnuplotPut(nf,\*\ stress stress {/Symbol s}_v [MPa]' at 12.,8. \*\ font 'Arial,16'\_)! Prepare color mapping -take Jet palettecallGnuplotPut(nf,\*\ '#000fff',2 '#0090ff',3 '#0fffee',4 '#90ff70',\*\ '#ffee00',6 '#ff7000',7 '#ee0000',8 '#7f0000')\_)! Find minimal and maximal values of von Mises stressminA=1.d6;maxA=-1.d6don=1,nfevs=dabs(NN(n)/Area(n)*1.d-6)minA=dmin1(minA,vs)maxA=dmax1(maxA,vs)enddoddA=maxA-minA! Prepare colorbar datacallGnuplotPut(nf,\_)write(buffer,\*minA,maxAcallGnuplotPut(nf,trim(buffer)//c_)! Plot of Von Mises for internal memberdon=1,nfeSv=dabs(NN(n)/Area(n)*1.d6)l1=leng(n)/2.d0! length of rectanglel2=Sv/ddA*0.2d0! height of rectangleX(1)=-l1;X(2)=l1;X(3)=l1;X(4)=-l1Y(1)=-l2;Y(2)=-l2;Y(3)=l2;Y(4)=l2rad=theta(n)*PI/180.d0c=dcos(rad)s=dsin(rad)xc=(XY(1,IEN(1,n))+XY(1,IEN(2,n)))/2yc=(XY(2,IEN(1,n))+XY(2,IEN(2,n)))/2doi=1,nbdXYten(1,i)=X(i)*c-Y(i)*s+xcXYten(2,i)=X(i)*s+Y(i)*c+ycXYten(3,i)=Svenddo! Need to be closedXYten(1,nbd+1)=XYten(1,1)XYten(2,nbd+1)=XYten(2,1)XYten(3,nbd+1)=XYten(3,1)callGnuplotPlotData(nf,\*\ transparent solid 0.6 lt palette notitle\_,*XYten,ned+1,nbd+1)write(buffer,\*\'' at ',f5.1,',',f5.1,' center font ''Arial,8''')\*int(Sv+0.1),xc,yccallGnuplotPut(nf,trim(buffer)//c_)enddoendselect! Plot values of input datawrite(buffer,\*\'' at 22.,5.5 font ''Arial,10''')\A1callGnuplotPut(nf,trim(buffer)//c_)write(buffer,\*\'' at 22.,5.2 font ''Arial,10''')\A2callGnuplotPut(nf,trim(buffer)//c_)write(buffer,\*\'' at 22.,4.9 font ''Arial,10''')\E1callGnuplotPut(nf,trim(buffer)//c_)write(buffer,\
                                
   1   2   3   4   5   6   7   8   9   10