// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal // Chapter 3-Hydrostatic Forces on surfaces // Problem 3.3 //Data given in the Problem //depth of gate=d m //width of gate=b m //depth of CG from surface=p m //solution: //Depth of COP from free surface=(I/(A*h_CG))+h_gate //Since I=(b*d^3)/12; //h_COP=(b*d^3/12/b/d/p)+p=d^2/12+p disp("The depth of centre of pressure from free surface is (d^2/12)+p ")