BEGIN{ dls=10 dcs=3 top=5.0 TT=30.0 h=25.0 Ak=1.0e-5 alpha=2.0 beta=1.5 d=TT*(alpha+beta)+top-0.7*alpha*h a1=sqrt(d*d+h*h)-sqrt(d*d-h*h*beta*beta) q1=Ak*a1/(1+beta*beta) y0=sqrt(d*d+h*h)-d xc=((beta*beta*h*h)+sqrt(beta*beta*h*h*(beta*beta*h*h+2*(d+y0/2)*y0)))/2/(d+y0/2) yc=xc/beta s=sqrt((d-xc)*(d-xc)+(h-yc)*(h-yc))+sqrt(xc*xc+yc*yc) a2=s-sqrt(s*s-h*h*(1+beta*beta)) q2=Ak*a2/(1+beta*beta) xmin=-10 xmax=alpha*TT+top+beta*TT+20 ymin=-30 ymax=TT+10 #========================================= # Drawing #========================================= printf "reset\n" printf "set terminal postscript eps enhanced font \"Helvetica\" 20\n" printf "set output \"fig_gpl_casa.eps\"\n" # printf "set size ratio -1\n" # printf "set xrange [%g:%g]\n",xmin,xmax printf "set yrange [%g:%g]\n",ymin,ymax printf "set border 0\n" printf "set xtics 0,0,0\n" printf "set ytics 0,0,0\n" printf "set xtics nomirror\n" printf "set ytics nomirror\n" # #set style arrow 1 size graph 0.02,10 nohead linewidth 1 linetype 5 中心線 #set style arrow 2 size graph 0.02,10 nohead linewidth 1 linetype 1 補助線 #set style arrow 3 size graph 0.02,20 filled heads linewidth 1 linetype 1 両矢印 #set style arrow 4 size graph 0.02,20 filled linewidth 1 linetype 1 片矢印 #set style arrow 5 size graph 0.02,20 filled linewidth 5 linetype 1 太い片矢印 #set style arrow 6 size graph 0.02,20,30 filled linewidth 2 linetype 1 水圧矢印 # printf "set style arrow 1 size graph 0.02,10 nohead linewidth 1 linetype 5\n" printf "set style arrow 2 size graph 0.02,10 nohead linewidth 1 linetype 1\n" printf "set style arrow 3 size graph 0.02,15 heads linewidth 1 linetype 1\n" printf "set style arrow 4 size graph 0.02,15 linewidth 1 linetype 1\n" printf "set style arrow 5 size graph 0.02,15 filled linewidth 5 linetype 1\n" printf "set style arrow 6 size graph 0.02,15,30 filled linewidth 2 linetype 1\n" # printf "set arrow as 3 from %g,%g to %g,%g\n",-5,0,-5,h printf "set label \"h\" at %g,%g center\n",-5-dcs,h/2 # printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top,TT,alpha*TT+top+TT*beta+12,TT printf "set arrow as 3 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta+10,0,alpha*TT+top+TT*beta+10,TT printf "set label \"T\" at %g,%g center\n",alpha*TT+top+TT*beta+10+dcs,TT/2 # printf "set arrow as 2 from %g,%g to %g,%g\n",0,0,0,-2*dls-2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT,TT,alpha*TT,-2*dls-2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top,TT,alpha*TT+top,-2*dls-2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta,0,alpha*TT+top+TT*beta,-2*dls-2 printf "set arrow as 3 from %g,%g to %g,%g\n",0,-2*dls,alpha*TT,-2*dls printf "set arrow as 3 from %g,%g to %g,%g\n",alpha*TT+top,-2*dls,alpha*TT+top+TT*beta,-2*dls printf "set label \"{/Symbol a}T\" at %g,%g center\n",alpha*TT/2,-2*dls-dcs printf "set label \"t\" at %g,%g center\n",alpha*TT+top/2,-2*dls-dcs printf "set label \"{/Symbol b}T\" at %g,%g center\n",alpha*TT+top+TT*beta/2,-2*dls-dcs # printf "set arrow as 2 from %g,%g to %g,%g\n",0.7*alpha*h,h,0.7*alpha*h,-1*dls-2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*h,h,alpha*h,-1*dls-2 printf "set arrow as 3 from %g,%g to %g,%g\n",0,-1*dls,0.7*alpha*h,-1*dls printf "set arrow as 3 from %g,%g to %g,%g\n",0.7*alpha*h,-1*dls,1.0*alpha*h,-1*dls printf "set label \"0.7{/Symbol a}h\" at %g,%g center\n",0.7*alpha*h/2,-1*dls-dcs printf "set label \"0.3{/Symbol a}h\" at %g,%g center\n",0.7*alpha*h+0.3*alpha*h/2,-1*dls-dcs # printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta-xc,0,alpha*TT+top+TT*beta-xc,-1*dls-2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta+y0/2,0,alpha*TT+top+TT*beta+y0/2,-1*dls-2 printf "set arrow as 3 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta-xc,-1*dls,alpha*TT+top+TT*beta,-1*dls printf "set arrow as 4 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta+y0/2+2*dcs,-1*dls,alpha*TT+top+TT*beta+y0/2,-1*dls printf "set arrow as 3 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta-xc,yc,alpha*TT+top+TT*beta-xc,0 printf "set label \"x_c\" at %g,%g center\n",alpha*TT+top+TT*beta-xc/2,-1*dls-dcs printf "set label \"y_0/2\" at %g,%g center\n",alpha*TT+top+TT*beta+y0/2+2*dcs,-1*dls-dcs printf "set label \"y_c\" at %g,%g center\n",alpha*TT+top+TT*beta-xc-dcs,yc/2 # printf "set arrow as 2 from %g,%g to %g,%g\n",0.7*alpha*h,h,0.7*alpha*h,TT+0.5*dls+2 printf "set arrow as 2 from %g,%g to %g,%g\n",alpha*TT+top+TT*beta,0,alpha*TT+top+TT*beta,TT+0.5*dls+2 printf "set arrow as 3 from %g,%g to %g,%g\n",0.7*alpha*h,TT+0.5*dls,alpha*TT+top+TT*beta,TT+0.5*dls printf "set label \"d\" at %g,%g center\n",0.7*alpha*h+d/2,TT+0.5*dls+dcs # sn=1/sqrt(1+beta*beta) cs=beta/sqrt(1+beta*beta) el=dls+2 x=alpha*TT+top+TT*beta-a2*cs y=a2*sn printf "set arrow as 2 from %g,%g to %g,%g\n",x,y,x+el*sn,y+el*cs x=alpha*TT+top+TT*beta y=0 printf "set arrow as 2 from %g,%g to %g,%g\n",x,y,x+el*sn,y+el*cs el=dls x=alpha*TT+top+TT*beta-a2*cs y=a2*sn printf "set arrow as 3 from %g,%g to %g,%g\n",x+el*sn,y+el*cs,x+a2*cs+el*sn,el*cs el=dls+dcs x=alpha*TT+top+TT*beta-a2*cs/2 y=a2*sn/2 printf "set label \"a\" at %g,%g center rotate by %g\n",x+el*sn,y+el*cs,-atan2(1,beta)/3.141592654*180 # sn=1/sqrt(1+alpha*alpha) cs=alpha/sqrt(1+alpha*alpha) x=alpha*TT/3 y=x/alpha el=dcs printf "set label \"1: {/Symbol a}\" at %g,%g center rotate by %g\n",x-el*sn,y+el*cs,atan2(1,alpha)/3.141592654*180 # sn=1/sqrt(1+beta*beta) cs=beta/sqrt(1+beta*beta) x=alpha*TT+top+beta*TT/3 y=TT-TT/3 el=dcs printf "set label \"1: {/Symbol b}\" at %g,%g center rotate by %g\n",x+el*sn,y+el*cs,-atan2(1,beta)/3.141592654*180 # printf "plot \\\n" printf "\"-\" with lines linewidth 3 linetype 1 notitle, \\\n" printf "\"-\" with lines linewidth 3 linetype 1 notitle, \\\n" printf "\"-\" with lines linewidth 3 linetype 1 notitle, \\\n" printf "\"-\" with lines linewidth 3 linetype 2 notitle, \\\n" printf "\"-\" with points pt 6 ps 1.5 notitle, \\\n" printf "\"-\" with points pt 6 ps 1.5 notitle, \\\n" printf "\"-\" with points pt 6 ps 1.5 notitle, \\\n" printf "\"-\" with points pt 7 ps 1.5 notitle\n" # Ground level printf "%g %g\n",xmin,0 printf "%g %g\n",xmax,0 printf "e\n" # Dam body printf "%g %g\n",0,0 printf "%g %g\n",TT*alpha,TT printf "%g %g\n",TT*alpha+top,TT printf "%g %g\n",TT*alpha+top+TT*beta,0 printf "e\n" # Water depth printf "%g %g\n",xmin,h printf "%g %g\n",h*alpha,h printf "e\n" # Basic parabola curve n=100 for(i=0;i<=n;i++){ x=(d+y0/2)/n*i y=sqrt(h*h/(d+y0/2)*x) printf "%g %g\n",alpha*TT+top+TT*beta+y0/2-x,y } printf "e\n" # Point B printf "%g %g\n",0.7*alpha*h,h printf "e\n" # Point A printf "%g %g\n",alpha*TT+top+TT*beta+y0/2,0 printf "e\n" # Point C printf "%g %g\n",alpha*TT+top+TT*beta-xc,yc printf "e\n" # Seepage surface point printf "%g %g\n",alpha*TT+top+TT*beta-a2*beta/sqrt(1+beta*beta),a2/sqrt(1+beta*beta) printf "e\n" printf "quit\n" }