file D:\_j_knuba_2026\jMAXIMA\jh_Job_ex08a_v4.wxmx
TEST OBJECT OF single operations of the K123
Умова. Визначити параметри вектору сили гідростатичного тиску на нахилену під кутом до горизонту прямокутну поверхню із висотою прошарку води H=3м та шириною поверхні B=1м. Прошарок води над верхнью кромкою поверхні h1=3м. Координати нижнюї грані поверхні (x0=2, y0=1), координати верхньої грані (x1=6, y1=3).
Тиск на вільній поверхні рідини атмосферний.
Визначити величини горизонтальної та ветрикальної проекцій вектору сумарної сили гідростатичного тиску. Визначити величину сумарного вектору сили тиску. Побудувати епюру вертикальної проекції сили тиску, показати об'єм тела тиску, розрахувати та позначити координату центру тиску (крапка D, координати (X,Y)).
Figure 1:
Diagram
(%i1) kill(all);

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

(%i1) load("draw")$
(%i2) fileName:"jh_Job_ex08a_v4.wxmx";

\[\]\[\tag{%o2} "jh\_ Job\_ ex08a\_ v4.wxmx"\]

(%i7) x_right:9; label_left:3; label_vert:1.5; label_URL:0.2; delta_x:4;

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

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

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

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

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

(%i15) ro:1000;g:9.81;x0:2;y0:1;x1:x0+delta_x;y1:3;B:1;h1:0;

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

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

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

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

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

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

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

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

(%i18) Hall:y1y0+h1;H:y1y0;Hwater:y1+h1;

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

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

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

VARIANT # 1 (standart)

P_x

(%i20) alpha:atan((y1y0)/(x1x0)),numer;grad:(180/%pi)·alpha,numer;

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

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

(%i23) h_C_x:(HallH/2);w_x:H·B;I:(B·H··3)/12,numer;

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

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

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

(%i24) p_c:ro·g·h_C_x;

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

(%i25) P_x:p_c·w_x;

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

(%i27) h_D_x:h_C_x+(I)/(h_C_x·w_x),numer;h_D_x:Hallh_D_x+y0;

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

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

(%i28) P:P_x/sin(alpha);

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

(%i29) P_z:P_x·(1/tan(alpha));

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

(%i30) Ptest:sqrt(P_x··2+P_z··2);

\[\]\[\tag{%o30} 43871.65371854587\]

test standart
(%i34) H30:(y1y0)/sin(alpha);w30:H30·B;P30:p_c·w30; if (abs(P P30) < 0.1) then display ("OK") else display ("ERROR!");

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

\[\]\[\tag{%o32} 4.47213595499958\]

\[\]\[\tag{%o33} 43871.65371854587 \]\[\mbox{}\\"OK"\mathop{=}"OK"\]

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

size plot2d - x1
(%i35) x1_:x1+x_right;

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

scale
(%i38) scale_L:P_x;scale_P_x:P_x/scale_L;scale_P_z:P_z/scale_L;

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

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

\[\]\[\tag{%o38} 2.0\]

Draw
(%i51) h1;Hall;Hwater;H;x1;h_D_x;h_D;scale_P_x;scale_P_z;scale_P_x;P;P_x;P_z;

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

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

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

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

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

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

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

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

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

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

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

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

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

Coordinate X, Y
(%i53) W1:(((x1x0)·(y1y0))/2)·B;mW1:W1·((1/3)·(x1x0)+x0);

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

\[\]\[\tag{%o53} \frac{40}{3}\]

(%i55) W2:(((x1x0)·h1))·B;mW2:W2·(0.5·(x1x0)+x0);

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

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

(%i56) X:(mW1+mW2)/(W1+W2),numer;

\[\]\[\tag{%o56} 3.3333333333333335\]

(%i58) P1:(((y1y0+h1)/2)·ro·g)·((y1y0+h1)·B);mP1:P1·(((y1y0+h1)·(1/3)));

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

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

(%i60) P2:(((h1)/2)·ro·g)·((h1)·B);mP2:P2·(Hall(2/3·h1));

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

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

(%i62) Y:(mP1mP2)/(P1P2);Y:h_D_x;

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

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

--> /*   X:x0+(x1-x0)/3; Y:h_D_x;  h1:0  */;
--> /* Definition of a block with local variables  */;
(%i63) ds(r) := block([x, n],
   n:100,
x:r·n,
   x:floor(x),
   x:x/100,
return(x)
)$
(%i67) h_C_x:ds(h_C_x),numer; w_x:ds(w_x),numer; I:ds(I),numer;p_c:ds(p_c),numer;

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

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

\[\]\[\tag{%o66} 0.66\]

\[\]\[\tag{%o67} 9810\]

(%i71) P_x:ds(P_x),numer; P_z:ds(P_z),numer; P:ds(P),numer; hi_D_x:ds(h_D_x),numer;

\[\]\[\tag{%o68} 19620\]

\[\]\[\tag{%o69} 39240\]

\[\]\[\tag{%o70} 43871.65\]

\[\]\[\tag{%o71} 1.66\]

(%i72) grad_:ds(grad),numer;

\[\]\[\tag{%o72} 26.56\]

(%i74) X:ds(X),numer; Y:ds(Y),numer;

\[\]\[\tag{%o73} 3.33\]

\[\]\[\tag{%o74} 1.66\]

(%i75) H2:y1+h1+3;

\[\]\[\tag{%o75} 6\]

epura
(%i76) b:(2/Hall)·(Hall0.1·y1);

\[\]\[\tag{%o76} 1.7\]

(%i78) (2/Hall)·(Hall1·y1);y1;

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

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

(%i79) if h1 < 7 then Hall_add:Hall+7 else Hall_add:Hall;

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

(%i83) x1_;Hall;Hall_add;x_left:2;

\[\]\[\tag{%o80} 15\]

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

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

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

(%i84) x1_;

\[\]\[\tag{%o84} 15\]

Draw of the Triangle
(%i85) draw2d(
   xrange = [x_left,x1_], /* size picture  x - x1 & y - H1 */
yrange = [0,Hall_add],
   proportional_axes=xy,
   font      = "Arial",
   font_size = 12,
   grid = true,
   line_width=1,
   color=black,
title = "TEST OBJECT OF single operations of the K123",
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = "#ddddee",
     polygon([[x0,y0],[x1,y1],[x1,Hwater],[x0,Hwater],[x0,y0]]), /* body of presure P_z */
      line_width=10,
      line_type = solid,
   points_joined = true,
   color=black,
   points([[x0,y0],[x0,y1]]), /* VERTICAL reflect of inclined flat surface */
   color=red,
   points([[x0,y0],[x1,y1]]), /* inclined flat surface */
   line_width=1,
   color=green,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
     points([[x0,y0],[x0,y1]]), /* inclined flat surface */
   color=green,
   points([[x0,y0],[x1,y1]]),
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = white,
     polygon([[2,y0],[0,Hall],[0,y0],[2,y0]]),
  line_width=4,
      line_type = solid,
   points_joined = true,
   color=red,
   points([[x0,y0],[x1,y1],[x1,Hwater]]),/* inclined flat surface */
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = white,
     polygon([[2,y0],[0,Hall+y0],[0,y0],[2,y0]]), /* rectangle epura of presure P_x */
   fill_color = gray90,
    line_type = solid,
     polygon([[2,y0],[((2/(Hall))·(h1)),y1],[0,y1],[0,y0],[2,y0]]), /* rectangle epura of presure P_x */
    /* Epura  */
   color = "blue",
   line_width=1,
   line_type = solid,
   head_angle = 10,
   head_length = 0.15,
   vector([(2/Hall)·(Hall0.1·H),0.1·H+y0],[(2/Hall)·(Hall0.1·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.2·H),0.2·H+y0],[(2/Hall)·(Hall0.2·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.3·H),0.3·H+y0],[(2/Hall)·(Hall0.3·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.4·H),0.4·H+y0],[(2/Hall)·(Hall0.4·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.5·H),0.5·H+y0],[(2/Hall)·(Hall0.5·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.6·H),0.6·H+y0],[(2/Hall)·(Hall0.6·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.7·H),0.7·H+y0],[(2/Hall)·(Hall0.7·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.8·H),0.8·H+y0],[(2/Hall)·(Hall0.8·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.9·H),0.9·H+y0],[(2/Hall)·(Hall0.9·H),0]),/* horizontal presure vector p  */
   color = "black",
fill_color = light_blue,
   line_width=2,
   head_angle = 15,
   head_length = 0.25,
   color=red,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  points([[x0,h_D_x]]), /*  point D_{x} on vertical  reflect */
   color=blue,
    label_orientation = horizontal,
label(["P_x",X0.8,Y+0.4]),/* point P_x */
line_width=1,
   line_type = dashes,
   head_angle = 180,
   vector([1,Y],[3·y1,0]), /* horizontal line dot to vector P  */
   color = "blue",
   line_width=3,
   line_type = solid,
   head_angle = 15,
   head_length = 0.25,
   vector([Xscale_P_x,Y],[+scale_P_x,0]), /* horizontal vector P_x  */
   label_orientation = horizontal,
   label_alignment = left,
   /*   Input data   */
   color = "#0e406e",
   label([concat("file:", string(fileName)), x0, Hall_add1.5]),
   label([concat("x0=", string(x0)), x0, Hall_add2]),
   label([concat("y0=", string(y0)), x0, Hall_add2.5]),
   label([concat("x1=", string(x1)), x0, Hall_add3.0]),
   label([concat("y1=", string(y1)), x0, Hall_add3.5]),
   label([concat("alpfa=", string(grad_)), x0, Hall_add4.0]),
   label([concat("h_{1}=: ", string(h1)," m"), x0, Hall_add4.5]),
color = black,
        label([concat("h_{C_{x}}=: ", string(h_C_x)," m"), x1_label_left, y1·2]),
   label([concat("w_{x}=: ", string(w_x)," m"), x1_label_left, y1·1.8]),
   label([concat("p_{c}=: ", string(p_c)," Pa"), x1_label_left, y1·1.6]),
   label([concat("I=: ", string(I)," m"), x1_label_left, y1·1.4]),
    label([concat("h_D_{coord}=: ", string(hi_D_x)," m"), x1_label_left, y1·1.2]),
   label([concat("P_{x}=: ", string(P_x)," N"), x1_label_left, y1·1]),
    label([concat("P_{z}=: ", string(P_z)," N"), x1_label_left, y1·0.8]),
   color=red,
   label([concat("P=: ", string(P)," N"), x1_label_left, y1·0.6]),
   label([concat("X=: ", string(X)," m"), x1_label_left, y1·0.4]),
   label([concat("Y=: ", string(Y)," m"), x1_label_left, y1·0.2]),
  line_type = solid,
  color=black,
   line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
   vector([x1+scale_P_x+0.1,0],[0,h_D_x]),/* h_D_x */
   label_alignment = center,
   label_orientation = vertical,
   font_size = 12,
label([concat("h_{D_{crd}}=: ", string(hi_D_x)," m"), x1+0.7, h_D_x·0.6]),   /* Input data */
line_type = solid,
  color=blue,
   line_width=4,
   head_angle = 180,
  vector([x_left,Hwater],[x1+x_left,0]), /* horizontal line dot to vector P_x  */
   line_width=1,
   line_type = dashes,
   head_angle = 180,
   vector([x0,y1],[x1+x_left,0]), /* horizontal line dot size H  */
   line_type = solid,
  color=black,
   line_width=1,
   line_type = solid,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
   vector([x1+1.5·x_left0.2,y0],[0,H]), /* vertical line size H */
   vector([x1+1.5·x_left0.2,y1],[0,h1]), /* vertical line size h1 */
   vector([x1+2·x_left0.2,y0],[0,Hall]), /* vertical line size Hall */
  label_alignment = center,
   label_orientation = vertical,
   font_size = 10,
label([concat("H=: ", string((y1y0))," m"), x1+1.5·x_left0.5, (y0+(y1y0)/2)]), /* vertical  size H */
   label([concat("h_{1}=: ", string((h1))," m"), x1+1.5·x_left0.5, (y1+(h1)/2)]), /* vertical  size H */
   label([concat("Hall=: ", string(Hall)," m"), x1+2·x_left0.5, Hall·0.6]), /* vertical  size Hall */
line_type = solid,
  color=blue,
   line_width=1,
   line_type = solid,
  head_both = false,
  head_length = 0.2,
  head_angle = 10,
   vector([x0x_left/2,Hwater+0.5],[0,0.4]), /* vector p_a */
   font_size = 12,
  color = "#0e406e",
   label_orientation = horizontal,
label(["p_{a} ", x0x_left/20.4,Hwater+0.5]),
   label(["D_{x} ", x0+0.5,hi_D_x0.2]),
   /* Vector P */
    font_size = 12,
   label_alignment = 'left,
   color = red,
   label([concat("D ( ", string(X),", ",string(Y),") "), X+0.3,Y0.2]),
  color=black,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  points([[X,Y],[x0,y0],[x1,y1]]),
   /* VECTOR P  */
  line_type = solid,
  color=red,
   line_width=3,
   line_type = solid,
  head_both = false,
  head_length = 0.3,
  head_angle = 10,
   vector([Xscale_P_x,Y+scale_P_z],[scale_P_x,scale_P_z]), /* vectorP */
   color = red,
   label_orientation = horizontal,
label(["P ", X1.2,Y+0.9]),
   /*   Vector P_z  */
   color = blue,
   label_orientation = vertical,
   label(["P_{z} ", X0.3,Y+0.8]),
   vector([X,Y+scale_P_z],[0,scale_P_z]), /* vector P_z */
   line_width=1,
   color=black,
    line_type = short_long_dashes,
   points_joined = true,
   polygon([[X,0],[X,Hwater+0.3]]),
   line_type = dots,
   polygon([[x1,0],[x1,y1]]),
  polygon([[Xscale_P_x,y0],[Xscale_P_x,Hall]]),
   polygon([[x0,Y+scale_P_z],[X+0.3,Y+scale_P_z]]),
   polygon([[x1,Hwater],[x1+4,Hwater]]),
   polygon([[x_left,y0],[x1_,y0]]),
   color = red,
   line_width=2,
   ellipse(x0, y0, 0.75, 0.75, 0, grad),
   label_orientation = horizontal,
    label([concat("alpfa= ", string(grad_)), x0+1.1,y0+0.3]),
   font      = "Arial",
   font_size = 12,
  color = "#0e406e",
   label_orientation = horizontal,
label(["www.k123.org.ua ", x1_x_right/2,Hall_addlabel_URL]),
  label(["Kopanytsia Y (c)  2026", x1_x_right/2,Hall_add3·label_URL])
);

\[\]\[\tag{%o85} \]

Figure 2:
Diagram
Figure 3:
Diagram

Created with wxMaxima.

The source of this Maxima session can be downloaded here.