D:\jknuba_2024_winter\j_MAXIMA_Iam\jh_k123_Rectangle_v4.wxmx
Rectangle

Задача. Визначити силу тиску на плоску прямокутну поверхню шириною B=3 м та висотою H=7 м. На вільній поверхні рідини атмосферний тиск .

(%i1) kill(all);

\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]

(%i5) ro:1000;g:9.81;H:7;B:3;p_m:10000;

\[\]\[\tag{%o1} 1000\]

\[\]\[\tag{%o2} 9.81\]

\[\]\[\tag{%o3} 7\]

\[\]\[\tag{%o4} 3\]

\[\]\[\tag{%o5} 10000\]

(%i10) del1:H/15,numer;del2:H/10,numer;del3:H/7,numer; del4:H/5,numer;del5:H/3,numer;

\[\]\[\tag{%o6} 0.4666666666666667\]

\[\]\[\tag{%o7} 0.7\]

\[\]\[\tag{%o8} 1\]

\[\]\[\tag{%o9} 1.4\]

\[\]\[\tag{%o10} 2.3333333333333335\]

(%i11) dh:H/5,numer;

\[\]\[\tag{%o11} 1.4\]

(%i13) 'integrate((ro·g·(Hh))·B,h,0,H);integrate((ro·g·(Hh))·B,h);

\[\]\[\tag{%o12} 29430.0 \int_{0}^{7}7\mathop{-}h{\, dh}\]

\[\]\[\tag{%o13} 29430.0 \left( 7 h\mathop{-}\frac{{{h}^{2}}}{2}\right) \]

(%i14) pi(h):=9810.0·(Hh);

\[\]\[\tag{%o14} \mathop{pi}(h)\mathop{:=}9810.0 \left( H\mathop{-}h\right) \]

(%i15) P:integrate(ro·g·(Hh)·B,h,0,H);

\[\]\[\tag{%o15} 721035.0\]

(%i16) if P<10 then scale:3 elseif P<100 then scale:20
   elseif P<1000 then scale:200
   elseif P<10000 then scale:2000
   elseif P<100000 then scale:20000
   elseif P<1000000 then scale:200000
   elseif P<10000000 then scale:2000000
   ;

\[\]\[\tag{%o16} 200000\]

(%i18) pi(0);pi(0)/scale;

\[\]\[\tag{%o17} 68670.0\]

\[\]\[\tag{%o18} 0.34335\]

(%i19) 'integrate(ro·g·((Hh)··2)·B,h,0,H);

\[\]\[\tag{%o19} 29430.0 \int_{0}^{7}{{\left( 7\mathop{-}h\right) }^{2}}{\, dh}\]

(%i20) mP:integrate(ro·g·((Hh)··2)·B,h,0,H);

\[\]\[\tag{%o20} 3364830.0\]

(%i22) h_D:mP/P;h_D_:Hh_D;

\[\]\[\tag{%o21} 4.666666666666667\]

\[\]\[\tag{%o22} 2.333333333333333\]

(%i24) x_draw:3·B;y_draw:H+2;

\[\]\[\tag{%o23} 9\]

\[\]\[\tag{%o24} 9\]

(%i26) n: h_D_;mod(n,1);

\[\]\[\tag{%o25} 2.333333333333333\]

\[\]\[\tag{%o26} 0.33333333333333304\]

--> /* make float to string */;
(%i27) if floor(n·100)/100>0 then n:floor(n·100)/100 elseif floor(n·1000)/1000>0 then n:floor(n·1000)/1000;

\[\]\[\tag{%o27} \frac{233}{100}\]

(%i28) n:n,numer;

\[\]\[\tag{%o28} 2.33\]

(%i29) hh:sconcat(n);

\[\]\[\tag{%o29} "2.33"\]

(%i30) hh;

\[\]\[\tag{%o30} "2.33"\]

(%i31) pp:sconcat(P);

\[\]\[\tag{%o31} "721035.0"\]

(%i32) pp;

\[\]\[\tag{%o32} "721035.0"\]

--> /*  p_:printf(false, "~d", n);stringp(pp);p_;n;  */;
--> /*  https://sourceforge.net/p/maxima/mailman/maxima-discuss/thread/34939E59-E2C1-484B-A0CF-C6D70CB9E835@peterpall.de/   */;
(%i33) scale_p:pi(0);

\[\]\[\tag{%o33} 68670.0\]

(%i58) draw2d(xrange = [5,x_draw],
yrange = [0,y_draw+1],
  font      = "Arial",
           font_size = 16,
title="Rectangle",
   xlabel = "B, m",
ylabel = "h,m",
  grid = true,
  proportional_axes=xy,
  line_type = solid,
   color = black,
  fill_color = "#cccccc",
line_width=1,
rectangle([0,0],[B,H]),
  line_width=2,color=blue,
   water:polygon([[3,H],[6,H]]),
/* water:polygon([[0,H],[B,H]]),  */
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
vector([0,H+del4],[B,0]),
  label(["B",B/2,H+del5]),
    points_joined = true,
  points([[0,H],[0,H+del4]]),
  points([[B,H],[B,H+del4]]),
   /*        */
  points([[B,0],[B+del4,0]]),
  points([[B,H],[B+del4,H]]),
  vector([B+del4,0],[0,H]),
   vector([B+del5+del1,0],[0,H]),
  points_joined = false,
  label_orientation = 'vertical,
label(["H",B+del2,H/2]),
   label(["h",B+del5,H/2]),
   /*  p_a  */
   color = black,
  label_orientation = 'horizontal,
  head_both = false,
  line_type = solid,
  head_length = 0.2,
head_angle = 10,
  color = black,
vector([B/2,(H+del3)],[0,del3]),
  label(["p_a",B/20.5+del3,H+del3]),
    /* Epura  
 line_width=1,color=blue,line_type = solid,
 fill_color = lightblue,
poly:polygon([[−1,0],[−1,H],[−pi(0)/scale_p−1,0],[0−1,0]]),
head_length = 0.3,
head_angle = 10,
 color = blue,
 line_width=2,
   head_both = false,
 vector([−pi(dh*0)/scale_p−1,H-5*dh],[pi(dh*0)/scale_p,0]),
 vector([−pi(dh*1)/scale_p−1,H-4*dh],[pi(dh*1)/scale_p,0]),
 vector([−pi(dh*2)/scale_p−1,H-3*dh],[pi(dh*2)/scale_p,0]),
 vector([−pi(dh*3)/scale_p−1,H-2*dh],[pi(dh*3)/scale_p,0]),
 vector([−pi(dh*4)/scale_p−1,H-1*dh],[pi(dh*4)/scale_p,0]),
    transparent = true,
   line_width=1,
   color = black,
   points_joined = true,
   point_size=0.1,
  points([[-2,0],[-1,0],[-1,H+del2]]),
   line_width=2,color=blue,
   water:points([[-2,H],[-1,H]]),
   color = red,
 label(["Px",-1-del4,h_D_+del2]),
 label([hh,-1+del2,h_D_+del1]),
   line_type = solid,
 head_length = 0.3,
head_angle = 15,
 line_width=2,
   point_type = filled_circle,
   point_size=1,
   vector([-1−P/(scale*2),h_D_],[P/(scale*2),0]),
  points([[-1,h_D_]]),
   points([[B/2,h_D_]]),
   label_orientation = 'horizontal,
label(["D",B/2+del1,h_D_]), */
   /*  h_D  
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
    vector([-1+del2,0],[0,h_D_]),
  points_joined = false,
  label_orientation = 'vertical,
label(["h_D_",-del2,h_D_/2]),
   points_joined = true,
   point_size=0.1,
  points([[-1,h_D_],[-1+del3,h_D_]]),  */
   /* copy right  */
   color = "#0e406e",
label_orientation = 'vertical,
label(["www.k123.org.ua ",3·B1,H/2]),
  label(["Kopanytsia Y (c)  2025",3·B0.5,H/2]),
   /*  Results  */
   color = "#0e406e"
/*   rectangle([0,y_draw-del4],[x_draw,y_draw]), */
/*   label_orientation = 'horizontal,
label([hh,x_draw/2,y_draw-del3]),
   label(["h_D [m]",x_draw/2,y_draw-del1/2]),
   label([pp,x_draw-del4,y_draw-del3]),
   label(["P [N]",x_draw-del4,y_draw-del1/2])  */
/*    key = "Force",
xtics_secondary = true,
   ytics_secondary = true,
   xaxis_secondary = true,
   yaxis_secondary = true,
   xlabel_secondary="P[N]",
   ylabel_secondary="p[Pa]",
    yrange_secondary=[-49050.0,2/5*49050.0],
   xrange_secondary=[-P,P] */
)$
Figure 1:
Diagram
Figure 2:D:\j_Iam_TEMP\_jh\jh_k123_Rectangle_v4.svg
Diagram
Fig. 1-2 ------------------------------------------------
(%i50) draw2d(xrange = [5,x_draw],
yrange = [0,y_draw],
  font      = "Arial",
           font_size = 16,
title="Rectangle",
   xlabel = "Presure, Pa",
ylabel = "h,m",
  grid = true,
  proportional_axes=xy,
  line_type = solid,
   color = black,
  fill_color = "#cccccc",
line_width=1,
rectangle([0,0],[B,H]),
  line_width=2,color=blue,
   water:polygon([[3,H],[1,H]]),
water:polygon([[0,H],[B,H]]),
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
vector([0,H+del2],[B,0]),
  label(["B",B/2,H+del3]),
    points_joined = true,
  points([[0,H],[0,H+del2]]),
  points([[B,H],[B,H+del2]]),
  points([[B,0],[B+del4,0]]),
  points([[B,H],[B+del4,H]]),
  vector([B+del4,0],[0,H]),
  points_joined = false,
  label_orientation = 'vertical,
label(["H",B+del2,H/2]),
   /*  p_a  */
   color = black,
  label_orientation = 'horizontal,
  head_both = false,
  line_type = solid,
  head_length = 0.2,
head_angle = 10,
  color = black,
vector([2.5,(H+del3)],[0,del3]),
  label(["p_a",2.50.5+del3,H+del3]),
    /* Epura  */
line_width=1,color=blue,line_type = solid,
fill_color = lightblue,
poly:polygon([[1,0],[1,H],[pi(0)/scale_p1,0],[01,0]]),
head_length = 0.3,
head_angle = 10,
color = blue,
line_width=2,
   head_both = false,
vector([pi(dh·0)/scale_p1,H5·dh],[pi(dh·0)/scale_p,0]),
vector([pi(dh·1)/scale_p1,H4·dh],[pi(dh·1)/scale_p,0]),
vector([pi(dh·2)/scale_p1,H3·dh],[pi(dh·2)/scale_p,0]),
vector([pi(dh·3)/scale_p1,H2·dh],[pi(dh·3)/scale_p,0]),
vector([pi(dh·4)/scale_p1,H1·dh],[pi(dh·4)/scale_p,0]),
    transparent = true,
   line_width=1,
   color = black,
   points_joined = true,
   point_size=0.1,
  points([[2,0],[1,0],[1,H+del2]]),
   line_width=2,color=blue,
   water:points([[2,H],[1,H]]),
   color = red,
label(["Px",1del4,h_D_+del2]),
label([hh,1+del2,h_D_+del1]),
   line_type = solid,
head_length = 0.3,
head_angle = 15,
line_width=2,
   point_type = filled_circle,
   point_size=1,
   vector([1P/(scale·2),h_D_],[P/(scale·2),0]),
  points([[1,h_D_]]),
   points([[B/2,h_D_]]),
   label_orientation = 'horizontal,
label(["D",B/2+del1,h_D_]),
   /*  h_D  */
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
    vector([1+del2,0],[0,h_D_]),
  points_joined = false,
  label_orientation = 'vertical,
label(["h_D_",del2,h_D_/2]),
   points_joined = true,
   point_size=0.1,
  points([[1,h_D_],[1+del3,h_D_]]),
   /* copy right  */
   color = "#0e406e",
label_orientation = 'vertical,
label(["www.k123.org.ua ",3·B1,H/2]),
  label(["Kopanytsia Y (c)  2025",3·B0.5,H/2]),
   /*  Results  */
   color = "#0e406e",
/*   rectangle([0,y_draw-del4],[x_draw,y_draw]), */
  label_orientation = 'horizontal,
label([hh,x_draw/2,y_drawdel3]),
   label(["h_D [m]",x_draw/2,y_drawdel1/2]),
   label([pp,x_drawdel4,y_drawdel3]),
   label(["P [N]",x_drawdel4,y_drawdel1/2])
/*    key = "Force",
xtics_secondary = true,
   ytics_secondary = true,
   xaxis_secondary = true,
   yaxis_secondary = true,
   xlabel_secondary="P[N]",
   ylabel_secondary="p[Pa]",
    yrange_secondary=[-49050.0,2/5*49050.0],
   xrange_secondary=[-P,P] */
)$
--> P;P/scale;

\[\]\[\tag{%o35} 721035.0\]

\[\]\[\tag{%o36} 3.605175\]

Figure 3:
Diagram
Figure 4:D:\j_Iam_TEMP\_jh\jh_k123_Rectangle_v1_1.svg
Diagram
--> H2·dh;H;dh;

\[\]\[\tag{%o35} 2.4\]

\[\]\[\tag{%o36} 4\]

\[\]\[\tag{%o37} 0.8\]

Var 2 (down)
--> 'integrate(ro·g·((Hh)·h)·B,h,0,H);

\[\]\[\tag{%o38} 29430.0 \int \left( 4\mathop{-}h\right) h{\, dh}\]

--> mP_down:integrate(ro·g·((Hh)·h)·B,h,0,H);

\[\]\[\tag{%o39} 313920.0\]

--> h_D_down:mP_down/P;

\[\]\[\tag{%o40} 1.3333333333333333\]

Numerical method K123 (Rectangle)

--> P_sum:0; n:5; dh:H/n;P_sum2:0;

\[\]\[\tag{%o41} 0\]

\[\]\[\tag{%o42} 5\]

\[\]\[\tag{%o43} \frac{4}{5}\]

\[\]\[\tag{%o44} 0\]

--> fP(i):=ro·g·(Hi·dh)·(B·dh);

\[\]\[\tag{%o45} \mathop{fP}(i)\mathop{:=}\ensuremath{\mathrm{ro}} g\, \left( H\mathop{-}i\, \ensuremath{\mathrm{dh}}\right) \, \left( B\, \ensuremath{\mathrm{dh}}\right) \]

--> fP2(i):=ro·g·(H(i·dh+dh/2))·(B·dh);

\[\]\[\tag{%o46} \mathop{fP2}(i)\mathop{:=}\ensuremath{\mathrm{ro}} g\, \left( H\mathop{-}\left( i\, \ensuremath{\mathrm{dh}}\mathop{+}\frac{\ensuremath{\mathrm{dh}}}{2}\right) \right) \, \left( B\, \ensuremath{\mathrm{dh}}\right) \]

--> for i:0 thru n1 step 1 do (Pi:fP(i),P_sum:P_sum+Pi)$
--> for i:0 thru n1 step 1 do (Pi:fP2(i),P_sum2:P_sum2+Pi,Pv[i]:Pi)$
--> P_sum;P_sum2;P;

\[\]\[\tag{%o49} 282528.0\]

\[\]\[\tag{%o50} 235439.99999999997\]

\[\]\[\tag{%o51} 235440.0\]

--> (PP_sum)/(P/100);(PP_sum2)/(P/100);

\[\]\[\tag{%o52} \mathop{-}20.0\]

\[\]\[\tag{%o53} 1.2361463836533173 {{10}^{-14}}\]

--> Pv[4];

\[\]\[\tag{%o54} 9417.6\]

--> scale_p2:scale_p/2;

\[\]\[\tag{%o55} 19620.0\]

--> draw2d(xrange = [5,x_draw],
yrange = [0,y_draw],
  font      = "Arial",
           font_size = 16,
title="Rectangle",
   xlabel = "Presure, Pa",
ylabel = "h,m",
  grid = true,
  proportional_axes=xy,
  line_type = solid,
   color = black,
  fill_color = "#cccccc",
line_width=1,
rectangle([0,0],[B,H]),
  line_width=2,color=blue,
   water:polygon([[3,H],[1,H]]),
water:polygon([[0,H],[B,H]]),
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
vector([0,H+del1],[B,0]),
  label(["B",B/2,H+del3]),
    points_joined = true,
  points([[0,H],[0,H+del2]]),
  points([[B,H],[B,H+del2]]),
  points([[B,0],[B+del4,0]]),
  points([[B,H],[B+del4,H]]),
  vector([B+del4,0],[0,H]),
  points_joined = false,
  label_orientation = 'vertical,
label(["H",B+del2,H/2]),
   /*  p_a  */
   color = black,
  label_orientation = 'horizontal,
  head_both = false,
  line_type = solid,
  head_length = 0.2,
head_angle = 10,
  color = black,
vector([2.5,(H+del3)],[0,del3]),
  label(["p_a",2.50.5+del3,H+del3]),
    /* Epura  */
line_width=1,color=blue,line_type = solid,
fill_color = lightblue,
/* poly:polygon([[−1,0],[−1,H],[−pi(0)/scale_p2−1,0],[0−1,0]]), */
head_length = 0.3,
head_angle = 10,
color = blue,
line_width=1,
   head_both = false,
   rectangle([1,dh·0],[pi(dh·0+dh/2)/scale_p21,dh]),
vector([pi(dh·0+dh/2)/scale_p21,H5·dh+dh/2],[pi(dh·0+dh/2)/scale_p2,0]),
   label(["p_i",pi(dh·0+dh/2del5)/scale_p2,H5·dh+dh/2+del1]),
rectangle([1,dh·1],[pi(dh·1+dh/2)/scale_p21,dh·2]),
vector([pi(dh·1+dh/2)/scale_p21,H4·dh+dh/2],[pi(dh·1+dh/2)/scale_p2,0]),
   label(["p_i",pi(dh·1+dh/2del5)/scale_p2,H4·dh+dh/2+del1]),
rectangle([1,dh·2],[pi(dh·2+dh/2)/scale_p21,dh·3]),
vector([pi(dh·2+dh/2)/scale_p21,H3·dh+dh/2],[pi(dh·2+dh/2)/scale_p2,0]),
   label(["p_i",pi(dh·2+dh/2del5)/scale_p2,H3·dh+dh/2+del1]),
rectangle([1,dh·3],[pi(dh·3+dh/2)/scale_p21,dh·4]),
vector([pi(dh·3+dh/2)/scale_p21,H2·dh+dh/2],[pi(dh·3+dh/2)/scale_p2,0]),
   label(["p_i",pi(dh·3+dh/2del5)/scale_p2,H2·dh+dh/2+del1]),
rectangle([1,dh·4],[pi(dh·4+dh/2)/scale_p21,dh·5]),
vector([pi(dh·4+dh/2)/scale_p21,H1·dh+dh/2],[pi(dh·4+dh/2)/scale_p2,0]),
   label(["p_i",pi(dh·4del5)/scale_p2,H1·dh+dh/2+del1]),
color=black,line_type = dashes,
   transparent = true,
/*  fill_color = lightblue, */
poly:polygon([[1,0],[1,H],[pi(0)/scale_p21,0],[01,0]]),

   transparent = true,
   line_width=1,
   color = black,
   points_joined = true,
   point_size=0.1,
  points([[2,0],[1,0],[1,H+del2]]),
   line_width=2,color=blue,
   water:points([[2,H],[1,H]]),
   color = red,
label(["Px",1del4,h_D_+del2]),
label([hh,1+del2,h_D_+del1]),
   line_type = solid,
head_length = 0.3,
head_angle = 15,
line_width=2,
   point_type = filled_circle,
   point_size=1,
   vector([1P/(scale·2),h_D_],[P/(scale·2),0]),
  points([[1,h_D_]]),
   points([[B/2,h_D_]]),
   label_orientation = 'horizontal,
label(["D",B/2+del1,h_D_]),
   /*  h_D  */
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
    vector([1+del2,0],[0,h_D_]),
   /*  dh   */
    vector([1del1pi(dh·0+dh/2del4)/scale_p2,0],[0,dh]),
   points_joined = true,
   point_size=0.1,
   points([[1del1pi(dh·0+dh/2del5)/scale_p2,dh],
           [1del1pi(dh·0+dh/2del5)/scale_p2+del3,dh]]),
  points_joined = false,
  label_orientation = 'vertical,
   color = red,
label(["h_D_",del2,h_D_/2]),
   color = black,
   label(["dh",1del2pi(dh·0+dh/2del5)/scale_p2,dh/2]),
   points_joined = true,
   point_size=0.1,
  points([[1,h_D_],[1+del3,h_D_]]),
   /* copy right  */
   color = "#0e406e",
label_orientation = 'vertical,
label(["www.k123.org.ua ",3·B1,H/2]),
  label(["Kopanytsia Y (c)  2025",3·B0.5,H/2]),
   /*  Results  */
   color = "#0e406e",
/*   rectangle([0,y_draw-del4],[x_draw,y_draw]), */
  label_orientation = 'horizontal,
label([hh,x_draw/2,y_drawdel3]),
   label(["h_D [m]",x_draw/2,y_drawdel1/2]),
   label([pp,x_drawdel4,y_drawdel3]),
   label(["P [N]",x_drawdel4,y_drawdel1/2])
/*    key = "Force",
xtics_secondary = true,
   ytics_secondary = true,
   xaxis_secondary = true,
   yaxis_secondary = true,
   xlabel_secondary="P[N]",
   ylabel_secondary="p[Pa]",
    yrange_secondary=[-49050.0,2/5*49050.0],
   xrange_secondary=[-P,P] */
)$
Figure 5:
Diagram
Figure 6:D:\j_Iam_TEMP\_jh\jh_k123_Rectangle_v3.svg
Diagram

Задача. Визначити силу тиску на плоску
прямокутну поверхню шириною B=3 м та
висотою H=7 м. На вільній поверхні рідини
атмосферний тиск . Прошарок води h1=1 м.

Rectangle with h1
--> kill(all);

\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]

--> ro:1000;g:9.81;H:7;B:3;p_m:10000;

\[\]\[\tag{%o1} 1000\]

\[\]\[\tag{%o2} 9.81\]

\[\]\[\tag{%o3} 4\]

\[\]\[\tag{%o4} 3\]

\[\]\[\tag{%o5} 10000\]

--> h1:1;

\[\]\[\tag{%o6} 1\]

--> del1:H/15,numer;del2:H/10,numer;del3:H/7,numer; del4:H/5,numer;del5:H/3,numer;

\[\]\[\tag{%o7} 0.26666666666666666\]

\[\]\[\tag{%o8} 0.4\]

\[\]\[\tag{%o9} 0.5714285714285714\]

\[\]\[\tag{%o10} 0.8\]

\[\]\[\tag{%o11} 1.3333333333333333\]

--> dh:H/5,numer;

\[\]\[\tag{%o12} 0.8\]

--> 'integrate((ro·g·(Hh+h1))·B,h,0,H);integrate((ro·g·(Hh+h1))·B,h);

\[\]\[\tag{%o13} 29430.0 \int 5\mathop{-}h{\, dh}\]

\[\]\[\tag{%o14} 29430.0 \left( 5 h\mathop{-}\frac{{{h}^{2}}}{2}\right) \]

--> pi(h):=9810.0·(Hh+h1);

\[\]\[\tag{%o15} \mathop{pi}(h)\mathop{:=}9810.0 \left( H\mathop{-}h\mathop{+}\ensuremath{\mathrm{h1}}\right) \]

--> P_h1:integrate(ro·g·(Hh+h1)·B,h,0,H);

\[\]\[\tag{%o16} 353160.0\]

--> if P_h1<10 then scale:3 elseif P_h1<100 then scale:20
   elseif P_h1<1000 then scale:200
   elseif P_h1<10000 then scale:2000
   elseif P_h1<100000 then scale:20000
   elseif P_h1<1000000 then scale:200000
   elseif P_h1<10000000 then scale:2000000
   ;

\[\]\[\tag{%o17} 200000\]

--> pi(0);pi(0)/scale;pi(h1)/scale;

\[\]\[\tag{%o18} 49050.0\]

\[\]\[\tag{%o19} 0.24525\]

\[\]\[\tag{%o20} 0.1962\]

--> mP_h1:integrate(ro·g·((Hh+h1)··2)·B,h,0,H);

\[\]\[\tag{%o21} 1216440.0\]

--> h_D_h1:mP_h1/P_h1;

\[\]\[\tag{%o22} 3.4444444444444446\]

Rectangle with h1 (down)
--> mP_h1_down:integrate(ro·g·((Hh+h1)·h)·B,h,0,H);

\[\]\[\tag{%o23} 549360.0\]

--> h_D_h1_down:mP_h1_down/P_h1;

\[\]\[\tag{%o24} 1.5555555555555556\]

test rectangle + h1
--> h_D_h1+h_D_h1_down;

\[\]\[\tag{%o25} 5.0\]

--> x_draw:3·B;y_draw:H+h1+2;

\[\]\[\tag{%o26} 9\]

\[\]\[\tag{%o27} 7\]

--> n: h_D_h1_down;mod(n,1);

\[\]\[\tag{%o28} 1.5555555555555556\]

\[\]\[\tag{%o29} 0.5555555555555556\]

--> if floor(n·100)/100>0 then n:floor(n·100)/100 elseif floor(n·1000)/1000>0 then n:floor(n·1000)/1000;

\[\]\[\tag{%o30} \frac{31}{20}\]

--> n:n,numer;

\[\]\[\tag{%o31} 1.55\]

--> hh:sconcat(n);

\[\]\[\tag{%o32} "1.55"\]

--> pp:sconcat(P_h1);

\[\]\[\tag{%o33} "353160.0"\]

--> scale_p:pi(0)/2;scale;

\[\]\[\tag{%o34} 24525.0\]

\[\]\[\tag{%o35} 200000\]

--> draw2d(xrange = [5,x_draw],
yrange = [0,y_draw],
  font      = "Arial",
           font_size = 16,
title="Rectangle",
   xlabel = "Presure, Pa",
ylabel = "h,m",
  grid = true,
  proportional_axes=xy,
  line_type = solid,
   color = black,
  fill_color = "#cccccc",
line_width=2,
rectangle([0,0],[B,H]),
  line_width=2,color=blue,
   water:polygon([[3,H+h1],[1,H+h1]]),
water:polygon([[0,H+h1],[B,H+h1]]),
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
vector([0,H+h1+del1],[B,0]),
  label(["B",B/2,H+h1+del3]),
    points_joined = true,
   point_size=0.1,
  points([[0,H+h1],[0,H+h1+del2]]),
  points([[B,H+h1],[B,H+h1+del2]]),
  points([[B,0],[B+del4,0]]),
  points([[B,H],[B+del4,H]]),
  vector([B+del4,0],[0,H]),
   points([[B,H+h1],[B+del4,H+h1]]),
  vector([B+del4,H],[0,h1]),
   line_width=2,
   points([[0,0],[0,H+del1/2+h1]]),
  points([[B,0],[B,H+del1/2+h1]]),
  points_joined = false,
  label_orientation = 'vertical,
label(["H",B+del2,H/2]),
   label(["h1",B+del2,(H+h1/2)]),
   /*  p_a  */
  color = black,
  label_orientation = 'horizontal,
  head_both = false,
  line_type = solid,
  head_length = 0.2,
head_angle = 10,
  color = black,
vector([2.5,(H+h1+del3)],[0,del3]),
  label(["p_a",2.50.5+del3,H+h1+del3]),
    /* Epura  */
  line_width=1,color=blue,line_type = dashes,
fill_color = white,
poly:polygon([[1,0],[1,H+h1],[pi(0)/scale_p1,0],[01,0]]),
   line_type = solid,
   fill_color = lightblue,
poly:polygon([[1,0],[1,H],[pi(H)/scale_p1,H],[pi(0)/scale_p1,0],[01,0]]),
head_length = 0.3,
head_angle = 10,
color = blue,
line_width=2,
   head_both = false,
vector([pi(dh·0)/scale_p1,H5·dh],[pi(dh·0)/scale_p,0]),
vector([pi(dh·1)/scale_p1,H4·dh],[pi(dh·1)/scale_p,0]),
vector([pi(dh·2)/scale_p1,H3·dh],[pi(dh·2)/scale_p,0]),
vector([pi(dh·3)/scale_p1,H2·dh],[pi(dh·3)/scale_p,0]),
vector([pi(dh·4)/scale_p1,H1·dh],[pi(dh·4)/scale_p,0]),
    transparent = true,
   line_width=2,
   color = black,
   points_joined = true,
   point_size=0.1,
  points([[2,0],[1,0],[1,H+h1+del1/2]]),
   line_width=2,color=blue,
  color = red,
label(["Px",1del4,h_D_h1_down+del2]),
label([hh,1+del2,h_D_h1_down+del1]),
   line_type = solid,
head_length = 0.3,
head_angle = 15,
line_width=2,
   point_type = filled_circle,
   point_size=1,
   vector([1P_h1/(scale·2),h_D_h1_down],[P_h1/(scale·2),0]),
  points([[1,h_D_h1_down]]),
   points([[B/2,h_D_h1_down]]),
   label_orientation = 'horizontal,
label(["D",B/2+del1,h_D_h1_down]),
   /*  h_D_h1_down  */
   color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
    vector([1+del2,0],[0,h_D_h1_down]),
  points_joined = false,
  label_orientation = 'vertical,
label(["h_D_",del2,h_D_h1_down/2]),
   points_joined = true,
   point_size=0.1,
  points([[1,h_D_h1_down],[1+del3,h_D_h1_down]]),
   /* copy right  */
   color = "#0e406e",
label_orientation = 'vertical,
label(["www.k123.org.ua ",3·B1,H/2]),
  label(["Kopanytsia Y (c)  2025",3·B0.5,H/2]),
   /*  Results  */
   color = "#0e406e",
  rectangle([x_draw/3,y_drawdel4],[x_draw,y_draw]),
  label_orientation = 'horizontal,
label([hh,x_draw/2,y_drawdel3]),
   label(["h_D [m]",x_draw/2,y_drawdel1/2]),
   label([pp,x_drawdel4,y_drawdel3]),
   label(["P [N]",x_drawdel4,y_drawdel1/2])
/*    key = "Force",
xtics_secondary = true,
   ytics_secondary = true,
   xaxis_secondary = true,
   yaxis_secondary = true,
   xlabel_secondary="P[N]",
   ylabel_secondary="p[Pa]",
    yrange_secondary=[-49050.0,2/5*49050.0],
   xrange_secondary=[-P,P] */
)$;
Figure 7:
Diagram
Figure 8:D:\j_Iam_TEMP\_jh\jh_k123_Rectangle_v1_2.svg
Diagram

Triangle

-----------Triangle-------------
--> H:7;

\[\]\[\tag{%o37} 4\]

--> fB(h):=(B/H)·(Hh);

\[\]\[\tag{%o38} \mathop{fB}(h)\mathop{:=}\frac{B}{H} \left( H\mathop{-}h\right) \]

--> fB(0);fB(H);

\[\]\[\tag{%o39} 3\]

\[\]\[\tag{%o40} 0\]

--> P_tri:integrate(ro·g·(Hh)·fB(h),h,0,H);

\[\]\[\tag{%o41} 156960.0\]

--> mP_tri:integrate(ro·g·((Hh)··2)·fB(h),h,0,H);

\[\]\[\tag{%o42} 470880.0\]

--> h_D_tri:mP_tri/P_tri;

\[\]\[\tag{%o43} 3.0\]

--> h_D_tri_down:Hh_D_tri;

\[\]\[\tag{%o44} 1.0\]

Trapetion
--> P_trap:integrate(ro·g·(Hh)·fB(h),h,0,H/2);

\[\]\[\tag{%o45} 137340.0\]

--> mP_trap:integrate(ro·g·((Hh)··2)·fB(h),h,0,H/2);

\[\]\[\tag{%o46} 441450.0\]

--> h_D_trap:mP_trap/P_trap;

\[\]\[\tag{%o47} 3.2142857142857144\]

--> mP_trap_down:integrate(ro·g·((Hh)·h)·fB(h),h,0,H/2);

\[\]\[\tag{%o48} 107910.0\]

--> h_D_trap_down:mP_trap_down/P_trap;

\[\]\[\tag{%o49} 0.7857142857142857\]

Circle UP half
--> R:1;

\[\]\[\tag{%o50} 1\]

--> fB_circle(h):=2·sqrt(R··2h··2);

\[\]\[\tag{%o51} \mathop{fB\_ circle}(h)\mathop{:=}2 \sqrt{{{R}^{2}}\mathop{-}{{h}^{2}}}\]

--> fB_circle(0);fB_circle(R);

\[\]\[\tag{%o52} 2\]

\[\]\[\tag{%o53} 0\]

--> P_cir_up:integrate(ro·g·(Rh)·fB_circle(h),h,0,R);

\[\]\[\tag{%o54} 19620.0 \left( \frac{\pi }{4}\mathop{-}\frac{1}{3}\right) \]

--> P_cir_up,numer;

\[\]\[\tag{%o55} 8869.511965857935\]

--> mP_cir_up:integrate(ro·g·((Rh)··2)·fB_circle(h),h,0,R);

\[\]\[\tag{%o56} 19620.0 \left( \frac{5 \pi }{16}\mathop{-}\frac{2}{3}\right) \]

--> h_D_cir_up:mP_cir_up/P_cir_up,numer;

\[\]\[\tag{%o57} 0.6969819738807302\]

test
--> h_c:(10.4244)·R;p:ro·g·h_c;w:(%pi·(R··2))/2;P:p·w,numer;I:0.1098·R··4;

\[\]\[\tag{%o58} 0.5756\]

\[\]\[\tag{%o59} 5646.636\]

\[\]\[\tag{%o60} \frac{\pi }{2}\]

\[\]\[\tag{%o61} 8869.715087547827\]

\[\]\[\tag{%o62} 0.1098\]

--> h_D:h_c+I/(h_c·w),numer;

\[\]\[\tag{%o63} 0.6970399774252266\]


Created with wxMaxima.

The source of this Maxima session can be downloaded here.